From a0b3e594a882914644c9cf6611520ca317a5bae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1nos=20Rusiczki?= Date: Sun, 23 Apr 2023 12:56:23 +0300 Subject: [PATCH] Integrate photo title on the hero for homepage --- app/javascript/homepage/index.vue | 49 +++++++-------------- app/javascript/photos/display-hero.vue | 59 ++++++++++++++++++++++++-- 2 files changed, 71 insertions(+), 37 deletions(-) diff --git a/app/javascript/homepage/index.vue b/app/javascript/homepage/index.vue index bb6d7d87..8c5d02bc 100644 --- a/app/javascript/homepage/index.vue +++ b/app/javascript/homepage/index.vue @@ -2,46 +2,27 @@
-
-
- - Latest photo: - - {{ result.latestPhoto.name }} - - -
-
- - See all photos... - -
-
-
-
-
-
- -
-
- +
+
+
+ +
+
+ +
- -
diff --git a/app/javascript/photos/display-hero.vue b/app/javascript/photos/display-hero.vue index 1a5847c6..4b919c92 100644 --- a/app/javascript/photos/display-hero.vue +++ b/app/javascript/photos/display-hero.vue @@ -2,7 +2,16 @@
- + + + +
+
+
+
+

+ Latest photo: + + {{ photo.name }} + +

+
+
+ + See all photos... + +
+
+
@@ -42,7 +75,7 @@ position: relative; } - #image-wrapper > img { + #image-wrapper img { max-height: calc(100vh - 150px); width: 100%; border-radius: 2px; @@ -64,4 +97,24 @@ #image-wrapper > .labels { } + + .overlay { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + background: rgba(0, 0, 0, 0.5); + } + + // #image-wrapper > .overlay { + // position: absolute; + // top: 0; + // left: 0; + // width: 100%; + // height: 100%; + // background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)); + // display: flex; + // align-items: center; + // justify-content: center; + // }