feat: 添加译文功能 + Attention Is All You Need 中文译本

This commit is contained in:
2026-06-02 11:27:30 +00:00
parent d5ba6f2847
commit bcdbc62681
5 changed files with 21 additions and 1 deletions

View File

@@ -151,6 +151,7 @@ function renderPaper(p) {
const links = [];
if (pdfUrl) links.push(`<button class="paper-link" data-pdf="${encodeURIComponent(pdfUrl)}" data-title="${encodeURIComponent(p.title)}" onclick="openPdfBtn(this)">📄 阅读</button>`);
else if (p.arxiv) links.push(`<a class="paper-link" href="https://arxiv.org/abs/${p.arxiv}" target="_blank">📋 arXiv</a>`);
if (p.arxiv) links.push(`<a class="paper-link trans-btn" href="/papers/translated/${p.arxiv}.pdf" target="_blank" title="中文译文">📖 译文</a>`);
return `<div class="paper-item"><div class="paper-year">${p.year||'—'}</div><div class="paper-body" id="${id}">
<div class="paper-title">${p.title}</div>
<div class="paper-meta"><span>${p.authors||''}</span>${p.venue?`<span class="paper-venue">${p.venue}</span>`:''}${tags}</div>

View File

@@ -183,6 +183,7 @@ function renderPaper(p) {
const links = [];
if (pdfUrl) links.push(`<button class="paper-link" data-pdf="${encodeURIComponent(pdfUrl)}" data-title="${encodeURIComponent(p.title)}" onclick="openPdfBtn(this)">📄 阅读</button>`);
else if (p.arxiv) links.push(`<a class="paper-link" href="https://arxiv.org/abs/${p.arxiv}" target="_blank">📋 arXiv</a>`);
if (p.arxiv) links.push(`<a class="paper-link trans-btn" href="/papers/translated/${p.arxiv}.pdf" target="_blank" title="中文译文">📖 译文</a>`);
return `<div class="paper-item"><div class="paper-year">${p.year||'—'}</div><div class="paper-body" id="${id}">
<div class="paper-title">${p.title}</div>
<div class="paper-meta"><span>${p.authors||''}</span>${p.venue?`<span class="paper-venue">${p.venue}</span>`:''}${tags}</div>