Skip to content

Commit

Permalink
Making featured album look the same if we are down to 1 column
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncanma committed Apr 8, 2024
1 parent a58d73f commit 5e8cd5d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 44 deletions.
72 changes: 29 additions & 43 deletions themes/hello-friend-ng/assets/scss/galleries/_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,42 @@ section.featured .card {
font-weight: 600;
font-size: 2rem;
line-height: 2rem;
padding-bottom: 0;

margin: 0.5rem 0 0.3rem 0;
}

& > p {
font-size: 0.875rem;
line-height: 1rem;
}

& > span {
font-weight: bold;
}

@media (max-width: 639px) {
& > h2 {
font-weight: 600;
font-size: 1.125rem;
line-height: 0.875rem;
margin: 0.5rem 0 0.3rem 0;
}

& > p {
color: var(--text-2);
font-size: 0.675rem;
line-height: 1rem;
}

.featuredIndicator {
display: none;
}
& > span {
font-weight: normal;
}

}

}
}

Expand Down Expand Up @@ -329,45 +357,3 @@ section.featured {
max-width: 1280px;
color: var(--text-1-dark);
}

.featured-card {
display: flex;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
border-radius: 1rem;
background-position: center;
background-size: cover;
aspect-ratio: 1 / 1;
width: 100%;
overflow: hidden;

@media (min-width: 640px) {
aspect-ratio: 16/9;
}

& > div {
display: flex;
flex-direction: column;
justify-content: flex-end;
gap: 1rem;
background-image: linear-gradient(to top, RGB(0 0 0 / 0.8) 10%, transparent 50%);
padding: 1.5rem;
width: 100%;
height: 100%;

& > h2 {
font-weight: 700;
font-size: 1.5rem;
line-height: 1.25;

@media (min-width: 768px) {
font-size: 1.875rem;
line-height: 2.25rem;
}
}

& > p {
font-size: 0.875rem;
line-height: 1.25rem;
}
}
}
2 changes: 1 addition & 1 deletion themes/hello-friend-ng/layouts/albums/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1>{{ .Title }}</h1>
<img loading="lazy" width="540" height="360" src="{{ $thumbnailLink.Url }}" style="" alt="{{ .Title }}" />
<div>
<h2>{{ .Title }}</h2>
<span>{{ $photoCount }} photos</span>
<span><span class="featuredIndicator">Featured | </span>{{ $photoCount }} photos</span>
{{ with .Description }}<p>{{ . }}</p>{{ end }}
</div>
</a>
Expand Down

0 comments on commit 5e8cd5d

Please sign in to comment.