feat: add setup sidebar profile logo support

This commit is contained in:
Ryan Wang
2022-11-10 14:18:29 +08:00
parent 6ab147d7ff
commit 15a3b2b499
3 changed files with 2047 additions and 9 deletions

View File

@@ -95,9 +95,18 @@ spec:
height: 200px
name: widgets
label: 小部件
value: "profile,popular-posts,categories,tags"
value: "popular-posts,categories,tags"
help: "目前提供的小部件有profile站点资料, popular-posts热门文章, categories文章分类, tags文章标签。你可以随意组合或排序以逗号隔开。"
- $formkit: group
name: profile
value:
logo:
children:
- $formkit: attachment
name: logo
label: 站点资料 Logo
- group: footer
label: 页脚
formSchema:

File diff suppressed because one or more lines are too long

View File

@@ -3,13 +3,8 @@
th:with="stats = ${siteStatsFinder.getStats()}"
>
<div class="flex flex-col items-center justify-center gap-4">
<div class="relative h-24 w-24">
<img th:src="${site.logo}" th:alt="${site.title}" class="h-full w-full rounded-full" />
<span
class="absolute right-0 bottom-0 flex h-7 w-7 items-center justify-center rounded-full border bg-white p-0.5"
>
🌚
</span>
<div th:if="${not #strings.isEmpty(theme.config.sidebar.profile.logo)}" class="relative h-24 w-24">
<img th:src="${theme.config.sidebar.profile.logo}" th:alt="${site.title}" class="h-full w-full rounded-full" />
</div>
<div><h1 class="text-2xl font-medium dark:text-slate-50" th:text="${site.title}"></h1></div>
<div th:if="${not #strings.isEmpty(site.subtitle)}">