🎨 Perf: remove link icon extra space

This commit is contained in:
Cell
2022-04-17 12:10:17 +08:00
parent e7a52e2aef
commit 9f3014b1c2
2 changed files with 18 additions and 5 deletions
+13
View File
@@ -24,4 +24,17 @@
}
.d-none-mobile {
display: block;
}
.ms-1 {
margin-left: 0.25rem !important;
}
.me-1 {
margin-right: 0.25rem !important;
}
.ps-1 {
padding-left: 0.25rem !important;
}
.pe-1 {
padding-right: 0.25rem !important;
}
+5 -5
View File
@@ -35,14 +35,14 @@
(.ExternalIcon | default false)
| and $external | and (eq (hasPrefix .Content `<img` ) false)
| and (eq ((strings.HasSuffix .Content `</i>`) | or (strings.HasSuffix .Content `):`)) false)
}}
{{ if .Download }}
{{ dict "Class" "fas fa-cloud-download-alt fa-fw fa-xs" | partial "plugin/icon.html" }}
-}}
{{- if .Download -}}
{{- dict "Class" "fas fa-cloud-download-alt fa-fw fa-xs ms-1" | partial "plugin/icon.html" -}}
{{- else -}}
{{ dict "Class" "fas fa-external-link-alt fa-fw fa-xs" | partial "plugin/icon.html" }}
{{- dict "Class" "fas fa-external-link-alt fa-fw fa-xs ms-1" | partial "plugin/icon.html" -}}
{{- end -}}
{{- else if .Download }}
{{ dict "Class" "fas fa-download fa-fw fa-xs" | partial "plugin/icon.html" }}
{{- dict "Class" "fas fa-download fa-fw fa-xs ms-1" | partial "plugin/icon.html" -}}
{{- end -}}
{{- else -}}
<span class="cl-backdrop"></span>