diff --git a/app/assets/stylesheets/application.bootstrap.scss b/app/assets/stylesheets/application.bootstrap.scss index 19d4485..65faf19 100644 --- a/app/assets/stylesheets/application.bootstrap.scss +++ b/app/assets/stylesheets/application.bootstrap.scss @@ -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 diff --git a/app/javascript/controllers/index.js b/app/javascript/controllers/index.js index 1946f61..8654ab4 100644 --- a/app/javascript/controllers/index.js +++ b/app/javascript/controllers/index.js @@ -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) \ No newline at end of file diff --git a/app/views/elements/_element.html.erb b/app/views/elements/_element.html.erb index 30421fa..1c939d8 100644 --- a/app/views/elements/_element.html.erb +++ b/app/views/elements/_element.html.erb @@ -24,14 +24,14 @@ <%= element.description %> <% 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| %> +
+ <%= link_to(s) do %> + <%= image_tag(s.variant(:thumbnail), class: "img-fluid", alt: "Screenshot des getesteten Elements") %> + <% end %> +
<% end %> - -

- -

<% end %>
diff --git a/package.json b/package.json index 148b0d9..b8c7a06 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "@popperjs/core": "^2.11.8", "@rails/actiontext": "^7.1.3-4", "@rails/request.js": "^0.0.11", + "@stimulus-components/lightbox": "^4.0.0", "autoprefixer": "^10.4.19", "bootstrap": "^5.3.3", "bootstrap-icons": "^1.11.3", @@ -32,4 +33,4 @@ "devDependencies": { "tabby-agent": "^1.7.0" } -} \ No newline at end of file +} diff --git a/vendor/assets/fonts/lg.svg b/vendor/assets/fonts/lg.svg new file mode 100644 index 0000000..fe8b075 --- /dev/null +++ b/vendor/assets/fonts/lg.svg @@ -0,0 +1,54 @@ + + + + + + +{ + "fontFamily": "lg", + "majorVersion": 2, + "minorVersion": 0, + "fontURL": "", + "copyright": "", + "license": "", + "licenseURL": "", + "description": "Font generated by IcoMoon.", + "version": "Version 2.0", + "fontId": "lg", + "psName": "lg", + "subFamily": "Regular", + "fullName": "lg" +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/assets/fonts/lg.ttf b/vendor/assets/fonts/lg.ttf new file mode 100644 index 0000000..825f483 Binary files /dev/null and b/vendor/assets/fonts/lg.ttf differ diff --git a/vendor/assets/fonts/lg.woff b/vendor/assets/fonts/lg.woff new file mode 100644 index 0000000..fd02a6f Binary files /dev/null and b/vendor/assets/fonts/lg.woff differ diff --git a/vendor/assets/fonts/lg.woff2 b/vendor/assets/fonts/lg.woff2 new file mode 100644 index 0000000..2c2e289 Binary files /dev/null and b/vendor/assets/fonts/lg.woff2 differ diff --git a/vendor/assets/images/loading.gif b/vendor/assets/images/loading.gif new file mode 100644 index 0000000..4744c45 Binary files /dev/null and b/vendor/assets/images/loading.gif differ diff --git a/yarn.lock b/yarn.lock index bf77f5c..b1abead 100644 --- a/yarn.lock +++ b/yarn.lock @@ -200,6 +200,13 @@ resolved "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz" integrity sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg== +"@stimulus-components/lightbox@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@stimulus-components/lightbox/-/lightbox-4.0.0.tgz#dbe56146a3d14582a13e568406292d52aa56cbb0" + integrity sha512-pj4PfnGANbc3Ef6I/5aPeRS8Tj2rK1b9dn8rlpJZs1K9narqM57ZtUTutHZsnOv95+4LqQVktj+auMgz+LKzjw== + dependencies: + lightgallery "^2.7.2" + ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" @@ -516,6 +523,11 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +lightgallery@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/lightgallery/-/lightgallery-2.7.2.tgz#9309216986fbce60602b851e1ef80cf40769c3d3" + integrity sha512-Ewdcg9UPDqV0HGZeD7wNE4uYejwH2u0fMo5VAr6GHzlPYlhItJvjhLTR0cL0V1HjhMsH39PAom9iv69ewitLWw== + lilconfig@^3.1.1: version "3.1.2" resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz"