feat(theme): logo配置功能提交

这个提交包含在:
2024-08-22 15:39:06 +08:00
未验证
父节点 026ed1f3c9
当前提交 4c76b9d076
修改 7 个文件,包含 44 行新增29 行删除
+10
查看文件
@@ -11,6 +11,16 @@ spec:
name: pixel_style name: pixel_style
label: 像素化风格 label: 像素化风格
help: 开启后,将使用像素风格字体及图标。 help: 开启后,将使用像素风格字体及图标。
- $formkit: attachment
name: logo
label: logo图片链接
help: 配置后,将展示在导航栏左侧。
accepts:
- "image/png"
- $formkit: text
name: title
label: 站点标题
help: 配置后,将展示站点标题。
- group: index - group: index
label: 首页设置 label: 首页设置
formSchema: formSchema:
+2 -12
查看文件
@@ -23,22 +23,12 @@
justify-content: space-between; justify-content: space-between;
} }
&__logo { .dividing {
display: flex;
flex: 1; flex: 1;
&:after {
content: '';
background: repeating-linear-gradient(90deg, var(--foreground), var(--foreground) 2px, transparent 0, transparent 16px); background: repeating-linear-gradient(90deg, var(--foreground), var(--foreground) 2px, transparent 0, transparent 16px);
display: block; display: block;
width: 100%; width: 100%;
right: 10px; height: 25px;
}
a {
flex: 0 0 auto;
max-width: 100%;
}
} }
.menu { .menu {
+17 -3
查看文件
@@ -1,8 +1,22 @@
.logo { .logo {
display: flex; display: flex;
align-items: center; align-items: center;
text-decoration: none;
background: var(--foreground); .icon {
max-width: 100%;
max-height: 35px;
height: 100%;
font-size: 0;
object-fit: cover;
margin-right: 10px;
}
.text {
display: flex;
padding: 3px 10px;
color: var(--background); color: var(--background);
padding: 5px 10px; background: var(--foreground);
text-decoration: none;
margin-right: 16px;
}
} }
+1
查看文件
@@ -92,6 +92,7 @@
&-content { &-content {
margin-top: 30px; margin-top: 30px;
font-family: Hack, Monaco, Consolas, 'Ubuntu Mono', PingHei, 'PingFang SC', 'Microsoft YaHei', monospace;
} }
&-cover { &-cover {
+5 -5
查看文件
@@ -1,11 +1,11 @@
<header class="header"> <header class="header" xmlns:th="http://www.w3.org/1999/xhtml">
<div th:fragment="header" th:with="menu = ${menuFinder.getPrimary()}"> <div th:fragment="header" th:with="menu = ${menuFinder.getPrimary()}">
<div class="header__inner"> <div class="header__inner">
<div class="header__logo"> <a class="logo" href="/" style="text-decoration: none">
<a href="/" style="text-decoration: none"> <img class="icon" th:if="${not #strings.isEmpty(theme.config.basic.logo)}" th:src="${theme.config.basic.logo}" alt="Logo" />
<div class="logo" th:text="${site.title}">Blog Title</div> <div class="text" th:if="${not #strings.isEmpty(theme.config.basic.title)}" th:text="${theme.config.basic.title}"></div>
</a> </a>
</div> <div class="dividing"></div>
<button <button
id="search-button" id="search-button"
type="button" type="button"
+2 -2
查看文件
@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title th:text="${site.title}"></title> <title th:text="${site.title}"></title>
<link rel="stylesheet" th:href="@{/assets/dist/style.css?version=v1.0.0}" href="./assets/dist/style.css" /> <link rel="stylesheet" th:href="@{/assets/dist/style.css?version=v1.0.1}" href="./assets/dist/style.css" />
</head> </head>
<!-- 根据情况判断是否添加开启像素化样式 --> <!-- 根据情况判断是否添加开启像素化样式 -->
<body class="main" th:classappend="${theme.config.basic.pixel_style} ? 'pixel_style' : '' "> <body class="main" th:classappend="${theme.config.basic.pixel_style} ? 'pixel_style' : '' ">
@@ -26,6 +26,6 @@
<th:block th:replace="${footer}" /> <th:block th:replace="${footer}" />
</th:block> </th:block>
</div> </div>
<script th:src="@{/assets/dist/main.iife.js?version=v1.0.0}"></script> <script th:src="@{/assets/dist/main.iife.js?version=v1.0.1}"></script>
</body> </body>
</html> </html>
+1 -1
查看文件
@@ -13,5 +13,5 @@ spec:
repo: https://git.dev.cm/theme-terminal repo: https://git.dev.cm/theme-terminal
settingName: "theme-terminal-setting" settingName: "theme-terminal-setting"
configMapName: "theme-terminal-configMap" configMapName: "theme-terminal-configMap"
version: 1.0.0 version: 1.0.1
require: ">=2.8.0" require: ">=2.8.0"