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

View File

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

View File

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

View File

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

View File

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