From 3e87925a35f73aa2261eb66df3ef4ca11b64eeea Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 30 Jun 2026 17:11:32 +0200 Subject: Replace Shadowbox with GLightbox, drop jQuery from public site Vendors GLightbox 3.3.1 (MIT, dependency-free) as static files in public/javascripts and public/stylesheets, replacing the Shadowbox 2009 vendor tree and its jQuery adapter. Public site no longer loads jQuery at all. - app/views/layouts/application.html.erb: swap Shadowbox script/style includes and the public_bundle (jQuery) include for GLightbox's CSS/JS - app/views/content/_headline_image.html.erb: headline image is now itself a GLightbox trigger; additional images are direct a.glightbox links sharing a per-page data-gallery group, replacing the hidden shadowbox_images div and its click-forwarding trigger - public/javascripts/public.js: replace Shadowbox.init/setup and the click-forwarding handler with a single GLightbox() init call; remove the unused image_handler object - Remove public/javascripts/shadowbox/ (including vendored Sizzle, swfobject, and unused video/Flash players) and public/stylesheets/shadowbox.css - Remove app/assets/javascripts/public_bundle.js (jquery require) --- app/views/content/_headline_image.html.erb | 14 +++++++------- app/views/layouts/application.html.erb | 5 ++--- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'app/views') diff --git a/app/views/content/_headline_image.html.erb b/app/views/content/_headline_image.html.erb index 71a4cb3..243be40 100644 --- a/app/views/content/_headline_image.html.erb +++ b/app/views/content/_headline_image.html.erb @@ -1,6 +1,8 @@ -<%= link_to_path( +<%= link_to( image_tag(@images[0].upload.url(:headline)), - ("galleries/" + @page.node.unique_name) + @images[0].upload.url, + :class => "glightbox", + :data => { :gallery => "page-#{@page.node.id}" } ) %> <% if 1 < @images.length %> @@ -9,8 +11,6 @@ <% end %> - \ No newline at end of file +<% @images[1..-1].each do |image| %> + <%= link_to "", image.upload.url, :class => "glightbox", :style => "display: none", :data => { :gallery => "page-#{@page.node.id}" } %> +<% end %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 5edb614..edab5fc 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -11,9 +11,8 @@ <%= page_title %> - <%= javascript_include_tag 'public_bundle' %> - - + + <%= auto_discovery_link_tag(:atom, '/rss/updates.xml', title: "ATOM") %> -- cgit v1.3