From 3cbd86cb570e03f5db17722ea27b879f35933fcd Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Mon, 22 Jan 2024 13:00:00 +0800 Subject: [PATCH] [opt] logo --- layout/_partial/sidebar/logo.ejs | 3 +++ source/css/_layout/sidebar/logo.styl | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/layout/_partial/sidebar/logo.ejs b/layout/_partial/sidebar/logo.ejs index ff57cf6..485f029 100644 --- a/layout/_partial/sidebar/logo.ejs +++ b/layout/_partial/sidebar/logo.ejs @@ -6,6 +6,9 @@ if (page.logo) { const proj = theme.wiki.tree[page.wiki] var l = proj.logo if (l) { + if (l.title.includes('](') == false) { + l.title = `[${l.title}](${url_for(proj.homepage?.path || '')})` + } logo = l } else if (proj.name || proj.icon) { logo = { diff --git a/source/css/_layout/sidebar/logo.styl b/source/css/_layout/sidebar/logo.styl index 5577c8a..cdd009b 100644 --- a/source/css/_layout/sidebar/logo.styl +++ b/source/css/_layout/sidebar/logo.styl @@ -10,6 +10,7 @@ height: 48px margin-right: 1rem border-radius: 4px + flex-shrink: 0 a color: inherit display: flex @@ -56,7 +57,7 @@ animation-timing-function: linear a.title - font-size: 1.75rem + font-size: 1.5rem font-weight: 900 color: inherit line-height: 1.2