Table of Contents for
Graphics and Multimedia for the Web with Adobe Creative Cloud: Navigating the Adobe Software Landscape

Version ebook / Retour

Cover image for bash Cookbook, 2nd Edition Graphics and Multimedia for the Web with Adobe Creative Cloud: Navigating the Adobe Software Landscape by Jennifer Harder Published by Apress, 2018
  1. Navigation
  2. Cover
  3. Front Matter
  4. Part I. Welcome to the Adobe Creative Cloud. Where Should You Begin?
  5. 1. Entering the Software Maze or Labyrinth
  6. Part II. Working with Photoshop to Create Web Graphics and Animations
  7. 2. Getting Started
  8. 3. Color Choices: CMYK, RGB, Grayscale, and Index
  9. 4. Saving or Exporting Your Files for the Web
  10. 5. Actions to Speed up File Conversion and Slicing Tools
  11. 6. Tools for Animation
  12. 7. Tools for Video
  13. 8. Other Miscellaneous Items in Photoshop That You Can Use for Web Design
  14. 9. Putting It into Practice with Photoshop CC
  15. Part III. Working with Illustrator to Create Web Graphics
  16. 10. Getting Started with Illustrator CC
  17. 11. Color Choices: CMYK, RGB, and Grayscale
  18. 12. Saving or Exporting Your Files for the Web
  19. 13. Actions to Speed up File Conversion and Slicing Tools
  20. 14. Tools for Animation and Video
  21. 15. Other Miscellaneous Items in Illustrator That You Can Use for Web Design
  22. 16. Putting It into Practice with Illustrator CC
  23. Part IV. Working with Animate to Create Animations, Movies, and HTML5 Canvas
  24. 17. Getting Started with Animate CC
  25. 18. Color Choices: RGB
  26. 19. Importing Your Artwork
  27. 20. Import Your Audio and Video
  28. 21. Working with the Timeline Panel
  29. 22. Exporting Your Files to the Web
  30. 23. Other Miscellaneous Items in Animate that You Can Use for Web Design
  31. 24. Putting It into Practice with Animate CC
  32. Part V. Working with Media Encoder to Create Audio and Video Files
  33. 25. Getting Started with Media Encoder
  34. 26. Working with Your RAW Video Files (AVI and MOV)
  35. 27. Working with Your RAW Video Files and Converting Them to Audio
  36. 28. Working with Your RAW Video Files and Converting Them to an Image Sequence
  37. 29. Putting It into Practice with Media Encoder CC
  38. Part VI. Working with Dreamweaver: Adding Images, Animations, and Multimedia to HTML5 Pages
  39. 30. Getting Started with Dreamweaver CC
  40. 31. Working with Images and Tags
  41. 32. Working with CSS
  42. 33. Working with Images for Mobile Web Design
  43. 34. What Is JavaScript?
  44. 35. Working with Bootstrap, Templates, Library Items, and the Assets Panel
  45. 36. Working with Video, Audio, and Animations
  46. 37. Additional Options to Apply Images in Dreamweaver
  47. 38. Final Testing, Getting Ready to Upload Your Site
  48. 39. Putting It into Practice with Dreamweaver CC
  49. Part VII. Further Dreamweaver Integration with Other Adobe Products for Websites
  50. 40. What Other Programs That Are Part of Adobe Creative Cloud Can I Use to Display My Graphics or Multimedia Online?
  51. Back Matter
© Jennifer Harder 2018
Jennifer HarderGraphics and Multimedia for the Web with Adobe Creative Cloudhttps://doi.org/10.1007/978-1-4842-3823-3_39

39. Putting It into Practice with Dreamweaver CC

Jennifer Harder1 
(1)
Delta, BC, Canada
 

In this chapter, you review three parts of the Hot Glass Tango website. First, you review how to insert images. You then look at how an image gallery carousel is added using Bootstrap. Finally, you look at a unique way of using JavaScript in which you can change which video is currently displayed in the <video> tag.

Note

This chapter does have any actual projects that you can review; however, you can copy the HTML files in the Part 6 folder called chapter_39_html_practice into the glass_tango_site folder. The completed files are already in this folder. Use them to practice opening and viewing for this lesson. They are at https://github.com/Apress/graphics-multimedia-web-adobe-creative-cloud .

