From f4a5023387a99885e4f23fb594cd4b3c229bac34 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sat, 4 Jun 2022 21:04:15 +0200 Subject: [PATCH 01/11] Gallery(ui): add action buttons to gallery on mainpage Adapted changes by Markus Rothgaenger from https://github.com/Moarqi/photobooth Optimized integration to only be visible on main page while be hidden on standalone gallery and at livechroma. Change-Id: I322f6575a8a93b9705d79e8b9650391b4a54eefb --- gallery.php | 2 ++ index.php | 1 + livechroma.php | 9 +++++---- src/sass/classic_style.scss | 8 ++++++++ src/sass/partials/_button.scss | 10 ++++++++++ src/sass/partials/_gallery.scss | 18 +++++++++++++++--- src/sass/partials/_modern_button.scss | 1 + template/gallery.template.php | 26 ++++++++++++++++++++++++++ 8 files changed, 68 insertions(+), 7 deletions(-) diff --git a/gallery.php b/gallery.php index 0d122e403..1d0809f1a 100644 --- a/gallery.php +++ b/gallery.php @@ -19,6 +19,8 @@ } $imagelist = ($config['gallery']['newest_first'] === true) ? array_reverse($images) : $images; + +$GALLERY_FOOTER = false; ?> diff --git a/index.php b/index.php index 41e78e74c..d660174e1 100644 --- a/index.php +++ b/index.php @@ -40,6 +40,7 @@ $btnClass2 = ''; $galleryIcon = 'fa-th'; } + $GALLERY_FOOTER = true; } else { header('location: ' . $config['protect']['index_redirect']); exit(); diff --git a/livechroma.php b/livechroma.php index 202a8d320..29bef4eee 100644 --- a/livechroma.php +++ b/livechroma.php @@ -18,13 +18,14 @@ } $imagelist = $config['gallery']['newest_first'] === true ? array_reverse($images) : $images; - if ($config['ui']['style'] === 'modern') { - $btnClass1 = 'round-btn'; - $btnClass2 = 'round-btn'; - } else { + if ($config['ui']['style'] === 'classic') { $btnClass1 = 'btn btn--small btn--flex'; $btnClass2 = 'btn'; + } else { + $btnClass1 = 'round-btn'; + $btnClass2 = 'round-btn'; } + $GALLERY_FOOTER = false; } else { header('location: ' . $config['protect']['index_redirect']); exit(); diff --git a/src/sass/classic_style.scss b/src/sass/classic_style.scss index 36719d411..5ac6dd0de 100644 --- a/src/sass/classic_style.scss +++ b/src/sass/classic_style.scss @@ -463,6 +463,14 @@ hr.small { } } +.buttongroup { + display: flex; + justify-content: center; + gap: 50px; + padding-top: 10px; + padding-bottom: 5px; +} + .gallery__close:active, .gallery__close:hover, .gallery__close:focus, diff --git a/src/sass/partials/_button.scss b/src/sass/partials/_button.scss index ebe10c0fe..8e9379c30 100644 --- a/src/sass/partials/_button.scss +++ b/src/sass/partials/_button.scss @@ -1,3 +1,4 @@ +.gal-action-btn, .btn { padding: 20px 40px; border: 0 none; @@ -40,6 +41,15 @@ } } +.gal-action-btn { + background: $hoverColor; + &:active, + &:focus, + &:hover { + opacity: 0.6; + } +} + .btn.save-btn, .btn.install-btn { position: absolute; diff --git a/src/sass/partials/_gallery.scss b/src/sass/partials/_gallery.scss index 928d06f9c..72dbf62a0 100644 --- a/src/sass/partials/_gallery.scss +++ b/src/sass/partials/_gallery.scss @@ -11,8 +11,8 @@ z-index: 1000; h1 { - margin-top: 10px; - margin-left: 30px; + margin: auto; + text-align: center; } &--open { @@ -47,10 +47,22 @@ } } + &__footer { + width: 100%; + height: 100px; + align-self: flex-end; + bottom: 0; + margin-top: auto; + display: flex; + justify-content: center; + background: $mainColor; + box-shadow: 0 0 15px rgb(40, 40, 40); + } + &__body { display: flex; flex-wrap: wrap; - overflow-y: auto; + overflow-y: scroll; justify-content: center; a { diff --git a/src/sass/partials/_modern_button.scss b/src/sass/partials/_modern_button.scss index 59cf8bc55..644209def 100644 --- a/src/sass/partials/_modern_button.scss +++ b/src/sass/partials/_modern_button.scss @@ -1,3 +1,4 @@ +.gal-action-btn, .round-btn { width: 5em; height: 5em; diff --git a/template/gallery.template.php b/template/gallery.template.php index ee74986f1..0d122c866 100644 --- a/template/gallery.template.php +++ b/template/gallery.template.php @@ -48,5 +48,31 @@ + + + From b0a9ae96f4e17537bf1cd6944f44afc5c982f999 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 8 Jun 2022 07:12:55 +0200 Subject: [PATCH 02/11] gallery(actions): remove CUPS button from gallery actions Change-Id: I5f2164ea37b6d2d56480cf6c4752b5f684979e87 --- template/gallery.template.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/template/gallery.template.php b/template/gallery.template.php index 0d122c866..92c2dec80 100644 --- a/template/gallery.template.php +++ b/template/gallery.template.php @@ -51,10 +51,6 @@