CO 4713 MULTIMEDIA JOURNALISM
ASSOCIATE PROFESSOR WENDY ROUSSIN, MFA
wroussin@comm.msstate.edu

TEMPLATE HELP
The STORY templates are available here and on the class website

Story 1 [file name: index.html, sources file name: biblio.html]

TEMPLATES should be placed in the correct folder for the stories (suggested name: team_local) and
you should follow the Site Management Teams handout for server set-up and uploading.


The HTML
Slideshow 1: From CODE view in the template: starting with line 314 (<div class="slideshow-container">) to line 379 (</div>)
Slideshow 2: From CODE view in the template: starting with line 386 (<div class="slideshow-container">) to line 451 (</div>)

Each slide show starts with opening the division for the container for the slide shows
      <div class="slideshow-container">
and ends with the arrow buttons and closing the division for the slideshow
     <a class="prev" onclick="plusSlides(-1, 1)">&#10094;</a>
     <a class="next" onclick="plusSlides(1, 1)">&#10095;</a>
</div>

Each slide show image is in a similar container

     <div class="mySlides1 fade">
     <div class="numbertext">1 / 10</div>
          <img src="images/01.jpg" style="width:100%" alt="sample image">
     <div class="text">Caption Text</div>
     </div>

With the options you change:
     mySlides1 fade or mySlides2 fade (which slideshow)
    I did the numbertext for each image
     The image file (img src) and the alt tag ("describe the image")
     The caption (>Caption Text<)

The SCRIPT
Providing the necessary functionality for the slideshows to operate
at the end of the body section, before the closing body tag (</body>)

<script>
let slideIndex = [1,1];
let slideId = ["mySlides1", "mySlides2"]
showSlides(1, 0);
showSlides(1, 1);

function plusSlides(n, no) {
  showSlides(slideIndex[no] += n, no);
}

function showSlides(n, no) {
  let i;
  let x = document.getElementsByClassName(slideId[no]);
  if (n > x.length) {slideIndex[no] = 1}   
  if (n < 1) {slideIndex[no] = x.length}
  for (i = 0; i < x.length; i++) {
     x[i].style.display = "none"; 
  }
  x[slideIndex[no]-1].style.display = "block"; 
}
</script>

RESIZE YOUR IMAGES
You will need to resize your images to 800 pixels in the largest dimension
Here is an easy way to do this via Adobe Bridge / Photoshop

With both Bridge and Photoshop open, naviagte to the Tools menu and Select Photoshop → Image Processor
Select your Images and Save location. Choose JPEG Quality 12, convert Profile to sRGB, W&H 800 px
Run the action

 

IMAGE folder tips
A separate image folder located inside of your local folder (team_local) helps keep the images organized and the site folder to look less crowded. File format .jpg or .png.

For simplicity, I named my images 01 thru 20. -If you name your .jpg images exactly like this and name the folder they are in images- you will have much less work getting the slide show to work. Otherwise, you will have to select and change each image file location (img src=" ")
 

(seen open and closed)
open images folder in file view closed images folder in file view

 

FINAL TIP
Slideshow Template Files will look wonky in DESIGN mode but editing in LIVE mode is tricker.