So far in Chapters 9, 16, 24, and 29 you Put into Practice what you learned in four Adobe Programs. Throughout Part 6, you’ve seen how Dreamweaver can integrate images into a site and the site with the help of a Bootstrap Library and a Template can be Mobile friendly and responsive for more than one sized device. Let’s take a moment to look more in depth look at a few key pages on the website in regards to the upcoming projects.

Adding Images to Web Pages Review

This section is more of a review of inserting images than an actual project; however, as you review the Hot Glass Tango howtomake.html webpage, take the time to explore how the colorful graphics were added to the page and review past chapters to compare. If you want to practice adding images to this page, use the howtomake_practice39.html file copy add it to the glass tango site folder and look for the HTML comment lines in Table 39-1.
Table 39-1

Insert These Images

Code Line

HTML Comment

Image

Alt/ Title Tag

95

<!--Insert DomeImage1-->

dome_1.gif

Glass Half Dome

96

<!--Insert DomeImage2-->

dome_2.gif

Scrapbooking paper

97

<!--Insert DomeImage3-->

dome_3.gif

Cutting paper for the dome

98

<!--Insert DomeImage4-->

dome_4.gif

Gluing an image onto the backing paper

99

<!--Insert DomeImage5-->

dome_5.gif

The composite image and the dome

100

<!--Insert DomeImage6-->

dome_6.gif

Spreading Diamond Glaze on bottom of dome

101

<!--Insert DomeImage7-->

dome_7.gif

Holding the dome down to allow it to dry

102

<!--Insert DomeImage8-->

dome_8.gif

Drying time and using nail polish remover for clean up

103

<!--Insert DomeImage9-->

dome_9.gif

Trim paper around the dome

104

<!--Insert DomeImage10-->

dome_10.gif

Nail polish remover final clean up

105

<!--Insert DomeImage11-->

dome_11.gif

Gluing velour paper to back of paperweight

106

<!--Insert DomeImage12-->

dome_12.gif

Cut away excess velour paper

108

<!--Insert Half DomeImageJPG-->

halfdoome_image.jpg

Side view of half dome paperweight

Use the Insert panel to practice adding images. When you highlight a comment, refer to the table. Afterward, you can delete the comment. Make sure to add an img-responsive class to each one, either in Code view or by using the Properties panel, like so:
<img class="img-responsive" src="images/dome_1.gif" width="195" height="138" alt="Glass Half Dome"/>

Also use the table to reference the text for your alt attributes that you need to add for each image.

If you get stuck, refer to the original howtomake.html file.

In Chapter 31, I discussed how to add an image to a webpage using the <img> tag and the Insert and Properties panels, or via Insert ➤ Image from the main menu. Refer to that chapter while reviewing howtomake.html. As a review, the following images can be added to a webpage using this method.
  • JPEG

  • GIF (Static and Animated)

  • PNG

  • SVG

Remember that while you can add an SVG file using this insert method, any form of interactivity will be lost; refer to contact.html. The best way to deal with this issue is to insert the SVG within an <object> tag, as seen on the contact.html and colorsglass.html pages. The object tag was used when you uncompressed your OAM file and extracted the HTML5 Canvas file into the image assets folder on the index.html page, as seen in Chapter 36.

As seen in the howtomake.html file at the bottom of the page, if you want to add a figure caption to your image, you need to wrap the <img> in a figure tag, as seen in Chapter 31 when you looked at sematic elements.

All these image formats can be added as backgrounds to the <div> tag or semantic element using external CSS, as in Chapter 32, using the background property, Code view and the CSS Designer panel.

The following are tips to remember while viewing this page.
  • Some formats have better quality and respond better to compression and expansion.

  • Background images should add interest and beauty to the site, as in the broken glass colors in the template-based page; however, they should not detract from the readability of the text. Remember to keep this in mind when dealing with viewers who experience color blindness.

  • Using CSS effects such as opacity or RGBA to overlay an image can sometimes blur the image and make it easier for the viewer to read the text.

  • When creating with media queries, keep in mind that complex graphics may be too processor intensive for some devices, so at that point, you may need to switch to a lower resolution graphic or just use a colored background.

  • If adding CSS for print, decide which graphics you think your viewers should print and which ones should be excluded.

