style: update layout

This commit is contained in:
Erzbir
2026-06-28 22:15:14 +08:00
parent 7baea6bb1c
commit 09bd2638ad
9 changed files with 382 additions and 580 deletions
+13
View File
@@ -12,3 +12,16 @@ page.post.more=READ MORE
page.post.pagination=READ MORE POSTS
page.post.comment=Comments
page.error.back=Back to home page
page.portfolio.title=Portfolio
page.portfolio.empty=No projects found.
page.portfolio.featured=Featured
page.portfolio.detail=Detail
page.portfolio.repository=Repository
page.portfolio.demo=Demo
page.portfolio.docs=Docs
page.portfolio.links=Links
page.portfolio.back=Portfolio
page.portfolio.tech_stack=Tech Stack
page.portfolio.tags=Tags
page.portfolio.description=Description
page.portfolio.content=Content
+13
View File
@@ -12,3 +12,16 @@ page.post.more=READ MORE
page.post.pagination=READ MORE POSTS
page.post.comment=Comments
page.error.back=Back to home page
page.portfolio.title=Portfolio
page.portfolio.empty=No projects found.
page.portfolio.featured=Featured
page.portfolio.detail=Detail
page.portfolio.repository=Repository
page.portfolio.demo=Demo
page.portfolio.docs=Docs
page.portfolio.links=Links
page.portfolio.back=Portfolio
page.portfolio.tech_stack=Tech Stack
page.portfolio.tags=Tags
page.portfolio.description=Description
page.portfolio.content=Content
+13
View File
@@ -12,3 +12,16 @@ page.post.more=LEER MÁS
page.post.pagination=LEER MÁS PUBLICACIONES
page.post.comment=Comentarios
page.error.back=Volver a la página principal
page.portfolio.title=Portafolio
page.portfolio.empty=No se encontraron proyectos.
page.portfolio.featured=Destacado
page.portfolio.detail=Detalles
page.portfolio.repository=Repositorio
page.portfolio.demo=Demo
page.portfolio.docs=Documentación
page.portfolio.links=Enlaces
page.portfolio.back=Portafolio
page.portfolio.tech_stack=Tecnologías
page.portfolio.tags=Etiquetas
page.portfolio.description=Descripción
page.portfolio.content=Contenido
+13
View File
@@ -12,3 +12,16 @@ page.post.more=阅读更多
page.post.pagination=更多文章
page.post.comment=评论
page.error.back=返回首页
page.portfolio.title=项目作品集
page.portfolio.empty=暂无项目
page.portfolio.featured=推荐
page.portfolio.detail=详情
page.portfolio.repository=仓库
page.portfolio.demo=演示
page.portfolio.docs=文档
page.portfolio.links=链接
page.portfolio.back=项目集
page.portfolio.tech_stack=技术栈
page.portfolio.tags=标签
page.portfolio.description=说明
page.portfolio.content=详细内容
+13
View File
@@ -12,3 +12,16 @@ page.post.more=閱讀更多
page.post.pagination=閱讀更多文章
page.post.comment=評論
page.error.back=返回首頁
page.portfolio.title=項目作品集
page.portfolio.empty=暫無項目
page.portfolio.featured=推薦
page.portfolio.detail=詳情
page.portfolio.repository=倉庫
page.portfolio.demo=演示
page.portfolio.docs=文件
page.portfolio.links=連結
page.portfolio.back=項目集
page.portfolio.tech_stack=技術堆疊
page.portfolio.tags=標籤
page.portfolio.description=說明
page.portfolio.content=詳細內容
+194 -437
View File
@@ -1,470 +1,227 @@
@use "variables" as *;
// ─── Portfolio Listing (ls -la style) ─────────────────────────────
.portfolio-listing {
&-post {
.post-title {
margin-bottom: calc(var(--size-theme-font) * 0.25);
}
}
&-subtitle {
font-size: calc(var(--size-theme-font) * 0.85);
color: var(--color-theme-meta);
opacity: 0.7;
margin-bottom: calc(var(--size-theme-font) * 1.75);
font-family: var(--family-theme-font), monospace;
}
&-header {
display: none;
@media (min-width: 640px) {
display: flex;
padding: 0 calc(var(--size-theme-font) * 0.625) calc(var(--size-theme-font) * 0.375);
gap: calc(var(--size-theme-font) * 0.75);
font-size: calc(var(--size-theme-font) * 0.7);
color: var(--color-theme-meta);
opacity: 0.45;
text-transform: uppercase;
letter-spacing: 0.06em;
font-family: var(--family-theme-font), monospace;
border-bottom: var(--width-theme-border) var(--style-theme-border) var(--color-theme-meta);
}
&-perms { flex-shrink: 0; min-width: calc(var(--size-theme-font) * 11); }
&-type,
&-platform { flex-shrink: 0; width: calc(var(--size-theme-font) * 8); }
&-name { flex: 1; }
}
&-container {
display: flex;
flex-direction: column;
font-family: var(--family-theme-font), monospace;
}
&-divider {
padding: 0 calc(var(--size-theme-font) * 0.625);
opacity: 0.18;
font-size: calc(var(--size-theme-font) * 0.68);
color: var(--color-theme-meta);
font-family: var(--family-theme-font), monospace;
overflow: hidden;
span {
display: block;
overflow: hidden;
white-space: nowrap;
}
}
&-entry {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: calc(var(--size-theme-font) * 0.25) calc(var(--size-theme-font) * 0.75);
padding: calc(var(--size-theme-font) * 0.5) calc(var(--size-theme-font) * 0.625);
position: relative;
transition: background-color 0.12s ease;
&:hover {
background-color: rgba(128, 128, 128, 0.05);
}
&-featured {
.portfolio-listing-permissions {
color: var(--color-theme-tag);
}
}
}
&-permissions {
display: flex;
align-items: center;
gap: calc(var(--size-theme-font) * 0.25);
font-size: calc(var(--size-theme-font) * 0.82);
color: var(--color-theme-meta);
opacity: 0.65;
flex-shrink: 0;
min-width: calc(var(--size-theme-font) * 11);
font-family: var(--family-theme-font), monospace;
}
&-star {
font-size: calc(var(--size-theme-font) * 0.85);
width: calc(var(--size-theme-font) * 1.1);
text-align: center;
font-weight: bold;
&-empty {
opacity: 0.25;
color: var(--color-theme-meta);
}
}
&-perms {
font-family: var(--family-theme-font), monospace;
letter-spacing: 0.02em;
}
&-type,
&-platform {
font-size: calc(var(--size-theme-font) * 0.76);
color: var(--color-theme-meta);
opacity: 0.75;
flex-shrink: 0;
width: calc(var(--size-theme-font) * 8);
font-family: var(--family-theme-font), monospace;
padding-top: calc(var(--size-theme-font) * 0.15);
@media (max-width: 639px) {
display: none;
}
}
&-info {
flex: 1;
min-width: 0;
}
&-name {
font-size: calc(var(--size-theme-font) * 0.92);
color: var(--color-theme-accent);
text-decoration: none;
font-weight: 500;
font-family: var(--family-theme-font), monospace;
&:hover {
text-decoration: underline;
text-underline-offset: calc(var(--size-theme-font) * 0.15);
}
}
&-summary {
font-size: calc(var(--size-theme-font) * 0.8);
color: var(--color-theme-foreground);
opacity: 0.6;
margin: calc(var(--size-theme-font) * 0.125) 0 0;
line-height: var(--height-theme-line);
font-family: var(--family-theme-font), monospace;
}
&-techstacks {
display: flex;
flex-wrap: wrap;
gap: calc(var(--size-theme-font) * 0.25);
margin-top: calc(var(--size-theme-font) * 0.25);
}
&-techstack {
font-size: calc(var(--size-theme-font) * 0.68);
color: var(--color-theme-foreground);
border: var(--width-theme-border) var(--style-theme-border) var(--color-theme-meta);
padding: 0 calc(var(--size-theme-font) * 0.35);
opacity: 0.7;
font-family: var(--family-theme-font), monospace;
}
&-tags {
display: flex;
flex-wrap: wrap;
gap: calc(var(--size-theme-font) * 0.25);
margin-top: calc(var(--size-theme-font) * 0.25);
}
&-tag {
font-size: calc(var(--size-theme-font) * 0.68);
color: var(--color-theme-tag);
border: var(--width-theme-border) var(--style-theme-border) var(--color-theme-tag);
padding: 0 calc(var(--size-theme-font) * 0.35);
opacity: 0.8;
font-family: var(--family-theme-font), monospace;
}
&-empty {
text-align: center;
padding: calc(var(--size-theme-font) * 3) 0;
&-text {
font-size: calc(var(--size-theme-font) * 0.85);
color: var(--color-theme-meta);
opacity: 0.45;
font-family: var(--family-theme-font), monospace;
}
}
.portfolio-page {
width: 100%;
text-align: left;
padding: calc(var(--size-theme-font) * 1.875) 0;
}
// ─── Portfolio Detail (cat / stat style) ──────────────────────────
.portfolio-list {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: calc(var(--size-theme-font) * 0.875);
margin-top: calc(var(--size-theme-font) * 0.625);
}
.portfolio-detail {
&-post {
.post-title {
margin-bottom: calc(var(--size-theme-font) * 0.25);
}
}
.portfolio-list > .portfolio-item.post {
display: flex;
flex-direction: column;
min-width: 0;
padding: calc(var(--size-theme-font) * 0.875);
border: calc(var(--size-theme-font) * 0.0625) var(--style-theme-border) var(--color-theme-framed);
}
&-subtitle {
font-size: calc(var(--size-theme-font) * 0.85);
color: var(--color-theme-meta);
opacity: 0.7;
margin-bottom: calc(var(--size-theme-font) * 1.75);
font-family: var(--family-theme-font), monospace;
span {
color: var(--color-theme-accent);
}
}
&-container {
font-family: var(--family-theme-font), monospace;
}
// Cover
&-cover {
margin-bottom: calc(var(--size-theme-font) * 1.5);
border: var(--width-theme-border) var(--style-theme-border) var(--color-theme-meta);
opacity: 0.85;
&-img {
.portfolio-card-cover {
display: block;
margin-bottom: calc(var(--size-theme-font) * 0.75);
}
.portfolio-card-cover img {
width: 100%;
height: auto;
max-height: 320px;
aspect-ratio: 16 / 9;
object-fit: cover;
}
}
margin: 0;
}
// Metadata
&-meta {
margin-bottom: calc(var(--size-theme-font) * 1.5);
border: var(--width-theme-border) var(--style-theme-border) var(--color-theme-meta);
border-color: rgba(128, 128, 128, 0.2);
.portfolio-card-labels {
display: flex;
flex-wrap: wrap;
gap: 0 1ch;
margin-bottom: calc(var(--size-theme-font) * 0.45);
}
&-header {
font-size: calc(var(--size-theme-font) * 0.76);
color: var(--color-theme-meta);
opacity: 0.55;
padding: calc(var(--size-theme-font) * 0.375) calc(var(--size-theme-font) * 0.625);
border-bottom: var(--width-theme-border) var(--style-theme-border) var(--color-theme-meta);
border-color: rgba(128, 128, 128, 0.12);
font-family: var(--family-theme-font), monospace;
}
.portfolio-card-label {
color: var(--color-theme-tag);
font-size: calc(var(--size-theme-font) * 0.86);
line-height: calc(var(--size-theme-font) * 1.4);
}
&-grid {
padding: calc(var(--size-theme-font) * 0.5) calc(var(--size-theme-font) * 0.625);
.portfolio-item .post-title {
font-size: calc(var(--size-theme-font) * 1.05);
margin-bottom: calc(var(--size-theme-font) * 0.5) !important;
padding-bottom: calc(var(--size-theme-font) * 0.5) !important;
}
.portfolio-item .post-meta {
margin-bottom: 0;
}
.portfolio-meta {
display: flex;
flex-direction: column;
gap: calc(var(--size-theme-font) * 0.2);
}
}
&-row {
display: flex;
gap: calc(var(--size-theme-font) * 0.75);
font-size: calc(var(--size-theme-font) * 0.82);
line-height: var(--height-theme-line);
}
.portfolio-meta > * {
display: block;
}
&-key {
color: var(--color-theme-meta);
opacity: 0.55;
flex-shrink: 0;
width: calc(var(--size-theme-font) * 6);
font-family: var(--family-theme-font), monospace;
}
.portfolio-meta > *::before,
.portfolio-meta > *:not(:first-child):not(:empty)::before {
content: none;
margin-right: 0;
}
&-val {
color: var(--color-theme-foreground);
font-family: var(--family-theme-font), monospace;
}
.portfolio-meta-line,
.portfolio-techs,
.portfolio-tags {
line-height: calc(var(--size-theme-font) * 1.45);
}
&-val-true {
color: var(--color-theme-tag);
font-weight: bold;
}
}
.portfolio-meta-group {
display: block;
}
// Sections
&-section {
margin-bottom: calc(var(--size-theme-font) * 1.5);
.portfolio-detail-post .portfolio-meta-group {
display: inline;
}
&-header {
font-size: calc(var(--size-theme-font) * 0.78);
.portfolio-meta .portfolio-term,
.portfolio-meta .portfolio-card-label,
.portfolio-meta .portfolio-tag {
display: inline-block;
}
.portfolio-meta .portfolio-term {
color: var(--color-theme-accent);
font-weight: 500;
margin-bottom: calc(var(--size-theme-font) * 0.5);
font-family: var(--family-theme-font), monospace;
}
}
}
// Links
&-links {
display: flex;
flex-direction: column;
gap: calc(var(--size-theme-font) * 0.125);
}
.portfolio-meta .portfolio-term:not(:last-child),
.portfolio-meta .portfolio-card-label:not(:last-child),
.portfolio-meta .portfolio-tag:not(:last-child) {
margin-right: 1ch;
}
&-link {
.portfolio-item .portfolio-tags,
.portfolio-item .portfolio-tags .portfolio-tag {
color: color-mix(in srgb, var(--color-theme-accent) 72%, transparent);
}
.portfolio-detail-post .portfolio-meta-line,
.portfolio-detail-post .portfolio-meta-line .portfolio-card-label,
.portfolio-detail-post .portfolio-meta-line .portfolio-tag {
color: color-mix(in srgb, var(--color-theme-meta) 72%, transparent);
}
.portfolio-detail-post .portfolio-meta-line.post-meta {
margin-bottom: 0;
}
.portfolio-detail-post .portfolio-techs,
.portfolio-detail-post .portfolio-techs .portfolio-term {
color: var(--color-theme-accent);
}
.portfolio-item .post-excerpt {
color: color-mix(in srgb, var(--color-theme-foreground) 82%, transparent);
font-size: calc(var(--size-theme-font) * 0.86);
line-height: calc(var(--size-theme-font) * 1.55);
margin-top: calc(var(--size-theme-font) * 0.625);
margin-bottom: 0;
}
.portfolio-actions {
display: flex;
flex-wrap: wrap;
gap: 0 1.5ch;
margin-top: auto;
padding-top: calc(var(--size-theme-font) * 0.625);
a {
white-space: nowrap;
}
}
.portfolio-action {
color: var(--color-theme-accent);
font-size: calc(var(--size-theme-font) * 0.92);
}
.portfolio-action::before {
content: "[ ";
color: var(--color-theme-accent);
}
.portfolio-action::after {
content: " ]";
color: var(--color-theme-accent);
}
.portfolio-empty {
color: color-mix(in srgb, var(--color-theme-foreground) 65%, transparent);
}
.portfolio-detail-nav {
margin-top: calc(var(--size-theme-font) * 1.5625);
}
.portfolio-detail-cover {
width: auto;
max-width: 100%;
height: auto;
object-fit: contain;
}
.portfolio-detail-summary {
color: color-mix(in srgb, var(--color-theme-foreground) 86%, transparent);
}
.portfolio-detail-section {
margin-top: calc(var(--size-theme-font) * 1.5625);
h2 {
margin-bottom: calc(var(--size-theme-font) * 0.625);
}
}
.portfolio-link-list {
margin-top: calc(var(--size-theme-font) * 0.625);
}
.portfolio-link-row {
display: grid;
grid-template-columns: max-content minmax(0, 1fr);
gap: 1ch;
align-items: baseline;
gap: calc(var(--size-theme-font) * 0.5);
padding: calc(var(--size-theme-font) * 0.375) calc(var(--size-theme-font) * 0.5);
text-decoration: none;
font-size: calc(var(--size-theme-font) * 0.8);
border: var(--width-theme-border) var(--style-theme-border) transparent;
transition: border-color 0.12s ease, background-color 0.12s ease;
}
&:hover {
border-color: rgba(128, 128, 128, 0.18);
background-color: rgba(128, 128, 128, 0.03);
}
&-marker {
color: var(--color-theme-meta);
opacity: 0.4;
font-family: var(--family-theme-font), monospace;
flex-shrink: 0;
}
&-label {
color: var(--color-theme-accent);
flex-shrink: 0;
font-family: var(--family-theme-font), monospace;
}
&-url {
color: var(--color-theme-foreground);
opacity: 0.5;
.portfolio-link-url {
color: color-mix(in srgb, var(--color-theme-meta) 72%, transparent);
font-size: calc(var(--size-theme-font) * 0.9);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: var(--family-theme-font), monospace;
font-size: calc(var(--size-theme-font) * 0.74);
min-width: 0;
}
}
// Tech Stacks
&-techstacks {
display: flex;
flex-wrap: wrap;
gap: calc(var(--size-theme-font) * 0.375);
}
&-techstack {
font-size: calc(var(--size-theme-font) * 0.76);
color: var(--color-theme-foreground);
border: var(--width-theme-border) var(--style-theme-border) var(--color-theme-meta);
padding: calc(var(--size-theme-font) * 0.125) calc(var(--size-theme-font) * 0.5);
opacity: 0.7;
font-family: var(--family-theme-font), monospace;
}
// Tags
&-tags {
display: flex;
flex-wrap: wrap;
gap: calc(var(--size-theme-font) * 0.375);
}
&-tag {
font-size: calc(var(--size-theme-font) * 0.7);
color: var(--color-theme-tag);
border: var(--width-theme-border) var(--style-theme-border) var(--color-theme-tag);
padding: calc(var(--size-theme-font) * 0.125) calc(var(--size-theme-font) * 0.375);
opacity: 0.85;
font-family: var(--family-theme-font), monospace;
}
// Summary
&-summary {
font-size: calc(var(--size-theme-font) * 0.82);
color: var(--color-theme-foreground);
opacity: 0.7;
line-height: var(--height-theme-line);
margin: 0;
padding: calc(var(--size-theme-font) * 0.25) calc(var(--size-theme-font) * 0.5);
border-left: calc(var(--size-theme-font) * 0.2) solid var(--color-theme-meta);
border-color: rgba(128, 128, 128, 0.25);
font-family: var(--family-theme-font), monospace;
}
// Content (rendered Markdown)
&-content {
font-size: calc(var(--size-theme-font) * 0.85);
line-height: var(--height-theme-line);
color: var(--color-theme-foreground);
font-family: var(--family-theme-font), monospace;
h1, h2, h3, h4, h5, h6 {
color: var(--color-theme-accent);
margin: calc(var(--size-theme-font) * 1) 0 calc(var(--size-theme-font) * 0.5);
font-family: var(--family-theme-font), monospace;
}
h1 { font-size: calc(var(--size-theme-font) * 1.1); }
h2 { font-size: calc(var(--size-theme-font) * 1.0); }
h3 { font-size: calc(var(--size-theme-font) * 0.92); }
p {
margin: calc(var(--size-theme-font) * 0.25) 0;
}
code {
font-family: var(--family-theme-font), monospace;
color: var(--color-theme-tag);
opacity: 0.85;
}
pre {
border: var(--width-theme-border) var(--style-theme-border) var(--color-theme-meta);
border-color: rgba(128, 128, 128, 0.2);
padding: calc(var(--size-theme-font) * 0.625);
overflow-x: auto;
margin: calc(var(--size-theme-font) * 0.5) 0;
}
a {
color: var(--color-theme-link);
text-decoration: var(--text-decoration-theme-link);
}
ul, ol {
padding-left: calc(var(--size-theme-font) * 1.5);
margin: calc(var(--size-theme-font) * 0.25) 0;
}
blockquote {
border-left: calc(var(--size-theme-font) * 0.25) solid var(--color-theme-meta);
opacity: 0.7;
padding-left: calc(var(--size-theme-font) * 0.625);
margin: calc(var(--size-theme-font) * 0.5) 0;
}
}
// Footer prompt
&-footer {
margin-top: calc(var(--size-theme-font) * 2);
padding-top: calc(var(--size-theme-font) * 0.75);
border-top: var(--width-theme-border) var(--style-theme-border) var(--color-theme-meta);
border-color: rgba(128, 128, 128, 0.12);
&-prompt {
font-family: var(--family-theme-font), monospace;
font-size: calc(var(--size-theme-font) * 0.82);
color: var(--color-theme-meta);
opacity: 0.55;
}
&-blink {
animation: portfolio-blink 1s step-end infinite;
color: var(--color-theme-accent);
}
}
}
@keyframes portfolio-blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
.portfolio-detail-content > *:first-child {
margin-top: 0;
}
@media (max-width: $phone-max-width) {
.portfolio-list {
grid-template-columns: 1fr;
}
.portfolio-actions {
gap: 0 1.25ch;
}
.portfolio-link-row {
grid-template-columns: 1fr;
gap: 0;
}
.portfolio-link-url {
display: block;
}
}
+1
View File
@@ -10,6 +10,7 @@
@use "moment";
@use "pagination";
@use "post";
@use "portfolio";
@use "search";
@use "theme";
@use "toc";
+67 -102
View File
@@ -1,118 +1,83 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:with="platformLabels=${projectFinder.platformLabels()}, typeLabels=${projectFinder.typeLabels()},
platformLabel=${platformLabels[project.platform] ?: project.platform},
typeLabel=${typeLabels[project.type] ?: project.type},
hasCover=${project.cover != null && !project.cover.isEmpty()},
hasRepoUrl=${project.repoUrl != null && !project.repoUrl.isEmpty()},
hasDemoUrl=${project.demoUrl != null && !project.demoUrl.isEmpty()},
hasDocsUrl=${project.docsUrl != null && !project.docsUrl.isEmpty()}"
th:replace="~{modules/layout :: html(title = |${project.title} - ${site.title}|, header = null, content = ~{::content}, footer = null)}"
th:replace="~{modules/layout :: html(title = |${project.title} - #{page.portfolio.title} - ${site.title}|, header = null, content = ~{::content}, footer = null)}"
>
<th:block th:fragment="content">
<th:block th:fragment="content"
th:with="hasCover=${project.cover != null and !project.cover.isEmpty()},
hasRepoUrl=${project.repoUrl != null and !project.repoUrl.isEmpty()},
hasDemoUrl=${project.demoUrl != null and !project.demoUrl.isEmpty()},
hasDocsUrl=${project.docsUrl != null and !project.docsUrl.isEmpty()},
hasSummary=${project.summary != null and !project.summary.isEmpty()},
hasContent=${project.content != null and !project.content.isEmpty()},
hasRenderedContent=${projectContentHtml != null and !projectContentHtml.isEmpty()},
platformLabel=${platformLabels != null and project.platform != null ? (platformLabels[project.platform] ?: project.platform) : project.platform},
typeLabel=${typeLabels != null and project.type != null ? (typeLabels[project.type] ?: project.type) : project.type}">
<article class="post portfolio-detail-post">
<header>
<h1 class="post-title" th:text="${project.title}">Project Title</h1>
<div class="portfolio-detail-subtitle">&gt; cat ~/portfolio/<span th:text="${project.slug}">project-slug</span></div>
<div class="post-meta portfolio-meta"
th:if="${project.featured == true
or !#strings.isEmpty(platformLabel)
or !#strings.isEmpty(typeLabel)
or (project.techStacks != null and !project.techStacks.isEmpty())
or (project.tags != null and !project.tags.isEmpty())}">
<span class="post-meta portfolio-meta-line"
th:if="${project.featured == true
or !#strings.isEmpty(platformLabel)
or !#strings.isEmpty(typeLabel)
or (project.tags != null and !project.tags.isEmpty())}">
<span class="portfolio-meta-group" th:if="${project.featured == true or !#strings.isEmpty(platformLabel) or !#strings.isEmpty(typeLabel)}">
<span th:if="${project.featured == true}" th:text="#{page.portfolio.featured}">Featured</span>
<span class="portfolio-card-label" th:if="${!#strings.isEmpty(platformLabel)}" th:text="|[${platformLabel}]|">[GitHub]</span>
<span class="portfolio-card-label" th:if="${!#strings.isEmpty(typeLabel)}" th:text="|[${typeLabel}]|">[Open Source]</span>
</span><span class="portfolio-meta-group post-tags portfolio-tags" th:if="${project.tags != null and !project.tags.isEmpty()}"><span class="post-tag portfolio-tag" th:each="tag : ${project.tags}" th:text="|#${tag}|">#tag</span></span>
</span>
<span class="portfolio-techs" th:if="${project.techStacks != null and !project.techStacks.isEmpty()}">
<span class="portfolio-term" th:each="tech : ${project.techStacks}" th:text="|[${tech}]|">[Rust]</span>
</span>
</div>
</header>
<div class="portfolio-detail-container">
<!-- Cover Image -->
<div class="portfolio-detail-cover" th:if="${hasCover}">
<img th:src="${project.cover}" th:alt="${project.title}" class="portfolio-detail-cover-img" />
</div>
<section class="post-content portfolio-detail">
<img th:if="${hasCover == true}" th:src="${project.cover}" th:alt="${project.title}" class="portfolio-detail-cover" />
<!-- Metadata Section -->
<div class="portfolio-detail-meta" th:if="${platformLabel or typeLabel or project.slug or project.createTime}">
<div class="portfolio-detail-meta-header"># Metadata</div>
<div class="portfolio-detail-meta-grid">
<div class="portfolio-detail-meta-row" th:if="${project.title}">
<span class="portfolio-detail-meta-key">title</span>
<span class="portfolio-detail-meta-val" th:text="${project.title}">Project Name</span>
</div>
<div class="portfolio-detail-meta-row" th:if="${platformLabel}">
<span class="portfolio-detail-meta-key">platform</span>
<span class="portfolio-detail-meta-val" th:text="${platformLabel}">GitHub</span>
</div>
<div class="portfolio-detail-meta-row" th:if="${typeLabel}">
<span class="portfolio-detail-meta-key">type</span>
<span class="portfolio-detail-meta-val" th:text="${typeLabel}">Open Source</span>
</div>
<div class="portfolio-detail-meta-row" th:if="${project.slug}">
<span class="portfolio-detail-meta-key">slug</span>
<span class="portfolio-detail-meta-val" th:text="${project.slug}">project-slug</span>
</div>
<div class="portfolio-detail-meta-row" th:if="${project.featured}">
<span class="portfolio-detail-meta-key">featured</span>
<span class="portfolio-detail-meta-val portfolio-detail-meta-val-true">true</span>
</div>
<div class="portfolio-detail-meta-row" th:if="${project.createTime}">
<span class="portfolio-detail-meta-key">created</span>
<span class="portfolio-detail-meta-val" th:text="${#strings.substring(project.createTime, 0, 10)} + ' ' + ${#strings.substring(project.createTime, 11, 16)}">2024-01-01 00:00</span>
</div>
<div class="portfolio-detail-meta-row" th:if="${project.updateTime}">
<span class="portfolio-detail-meta-key">updated</span>
<span class="portfolio-detail-meta-val" th:text="${#strings.substring(project.updateTime, 0, 10)} + ' ' + ${#strings.substring(project.updateTime, 11, 16)}">2024-01-15 14:30</span>
</div>
</div>
</div>
<blockquote class="portfolio-detail-summary" th:if="${hasSummary == true}" th:text="${project.summary}">
Summary text here.
</blockquote>
<!-- Links Section -->
<div class="portfolio-detail-section" th:if="${hasRepoUrl or hasDemoUrl or hasDocsUrl}">
<div class="portfolio-detail-section-header"># Links</div>
<div class="portfolio-detail-links">
<a class="portfolio-detail-link" th:if="${hasRepoUrl}" th:href="${project.repoUrl}" target="_blank" rel="noopener noreferrer">
<span class="portfolio-detail-link-marker">↪</span>
<span class="portfolio-detail-link-label">repository</span>
<span class="portfolio-detail-link-url" th:text="${project.repoUrl}">https://github.com/...</span>
</a>
<a class="portfolio-detail-link" th:if="${hasDemoUrl}" th:href="${project.demoUrl}" target="_blank" rel="noopener noreferrer">
<span class="portfolio-detail-link-marker">↪</span>
<span class="portfolio-detail-link-label">live demo</span>
<span class="portfolio-detail-link-url" th:text="${project.demoUrl}">https://example.com</span>
</a>
<a class="portfolio-detail-link" th:if="${hasDocsUrl}" th:href="${project.docsUrl}" target="_blank" rel="noopener noreferrer">
<span class="portfolio-detail-link-marker">↪</span>
<span class="portfolio-detail-link-label">documentation</span>
<span class="portfolio-detail-link-url" th:text="${project.docsUrl}">https://docs.example.com</span>
<section class="portfolio-detail-section portfolio-detail-links" th:if="${hasRepoUrl == true or hasDemoUrl == true or hasDocsUrl == true}">
<h2 th:text="#{page.portfolio.links}">Links</h2>
<ul class="portfolio-link-list">
<li class="portfolio-link-row" th:if="${hasRepoUrl == true}">
<a class="portfolio-action button inline" th:href="${project.repoUrl}" target="_blank" rel="noopener noreferrer"
th:text="#{page.portfolio.repository}">Repository</a>
<span class="portfolio-link-url" th:text="${project.repoUrl}">https://github.com/example/repo</span>
</li>
<li class="portfolio-link-row" th:if="${hasDemoUrl == true}">
<a class="portfolio-action button inline" th:href="${project.demoUrl}" target="_blank" rel="noopener noreferrer"
th:text="#{page.portfolio.demo}">Demo</a>
<span class="portfolio-link-url" th:text="${project.demoUrl}">https://example.com</span>
</li>
<li class="portfolio-link-row" th:if="${hasDocsUrl == true}">
<a class="portfolio-action button inline" th:href="${project.docsUrl}" target="_blank" rel="noopener noreferrer"
th:text="#{page.portfolio.docs}">Docs</a>
<span class="portfolio-link-url" th:text="${project.docsUrl}">https://docs.example.com</span>
</li>
</ul>
</section>
<section class="portfolio-detail-section" th:if="${hasRenderedContent == true}">
<h2 th:text="#{page.portfolio.content}">Content</h2>
<div class="portfolio-detail-content" th:utext="${projectContentHtml}"></div>
</section>
<div class="portfolio-detail-nav">
<a data-pjax class="button inline portfolio-detail-back" th:href="@{/portfolio}">
<span th:text="'< ' + #{page.portfolio.back}">&lt; portfolio</span>
</a>
</div>
</div>
<!-- Tech Stacks -->
<div class="portfolio-detail-section" th:if="${project.techStacks != null && !project.techStacks.isEmpty()}">
<div class="portfolio-detail-section-header"># Tech Stack</div>
<div class="portfolio-detail-techstacks">
<span class="portfolio-detail-techstack" th:each="tech : ${project.techStacks}" th:text="${tech}">Rust</span>
</div>
</div>
<!-- Tags -->
<div class="portfolio-detail-section" th:if="${project.tags != null && !project.tags.isEmpty()}">
<div class="portfolio-detail-section-header"># Tags</div>
<div class="portfolio-detail-tags">
<span class="portfolio-detail-tag" th:each="tag : ${project.tags}" th:text="${tag}">tag</span>
</div>
</div>
<!-- Summary -->
<div class="portfolio-detail-section" th:if="${project.summary}">
<div class="portfolio-detail-section-header"># Summary</div>
<blockquote class="portfolio-detail-summary" th:text="${project.summary}">Summary text here.</blockquote>
</div>
<!-- Content (Markdown rendered as HTML) -->
<div class="portfolio-detail-section" th:if="${project.content}">
<div class="portfolio-detail-section-header"># Description</div>
<div class="portfolio-detail-content" th:utext="${projectFinder.renderContent(project)}"></div>
</div>
<!-- Terminal prompt footer -->
<div class="portfolio-detail-footer">
<span class="portfolio-detail-footer-prompt">$ <span class="portfolio-detail-footer-blink">█</span></span>
</div>
</div>
</section>
</article>
</th:block>
</html>
+61 -47
View File
@@ -1,63 +1,77 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:with="platformLabels=${projectFinder.platformLabels()}, typeLabels=${projectFinder.typeLabels()}"
th:replace="~{modules/layout :: html(title = |${projectFinder.setting().seoTitle} - ${site.title}|, header = null, content = ~{::content}, footer = null)}"
th:replace="~{modules/layout :: html(title = |#{page.portfolio.title} - ${site.title}|, header = null, content = ~{::content}, footer = null)}"
>
<th:block th:fragment="content">
<article class="post portfolio-listing-post">
<article class="portfolio-page">
<header>
<h1 class="post-title" th:text="${projectFinder.setting().seoTitle}">Portfolio</h1>
<div class="portfolio-listing-subtitle">&gt; ls -la ~/portfolio/</div>
<h1 class="post-title" th:text="#{page.portfolio.title}">Portfolio</h1>
</header>
<div class="portfolio-listing-header">
<span class="portfolio-listing-header-perms">PERMISSIONS</span>
<span class="portfolio-listing-header-type">TYPE</span>
<span class="portfolio-listing-header-platform">PLATFORM</span>
<span class="portfolio-listing-header-name">NAME</span>
<section class="posts portfolio-list" th:if="${projects.items != null and !projects.items.isEmpty()}">
<article class="post on-list portfolio-item" th:each="project, iterStat : ${projects.items}"
th:with="platformLabel=${platformLabels != null and project.platform != null ? (platformLabels[project.platform] ?: project.platform) : project.platform},
typeLabel=${typeLabels != null and project.type != null ? (typeLabels[project.type] ?: project.type) : project.type}">
<a data-pjax class="portfolio-card-cover" th:if="${!#strings.isEmpty(project.cover)}"
th:href="@{/portfolio/{slug}(slug=${project.slug})}">
<img th:src="${project.cover}" th:alt="${project.title}" />
</a>
<header>
<h2 class="post-title">
<a data-pjax th:href="@{/portfolio/{slug}(slug=${project.slug})}" th:text="${project.title}">Project Name</a>
</h2>
<div class="post-meta portfolio-meta"
th:if="${project.featured == true
or !#strings.isEmpty(platformLabel)
or !#strings.isEmpty(typeLabel)
or (project.tags != null and !project.tags.isEmpty())
or (project.techStacks != null and !project.techStacks.isEmpty())}">
<span class="portfolio-meta-line"
th:if="${project.featured == true
or !#strings.isEmpty(platformLabel)
or !#strings.isEmpty(typeLabel)
or (project.tags != null and !project.tags.isEmpty())}">
<span class="portfolio-meta-group" th:if="${project.featured == true or !#strings.isEmpty(platformLabel) or !#strings.isEmpty(typeLabel)}">
<span th:if="${project.featured == true}" th:text="#{page.portfolio.featured}">Featured</span>
<span class="portfolio-card-label" th:if="${!#strings.isEmpty(platformLabel)}" th:text="|[${platformLabel}]|">[GitHub]</span>
<span class="portfolio-card-label" th:if="${!#strings.isEmpty(typeLabel)}" th:text="|[${typeLabel}]|">[Open Source]</span>
</span>
<span class="portfolio-meta-group post-tags portfolio-tags" th:if="${project.tags != null and !project.tags.isEmpty()}">
<span class="post-tag portfolio-tag" th:each="tag : ${project.tags}" th:text="|#${tag}|">#tag</span>
</span>
</span>
<span class="portfolio-techs" th:if="${project.techStacks != null and !project.techStacks.isEmpty()}">
<span class="portfolio-term" th:each="tech : ${project.techStacks}" th:text="|[${tech}]|">[Rust]</span>
</span>
</div>
</header>
<div class="post-excerpt" th:if="${!#strings.isEmpty(project.summary)}">
<span th:text="${project.summary}">A brief summary of the project.</span>
</div>
<div class="portfolio-listing-container">
<div class="portfolio-listing-divider">
<span>═══════════════════════════════════════════════════════════════════════</span>
<div class="portfolio-actions">
<a data-pjax class="portfolio-action button inline" th:href="@{/portfolio/{slug}(slug=${project.slug})}"
th:text="#{page.portfolio.detail}">Detail</a>
<a class="portfolio-action button inline" th:if="${!#strings.isEmpty(project.repoUrl)}"
th:href="${project.repoUrl}" target="_blank" rel="noopener noreferrer"
th:text="#{page.portfolio.repository}">Repository</a>
<a class="portfolio-action button inline" th:if="${!#strings.isEmpty(project.demoUrl)}"
th:href="${project.demoUrl}" target="_blank" rel="noopener noreferrer"
th:text="#{page.portfolio.demo}">Demo</a>
</div>
</article>
</section>
<th:block th:each="project, iterStat : ${projects.items}" th:with="
platformLabel = ${platformLabels[project.platform] ?: project.platform},
typeLabel = ${typeLabels[project.type] ?: project.type}
">
<div class="portfolio-listing-entry" th:classappend="${project.featured} ? 'portfolio-listing-entry-featured' : ''">
<div class="portfolio-listing-permissions">
<span th:if="${project.featured}" class="portfolio-listing-star" title="Featured">*</span>
<span th:if="${!project.featured}" class="portfolio-listing-star portfolio-listing-star-empty">-</span>
<span class="portfolio-listing-perms">rw-r--r--</span>
</div>
<span class="portfolio-listing-type" th:text="${typeLabel ?: '-'}">open_source</span>
<span class="portfolio-listing-platform" th:text="${platformLabel ?: '-'}">GitHub</span>
<div class="portfolio-listing-info">
<a class="portfolio-listing-name" th:href="@{/portfolio/{slug}(slug=${project.slug})}" th:text="${project.title}">Project Name</a>
<p class="portfolio-listing-summary" th:if="${project.summary}" th:text="${project.summary}">A brief summary of the project.</p>
<div class="portfolio-listing-techstacks" th:if="${project.techStacks != null && !project.techStacks.isEmpty()}">
<span class="portfolio-listing-techstack" th:each="tech : ${project.techStacks}" th:text="${tech}">Rust</span>
</div>
<div class="portfolio-listing-tags" th:if="${project.tags != null && !project.tags.isEmpty()}">
<span class="portfolio-listing-tag" th:each="tag : ${project.tags}" th:text="${tag}">tag</span>
</div>
</div>
</div>
<section class="post-content">
<p th:if="${projects.items == null or projects.items.isEmpty()}" class="portfolio-empty" th:text="#{page.portfolio.empty}">
No projects found.
</p>
</section>
<div class="portfolio-listing-divider">
<span>───────────────────────────────────────────────────────────────</span>
</div>
</th:block>
<div th:if="${projects.items == null or projects.items.isEmpty()}" class="portfolio-listing-empty">
<span class="portfolio-listing-empty-text">No projects found.</span>
</div>
</div>
<nav class="pagination" th:if="${projects.hasPrevious() || projects.hasNext()}">
<nav class="pagination" th:if="${projects.hasPrevious() or projects.hasNext()}">
<div class="pagination-buttons">
<span th:if="${projects.hasPrevious()}">
<a data-pjax th:href="@{/portfolio(page=${projects.page - 1})}" th:classappend="${projects.page == 1} ? 'first-page' : ''" class="button prev inline">