From 9f3014b1c2b778f8221305eaafbd4dedc41660ed Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Sun, 17 Apr 2022 12:10:17 +0800 Subject: [PATCH] :art: Perf: remove link icon extra space --- assets/css/_common.scss | 13 +++++++++++++ layouts/partials/plugin/link.html | 10 +++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/assets/css/_common.scss b/assets/css/_common.scss index b37c9b75..e15511f3 100644 --- a/assets/css/_common.scss +++ b/assets/css/_common.scss @@ -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; } \ No newline at end of file diff --git a/layouts/partials/plugin/link.html b/layouts/partials/plugin/link.html index 578b7cb6..e416df7d 100644 --- a/layouts/partials/plugin/link.html +++ b/layouts/partials/plugin/link.html @@ -35,14 +35,14 @@ (.ExternalIcon | default false) | and $external | and (eq (hasPrefix .Content ``) | 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 -}}