Now that you have reviewed the how to make and contact pages, try applying some of these tips to your own project. For now, let’s move on to the second project.

Carousel Gallery (Bootstrap)

Let’s look at the gallery.html webpage. If you would like to insert the gallery, use the gallery_practice39.html file copy it to the glass tango site folder and look for the <!--Insert Bootstrap Carousel Gallery Here--> HTML comment, so that you know where the gallery should go on the page. If you get stuck at any point, refer to the completed gallery.html file. After I designed my mobile-friendly responsive site in Chapter 35, I found a location that I wanted to add the carousel(sideshow component for images) using the Insert panel. Refer to Figure 39-1.
../images/466782_1_En_39_Chapter/466782_1_En_39_Fig1_HTML.jpg
Figure 39-1

Adding a carousel gallery to a website

With or without a Bootstrap website, you can add a carousel to your project; just keep in mind that you may have to adjust the CSS for your project so that the colors and layout fit your theme. I always work on a blank page to test the layout before I insert it into a template-based page. Create a blank HTML page if you want to practice. Refer to Figure 39-2.
../images/466782_1_En_39_Chapter/466782_1_En_39_Fig2_HTML.jpg
Figure 39-2

The Bootstrap component

This type of gallery can have at between three and twenty images in it. Based on the layout, more than twenty would be too difficult to maintain, and less than three does not add visual interest to the viewer. Just make sure to work with it in Live view so that you can see the results.

The following JavaScript and CSS are added to your site folder. In this case, it was already added; however, if these files are already in your folders from other components, only the additional items will be added. Refer to Figure 39-3.
../images/466782_1_En_39_Chapter/466782_1_En_39_Fig3_HTML.jpg
Figure 39-3

Bootstrap and jQuery files may be added as links to your file

When you File ➤ Save the blank HTML file in your root folder, you are asked if you want to copy the dependent files seen in Figure 39-4.
../images/466782_1_En_39_Chapter/466782_1_En_39_Fig4_HTML.jpg
Figure 39-4

Copy Dependent Files

In this case, they are already present.

Besides the JavaScript and CSS, you also have a temporary placeholder image added to your image folder. You can replace this in the links with your actual images.

The inserted carousel code looks something like this for version 4.0.0. in the <body>:
<div id="carouselExampleIndicators1" class="carousel slide" data-ride="carousel" style="background-color: grey">
        <ol class="carousel-indicators">
            <li data-target="#carouselExampleIndicators1" data-slide-to="0" class="active"></li>
            <li data-target="#carouselExampleIndicators1" data-slide-to="1"></li>
            <li data-target="#carouselExampleIndicators1" data-slide-to="2"></li>
        </ol>
        <div class="carousel-inner" role="listbox">
            <div class="carousel-item active"> <img class="d-block mx-auto" src="images/Carousel_Placeholder.png" alt="First slide">
                <div class="carousel-caption">
                    <h5>First slide Heading</h5>
                    <p>First slide Caption</p>
                </div>
            </div>
            <div class="carousel-item"> <img class="d-block mx-auto" src="images/Carousel_Placeholder.png" alt="Second slide">
                <div class="carousel-caption">
                    <h5>Second slide Heading</h5>
                    <p>Second slide Caption</p>
                </div>
            </div>
            <div class="carousel-item"> <img class="d-block mx-auto" src="images/Carousel_Placeholder.png" alt="Third slide">
                <div class="carousel-caption">
                    <h5>Third slide Heading</h5>
                    <p>Third slide Caption</p>
                </div>
            </div>
        </div>
            <a class="carousel-control-prev" href="#carouselExampleIndicators1" role="button" data-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="carousel-control-next" href="#carouselExampleIndicators1" role="button" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div>
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap-4.0.0.js"></script>
See that the JavaScript is added to the bottom of the carousel, but the CSS remains in the head. Always keep this order if you want the carousel to run correctly. Figure 39-5 shows what the default looks like.
../images/466782_1_En_39_Chapter/466782_1_En_39_Fig5_HTML.jpg
Figure 39-5

