From 741f04ebb034efacd116f1dbaf24bab8f989019e Mon Sep 17 00:00:00 2001 From: Nye Evans Date: Fri, 1 Jan 2021 16:28:29 +0000 Subject: [PATCH] started work on slideshow code --- Pages/Mainpage.css | 6 ++++++ Pages/index.html | 6 ++++-- pages/Gallery.js | 31 +++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 pages/Gallery.js diff --git a/Pages/Mainpage.css b/Pages/Mainpage.css index 13efe4a..5d1d61e 100644 --- a/Pages/Mainpage.css +++ b/Pages/Mainpage.css @@ -48,6 +48,12 @@ h2, h3{ } +button{ + background-color: transparent; + border: none; + color: #ffd256; +} + .orangeBack{ /*for anything that isnt a tag*/ diff --git a/Pages/index.html b/Pages/index.html index cd28c87..09079ae 100644 --- a/Pages/index.html +++ b/Pages/index.html @@ -1,6 +1,8 @@
+ + Nye Evans Portfolio
@@ -34,8 +36,8 @@

Image Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

-

-

+ +
diff --git a/pages/Gallery.js b/pages/Gallery.js new file mode 100644 index 0000000..1f08dc7 --- /dev/null +++ b/pages/Gallery.js @@ -0,0 +1,31 @@ +class slide{ + constructor(title, caption, image){ + this.title = title; + this.caption = caption; + this.image = image; + } +} + +var currentSlide = 0; +var slides = [] + + +function nextSlide(){ + currentSlide++; + updateSlide(); +} + +function lastSlide(){ + currentSlide--; + updateSlide(); +} + +function updateSlide(){ + if (currentSlide > slides.length){ + currentSlide = 0; + } else if (currentSlide < 0){ + currentSlide = slides.length; + } + + console.log(currentSlide); +} \ No newline at end of file