[feat] 完成了一些个性化修改。
1. 新增引用文字颜色和文章标题时间颜色配置,能够单独修改主页文章时间以及文章引用部分的字体颜色。 2. 修改主题名称 3. 页头竖线修改成斜线 4. 菜单栏父菜单整个都会触发下拉菜单栏 5. 主页文章在右侧可以显示封面
This commit is contained in:
+35
-25
@@ -17,32 +17,42 @@
|
||||
</section>
|
||||
<section class="posts">
|
||||
<article class="post on-list" th:each="post : ${posts.items}">
|
||||
<header>
|
||||
<h2 class="post-title">
|
||||
<span class="pin" th:classappend="${theme.config?.index_page?.pin_pos}" th:if="${post.spec.pinned} and ${theme.config?.index_page?.show_pin}">
|
||||
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path fill="currentColor" d="M5 2h14a1 1 0 0 1 1 1v19.143a.5.5 0 0 1-.766.424L12 18.03l-7.234 4.536A.5.5 0 0 1 4 22.143V3a1 1 0 0 1 1-1m13 2H6v15.432l6-3.761l6 3.761z" />
|
||||
</svg>
|
||||
<svg class="icon-pixel" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path fill="currentColor" d="M18 2H6v2h12v16h-2v-2h-2v-2h-4v2H8v2H6V2H4v20h4v-2h2v-2h4v2h2v2h4V2z" />
|
||||
</svg>
|
||||
</span>
|
||||
<a data-pjax th:text="${post.spec.title}" th:href="@{${post.status.permalink}}">Post Title</a>
|
||||
</h2>
|
||||
<div class="post-meta">
|
||||
<time class="post-date"
|
||||
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.general.time_style == 'custom' ?
|
||||
theme.config.general.custom_time_style : theme.config.general.time_style}__')}">Publish Time</time>
|
||||
<span class="post-author"
|
||||
th:with="contributor = ${post.contributors[0]}"
|
||||
th:text="${contributor.displayName}">Author</span><th:block th:replace="~{modules/tag-list(post = ${post}, show = ${theme.config.index_page.show_tags})}"/>
|
||||
<div class="post-wrapper">
|
||||
<div class="post-content-wrapper">
|
||||
<header>
|
||||
<h2 class="post-title">
|
||||
<span class="pin" th:classappend="${theme.config?.index_page?.pin_pos}" th:if="${post.spec.pinned} and ${theme.config?.index_page?.show_pin}">
|
||||
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path fill="currentColor" d="M5 2h14a1 1 0 0 1 1 1v19.143a.5.5 0 0 1-.766.424L12 18.03l-7.234 4.536A.5.5 0 0 1 4 22.143V3a1 1 0 0 1 1-1m13 2H6v15.432l6-3.761l6 3.761z" />
|
||||
</svg>
|
||||
<svg class="icon-pixel" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path fill="currentColor" d="M18 2H6v2h12v16h-2v-2h-2v-2h-4v2H8v2H6V2H4v20h4v-2h2v-2h4v2h2v2h4V2z" />
|
||||
</svg>
|
||||
</span>
|
||||
<a data-pjax th:text="${post.spec.title}" th:href="@{${post.status.permalink}}">Post Title</a>
|
||||
</h2>
|
||||
<div class="post-title-time">
|
||||
<time class="post-date"
|
||||
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.general.time_style == 'custom' ?
|
||||
theme.config.general.custom_time_style : theme.config.general.time_style}__')}">Publish Time</time>
|
||||
<span class="post-author"
|
||||
th:with="contributor = ${post.contributors[0]}"
|
||||
th:text="${contributor.displayName}">Author</span>
|
||||
<th:block th:replace="~{modules/tag-list(post = ${post}, show = ${theme.config.index_page.show_tags})}"/>
|
||||
</div>
|
||||
</header>
|
||||
<div class="post-excerpt">
|
||||
<span th:text="${post.status.excerpt}">Post Excerpt...</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-cover-wrapper" th:if="${post.spec.cover}">
|
||||
<img class="post-cover-image"
|
||||
th:src="${post.spec.cover}"
|
||||
th:srcset="|${thumbnail.gen(post.spec.cover, 's')} 400w, ${thumbnail.gen(post.spec.cover, 'm')} 800w, ${thumbnail.gen(post.spec.cover, 'l')} 1200w|"
|
||||
sizes="(max-width: 800px) 100vw, 400px"
|
||||
th:alt="${post.spec.title}"
|
||||
loading="lazy"/>
|
||||
</div>
|
||||
</header>
|
||||
<div class="post-excerpt">
|
||||
<span th:text="${post.status.excerpt}">Post Excerpt...</span>
|
||||
</div>
|
||||
<div>
|
||||
<a data-pjax class="read-more button inline" th:href="@{${post.status.permalink}}" th:text="#{page.post.more} + ' >'">READ MORE ></a>
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user