Remove style.css; put all styles in app.css; add post_figure shortcode
This commit is contained in:
parent
5aabf75702
commit
8c8f97a607
4 changed files with 57 additions and 48 deletions
|
@ -16,7 +16,6 @@
|
|||
{{ end }}
|
||||
|
||||
<link rel="preload stylesheet" as="style" href="/app.css" />
|
||||
<link rel="preload stylesheet" as="style" href="/style.css" />
|
||||
{{ if .IsHome }}
|
||||
<link rel="preload stylesheet" as="style" href="/home.css" />
|
||||
{{ end }}
|
||||
|
@ -30,9 +29,6 @@
|
|||
></script>
|
||||
{{ end }}
|
||||
|
||||
<!-- Preload -->
|
||||
<link rel="preload" as="image" href="{{ `theme.png` | absURL }}" />
|
||||
|
||||
{{ range $.Scratch.Get "social-list" }}
|
||||
<link rel="preload" as="image" href="{{ printf `%s.svg` . | absURL }}" />
|
||||
{{ end }}
|
||||
|
|
12
layouts/shortcodes/post_figure.html
Normal file
12
layouts/shortcodes/post_figure.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<figure>
|
||||
{{ $img := (.Page.Resources.GetMatch (.Get "name")) }}
|
||||
{{ $resized_img := $img.Fit "576x576" }}
|
||||
<a href="{{ $img.RelPermalink }}">
|
||||
<img src="{{ $resized_img.RelPermalink }}" />
|
||||
</a>
|
||||
<figcaption>
|
||||
{{ if $img.Title }}
|
||||
<h4>{{ $img.Title }}</h4>
|
||||
{{ end }}
|
||||
</figcaption>
|
||||
</figure>
|
Loading…
Add table
Add a link
Reference in a new issue