The default carousel

Now all you need to do is find the first instance of the placeholder image and alter the image link, alt tag, heading <h5>, and caption <p>. See the areas that I highlighted in bold in the code example below.
<div class="carousel-item active"> <img class="d-block mx-auto" src="images/Carousel_Placeholder.png" alt="First slide">
    <div class="carousel-caption">
        <h5>First slide Heading</h5>
        <p>First slide Caption</p>
    </div>
I did this for each of the three images. Also, I added at least eight more images. Refer to gallery.html if you need to see the completed code. To do this, I made sure to copy in order the following text. Note that the carousel always starts at 0 as the first image, and moves to 1, which is the second image, and 2 is the third image. This relates to arrays in JavaScript. Never start the data-slide-to numbering of a Bootstrap carousel at 1 because this causes it to function incorrectly. JavaScript code expects the array to start at 0 because it is zero-based and this the first number it indexes. So, the fourth image is number 3 as seen in the following code.
<li data-target="#carouselExampleIndicators1" data-slide-to="3"></li>
And image 11 would be
<li data-target="#carouselExampleIndicators1" data-slide-to="10"></li>
Then I would add another div, such as
<div class="carousel-item"> <img class="d-block mx-auto" src="images/Carousel_Placeholder.png" alt="Fourth slide">
    <div class="carousel-caption">
        <h5>Fourth slide Heading</h5>
        <p>Fourth slide Caption</p>
    </div>
</div>

To keep organized, I often use the words fourth or slide 4 (whatever slide it is) as part of the alt tag so that I don’t get confused. This type of gallery is best with no more than 20 images. If you need a gallery with more images, I recommend checking out other Bootstrap options on the W3Schools website or the Bootstrap website. If you are concerned about accessibility standards, nested carousels do not always accurately support this. Nevertheless, they are responsive on your site, and each image should contain an alt attribute.

I also did some modifications to the bootstrap-4.0.0.css file. It was locked, as you saw in Chapter 35, so I made a copy called bootstrap-4.0.0_jh.css. I altered the background and I made my slide buttons more visible and easier to touch with the mouse. I made the text easier to read over top of the photos. To do this, I located that area of the CSS in my new copy of the Bootstrap file. I then searched for the classes in the text (Find ➤ Find in Current document) that matched the classes that are in the tags or elements of the carousel. The following are some classes or class collections to search within my copy of the bootstrap-4.0.0_jh.css file. In my file, it starts at line 5857 and ends 6057.
  • carousel slide background-gallery

  • carousel-indicators

  • carousel-inner

  • carousel-item active

  • carousel-caption

  • carousel-item

  • carousel-caption

  • d-block mx-auto

  • carousel-control-prev

  • carousel-control-prev-icon

  • carousel-control-next

  • carousel-control-next-icon

If you want to compare any changes in my CSS the original Bootstrap file, when you double-click the file bootstrap-4.0.0_jh.css file to style the CSS. I made minor edits to color properties to match my theme in the Files panel. To keep it locked choose only view to enter it. Refer to Figure 39-6.
../images/466782_1_En_39_Chapter/466782_1_En_39_Fig6_HTML.jpg
Figure 39-6

When you enter the locked CSS file, you see this message

If you compare the code, you see that I made very few changes to those lines. Though in other areas of my bootstrap, I made minor edits as well.

Likewise, I further overwrote some of the CSS in my gallery using my own external CSS file, called main_mobile.css; you can see these changes in line 81 of that file. I altered things like text shadow so that the lettering stood out better against the graphics; font size so that the lettering was easier to read; and the border of the <li> indicators circles so that they stood out too. This is to show you that you can override Bootstrap settings when you include another external CSS file below the Bootstrap CSS file. Refer to the <head> area of gallery.html if you need to compare.

Making any changes to the layout and CSS properties of a carousel takes time, so it may take a few hours of testing in a new CSS file to get the layout and colors to suit your needs. Alternatively, using your browser’s Inspect Element feature may help you find the CSS you want to alter more quickly so that you can continue to edit the code in Dreamweaver.

