🛠 fix: icon padding in menus

pull/568/head
Tomy Hsieh 2023-06-01 19:09:31 +08:00
parent ebfe161c9d
commit b67f0a7c73
No known key found for this signature in database
GPG Key ID: 4E6AF0EEDD2205F8
5 changed files with 46 additions and 46 deletions

View File

@ -16,9 +16,9 @@
<span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -55,9 +55,9 @@
<span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span

View File

@ -22,9 +22,9 @@
<span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -44,9 +44,9 @@
title="{{ i18n "footer.dark_appearance" }}"
>
{{ with .Params.icon | default "moon" }}
{{ partial "icon.html" . }}
{{ end }}
{{ if .Params.showName | default true }}
{{- partial "icon.html" . -}}
{{- end -}}
{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -77,9 +77,9 @@
<span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span

View File

@ -38,9 +38,9 @@
<span
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -60,9 +60,9 @@
title="{{ i18n "footer.dark_appearance" }}"
>
{{ with .Params.icon | default "moon" }}
{{ partial "icon.html" . }}
{{ end }}
{{ if .Params.showName | default true }}
{{- partial "icon.html" . -}}
{{- end -}}
{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -74,9 +74,9 @@
title="{{ i18n "footer.light_appearance" }}"
>
{{ with .Params.icon | default "sun" }}
{{ partial "icon.html" . }}
{{ end }}
{{ if .Params.showName | default true }}
{{- partial "icon.html" . -}}
{{- end -}}
{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -93,9 +93,9 @@
<span
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span

View File

@ -38,9 +38,9 @@
<span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -60,9 +60,9 @@
title="{{ i18n "footer.dark_appearance" }}"
>
{{ with .Params.icon | default "moon" }}
{{ partial "icon.html" . }}
{{ end }}
{{ if .Params.showName | default true }}
{{- partial "icon.html" . -}}
{{- end -}}
{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -74,9 +74,9 @@
title="{{ i18n "footer.light_appearance" }}"
>
{{ with .Params.icon | default "sun" }}
{{ partial "icon.html" . }}
{{ end }}
{{ if .Params.showName | default true }}
{{- partial "icon.html" . -}}
{{- end -}}
{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -93,9 +93,9 @@
<span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -136,9 +136,9 @@
<span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -158,9 +158,9 @@
title="{{ i18n "footer.dark_appearance" }}"
>
{{ with .Params.icon | default "moon" }}
{{ partial "icon.html" . }}
{{ end }}
{{ if .Params.showName | default true }}
{{- partial "icon.html" . -}}
{{- end -}}
{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -172,9 +172,9 @@
title="{{ i18n "footer.light_appearance" }}"
>
{{ with .Params.icon | default "sun" }}
{{ partial "icon.html" . }}
{{ end }}
{{ if .Params.showName | default true }}
{{- partial "icon.html" . -}}
{{- end -}}
{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
@ -191,9 +191,9 @@
<span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span

View File

@ -1,6 +1,6 @@
{{ $icon := resources.Get (print "icons/" . ".svg") }}
{{ if $icon }}
<span class="relative inline-block align-text-bottom icon">
{{ $icon.Content | safeHTML }}
{{- $icon := resources.Get (print "icons/" . ".svg") -}}
{{- if $icon -}}
<span class="relative inline-block align-text-bottom px-1 icon">
{{- $icon.Content | safeHTML -}}
</span>
{{ end }}
{{- end -}}