Add lightbox
Some checks failed
/ Run tests (push) Successful in 1m51s
/ Run system tests (push) Failing after 3m5s
/ Build, push and deploy image (push) Successful in 3m30s

This commit is contained in:
david 2024-11-13 00:26:07 +01:00
parent 934deddec4
commit fab4981508
10 changed files with 82 additions and 14 deletions

View file

@ -28,13 +28,8 @@ $enable-rounded: false;
@import 'bootstrap/scss/bootstrap';
@font-face {
font-display: block;
font-family: "bootstrap-icons";
src: url("./bootstrap-icons.woff2") format("woff2"),
url("./bootstrap-icons.woff") format("woff");
}
$lg-path-images: "";
$bootstrap-icons-font-dir: "";
@import 'bootstrap-icons/font/bootstrap-icons';
@ -52,6 +47,9 @@ $enable-rounded: false;
@import "trix/dist/trix";
$lg-path-fonts: "";
@import "lightgallery/scss/lightgallery";
/*
* Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
* the trix-editor content (whether displayed or under editing). Feel free to incorporate this

View file

@ -48,3 +48,6 @@ application.register("toast", ToastController)
import UnsavedChangesController from "./unsaved_changes_controller"
application.register("unsaved-changes", UnsavedChangesController)
import Lightbox from '@stimulus-components/lightbox'
application.register('lightbox', Lightbox)

View file

@ -24,14 +24,14 @@
<%= element.description %>
</div>
<% end %>
<%= safe_display(element.screenshot.variant(:thumbnail)) do %>
<%= image_tag(_1, class: "img-fluid", alt: "Screenshot des getesteten Elements") %>
<% safe_display(element.screenshot) do |s| %>
<div data-controller="lightbox">
<%= link_to(s) do %>
<%= image_tag(s.variant(:thumbnail), class: "img-fluid", alt: "Screenshot des getesteten Elements") %>
<% end %>
</div>
<% end %>
</div>
<p class="actions">
</p>
<% end %>
<div id="<%= dom_id(element, :success_criteria_list) %>" class="mb-3" data-controller="sortable" data-form-name="success_criterion" data-position-attribute= "position" data-draggable-selector=".draggable">