File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -980,3 +980,42 @@ body {
980980 margin-right: auto;
981981 width: 100%;
982982}
983+
984+
985+ .mySlides1, .mySlides2 {display: none}
986+ img {vertical-align: middle;}
987+
988+ /* Slideshow container */
989+ .slideshow-container {
990+ max-width: 1000px;
991+ position: relative;
992+ margin: auto;
993+ }
994+
995+ /* Next & previous buttons */
996+ .prev, .next {
997+ cursor: pointer;
998+ position: absolute;
999+ top: 50%;
1000+ width: auto;
1001+ padding: 16px;
1002+ margin-top: -22px;
1003+ color: white;
1004+ font-weight: bold;
1005+ font-size: 18px;
1006+ transition: 0.6s ease;
1007+ border-radius: 0 3px 3px 0;
1008+ user-select: none;
1009+ }
1010+
1011+ /* Position the "next button" to the right */
1012+ .next {
1013+ right: 0;
1014+ border-radius: 3px 0 0 3px;
1015+ }
1016+
1017+ /* On hover, add a grey background color */
1018+ .prev:hover, .next:hover {
1019+ background-color: #f1f1f1;
1020+ color: black;
1021+ }
Original file line number Diff line number Diff line change @@ -13,6 +13,42 @@ <h2 class="section-heading">Photos</h2>
1313 </ div >
1414
1515
16+ < div class ="slideshow-container ">
17+ < div class ="mySlides1 ">
18+ < img src ="img/photos/IMG_5598.JPG " style ="width:100% ">
19+ </ div >
20+
21+ < div class ="mySlides1 ">
22+ < img src ="img/photos/IMG_5601.JPG " style ="width:100% ">
23+ </ div >
24+
25+ < div class ="mySlides1 ">
26+ < img src ="img/photos/IMG_5622.JPG " style ="width:100% ">
27+ </ div >
28+
29+ < a class ="prev " onclick ="plusSlides(-1, 0) "> ❮</ a >
30+ < a class ="next " onclick ="plusSlides(1, 0) "> ❯</ a >
31+ </ div >
32+
33+ < p > Slideshow 2:</ p >
34+ < div class ="slideshow-container ">
35+ < div class ="mySlides2 ">
36+ < img src ="img/photos/IMG_5624.JPG " style ="width:100% ">
37+ </ div >
38+
39+ < div class ="mySlides2 ">
40+ < img src ="img/photos/IMG_5624.JPG " style ="width:100% ">
41+ </ div >
42+
43+ < div class ="mySlides2 ">
44+ < img src ="img/photos/IMG_5624.JPG " style ="width:100% ">
45+ </ div >
46+
47+ < a class ="prev " onclick ="plusSlides(-1, 1) "> ❮</ a >
48+ < a class ="next " onclick ="plusSlides(1, 1) "> ❯</ a >
49+ </ div >
50+
51+
1652 < div class ="row ">
1753 < div class ="col-lg-12 text-center ">
1854 < h3 > < a href ="https://photos.app.goo.gl/2V4QojZqsNLVgEXb8 "> See more photos < i class ="fa fa-arrow-right "> </ i > </ a > </ h3 >
Original file line number Diff line number Diff line change @@ -34,4 +34,24 @@ $('div.modal').on('show.bs.modal', function() {
3434 $ ( modal ) . modal ( 'hide' ) ;
3535 }
3636 }
37- } ) ;
37+ } ) ;
38+
39+ var slideIndex = [ 1 , 1 ] ;
40+ var slideId = [ "mySlides1" , "mySlides2" ]
41+ showSlides ( 1 , 0 ) ;
42+ showSlides ( 1 , 1 ) ;
43+
44+ function plusSlides ( n , no ) {
45+ showSlides ( slideIndex [ no ] += n , no ) ;
46+ }
47+
48+ function showSlides ( n , no ) {
49+ var i ;
50+ var x = document . getElementsByClassName ( slideId [ no ] ) ;
51+ if ( n > x . length ) { slideIndex [ no ] = 1 }
52+ if ( n < 1 ) { slideIndex [ no ] = x . length }
53+ for ( i = 0 ; i < x . length ; i ++ ) {
54+ x [ i ] . style . display = "none" ;
55+ }
56+ x [ slideIndex [ no ] - 1 ] . style . display = "block" ;
57+ }
You can’t perform that action at this time.
0 commit comments