feat: release Terminal-Witcher 3.1.17 and project handoff
Ship responsive navigation, configurable profile and four-section homepage, article/life category separation, natural-ratio book covers, and independent border settings. Include release history and complete context handoff documentation.
This commit is contained in:
@@ -0,0 +1,216 @@
|
||||
<div class="homepage" th:fragment="home" th:attr="data-intro-style=${theme.config.index_page?.intro_style ?: 'detailed'}"
|
||||
th:with="home=${theme.config.index_page},
|
||||
profileEnabled=${home?.profile_enable != false},
|
||||
hasWelcome=${not #strings.isEmpty(home.notice_title) or not #strings.isEmpty(home.notice_content)},
|
||||
hasProfileText=${not #strings.isEmpty(home?.profile_name) or not #strings.isEmpty(home?.profile_role) or not #strings.isEmpty(home?.profile_bio) or not #strings.isEmpty(home?.profile_url)},
|
||||
hasProfile=${hasProfileText or not #strings.isEmpty(home?.profile_photo)},
|
||||
noteLimit=${home?.note_limit ?: 6},
|
||||
lifeLimit=${home?.life_limit ?: 6},
|
||||
bookLimit=${home?.book_limit ?: 4},
|
||||
projectLimit=${home?.project_limit ?: 4},
|
||||
articleSource=${home?.article_source ?: 'all'},
|
||||
dateFormat=${theme.config.general.time_style == 'custom' ? theme.config.general.custom_time_style : theme.config.general.time_style},
|
||||
categories=${categoryFinder.listAll()},
|
||||
lifeMatches=${categories.?[spec.displayName == '生活' or spec.slug == 'life']},
|
||||
lifeCategoryName=${not #strings.isEmpty(home?.life_category) ? home.life_category : (not #lists.isEmpty(lifeMatches) ? lifeMatches[0].metadata.name : null)},
|
||||
noteCategoryName=${articleSource == 'category' ? home?.note_category : null},
|
||||
lifeCategory=${#strings.isEmpty(lifeCategoryName) ? null : categoryFinder.getByName(lifeCategoryName)},
|
||||
noteCategory=${#strings.isEmpty(noteCategoryName) ? null : categoryFinder.getByName(noteCategoryName)},
|
||||
lifeCategoryNames=${lifeCategory == null ? {} : categories.?[metadata.name == #vars.lifeCategory.metadata.name or #lists.contains(#vars.categoryFinder.getBreadcrumbs(metadata.name).![metadata.name], #vars.lifeCategory.metadata.name)].![metadata.name]},
|
||||
noteCategoryNames=${lifeCategory == null or noteCategory == null ? {} : categories.?[metadata.name == #vars.noteCategory.metadata.name or #lists.contains(#vars.categoryFinder.getBreadcrumbs(metadata.name).![metadata.name], #vars.noteCategory.metadata.name)].![metadata.name]},
|
||||
sourcePosts=${lifeCategory == null ? (noteCategory != null ? postFinder.list({page: 1, size: noteLimit, categoryName: noteCategory.metadata.name}) : postFinder.list({page: 1, size: noteLimit})).items : postFinder.listAll()},
|
||||
notes=${lifeCategory == null ? sourcePosts : sourcePosts.?[
|
||||
status.hideFromList != true
|
||||
and (#vars.noteCategory == null or (not #lists.isEmpty(spec.categories) and not #lists.isEmpty(spec.categories.?[#lists.contains(#vars.noteCategoryNames, #this)])))
|
||||
and (#lists.isEmpty(spec.categories) or #lists.isEmpty(spec.categories.?[#lists.contains(#vars.lifeCategoryNames, #this)]))
|
||||
]},
|
||||
books=${home?.books},
|
||||
manualProjects=${home?.projects},
|
||||
usePortfolioPlugin=${home?.project_source != 'manual' and pluginFinder.available('portfolio')}">
|
||||
<div class="home-intro" th:if="${hasWelcome or (profileEnabled and hasProfile)}"
|
||||
th:attr="data-split=${profileEnabled ? (home?.profile_split ?: 'aligned') : 'single'}">
|
||||
<aside class="home-profile" th:if="${profileEnabled and hasProfile}" th:attr="aria-label=#{home.profile.title}">
|
||||
<div class="home-profile-copy" th:if="${hasProfileText}">
|
||||
<h2 class="home-profile-name" th:if="${not #strings.isEmpty(home?.profile_name)}" th:text="${home.profile_name}"></h2>
|
||||
<p class="home-profile-role" th:if="${not #strings.isEmpty(home?.profile_role)}" th:text="${home.profile_role}"></p>
|
||||
<p class="home-profile-bio" th:if="${not #strings.isEmpty(home?.profile_bio)}" th:text="${home.profile_bio}"></p>
|
||||
<a class="home-profile-link" th:if="${not #strings.isEmpty(home?.profile_url)}"
|
||||
th:href="${home.profile_url}" th:text="#{home.profile.more}">About me</a>
|
||||
</div>
|
||||
<img class="home-profile-photo" th:if="${not #strings.isEmpty(home?.profile_photo)}"
|
||||
th:src="${home.profile_photo}"
|
||||
th:alt="${not #strings.isEmpty(home?.profile_name) ? home.profile_name : #messages.msg('home.profile.photo')}"
|
||||
width="112" height="140" decoding="async"/>
|
||||
</aside>
|
||||
<section class="index-content home-welcome" th:if="${hasWelcome}">
|
||||
<svg class="home-welcome-art" viewBox="0 0 360 160" fill="none" aria-hidden="true" focusable="false"
|
||||
th:if="${home?.intro_style != 'plain'}">
|
||||
<g stroke="currentColor" stroke-width="1">
|
||||
<path d="M16 124h92l36-36h104l48-48h48M64 148h78l32-32h90l48-48h32M112 28h58l32 32h80l26-26h36"/>
|
||||
<path d="M208 4v24l28 28M280 160v-24l40-40h24"/>
|
||||
<circle cx="16" cy="124" r="3"/><circle cx="64" cy="148" r="3"/>
|
||||
<circle cx="112" cy="28" r="3"/><circle cx="208" cy="4" r="3"/>
|
||||
<circle cx="344" cy="40" r="3"/><circle cx="344" cy="68" r="3"/>
|
||||
<circle cx="344" cy="34" r="3"/><circle cx="344" cy="96" r="3"/>
|
||||
</g>
|
||||
</svg>
|
||||
<h1 class="typed-text" th:if="${not #strings.isEmpty(home.notice_title)}" th:text="${home.notice_title}">Hello Terminal!</h1>
|
||||
<div class="home-welcome-description" th:if="${not #strings.isEmpty(home.notice_content)}"
|
||||
th:utext="${home.notice_content}"></div>
|
||||
<div class="home-welcome-footer" th:if="${home.show_sns or home?.intro_style != 'plain'}">
|
||||
<div id="sns" class="home-social" th:if="${home.show_sns}">
|
||||
<th:block th:replace="~{modules/sns :: sns}"/>
|
||||
</div>
|
||||
<nav class="home-welcome-links" th:if="${home?.intro_style != 'plain'}" th:attr="aria-label=#{home.welcome.links}">
|
||||
<a data-pjax href="/archives"><span th:text="#{home.welcome.articles}">Article archive</span><svg viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M3 8h10M9 4l4 4-4 4"/></svg></a>
|
||||
<a data-pjax th:href="${#strings.isEmpty(home?.projects_more_url) ? '/portfolio' : home.projects_more_url}"><span th:text="#{home.projects.title}">Portfolio</span><svg viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M3 8h10M9 4l4 4-4 4"/></svg></a>
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section id="sns" class="home-social" th:if="${home.show_sns and not hasWelcome}">
|
||||
<th:block th:replace="~{modules/sns :: sns}"/>
|
||||
</section>
|
||||
|
||||
<div class="home-row home-row--top">
|
||||
<section class="home-section home-notes" aria-labelledby="home-notes-title">
|
||||
<header class="home-section-heading">
|
||||
<h2 id="home-notes-title" th:text="#{home.notes.title}">Articles</h2>
|
||||
<a data-pjax class="home-more"
|
||||
th:href="${noteCategory != null ? noteCategory.status.permalink : '/archives'}"
|
||||
th:text="#{home.notes.more}">More</a>
|
||||
</header>
|
||||
<div class="posts home-note-list" th:if="${not #lists.isEmpty(notes)}"
|
||||
th:attr="data-columns=${home?.article_columns ?: 'auto'}">
|
||||
<th:block th:each="post, postStat : ${notes}">
|
||||
<th:block th:if="${postStat.index < noteLimit}">
|
||||
<th:block th:replace="~{modules/home :: note(post=${post})}"/>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
<p class="home-empty" th:if="${#lists.isEmpty(notes)}" th:text="#{home.notes.empty}">No articles yet.</p>
|
||||
</section>
|
||||
|
||||
<section class="home-section home-life" aria-labelledby="home-life-title">
|
||||
<header class="home-section-heading">
|
||||
<h2 id="home-life-title" th:text="#{home.life.title}">Life</h2>
|
||||
<a data-pjax class="home-more"
|
||||
th:href="${lifeCategory != null ? lifeCategory.status.permalink : '/categories'}" th:text="#{home.life.more}">More</a>
|
||||
</header>
|
||||
<div class="home-life-list">
|
||||
<th:block th:if="${lifeCategory != null}"
|
||||
th:with="lifePosts=${postFinder.list({page: 1, size: lifeLimit, categoryName: lifeCategory.metadata.name, sort: {'spec.publishTime,desc'}})}">
|
||||
<article class="home-life-post" th:each="post : ${lifePosts.items}">
|
||||
<a class="home-life-cover" data-pjax th:if="${not #strings.isEmpty(post.spec.cover)}"
|
||||
th:href="${post.status.permalink}" th:attr="aria-label=${post.spec.title}">
|
||||
<img th:src="${post.spec.cover}" alt="" width="96" height="96" loading="lazy" decoding="async"/>
|
||||
</a>
|
||||
<div class="home-life-copy">
|
||||
<h3><a data-pjax th:href="${post.status.permalink}" th:text="${post.spec.title}" th:title="${post.spec.title}">Post title</a></h3>
|
||||
<time class="post-title-time" th:if="${post.spec.publishTime != null}"
|
||||
th:datetime="${post.spec.publishTime}" th:text="${#dates.format(post.spec.publishTime, dateFormat)}"></time>
|
||||
<p class="home-summary" th:if="${not #strings.isEmpty(post.status.excerpt)}"
|
||||
th:text="${post.status.excerpt}"></p>
|
||||
</div>
|
||||
</article>
|
||||
<p class="home-empty" th:if="${#lists.isEmpty(lifePosts.items)}" th:text="#{home.life.empty}">Life, to be continued.</p>
|
||||
</th:block>
|
||||
<p class="home-empty" th:if="${lifeCategory == null}" th:text="#{home.life.empty}">Life, to be continued.</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="home-row home-row--bottom">
|
||||
<section class="home-section home-reading" aria-labelledby="home-reading-title">
|
||||
<header class="home-section-heading">
|
||||
<h2 id="home-reading-title" th:text="#{home.reading.title}">Reading</h2>
|
||||
<a data-pjax class="home-more"
|
||||
th:href="${#strings.isEmpty(home?.books_more_url) ? '/read' : home.books_more_url}" th:text="#{home.reading.more}">More</a>
|
||||
</header>
|
||||
<div class="home-book-grid" th:if="${not #lists.isEmpty(books)}">
|
||||
<article class="home-book" th:each="book, bookStat : ${books}" th:if="${bookStat.index < bookLimit}">
|
||||
<a class="home-book-cover" data-pjax th:href="${#strings.isEmpty(book.url) ? null : book.url}"
|
||||
th:attr="aria-label=${book.title}">
|
||||
<img th:if="${not #strings.isEmpty(book.cover)}" th:src="${book.cover}" th:alt="${book.title}"
|
||||
width="240" height="360" loading="lazy"/>
|
||||
<span class="home-book-placeholder" th:if="${#strings.isEmpty(book.cover)}" th:text="${book.title}"></span>
|
||||
</a>
|
||||
<h3 class="home-book-title" th:text="${book.title}">Book title</h3>
|
||||
<p class="home-book-comment" th:if="${not #strings.isEmpty(book.comment)}"
|
||||
th:text="${book.comment}" th:title="${book.comment}"></p>
|
||||
</article>
|
||||
</div>
|
||||
<p class="home-empty" th:if="${#lists.isEmpty(books)}" th:text="#{home.reading.empty}">A place for books and thoughts.</p>
|
||||
</section>
|
||||
|
||||
<section class="home-section home-projects" aria-labelledby="home-projects-title">
|
||||
<header class="home-section-heading">
|
||||
<h2 id="home-projects-title" th:text="#{home.projects.title}">Portfolio</h2>
|
||||
<a data-pjax class="home-more"
|
||||
th:href="${#strings.isEmpty(home?.projects_more_url) ? '/portfolio' : home.projects_more_url}"
|
||||
th:text="#{home.projects.more}">More</a>
|
||||
</header>
|
||||
<!-- Keep plugin Finder calls inside the availability guard. -->
|
||||
<th:block th:if="${usePortfolioPlugin}" th:with="projectResult=${projectFinder.list(1, projectLimit)}">
|
||||
<div class="home-project-grid" th:if="${not #lists.isEmpty(projectResult.items)}">
|
||||
<th:block th:each="project : ${projectResult.items}">
|
||||
<th:block th:replace="~{modules/home :: project(title=${project.title}, cover=${project.cover}, summary=${project.summary}, url=@{/portfolio/{slug}(slug=${project.slug})}, repoUrl=${project.repoUrl})}"/>
|
||||
</th:block>
|
||||
</div>
|
||||
<p class="home-empty" th:if="${#lists.isEmpty(projectResult.items)}" th:text="#{home.projects.empty}">Projects in progress.</p>
|
||||
</th:block>
|
||||
<th:block th:unless="${usePortfolioPlugin}">
|
||||
<div class="home-project-grid" th:if="${not #lists.isEmpty(manualProjects)}">
|
||||
<th:block th:each="project, projectStat : ${manualProjects}">
|
||||
<th:block th:if="${projectStat.index < projectLimit}">
|
||||
<th:block th:replace="~{modules/home :: project(title=${project.title}, cover=${project.cover}, summary=${project.summary}, url=${project.url}, repoUrl=${project.repoUrl})}"/>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
<p class="home-empty" th:if="${#lists.isEmpty(manualProjects)}" th:text="#{home.projects.empty}">Projects in progress.</p>
|
||||
</th:block>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<article class="home-note-post home-article-card" th:fragment="note(post)">
|
||||
<a class="home-article-link" data-pjax th:href="${post.status.permalink}" th:title="${post.spec.title}"
|
||||
th:attr="aria-labelledby=|home-article-title-${post.metadata.name}|">
|
||||
<div class="home-article-cover">
|
||||
<img th:if="${not #strings.isEmpty(post.spec.cover)}" th:src="${post.spec.cover}" th:alt="${post.spec.title}"
|
||||
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: 480px) 100vw, (max-width: 899px) 50vw, 33vw"
|
||||
width="480" height="480" loading="lazy"/>
|
||||
<span class="home-article-placeholder" th:if="${#strings.isEmpty(post.spec.cover)}" aria-hidden="true">>_</span>
|
||||
<span class="home-article-pin" th:if="${post.spec.pinned and home?.show_pin}" th:text="#{home.notes.pinned}">Pinned</span>
|
||||
</div>
|
||||
<div class="home-article-content">
|
||||
<h3 class="home-article-title" th:id="|home-article-title-${post.metadata.name}|" th:text="${post.spec.title}">Post title</h3>
|
||||
<p class="home-article-excerpt" th:text="${post.status.excerpt}"></p>
|
||||
<time class="home-article-date" th:if="${post.spec.publishTime != null}" th:datetime="${post.spec.publishTime}"
|
||||
th:text="${#dates.format(post.spec.publishTime, dateFormat)}"></time>
|
||||
<div class="home-article-tags" th:if="${home.show_tags}">
|
||||
<span th:each="tag : ${post.tags}" th:text="|#${tag.spec.displayName}|" th:title="${tag.spec.displayName}"></span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
|
||||
<article class="home-project" th:fragment="project(title, cover, summary, url, repoUrl)">
|
||||
<a class="home-project-cover" data-pjax th:if="${not #strings.isEmpty(cover)}"
|
||||
th:href="${#strings.isEmpty(url) ? null : url}" th:attr="aria-label=${title}">
|
||||
<img th:src="${cover}" th:alt="${title}" width="640" height="360" loading="lazy"/>
|
||||
</a>
|
||||
<h3 class="post-title home-project-title">
|
||||
<a data-pjax th:href="${#strings.isEmpty(url) ? null : url}" th:text="${title}">Project title</a>
|
||||
</h3>
|
||||
<p class="home-summary" th:if="${not #strings.isEmpty(summary)}" th:text="${summary}"></p>
|
||||
<a class="home-repository" th:if="${not #strings.isEmpty(repoUrl)}" th:href="${repoUrl}"
|
||||
target="_blank" rel="noopener noreferrer">
|
||||
<svg th:if="${#strings.contains(repoUrl, 'github.com/')}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
|
||||
<path d="M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2.3c-3.3.7-4-1.4-4-1.4-.5-1.4-1.3-1.7-1.3-1.7-1.1-.8.1-.8.1-.8 1.2.1 1.8 1.2 1.8 1.2 1.1 1.8 2.8 1.3 3.5 1 .1-.8.4-1.3.8-1.6-2.7-.3-5.5-1.3-5.5-5.9 0-1.3.5-2.4 1.2-3.2-.1-.3-.5-1.6.1-3.2 0 0 1-.3 3.3 1.2a11.5 11.5 0 0 1 6 0c2.3-1.5 3.3-1.2 3.3-1.2.6 1.6.2 2.9.1 3.2.8.8 1.2 1.9 1.2 3.2 0 4.6-2.8 5.6-5.5 5.9.5.4.8 1.1.8 2.2v3.3c0 .3.2.7.8.6A12 12 0 0 0 12 .3Z"/>
|
||||
</svg>
|
||||
<span th:text="${#strings.contains(repoUrl, 'github.com/') ? 'GitHub' : #messages.msg('page.portfolio.repository')}">GitHub</span>
|
||||
</a>
|
||||
</article>
|
||||
Reference in New Issue
Block a user