Add icon to snippet list
This commit is contained in:
parent
3148adb67f
commit
e9d56c009c
8
archetypes/snippet.md
Normal file
8
archetypes/snippet.md
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: "{{ replace .File.ContentBaseName "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
tags: []
|
||||
draft: true
|
||||
icon: null
|
||||
---
|
||||
|
||||
@ -3,6 +3,7 @@ title: "Seconds since last pacman sync"
|
||||
date: 2022-06-11T08:45:13Z
|
||||
tags: ["archlinux", "linux", "pacman"]
|
||||
draft: false
|
||||
icon: shell
|
||||
---
|
||||
|
||||
## Result
|
||||
|
||||
@ -25,8 +25,9 @@
|
||||
{{ if $pagination }}
|
||||
{{ $paginator := $page.Paginate $entries }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ $iconName := default "default" .Params.icon }}
|
||||
<li class="list-item" data-href="{{ .Permalink }}" role="button" tabindex="0">
|
||||
<img class="list-item-image" src="//via.placeholder.com/128" alt="{{ index $ "labelSingular" }} Topic">
|
||||
<img class="list-item-image" src="/icons/{{ $iconName }}.svg" alt="{{ index $ "labelSingular" }} Topic">
|
||||
<div class="list-item-text">
|
||||
<h4 class="list-item-title">{{ .Title }}</h4>
|
||||
<span class="list-item-date">{{ .Date.Format "January 2, 2006" }}</span>
|
||||
@ -36,8 +37,9 @@
|
||||
{{ template "_internal/pagination.html" $page }}
|
||||
{{ else }}
|
||||
{{ range ( first $maximumListSize $entries ) }}
|
||||
{{ $iconName := default "default" .Params.icon }}
|
||||
<li class="list-item" data-href="{{ .Permalink }}" role="button" tabindex="0">
|
||||
<img class="list-item-image" src="//via.placeholder.com/128" alt="{{ index $ "labelSingular" }} Topic">
|
||||
<img class="list-item-image" src="/icons/{{ $iconName }}.svg" alt="{{ index $ "labelSingular" }} Topic">
|
||||
<div class="list-item-text">
|
||||
<h4 class="list-item-title">{{ .Title }}</h4>
|
||||
<span class="list-item-date">{{ .Date.Format "January 2, 2006" }}</span>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user