From 074201c7bc9c1a5855cf3b7e4d014f68a317390d Mon Sep 17 00:00:00 2001 From: mjsoftware <1406993111@qq.com> Date: Mon, 12 Feb 2024 08:23:19 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=94=AF=E6=8C=81=E9=A1=B5=E8=84=9A?= =?UTF-8?q?=E5=AF=B9=E9=BD=90=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.yaml | 10 ++++++++++ src/css/style.less | 10 ++++++++++ templates/common/footer.html | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/settings.yaml b/settings.yaml index 7847b8b..dcb067f 100644 --- a/settings.yaml +++ b/settings.yaml @@ -59,6 +59,16 @@ spec: name: cloud_by_url label: '云服务提供商 URL' placeholder: '请输入链接地址' + - $formkit: radio + name: footer_center + label: 页脚对齐方式 + value: false + help: 在非移动设备下改变页脚的对齐方式。 + options: + - label: 左侧 + value: false + - label: 居中 + value: true - group: basic_style label: '基础样式' formSchema: diff --git a/src/css/style.less b/src/css/style.less index ad86296..a7a33a4 100644 --- a/src/css/style.less +++ b/src/css/style.less @@ -3896,6 +3896,16 @@ button.swiper-pagination-bullet { } } +@media (min-width: (@mobile-max-width - 1)) { + .footer-center { + text-align: center; + + & > li { + text-align: left; + } + } +} + @media (max-width: (@desktop-min-width - 1)) { .navbar { .navbar-search .input { diff --git a/templates/common/footer.html b/templates/common/footer.html index 48e1498..033a3eb 100644 --- a/templates/common/footer.html +++ b/templates/common/footer.html @@ -1,6 +1,6 @@ <footer class="footer" xmlns:th="https://www.thymeleaf.org"> <div class="container"> - <ul class="footer-container"> + <ul th:class="${theme.config.basic_info.footer_center} ? 'footer-container footer-center' : 'footer-container'"> <li> <a class="logo-title" th:href="${site.url}"> <th:block th:if="${#strings.isEmpty(site.logo)}" th:text="${site.title}"/>