JSFiddle - React, Tailwind, and code Playground

by sjmcpherson

HTML

<div style="text-align: Center;" id="photoSection">
    <img  id='photo' src='http://seineouestdigital.fr/wp-content/uploads/2015/06/test.jpg' alt='photo' />
    <div id="caption">
        Stanford Memorial Church - the church used to have an 80' bell tower, which fell in the 1906 earthquake.
    </div>
    <div id="forwardOverlay"></div>
    <div id="backwardOverlay"></div>
</div>

CSS

#photoSection{display:table;margin:0 auto;position:relative;}
#photoSection img{max-width:100%;}
#caption {
    position:absolute;
    padding: 10px;
    color: white;
    font-size: 14pt;
    font-family: sans-serif;
    background-color: #008800;
    opacity: 0.5;
    text-align: left;
    bottom:0;
}

JavaScript

var photoArray = [
    {filename: "memchu.jpg",
     caption: "Stanford Memorial Church - the church used to have an 80 bell tower, which fell in the 1906 earthquake."},
    {filename: "quad.jpg",
     caption: "The Stanford Quad"},
    {filename: "hoop.jpg",
     caption: "The <i>Red Hoop Fountain</i> with Green Library in the background."},
    {filename: "memorial-court.jpg",
     caption: "Memorial Court (in the front of the Quad) with Rodin's <i>Burghers of Calais</i> statues."},
    {filename: "gates.jpg",
     caption: "The Gates Building - home of Stanford Computer Science."},
    {filename: "stone-river.jpg",
     caption: "The Stone River statue near the Cantor Arts Center (Stanford's own art museum)."},
];