Compare commits

...

4 Commits

Author SHA1 Message Date
Luca 0bd29fdf4f Make main menu stick to top 2023-03-12 20:34:30 +01:00
Luca 66c692af84 Adjust margin of pagination nav 2023-03-12 20:26:31 +01:00
Luca fb5c933dfe Resize and crop gallery images 2023-03-12 20:25:00 +01:00
Luca db79aae55f Use object-fit property instead of container element 2023-03-12 20:22:48 +01:00
6 changed files with 35 additions and 58 deletions

View File

@ -8,6 +8,8 @@
a { a {
&.blur-on-hover { &.blur-on-hover {
overflow: hidden;
&:hover img { &:hover img {
filter: blur(5px); filter: blur(5px);
transform: scale(120%); transform: scale(120%);
@ -18,10 +20,6 @@
} }
} }
img {
display: block;
}
p { p {
background: rgba($color-overlay, 0.9); background: rgba($color-overlay, 0.9);
color: $color-overlay-text; color: $color-overlay-text;
@ -34,24 +32,9 @@
} }
img { img {
&.landscape { display: block;
height: 100%;
width: auto;
}
&.portrait {
height: auto;
width: 100%;
}
}
.image {
align-items: center;
display: flex;
height: 280px; height: 280px;
justify-content: center; object-fit: cover;
max-height: 280px;
width: 280px; width: 280px;
overflow: hidden;
} }
} }

View File

@ -31,15 +31,18 @@ body {
} }
header, footer { header, footer {
padding: 0 1rem; padding: 1rem;
} }
header { header {
align-items: center; align-items: center;
background: $color-background;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
margin-top: 1rem; position: sticky;
top: 0;
z-index: 1;
a img { a img {
display: block; display: block;
@ -89,7 +92,7 @@ header {
} }
main { main {
padding: 1rem; padding: 0 1rem;
& > :last-child { & > :last-child {
margin-bottom: 0 !important; margin-bottom: 0 !important;
@ -100,16 +103,12 @@ main {
} }
} }
footer { footer nav {
margin-bottom: 1rem; align-items: end;
nav { @media screen and (min-width: $small) {
align-items: end; align-items: normal;
justify-content: end;
@media screen and (min-width: $small) {
align-items: normal;
justify-content: end;
}
} }
} }
@ -129,7 +128,7 @@ nav {
} }
&.pagination { &.pagination {
margin-top: 2.5em; margin-bottom: 3rem;
:first-child { :first-child {
margin: 0; margin: 0;
@ -158,33 +157,18 @@ nav {
article { article {
display: flex; display: flex;
& > .image {
display: none;
& > img {
height: auto;
width: 100%;
}
@media screen and (min-width: $small) {
display: block;
}
}
&.preview { &.preview {
margin-bottom: 3rem; margin-bottom: 3rem;
& > .image { & > img {
align-items: center; display: none;
height: 200px; height: 200px;
justify-content: center;
min-width: 200px;
overflow: hidden;
margin-right: 1.5rem; margin-right: 1.5rem;
width: 200px; min-width: 200px;
object-fit: cover;
@media screen and (min-width: $small) { @media screen and (min-width: $small) {
display: flex; display: block;
} }
} }
@ -195,9 +179,16 @@ article {
&.page { &.page {
& > .image { & > .image {
display: none;
text-align: right; text-align: right;
& > img {
height: auto;
width: 100%;
}
@media screen and (min-width: $small) { @media screen and (min-width: $small) {
display: block;
padding-left: 1.5em; padding-left: 1.5em;
width: 60%; width: 60%;
} }

View File

@ -4,6 +4,9 @@ languageCode = 'de-de'
paginate = 3 paginate = 3
title = 'kontakt Das Kulturprojekt' title = 'kontakt Das Kulturprojekt'
[imaging]
resampleFilter = "Lanczos"
[menu] [menu]
[[menu.footer]] [[menu.footer]]
name = "Impressum" name = "Impressum"

View File

@ -5,7 +5,7 @@
{{ range .Pages }} {{ range .Pages }}
<a class="blur-on-hover" href="{{ .RelPermalink }}"> <a class="blur-on-hover" href="{{ .RelPermalink }}">
{{ with index (.Resources.ByType "image") 0 }} {{ with index (.Resources.ByType "image") 0 }}
<div class="image"><img alt="{{ .Title }}" class="{{ if lt .Height .Width }}landscape{{ else }}portrait{{ end }}" src="{{ .RelPermalink }}"></div> <img alt="{{ .Title }}" src="{{ (.Fill "560x560").RelPermalink }}">
{{ end }} {{ end }}
<p>{{ .Title }}</p> <p>{{ .Title }}</p>
</a> </a>

View File

@ -3,7 +3,7 @@
{{ .Content }} {{ .Content }}
<section class="gallery"> <section class="gallery">
{{ range .Resources.ByType "image" }} {{ range .Resources.ByType "image" }}
<div class="image"><img alt="{{ .Title }}" class="{{ if lt .Height .Width }}landscape{{ else }}portrait{{ end }}" src="{{ .RelPermalink }}"></div> <img alt="{{ .Title }}" src="{{ (.Fill "560x560").RelPermalink }}">
{{ end }} {{ end }}
</section> </section>
{{ end }} {{ end }}

View File

@ -6,7 +6,7 @@
<p class="date">{{ .Date | dateFormat "Mon, 02. January 2006" }}</p> <p class="date">{{ .Date | dateFormat "Mon, 02. January 2006" }}</p>
<article class="preview"> <article class="preview">
{{ with .Resources.GetMatch "image.jpg" }} {{ with .Resources.GetMatch "image.jpg" }}
<section class="image"><img alt="{{ .Title }}" src="{{ .RelPermalink }}"></section> <img alt="{{ .Title }}" src="{{ .RelPermalink }}">
{{ end }} {{ end }}
<section class="text"> <section class="text">
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2> <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
@ -31,7 +31,7 @@
{{ range first 4 (.Site.GetPage "/galerie").Pages }} {{ range first 4 (.Site.GetPage "/galerie").Pages }}
<a class="blur-on-hover" href="{{ .RelPermalink }}"> <a class="blur-on-hover" href="{{ .RelPermalink }}">
{{ with index (.Resources.ByType "image") 0 }} {{ with index (.Resources.ByType "image") 0 }}
<div class="image"><img alt="{{ .Title }}" class="{{ if lt .Height .Width }}landscape{{ else }}portrait{{ end }}" src="{{ .RelPermalink }}"></div> <img alt="{{ .Title }}" src="{{ (.Fill "560x560").RelPermalink }}">
{{ end }} {{ end }}
<p>{{ .Title }}</p> <p>{{ .Title }}</p>
</a> </a>