diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-30 17:11:32 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-30 17:29:12 +0200 |
| commit | 3e87925a35f73aa2261eb66df3ef4ca11b64eeea (patch) | |
| tree | 8a9a6da1f99b4480e07548ffaf5d5b4945603ba9 /app/views/content/_headline_image.html.erb | |
| parent | b97466cdfbcb5b02d4eaf38661c051d1a095838e (diff) | |
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)
Diffstat (limited to 'app/views/content/_headline_image.html.erb')
| -rw-r--r-- | app/views/content/_headline_image.html.erb | 14 |
1 files changed, 7 insertions, 7 deletions
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 @@ | |||
| 1 | <%= link_to_path( | 1 | <%= link_to( |
| 2 | image_tag(@images[0].upload.url(:headline)), | 2 | image_tag(@images[0].upload.url(:headline)), |
| 3 | ("galleries/" + @page.node.unique_name) | 3 | @images[0].upload.url, |
| 4 | :class => "glightbox", | ||
| 5 | :data => { :gallery => "page-#{@page.node.id}" } | ||
| 4 | ) %> | 6 | ) %> |
| 5 | 7 | ||
| 6 | <% if 1 < @images.length %> | 8 | <% if 1 < @images.length %> |
| @@ -9,8 +11,6 @@ | |||
| 9 | </div> | 11 | </div> |
| 10 | <% end %> | 12 | <% end %> |
| 11 | 13 | ||
| 12 | <div class="shadowbox_images" style="display: none"> | 14 | <% @images[1..-1].each do |image| %> |
| 13 | <% @images.each do |image| %> | 15 | <%= link_to "", image.upload.url, :class => "glightbox", :style => "display: none", :data => { :gallery => "page-#{@page.node.id}" } %> |
| 14 | <%= link_to "hallo", image.upload.url, :class => "shadowbox_image" %> | 16 | <% end %> |
| 15 | <% end %> | ||
| 16 | </div> \ No newline at end of file | ||