You can adjust the speed of the carousel movement so that the viewers have more time to look at each picture in the bootstrap-4.0.0.js file. Look for line 557 in the carousel section. Refer to Figure 39-7.
../images/466782_1_En_39_Chapter/466782_1_En_39_Fig7_HTML.jpg
Figure 39-7

Find the line that alters the speed of the carousel

Look for: interval: 5000.

5000 is the default of 5 seconds, so if you want the gallery to move more slowly, let’s say 10 seconds, then you would change the number to 10000. If you wanted it to move faster, then you might set it to 3000, or three seconds. However, most times, your audience will not appreciate a continuously fast-moving slider; no matter how great your images, this can be annoying and frustrate the viewer. In most cases, the viewer wants to have a bit of time to look at an image. I recommend either leaving it at the default interval or slowing it down to a speed that your audience is comfortable with.

Other than that, I made no other changes to the other JavaScript files.

When you are done, copy the carousel HTML from your blank HTML page into the HTML comment area in gallery_practice39.html.

Figure 39-8 shows how my gallery turned out in gallery.html.
../images/466782_1_En_39_Chapter/466782_1_En_39_Fig8_HTML.jpg
Figure 39-8

The final gallery in the Hot Glass Tango site

If you expand and contract your browser, you see that it is responsive.

One gallery on a site is often enough; you don’t need to overload your site with a gallery on every page. Likewise, if this gallery does not suit your project’s needs, there are many other similar galleries available online and in W3Schools that use similar HTML5, CSS, and JavaScript styling that you can incorporate into Dreamweaver. Examples include lightboxes and modal images, which are also found at W3Schools.

This concludes our look at the second project. Next, you look at the third and final project on the site.

Video with Channel Changer

In Chapter 36, you looked at how to add HTML5 video to a page using the <video> tag (see the media.html page). If you would like to practice, use the media2_practice39.html file copy it to the glass tango site folder and locate the following HTML comments.
<!--Insert Table Here for Buttons-->
       <!--Insert HTML5 Video Here-->

This is where you insert your code. Refer to media2.html to see the final result if you get stuck.

While having one video on the page is very useful, sometimes you may want to display more than one on a page. When you’re trying to make a mobile site more compact, it seems kind of redundant to add five or more videos on a page, and viewers must keep scrolling down to see each one. What if the video has steps to follow? What if you are doing a whole series of short stories? How will your viewers feel if they must scroll down the page to see the next episode?

A few years ago, I did some research on this very topic. After modifying JavaScript code, I found a way to use JavaScript to change which video I wanted to view simply by clicking a button. Refer to the media2.html file and Figure 39-9.
../images/466782_1_En_39_Chapter/466782_1_En_39_Fig9_HTML.jpg
Figure 39-9

The final gallery in the Hot Glass Tango site

Each time you click a button, you change the poster image and the video.

Here is how the code works. I use only four videos to keep this example easy to understand, but you could expand this concept if you want to.

On the left, I created a <table> to keep my buttons organized. If you want to practice, use the media2_practice39.html file and add the following HTML under the comment.
<!--Insert Table Here for Buttons-->
<table class ="channelTable">
  <tbody>
    <tr>
      <th scope="row">Video 1</th>
      <td><button onclick="Video1()" type="button" class="btn btn-primary">Broken Glass</button></td>
    </tr>
    <tr>
      <th scope="row">Video 2</th>
      <td><button onclick="Video2()" type="button" class="btn btn-primary">Glass Canes</button></td>
    </tr>
    <tr>
      <th scope="row">Video 3</th>
      <td><button onclick="Video3()" type="button" class="btn btn-primary">Smoking Tools</button></td>
    </tr>
    <tr>
      <th scope="row">Video 4</th>
      <td><button onclick="Video4()" type="button" class="btn btn-primary">Glass Clean Up</button></td>
    </tr>
  </tbody>
</table>

Each of the buttons has JavaScript tied to them onclick(). Refer to Chapter 34 if you need a review of JavaScript and events. This type of <button> tag is for buttons that are not used in forms.

