perf:瞬间、相册界面标题和浏览器标签页标题跟随瞬间、相册插件的页面标题设置 (#99)

* perf:优化相册界面标题和浏览器标签页标题跟随相册插件的页面标题设置

* perf:优化瞬间界面标题和浏览器标签页标题跟随瞬间插件的页面标题设置
This commit is contained in:
mjking 2024-01-22 11:01:43 +08:00 committed by GitHub
parent ae30a3b1f5
commit 72fae3c2de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 5 deletions

View File

@ -1,9 +1,14 @@
<!DOCTYPE html>
<th:block
th:insert="~{common/layout :: layout (title = '瞬间 - ' + ${site.title}, canonical = @{/moments}, content = ~{::content}, isPost = true)}"
th:insert="~{common/layout :: layout (title = ${title} + ' - ' + ${site.title}, canonical = @{/moments}, content = ~{::content}, isPost = true)}"
th:with="isJournals = true, enableShare = ${theme.config.page_config.enable_journals_share}, baseEnableComment = ${theme.config.page_config.enable_journals_comment}"
xmlns:th="https://www.thymeleaf.org">
<th:block th:fragment="content">
<div class="card card-content friends-hide-stats">
<div class="card-tab">
<div>[[${#strings.replace(title, ' - ' + site.title, '')}]]</div>
</div>
</div>
<div class="card card-content journal" th:each="moment : ${moments.items}">
<p class="journal-date">
<i class="ri-send-plane-line"></i>
@ -43,4 +48,4 @@
</div>
<th:block th:replace="~{main/pagination :: pagination (${moments}, '/moments')}"/>
</th:block>
</th:block>
</th:block>

View File

@ -1,10 +1,10 @@
<!DOCTYPE html>
<th:block xmlns:th="https://www.thymeleaf.org"
th:insert="~{common/layout :: layout (title = '我的相册 - ' + ${site.title}, canonical = @{/links}, content = ~{::content}, isPost = false)}"
th:insert="~{common/layout :: layout (title = ${title} + ' - ' + ${site.title}, canonical = @{/links}, content = ~{::content}, isPost = false)}"
th:with="isPhotos = true">
<th:block th:fragment="content">
<div class="card card-content photos">
<div class="card-tab"><div>我的相册</div></div>
<div class="card-tab"><div>[[${#strings.replace(title, ' - ' + site.title, '')}]]</div></div>
<div class="photos-teams">
<a th:class="${#strings.isEmpty(param.group)? 'item active' : 'item'}" th:href="@{/photos}">全部</a>
<a th:each="group : ${groups}" th:class="${#strings.equals(param.group, group.metadata.name)? 'item active' : 'item'}" th:href="@{/photos(group=${group.metadata.name})}" th:text="${group.spec.displayName}"></a>
@ -49,4 +49,4 @@
}, 500);
</script>
</th:block>
</th:block>
</th:block>