Skip to content

Commit

Permalink
Remove space between icon and text in meta fields
Browse files Browse the repository at this point in the history
When minify, the meta icon + text starts rendering
w/o space in between. So, regular and minified
versions are slightly different. To avoid this, we
use only margin-right to the icon for a consistent
look with or without minification.
  • Loading branch information
Vimux committed Mar 25, 2020
1 parent 2260591 commit aff8789
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/post_meta/categories.html
@@ -1,7 +1,7 @@
{{- $taxo := "categories" -}}
{{- with .Param $taxo }}
{{- with .Param $taxo -}}
<div class="meta__item-categories meta__item">
{{ partial "svg/category.svg" (dict "class" "meta__icon") }}
{{- partial "svg/category.svg" (dict "class" "meta__icon") -}}
<span class="meta__text">
{{- range $index, $category := . }}
{{- $url := urls.Parse ($category | urlize) -}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/post_meta/date.html
@@ -1,13 +1,13 @@
{{- if not .Date.IsZero }}
<div class="meta__item-datetime meta__item">
{{ partial "svg/time.svg" (dict "class" "meta__icon") }}
{{ partial "svg/time.svg" (dict "class" "meta__icon") -}}
<time class="meta__text" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{- .Date.Format (.Site.Params.dateformat | default "January 02, 2006") -}}
</time>
{{- if ne .Date .Lastmod }}
<time class="meta__text" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">(
{{- T "meta_lastmod" }}: {{ .Lastmod.Format (.Site.Params.dateformat | default "January 02, 2006") -}}
)</time>
{{- end }}
{{- end -}}
</div>
{{- end }}

0 comments on commit aff8789

Please sign in to comment.