Add emoji to posts list

This commit is contained in:
JP Hastings-Spital 2023-05-24 08:18:25 +01:00
parent ecd37bf586
commit e24c0c7bef
2 changed files with 14 additions and 0 deletions

View file

@ -73,6 +73,11 @@
align-items: baseline;
padding: 12px 0;
text-decoration: none;
position: relative;
&:hover .post-emoji {
opacity: 1;
}
}
}
@ -81,5 +86,13 @@
margin-left: 1em;
@include dimmed;
}
&-emoji {
position: absolute;
left: -1.5em;
line-height: 1.8em;
opacity: 0;
transition: opacity 0.2s ease-in-out;
}
}
}

View file

@ -16,6 +16,7 @@
{{ range .Pages }}
<li class="post-item">
<a href="{{.Permalink}}">
{{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }}
<span class="post-title">{{ if .Title }}{{.Title}}{{ else }}<i>Untitled post</i>{{ end }}</span>
<span class="post-day">
{{ if .Site.Params.dateformShort }}