mirror of
https://github.com/lavafroth/lavafroth.github.io.git
synced 2026-06-01 21:11:12 -03:00
feat: extend behavior of article for gallery posts
This commit is contained in:
@@ -388,34 +388,32 @@ article {
|
||||
color: var(--air);
|
||||
}
|
||||
|
||||
img {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.gallery {
|
||||
img {
|
||||
break-inside: avoid;
|
||||
border-radius: 1rem;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
figure {
|
||||
position: relative;
|
||||
img, .post-link {
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
column-count: if(media(width >= 768px): 2; else: 1);
|
||||
column-gap: var(--small-gap);
|
||||
|
||||
figure+figure {
|
||||
article+article {
|
||||
margin-top: var(--gap);
|
||||
}
|
||||
|
||||
article {
|
||||
padding-block: 0;
|
||||
}
|
||||
|
||||
.post-link {
|
||||
position: absolute;
|
||||
border-radius: 1rem;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
font-weight: 600;
|
||||
@@ -572,7 +570,6 @@ nav[data-post] {
|
||||
}
|
||||
|
||||
a {
|
||||
padding-bottom: 0.2rem;
|
||||
font-weight: 500;
|
||||
border-bottom: 2px solid var(--foreground);
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
|
||||
<section class="gallery">
|
||||
{{ $paginator := .Paginate $pages }} {{ range $index, $page := $paginator.Pages }}
|
||||
<figure>
|
||||
<article>
|
||||
<img src="{{ .Params.image }}">
|
||||
<a href="{{ .Permalink }}" aria-label="{{ .Title }}" class="post-link">{{ .Title }}</a>
|
||||
</figure>
|
||||
</article>
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user