Skip to content

Commit

Permalink
rename articles' "poster" to "thumbnail"
Browse files Browse the repository at this point in the history
  • Loading branch information
stebunovd committed Dec 20, 2024
1 parent db205d3 commit 0caf4e1
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/sass/_blog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
}

&--item-poster {
&--item-thumbnail {
@include transition(opacity 0.35s);
flex-shrink: 0;
max-height: 300px;
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
12 changes: 6 additions & 6 deletions layouts/blog/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ <h1>Blog</h1>

{{- range $logs }}
<div class="blog--item">
{{- $poster := .Resources.GetMatch "poster.png" }}
{{- $poster2x := $.Resources.GetMatch "poster@2x.png" }}
{{- if $poster }}
{{- $thumbnail := .Resources.GetMatch "thumbnail.png" }}
{{- $thumbnail2x := $.Resources.GetMatch "thumbnail@2x.png" }}
{{- if $thumbnail }}
<a href="{{ .RelPermalink }}">
<img
src="{{ $poster.RelPermalink }}"
srcset="{{ $poster.RelPermalink }} 1x{{- if $poster2x }}, {{ $poster2x.RelPermalink }} 2x{{ end }}"
class="blog--item-poster"
src="{{ $thumbnail.RelPermalink }}"
srcset="{{ $thumbnail.RelPermalink }} 1x{{- if $thumbnail2x }}, {{ $thumbnail2x.RelPermalink }} 2x{{ end }}"
class="blog--item-thumbnail"
/>
</a>
{{- end }}
Expand Down

0 comments on commit 0caf4e1

Please sign in to comment.