Refactor scss to minimize resulting css
This commit is contained in:
parent
8d154d444e
commit
190c0acf7f
23 changed files with 78 additions and 25 deletions
32
layouts/blog/single.html
Normal file
32
layouts/blog/single.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
{{- define "stylesheet" -}}
|
||||
{{- $scss := resources.Get "/scss/blog.scss" -}}
|
||||
{{- $style := $scss | resources.ToCSS -}}
|
||||
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
|
||||
{{- end -}}
|
||||
|
||||
{{- define "main" }}
|
||||
<main>
|
||||
{{- if eq .Params.type "post" }}
|
||||
<p class="date-published" title="{{ .Date | time.Format "2. January 2006, 15:04 MST" }}">{{ .Date | time.Format "2. January 2006" }}</p>
|
||||
{{- end }}
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
{{ .Content -}}
|
||||
<aside>
|
||||
{{- with .Params.topics }}
|
||||
<ul class="topics">
|
||||
{{- range . }}
|
||||
<li>
|
||||
<a href="{{ "topics" | relURL}}/{{ . | urlize }}">{{ . }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- with .Params.tags }}
|
||||
tags
|
||||
{{- range . }}
|
||||
<a href='{{ "tags" | relURL }}/{{ . | urlize }}'>{{ . }}</a>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</aside>
|
||||
</main>
|
||||
{{- end }}
|
Loading…
Add table
Add a link
Reference in a new issue