Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanxiaobei/hugo-paper.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanxiaobei <nanxiaobei@gmail.com>2022-07-18 22:49:32 +0300
committernanxiaobei <nanxiaobei@gmail.com>2022-07-18 22:49:32 +0300
commit68a7cbe2011761f96d984c5493c856d93d7aea59 (patch)
tree47e32831153877811e0af0711ca1f92f8b7e9ad4 /layouts
parent5aaadae760a5e72568f9f01e772b22e1c6c54829 (diff)
support 2 types of icons
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/head.html6
-rw-r--r--layouts/partials/header.html6
2 files changed, 8 insertions, 4 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 1ec7cae..59da3ee 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -33,7 +33,11 @@
{{ end }}
<!-- Preload -->
- <link rel="preload" as="image" href="{{ `theme.svg` | absURL }}" />
+ <link
+ rel="preload"
+ as="image"
+ href="{{ `theme.{{ if site.Params.monoDarkIcon }}svg{{ else }}png{{ end }}` | absURL }}"
+ />
{{ $avatar_url := $.Scratch.Get "avatar_url" }}
<!---->
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 2f84aad..03183e9 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -4,7 +4,7 @@
>{{ site.Title }}</a
>
<a
- class="btn-dark ml-7 h-[1.4rem] w-[1.4rem] shrink-0 cursor-pointer [background:url(./theme.svg)_left_center/cover_no-repeat] dark:invert dark:[background-position:right]"
+ class="btn-dark ml-6 h-6 w-6 shrink-0 cursor-pointer {{ if site.Params.monoDarkIcon }}[background:url(./theme.svg)_left_center/cover_no-repeat] dark:invert dark:[background-position:right]{{ else }}[background:url(./theme.png)_left_/_auto_theme('spacing.6')_no-repeat] [transition:_background-position_0.4s_steps(5)] dark:[background-position:right]{{ end }}"
></a>
</div>
@@ -53,7 +53,7 @@
>
{{ $url := .RelPermalink }}<!---->
{{ with site.Menus.main }}
- <nav class="lg:ml-14 lg:flex lg:flex-row lg:items-center lg:space-x-7">
+ <nav class="lg:ml-12 lg:flex lg:flex-row lg:items-center lg:space-x-6">
{{ range . }}
<a
class="block font-medium lg:font-normal text-center leading-[5rem] text-3xl lg:text-base {{ if eq .URL $url }}active{{ end }}"
@@ -66,7 +66,7 @@
{{ with $.Scratch.Get "social_list" }}
<nav
- class="mt-12 flex justify-center space-x-10 dark:invert lg:mt-0 lg:ml-14 lg:items-center lg:space-x-7"
+ class="mt-12 flex justify-center space-x-10 dark:invert lg:mt-0 lg:ml-12 lg:items-center lg:space-x-6"
>
{{ range . }}<!---->
<a