On the right, I have my <video> tag. Add the following HTML under the comment.
       <!--Insert HTML5 Video Here-->
<video width="640" height="480" id="myVideoJH" poster="images/poster_cover_es1.jpg" preload="metadata" controls="controls" class="responsive-video" >
          <source id="mp4_src" src="video/mp4/MVI_1361_shardscolors.mp4" type='video/mp4; codecs="avc1.42E01E,mp4a.40.2"'>
          <source id="ogg_src" src="video/ogg/MVI_1361_shardscolors.oggtheora.ogv" type='video/ogg; codecs="theora,vorbis"'>
          <source id="webm_src" src="video/webm/MVI_1361_shardscolors.webmhd.webm" type='video/webm; codecs="vp8,vorbis"'>
            <embed id="swf_src" name="swf_src" src="video/swf/shardscolors.swf" type="application/x-shockwave-flash" width="640" height="480" />
          <!--<p> Your Browser does not support this video</p>-->
          <a href="video/mp4/MVI_1361_shardscolors.mp4"
   style="display:block;width:640px;height:480px;"
   id="player"> </a></video>
Note that the JavaScript link has already been added for you.
<script src="js/channel_changer_jh.js" type="text/javascript"></script>

This code is very much like what you saw in Chapter 36. However, in this case, I left the option of adding SWF files for older browsers; otherwise, you can leave the SWF area blank. The ID links to important code inside the external JavaScript, which has been added as a link below the <video> tag. Take some time to look at the channel_changer_jh.js JavaScript file.

I show one section here since other than links and names, the reset repeats.
var vid = document.getElementById("myVideoJH");
var play = document.getElementById("player");
//Video 1 Broken Glass
function Video1() {
vid.poster = "images/poster_cover_es1.jpg";
play.href = "video/mp4/MVI_1361_shardscolors.mp4";
    isSupp = vid.canPlayType("video/mp4");
    if (isSupp == "") {
        //video/ogg
        vid.src = "video/ogg/MVI_1361_shardscolors.oggtheora.ogv";
    } else if (isSupp == "") {
        //video/webm
        vid.src = "video/webm/MVI_1361_shardscolors.webmhd.webm";
    } else if (isSupp == "") {
        //flash backup
        vid.src = "video/swf/MVI_1361_shardscolors.swf";
    } else {
        vid.src = "video/mp4/MVI_1361_shardscolors.mp4";
    }
    vid.load();
}
//Video 2 Glass Canes
function Video2() {
}
//Video 3 Smoking Tools
function Video3() {
}
//Video 4 Glass Clean Up
function Video4() {
}

The code is tied to myVideoJH, which is the video’s ID. It then looks for the player ID to play the video. There are four functions, one for each button. When the Video 1 button is clicked, this loads the first video (vid.poster) and any backup options in case the browser does not like the MP4 file. The same happens for Video 2, and so on.

The conditional statements if, else if, and else separate these options. As you can see, this method can be modified by adding more videos and file formats, and keeps them all in one compact location rather than scrolling down the page to see them one at a time. If you are not using SWF files, the else if condition could be removed from each function; it is optional.
else if (isSupp == "") {
        //flash backup
        vid.src = "video/swf/MVI_1361_shardscolors.swf";

With some modifications, this idea could be applied to buttons and audio files; although you would need to have some sort of visual clue, such as the button being a distinct color, so that the viewer knows which audio file they are listening to.

This concludes our discussion of Dreamweaver. You can continue to review the files or close the program, as this ends my coverage of the five core programs.

Summary

In this chapter, you reviewed how to add your images to a page and a Bootstrap carousel gallery. Then you created a way to change the video using JavaScript and the <video> tag for the Hot Glass Tango website. This chapter concludes your study of Dreamweaver CC. You should be proud of your accomplishments as you made the long journey through many of the twists and turns of working with multimedia. Come back to Part 6 any time to review areas that you don’t fully understand. Ultimately, you want to feel comfortable working with your own files in Dreamweaver.

In Part 7, you take a brief look at some other programs that you can use for web design besides Dreamweaver, but they are part of the Adobe Creative Cloud. Then you have a quiz to test your knowledge.