Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ archives: Archives
top: TOP
sticky: Sticky
go-back-home: Go Back Home
publications: Publications
no_publications: No publications available yet.
view_full_text: View full text
last_updated: Last updated
untitled: Untitled


# ----------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions languages/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ archives: Archivos
top: PRINCIPAL
sticky: Fijado
go-back-home: Volver al inicio
publications: Publicaciones
no_publications: Aún no hay publicaciones.
view_full_text: Ver texto completo
last_updated: Última actualización
untitled: Sin título

# ----------------------------------------
# Traducción del menú
Expand Down
5 changes: 5 additions & 0 deletions languages/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ archives: Archives
top: TOP
sticky: Sticky
go-back-home: Retour à l'accueil
publications: Publications
no_publications: Pas encore de publications.
view_full_text: Voir le texte complet
last_updated: Dernière mise à jour
untitled: Sans titre

# ----------------------------------------
# Traduction du menu
Expand Down
5 changes: 5 additions & 0 deletions languages/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ comments: コメント
top: トップ
sticky: 屋根
go-back-home: トップページに戻ります
publications: 研究業績
no_publications: まだ掲載された論文はありません。
view_full_text: 全文を表示
last_updated: 最終更新
untitled: 無題

# ----------------------------------------
# 菜单翻译
Expand Down
5 changes: 5 additions & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ comments: 评论
top: 置顶
sticky: 置顶
go-back-home: 回到首页
publications: 论文成果
no_publications: 暂无论文成果
view_full_text: 查看全文
last_updated: 最近更新
untitled: 未命名

# ----------------------------------------
# 菜单翻译
Expand Down
5 changes: 5 additions & 0 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ comments: 留言
top: 頂端
sticky: 置頂
go-back-home: 回到首頁
publications: 論文成果
no_publications: 暫無論文成果
view_full_text: 查看全文
last_updated: 最近更新
untitled: 未命名

# ----------------------------------------
# 選單翻譯
Expand Down
85 changes: 85 additions & 0 deletions layout/pages/publications/publications.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<div class="publications-page-container py-8 sm:py-12">
<% const resolveDoi=(value)=> {
if (!value) return { url: null, label: null };
const trimmed = String(value).trim();
const label = trimmed.replace(/^https?:\/\/(doi\.org\/)?/i, '').replace(/^doi:\s*/i, '');
const url = trimmed.startsWith('http') ? trimmed : `https://doi.org/${label}`;
return { url, label };
};

let publications = theme.publications.items

const emptyText = __('no_publications') || 'No publications available yet.';
const fullTextLabel = __('view_full_text') || 'View full text';
%>

<div class="max-w-4xl mx-auto flex flex-col gap-6">
<header class="flex flex-col gap-3 text-center sm:text-left">
<h1 class="text-[2.8rem] leading-tight font-bold text-second-text-color">
<%= page.title || __('publications') %>
</h1>
</header>

<% if (!publications.length) { %>
<div class="rounded-2xl border border-dashed border-border-color bg-second-background-color/60 p-8 text-center text-third-text-color">
<i class="fa-regular fa-books text-3xl mb-3 block"></i>
<p>
<%= emptyText %>
</p>
</div>
<% } else { %>
<ol class="flex flex-col gap-6 list-decimal pl-6 sm:pl-8">
<% publications.forEach((paper)=> {
const displayTitle = paper.title || paper.name || __('untitled');
const authors = Array.isArray(paper.authors) ? paper.authors.join(', ') : paper.authors;
const journal = paper.journal || paper.conference || paper.venue;
const { url: doiUrl, label: doiLabel } = resolveDoi(paper.doi || paper.DOI);
const fullTextUrl = paper.url || paper.link;
%>
<li class="publication-item">
<div class="rounded-2xl redefine-box-shadow-flat bg-second-background-color/70 border border-border-color/60 p-6 sm:p-8 flex flex-col gap-4">
<div>
<h2
class="text-xl sm:text-2xl font-semibold text-second-text-color leading-snug">
<%= displayTitle %>
</h2>
<% if (authors) { %>
<p class="text-sm sm:text-base text-third-text-color mt-1">
<i class="fa-regular fa-user-pen mr-2 text-primary"></i>
<%= authors %>
</p>
<% } %>
<% if (journal) { %>
<p
class="text-sm sm:text-base text-primary mt-1 flex items-center gap-2">
<i class="fa-regular fa-newspaper"></i>
<%= journal %>
</p>
<% } %>
</div>

<div class="flex flex-wrap items-center gap-3 text-sm">
<% if (fullTextUrl) { %>
<a href="<%= fullTextUrl %>" target="_blank" rel="noopener"
class="inline-flex items-center gap-2 px-3 py-2 rounded-xl border border-border-color text-primary hover:bg-primary/10 transition-colors">
<i class="fa-regular fa-up-right-from-square"></i>
<span>
<%= fullTextLabel %>
</span>
</a>
<% } %>
<% if (doiUrl) { %>
<a href="<%= doiUrl %>" target="_blank" rel="noopener"
class="inline-flex items-center gap-2 px-3 py-2 rounded-xl border border-border-color text-primary hover:bg-primary/10 transition-colors">
<i class="fa-regular fa-fingerprint"></i>
<span>DOI: <%= doiLabel %></span>
</a>
<% } %>
</div>
</div>
</li>
<% }); %>
</ol>
<% } %>
</div>
</div>
3 changes: 3 additions & 0 deletions scripts/data-handle.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ hexo.on('generateBefore', function () {
hexo.theme.config.bookmarks = data.bookmarks || data.tools;
}

if (data.publications || data.publication || data.papers || data.paper) {
hexo.theme.config.publications = data.publications || data.publication || data.papers || data.pape;
}
}
}
});
6 changes: 6 additions & 0 deletions scripts/helpers/page-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ const pageData = {
partial: "pages/masonry/masonry",
layout: "default",
},
publications: {
titles: ["publications", "论文", "论文成果", "科研成果"],
types: ["publications", "publication", "papers", "paper", "research"],
partial: "pages/publications/publications",
layout: "default",
},
bookmarks: {
titles: [],
types: ["bookmarks", "bookmark", "tools"],
Expand Down
4 changes: 2 additions & 2 deletions source/css/build/tailwind.css

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions source/css/layout/publications.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.publications-page-container
position relative

ol
margin 0
padding 0

.publication-item
list-style-position outside

&::marker
color var(--primary-color)
font-weight 600
1 change: 1 addition & 0 deletions source/css/style.styl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
@require 'layout/article-content.styl'
@require 'layout/category-content.styl'
@require 'layout/tag-content.styl'
@require 'layout/publications.styl'

if (hexo-config('home.sidebar.enable') == true)
@require 'layout/home-sidebar.styl'