setup
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
{{ $cover_src := .Params.bookcase_cover_src | default .Params.bookcase_cover_src_dark }}
|
||||
{{ $cover_src_dark := .Params.bookcase_cover_src_dark | default .Params.bookcase_cover_src }}
|
||||
{{ $cover_title := .Params.bookcase_cover_title | default .Title }}
|
||||
|
||||
<div class="bookcase-item">
|
||||
<figure>
|
||||
<img src="{{ $cover_src | absURL }}" class="bookcase-item-img-light">
|
||||
<img src="{{ $cover_src_dark | absURL }}" class="bookcase-item-img-dark">
|
||||
<a href="{{ .RelPermalink }}" class="bookcase-item-overlay"></a>
|
||||
</figure>
|
||||
<figcaption>
|
||||
<a href="{{ .RelPermalink }}">{{ $cover_title }}</a>
|
||||
</figcaption>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
{{ $ctx := .ctx }}
|
||||
{{ $title := .title }}
|
||||
{{ $content := .content }}
|
||||
{{ $res := .res }}
|
||||
|
||||
<div class="content-margin">
|
||||
<div class="my-8">
|
||||
<h1>{{ $title }}</h1>
|
||||
{{ if $content }}
|
||||
{{- partial "content.html" (dict "ctx" $ctx "content" $content) -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ with $res }}
|
||||
<div class="bookcase-layout content-margin">
|
||||
{{ range . }}
|
||||
{{ $hidden := .Params.bookcase_hidden | default false }}
|
||||
{{ if not $hidden -}}
|
||||
{{- partial "bookcase/item.html" . -}}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user