From a05348afa49eeb94fe9784b5783bd0d6df8c8bb9 Mon Sep 17 00:00:00 2001 From: Ashutosh Choudhary Date: Mon, 1 Sep 2025 00:58:18 +0530 Subject: [PATCH 1/7] added js code to enhance gallery app --- Gemfile | 2 +- Gemfile.lock | 271 +++++++++++++++++++++++++--- _config.yml | 4 + _includes/head.html | 9 + _site/2016/11/03/title-of-post.html | 9 + _site/2016/11/04/title-of-post.html | 9 + _site/blog/index.html | 9 + _site/gallery/index.html | 27 ++- _site/index.html | 9 + js/Gallery.js | 22 +++ 10 files changed, 333 insertions(+), 38 deletions(-) create mode 100644 _config.yml create mode 100644 js/Gallery.js diff --git a/Gemfile b/Gemfile index c05154e4..82b5f0bd 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' -gem 'jekyll', '4.2.2' gem 'webrick', '1.7.0' +gem "github-pages", group: :jekyll_plugins diff --git a/Gemfile.lock b/Gemfile.lock index f6f72e95..42d4dd50 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,69 +1,284 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + activesupport (7.1.5.2) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + mutex_m + securerandom (>= 0.3) + tzinfo (~> 2.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + base64 (0.2.0) + benchmark (0.4.1) + bigdecimal (3.2.2) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.12.2) colorator (1.1.0) - concurrent-ruby (1.1.10) + commonmarker (0.23.11) + concurrent-ruby (1.3.5) + connection_pool (2.5.3) + dnsruby (1.72.4) + base64 (~> 0.2.0) + logger (~> 1.6.5) + simpleidn (~> 0.2.1) + drb (2.2.3) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) + ethon (0.15.0) + ffi (>= 1.15.0) eventmachine (1.2.7) - ffi (1.15.5) + eventmachine (1.2.7-x64-mingw32) + execjs (2.10.0) + faraday (2.13.4) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-net_http (3.4.1) + net-http (>= 0.5.0) + ffi (1.17.2-x64-mingw32) + ffi (1.17.2-x86_64-darwin) forwardable-extended (2.6.0) + gemoji (4.1.0) + github-pages (231) + github-pages-health-check (= 1.18.2) + jekyll (= 3.9.5) + jekyll-avatar (= 0.8.0) + jekyll-coffeescript (= 1.2.2) + jekyll-commonmark-ghpages (= 0.4.0) + jekyll-default-layout (= 0.1.5) + jekyll-feed (= 0.17.0) + jekyll-gist (= 1.5.0) + jekyll-github-metadata (= 2.16.1) + jekyll-include-cache (= 0.2.1) + jekyll-mentions (= 1.6.0) + jekyll-optional-front-matter (= 0.3.2) + jekyll-paginate (= 1.1.0) + jekyll-readme-index (= 0.3.0) + jekyll-redirect-from (= 0.16.0) + jekyll-relative-links (= 0.6.1) + jekyll-remote-theme (= 0.4.3) + jekyll-sass-converter (= 1.5.2) + jekyll-seo-tag (= 2.8.0) + jekyll-sitemap (= 1.4.0) + jekyll-swiss (= 1.0.0) + jekyll-theme-architect (= 0.2.0) + jekyll-theme-cayman (= 0.2.0) + jekyll-theme-dinky (= 0.2.0) + jekyll-theme-hacker (= 0.2.0) + jekyll-theme-leap-day (= 0.2.0) + jekyll-theme-merlot (= 0.2.0) + jekyll-theme-midnight (= 0.2.0) + jekyll-theme-minimal (= 0.2.0) + jekyll-theme-modernist (= 0.2.0) + jekyll-theme-primer (= 0.6.0) + jekyll-theme-slate (= 0.2.0) + jekyll-theme-tactile (= 0.2.0) + jekyll-theme-time-machine (= 0.2.0) + jekyll-titles-from-headings (= 0.5.3) + jemoji (= 0.13.0) + kramdown (= 2.4.0) + kramdown-parser-gfm (= 1.1.0) + liquid (= 4.0.4) + mercenary (~> 0.3) + minima (= 2.5.1) + nokogiri (>= 1.13.6, < 2.0) + rouge (= 3.30.0) + terminal-table (~> 1.4) + github-pages-health-check (1.18.2) + addressable (~> 2.3) + dnsruby (~> 1.60) + octokit (>= 4, < 8) + public_suffix (>= 3.0, < 6.0) + typhoeus (~> 1.3) + html-pipeline (2.14.3) + activesupport (>= 2) + nokogiri (>= 1.4) http_parser.rb (0.8.0) - i18n (1.10.0) + i18n (1.14.7) concurrent-ruby (~> 1.0) - jekyll (4.2.2) + jekyll (3.9.5) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) - i18n (~> 1.0) - jekyll-sass-converter (~> 2.0) + i18n (>= 0.7, < 2) + jekyll-sass-converter (~> 1.0) jekyll-watch (~> 2.0) - kramdown (~> 2.3) - kramdown-parser-gfm (~> 1.0) + kramdown (>= 1.17, < 3) liquid (~> 4.0) - mercenary (~> 0.4.0) + mercenary (~> 0.3.3) pathutil (~> 0.9) - rouge (~> 3.0) + rouge (>= 1.7, < 4) safe_yaml (~> 1.0) - terminal-table (~> 2.0) - jekyll-sass-converter (2.2.0) - sassc (> 2.0.1, < 3.0) + jekyll-avatar (0.8.0) + jekyll (>= 3.0, < 5.0) + jekyll-coffeescript (1.2.2) + coffee-script (~> 2.2) + coffee-script-source (~> 1.12) + jekyll-commonmark (1.4.0) + commonmarker (~> 0.22) + jekyll-commonmark-ghpages (0.4.0) + commonmarker (~> 0.23.7) + jekyll (~> 3.9.0) + jekyll-commonmark (~> 1.4.0) + rouge (>= 2.0, < 5.0) + jekyll-default-layout (0.1.5) + jekyll (>= 3.0, < 5.0) + jekyll-feed (0.17.0) + jekyll (>= 3.7, < 5.0) + jekyll-gist (1.5.0) + octokit (~> 4.2) + jekyll-github-metadata (2.16.1) + jekyll (>= 3.4, < 5.0) + octokit (>= 4, < 7, != 4.4.0) + jekyll-include-cache (0.2.1) + jekyll (>= 3.7, < 5.0) + jekyll-mentions (1.6.0) + html-pipeline (~> 2.3) + jekyll (>= 3.7, < 5.0) + jekyll-optional-front-matter (0.3.2) + jekyll (>= 3.0, < 5.0) + jekyll-paginate (1.1.0) + jekyll-readme-index (0.3.0) + jekyll (>= 3.0, < 5.0) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) + jekyll-relative-links (0.6.1) + jekyll (>= 3.3, < 5.0) + jekyll-remote-theme (0.4.3) + addressable (~> 2.0) + jekyll (>= 3.5, < 5.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) + jekyll-seo-tag (2.8.0) + jekyll (>= 3.8, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-swiss (1.0.0) + jekyll-theme-architect (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-cayman (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-dinky (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-hacker (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-leap-day (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-merlot (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-midnight (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-minimal (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-modernist (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-primer (0.6.0) + jekyll (> 3.5, < 5.0) + jekyll-github-metadata (~> 2.9) + jekyll-seo-tag (~> 2.0) + jekyll-theme-slate (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-tactile (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-time-machine (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-titles-from-headings (0.5.3) + jekyll (>= 3.3, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) + jemoji (0.13.0) + gemoji (>= 3, < 5) + html-pipeline (~> 2.2) + jekyll (>= 3.0, < 5.0) + json (2.13.2) kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - liquid (4.0.3) - listen (3.7.1) + liquid (4.0.4) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.4.0) + logger (1.6.6) + mercenary (0.3.6) + minima (2.5.1) + jekyll (>= 3.5, < 5.0) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + minitest (5.25.5) + mutex_m (0.3.0) + net-http (0.6.0) + uri + nokogiri (1.17.2-x64-mingw32) + racc (~> 1.4) + nokogiri (1.17.2-x86_64-darwin) + racc (~> 1.4) + octokit (4.25.1) + faraday (>= 1, < 3) + sawyer (~> 0.9) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (4.0.7) - rb-fsevent (0.11.1) - rb-inotify (0.10.1) + public_suffix (5.1.1) + racc (1.8.1) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) ffi (~> 1.0) - rexml (3.2.5) - rouge (3.29.0) + rexml (3.4.2) + rouge (3.30.0) + rubyzip (2.4.1) safe_yaml (1.0.5) - sassc (2.4.0) - ffi (~> 1.9) - terminal-table (2.0.0) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sawyer (0.9.2) + addressable (>= 2.3.5) + faraday (>= 0.17.3, < 3) + securerandom (0.3.2) + simpleidn (0.2.3) + terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) + typhoeus (1.5.0) + ethon (>= 0.9.0, < 0.16.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) unicode-display_width (1.8.0) + uri (1.0.3) webrick (1.7.0) PLATFORMS + x64-mingw32 x86_64-darwin-21 DEPENDENCIES - jekyll (= 4.2.2) + github-pages webrick (= 1.7.0) BUNDLED WITH - 2.2.17 + 2.5.23 diff --git a/_config.yml b/_config.yml new file mode 100644 index 00000000..f7853162 --- /dev/null +++ b/_config.yml @@ -0,0 +1,4 @@ +title: My Site +description: Just testing Jekyll +url: "" +baseurl: "" diff --git a/_includes/head.html b/_includes/head.html index a506a3ef..654fb8bd 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -16,4 +16,13 @@ + + + \ No newline at end of file diff --git a/_site/2016/11/03/title-of-post.html b/_site/2016/11/03/title-of-post.html index 58470163..341762f5 100644 --- a/_site/2016/11/03/title-of-post.html +++ b/_site/2016/11/03/title-of-post.html @@ -14,6 +14,15 @@ + + +
diff --git a/_site/2016/11/04/title-of-post.html b/_site/2016/11/04/title-of-post.html index 09830d4e..d3355d28 100644 --- a/_site/2016/11/04/title-of-post.html +++ b/_site/2016/11/04/title-of-post.html @@ -14,6 +14,15 @@ + + +
diff --git a/_site/blog/index.html b/_site/blog/index.html index 120b5fc6..0d1596d4 100644 --- a/_site/blog/index.html +++ b/_site/blog/index.html @@ -14,6 +14,15 @@ + + +
diff --git a/_site/gallery/index.html b/_site/gallery/index.html index dbc9be8f..9a451fd6 100644 --- a/_site/gallery/index.html +++ b/_site/gallery/index.html @@ -14,6 +14,15 @@ + + +
@@ -68,13 +77,13 @@ desert vista + data-description="A view of Joshua Tree National Park.">
- Disney Concert Hall + data-title="Walt Disney Concert Hall" + data-description="Walt Disney Concert Hall in downtown Los Angeles.">
fish + data-description="The Flavian Amphitheater (Colosseum) in Rome.">
Huntington Gardens + data-description="A friendly sea turtle.">
diff --git a/_site/index.html b/_site/index.html index 93b80ab0..e2090133 100644 --- a/_site/index.html +++ b/_site/index.html @@ -14,6 +14,15 @@ + + +
diff --git a/js/Gallery.js b/js/Gallery.js new file mode 100644 index 00000000..0d375e3a --- /dev/null +++ b/js/Gallery.js @@ -0,0 +1,22 @@ +function gallery(){ + let thumbnails = document.querySelectorAll("#gallery-thumbs img") + let mainImageSrc = document.querySelector("#gallery-photo img") + let galleryInfo = document.querySelector("#gallery-info") + let title = galleryInfo.querySelector(".title") + let description = galleryInfo.querySelector(".description") + + thumbnails.forEach(function(thumbnail){ + let newImageSrc = thumbnail.dataset.largeVersion + let largeVersion = new Image(); + largeVersion.src = newImageSrc + + thumbnail.addEventListener("click", function(){ + let newMainImageSrc = thumbnail.dataset.largeVersion + mainImageSrc.setAttribute("src", newMainImageSrc) + document.querySelector(".current").classList.remove("current"); + thumbnail.parentNode.classList.add("current"); + title.innerHTML = thumbnail.dataset.title + description.innerHTML = thumbnail.dataset.description + }) + }) +} \ No newline at end of file From b927f4e3dc7469f98f1bbcc05ea9d5354d40e088 Mon Sep 17 00:00:00 2001 From: Ashutosh Choudhary Date: Mon, 1 Sep 2025 01:07:34 +0530 Subject: [PATCH 2/7] improved relative path --- _config.yml | 4 ++-- _includes/head.html | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_config.yml b/_config.yml index f7853162..c82ad4bb 100644 --- a/_config.yml +++ b/_config.yml @@ -1,4 +1,4 @@ title: My Site description: Just testing Jekyll -url: "" -baseurl: "" +url: "choudashu123.github.io" +baseurl: "/le_js_full" diff --git a/_includes/head.html b/_includes/head.html index 654fb8bd..171c8cd3 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -9,15 +9,15 @@ {% else %} {% endif %} - - + + - + - + - \ No newline at end of file + diff --git a/_site/2016/11/03/title-of-post.html b/_site/2016/11/03/title-of-post.html index 341762f5..ae819f5c 100644 --- a/_site/2016/11/03/title-of-post.html +++ b/_site/2016/11/03/title-of-post.html @@ -4,26 +4,32 @@ This is the title of the first post | Test Page + + + + + + + - + +