feat: localize interface messages
This commit is contained in:
@@ -25,3 +25,27 @@ page.portfolio.tech_stack=Tech Stack
|
|||||||
page.portfolio.tags=Tags
|
page.portfolio.tags=Tags
|
||||||
page.portfolio.description=Description
|
page.portfolio.description=Description
|
||||||
page.portfolio.content=Content
|
page.portfolio.content=Content
|
||||||
|
header.search.open=Open search
|
||||||
|
header.color_scheme.open=Choose color scheme
|
||||||
|
header.color_scheme.list=Color schemes
|
||||||
|
header.color_scheme.current=Current color scheme
|
||||||
|
header.color_scheme.default=Default
|
||||||
|
header.theme.toggle=Toggle light or dark mode
|
||||||
|
header.pixel_style.toggle=Toggle pixel style
|
||||||
|
toc.show=Show table of contents
|
||||||
|
toc.hide=Hide table of contents
|
||||||
|
moment.upvote=Upvote
|
||||||
|
moment.comments=Toggle comments
|
||||||
|
moment.network_error=Network error. Please try again.
|
||||||
|
media.photo=Photo
|
||||||
|
footer.powered_by=Powered by
|
||||||
|
footer.theme=Theme
|
||||||
|
sns.email=Email
|
||||||
|
sns.github=GitHub
|
||||||
|
sns.discord=Discord
|
||||||
|
sns.telegram=Telegram
|
||||||
|
sns.facebook=Facebook
|
||||||
|
sns.instagram=Instagram
|
||||||
|
sns.x=X
|
||||||
|
sns.rss=RSS
|
||||||
|
page.error.title=Error
|
||||||
|
|||||||
@@ -25,3 +25,27 @@ page.portfolio.tech_stack=Tech Stack
|
|||||||
page.portfolio.tags=Tags
|
page.portfolio.tags=Tags
|
||||||
page.portfolio.description=Description
|
page.portfolio.description=Description
|
||||||
page.portfolio.content=Content
|
page.portfolio.content=Content
|
||||||
|
header.search.open=Open search
|
||||||
|
header.color_scheme.open=Choose color scheme
|
||||||
|
header.color_scheme.list=Color schemes
|
||||||
|
header.color_scheme.current=Current color scheme
|
||||||
|
header.color_scheme.default=Default
|
||||||
|
header.theme.toggle=Toggle light or dark mode
|
||||||
|
header.pixel_style.toggle=Toggle pixel style
|
||||||
|
toc.show=Show table of contents
|
||||||
|
toc.hide=Hide table of contents
|
||||||
|
moment.upvote=Upvote
|
||||||
|
moment.comments=Toggle comments
|
||||||
|
moment.network_error=Network error. Please try again.
|
||||||
|
media.photo=Photo
|
||||||
|
footer.powered_by=Powered by
|
||||||
|
footer.theme=Theme
|
||||||
|
sns.email=Email
|
||||||
|
sns.github=GitHub
|
||||||
|
sns.discord=Discord
|
||||||
|
sns.telegram=Telegram
|
||||||
|
sns.facebook=Facebook
|
||||||
|
sns.instagram=Instagram
|
||||||
|
sns.x=X
|
||||||
|
sns.rss=RSS
|
||||||
|
page.error.title=Error
|
||||||
|
|||||||
@@ -25,3 +25,27 @@ page.portfolio.tech_stack=Tecnologías
|
|||||||
page.portfolio.tags=Etiquetas
|
page.portfolio.tags=Etiquetas
|
||||||
page.portfolio.description=Descripción
|
page.portfolio.description=Descripción
|
||||||
page.portfolio.content=Contenido
|
page.portfolio.content=Contenido
|
||||||
|
header.search.open=Abrir búsqueda
|
||||||
|
header.color_scheme.open=Elegir esquema de color
|
||||||
|
header.color_scheme.list=Esquemas de color
|
||||||
|
header.color_scheme.current=Esquema de color actual
|
||||||
|
header.color_scheme.default=Predeterminado
|
||||||
|
header.theme.toggle=Cambiar entre modo claro y oscuro
|
||||||
|
header.pixel_style.toggle=Activar o desactivar el estilo píxel
|
||||||
|
toc.show=Mostrar tabla de contenido
|
||||||
|
toc.hide=Ocultar tabla de contenido
|
||||||
|
moment.upvote=Votar
|
||||||
|
moment.comments=Mostrar u ocultar comentarios
|
||||||
|
moment.network_error=Error de red. Inténtalo de nuevo.
|
||||||
|
media.photo=Foto
|
||||||
|
footer.powered_by=Desarrollado con
|
||||||
|
footer.theme=Tema
|
||||||
|
sns.email=Correo electrónico
|
||||||
|
sns.github=GitHub
|
||||||
|
sns.discord=Discord
|
||||||
|
sns.telegram=Telegram
|
||||||
|
sns.facebook=Facebook
|
||||||
|
sns.instagram=Instagram
|
||||||
|
sns.x=X
|
||||||
|
sns.rss=RSS
|
||||||
|
page.error.title=Error
|
||||||
|
|||||||
@@ -25,3 +25,27 @@ page.portfolio.tech_stack=技术栈
|
|||||||
page.portfolio.tags=标签
|
page.portfolio.tags=标签
|
||||||
page.portfolio.description=说明
|
page.portfolio.description=说明
|
||||||
page.portfolio.content=详细内容
|
page.portfolio.content=详细内容
|
||||||
|
header.search.open=打开搜索
|
||||||
|
header.color_scheme.open=选择配色
|
||||||
|
header.color_scheme.list=配色列表
|
||||||
|
header.color_scheme.current=当前配色
|
||||||
|
header.color_scheme.default=默认
|
||||||
|
header.theme.toggle=切换深色或浅色模式
|
||||||
|
header.pixel_style.toggle=切换像素风格
|
||||||
|
toc.show=显示文章目录
|
||||||
|
toc.hide=隐藏文章目录
|
||||||
|
moment.upvote=点赞
|
||||||
|
moment.comments=展开或收起评论
|
||||||
|
moment.network_error=网络错误,请稍后重试
|
||||||
|
media.photo=图片
|
||||||
|
footer.powered_by=由以下程序驱动
|
||||||
|
footer.theme=主题
|
||||||
|
sns.email=电子邮件
|
||||||
|
sns.github=GitHub
|
||||||
|
sns.discord=Discord
|
||||||
|
sns.telegram=Telegram
|
||||||
|
sns.facebook=Facebook
|
||||||
|
sns.instagram=Instagram
|
||||||
|
sns.x=X
|
||||||
|
sns.rss=RSS
|
||||||
|
page.error.title=错误
|
||||||
|
|||||||
@@ -25,3 +25,27 @@ page.portfolio.tech_stack=技術堆疊
|
|||||||
page.portfolio.tags=標籤
|
page.portfolio.tags=標籤
|
||||||
page.portfolio.description=說明
|
page.portfolio.description=說明
|
||||||
page.portfolio.content=詳細內容
|
page.portfolio.content=詳細內容
|
||||||
|
header.search.open=開啟搜尋
|
||||||
|
header.color_scheme.open=選擇配色
|
||||||
|
header.color_scheme.list=配色清單
|
||||||
|
header.color_scheme.current=目前配色
|
||||||
|
header.color_scheme.default=預設
|
||||||
|
header.theme.toggle=切換深色或淺色模式
|
||||||
|
header.pixel_style.toggle=切換像素風格
|
||||||
|
toc.show=顯示文章目錄
|
||||||
|
toc.hide=隱藏文章目錄
|
||||||
|
moment.upvote=按讚
|
||||||
|
moment.comments=展開或收合評論
|
||||||
|
moment.network_error=網路錯誤,請稍後再試
|
||||||
|
media.photo=圖片
|
||||||
|
footer.powered_by=由以下程式驅動
|
||||||
|
footer.theme=主題
|
||||||
|
sns.email=電子郵件
|
||||||
|
sns.github=GitHub
|
||||||
|
sns.discord=Discord
|
||||||
|
sns.telegram=Telegram
|
||||||
|
sns.facebook=Facebook
|
||||||
|
sns.instagram=Instagram
|
||||||
|
sns.x=X
|
||||||
|
sns.rss=RSS
|
||||||
|
page.error.title=錯誤
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import {
|
|||||||
PREFERENCE_KEYS,
|
PREFERENCE_KEYS,
|
||||||
getStoredPreference
|
getStoredPreference
|
||||||
} from "../utils/theme-preferences.js";
|
} from "../utils/theme-preferences.js";
|
||||||
|
import {getMessage} from "../utils/messages.js";
|
||||||
|
|
||||||
const COLOR_SCHEME_SELECTOR_PATTERN = /html\[theme-color-scheme\s*=\s*(['"]?)([^'"\]\s]+)\1\]/g;
|
const COLOR_SCHEME_SELECTOR_PATTERN = /html\[theme-color-scheme\s*=\s*(['"]?)([^'"\]\s]+)\1\]/g;
|
||||||
|
|
||||||
@@ -33,7 +34,7 @@ function getDefinedColorSchemes() {
|
|||||||
return schemes;
|
return schemes;
|
||||||
}
|
}
|
||||||
|
|
||||||
function createColorSchemeOption(scheme) {
|
function createColorSchemeOption(scheme, label = scheme) {
|
||||||
const option = document.createElement("button");
|
const option = document.createElement("button");
|
||||||
option.className = "color-scheme-option";
|
option.className = "color-scheme-option";
|
||||||
option.type = "button";
|
option.type = "button";
|
||||||
@@ -41,12 +42,15 @@ function createColorSchemeOption(scheme) {
|
|||||||
option.tabIndex = -1;
|
option.tabIndex = -1;
|
||||||
option.dataset.colorScheme = scheme;
|
option.dataset.colorScheme = scheme;
|
||||||
option.setAttribute("aria-selected", "false");
|
option.setAttribute("aria-selected", "false");
|
||||||
option.textContent = scheme;
|
option.textContent = label;
|
||||||
return option;
|
return option;
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateColorSchemeMenu(menu) {
|
function populateColorSchemeMenu(menu) {
|
||||||
menu.replaceChildren(createColorSchemeOption("default"));
|
menu.replaceChildren(createColorSchemeOption(
|
||||||
|
"default",
|
||||||
|
getMessage("defaultColorScheme", "Default")
|
||||||
|
));
|
||||||
|
|
||||||
for (const scheme of getDefinedColorSchemes()) {
|
for (const scheme of getDefinedColorSchemes()) {
|
||||||
menu.appendChild(createColorSchemeOption(scheme));
|
menu.appendChild(createColorSchemeOption(scheme));
|
||||||
@@ -71,9 +75,13 @@ export function syncColorSchemePicker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const selectedScheme = hasStoredOption ? storedScheme : "default";
|
const selectedScheme = hasStoredOption ? storedScheme : "default";
|
||||||
|
const selectedLabel = selectedScheme === "default"
|
||||||
|
? getMessage("defaultColorScheme", "Default")
|
||||||
|
: selectedScheme;
|
||||||
const trigger = picker.querySelector("#color-scheme-trigger");
|
const trigger = picker.querySelector("#color-scheme-trigger");
|
||||||
if (trigger) {
|
if (trigger) {
|
||||||
const description = `选择配色,当前:${selectedScheme}`;
|
const currentLabel = getMessage("currentColorScheme", "Current color scheme");
|
||||||
|
const description = `${currentLabel}: ${selectedLabel}`;
|
||||||
trigger.setAttribute("aria-label", description);
|
trigger.setAttribute("aria-label", description);
|
||||||
trigger.title = description;
|
trigger.title = description;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import {terminal} from "../terminal.js";
|
import {terminal} from "../terminal.js";
|
||||||
|
import {getMessage} from "../utils/messages.js";
|
||||||
|
|
||||||
const RESOURCE_KEY = "moment";
|
const RESOURCE_KEY = "moment";
|
||||||
const RESOURCE_GROUP = "moment.halo.run";
|
const RESOURCE_GROUP = "moment.halo.run";
|
||||||
@@ -74,7 +75,7 @@ function handleUpvote(name) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
xhr.onerror = function () {
|
xhr.onerror = function () {
|
||||||
alert("Network Error");
|
alert(getMessage("networkError", "Network error. Please try again."));
|
||||||
};
|
};
|
||||||
|
|
||||||
xhr.send(JSON.stringify({group: RESOURCE_GROUP, plural: RESOURCE_PLURAL, name: name}));
|
xhr.send(JSON.stringify({group: RESOURCE_GROUP, plural: RESOURCE_PLURAL, name: name}));
|
||||||
|
|||||||
+7
-1
@@ -1,5 +1,6 @@
|
|||||||
import {terminal} from "../terminal.js";
|
import {terminal} from "../terminal.js";
|
||||||
import {debounce, toggleClass} from "../utils/dom.js";
|
import {debounce, toggleClass} from "../utils/dom.js";
|
||||||
|
import {getMessage} from "../utils/messages.js";
|
||||||
import tocbot from "tocbot";
|
import tocbot from "tocbot";
|
||||||
|
|
||||||
const TOC_SELECTOR = "#toc";
|
const TOC_SELECTOR = "#toc";
|
||||||
@@ -45,7 +46,12 @@ function syncToggleButton(toc = getToc()) {
|
|||||||
|
|
||||||
const isVisible = toc.classList.contains(TOC_VISIBLE_CLASS);
|
const isVisible = toc.classList.contains(TOC_VISIBLE_CLASS);
|
||||||
tocToggle.textContent = isVisible ? TOC_CLOSE_ICON : TOC_OPEN_ICON;
|
tocToggle.textContent = isVisible ? TOC_CLOSE_ICON : TOC_OPEN_ICON;
|
||||||
tocToggle.setAttribute("aria-label", isVisible ? "Hide Table of Contents" : "Show Table of Contents");
|
tocToggle.setAttribute(
|
||||||
|
"aria-label",
|
||||||
|
isVisible
|
||||||
|
? getMessage("hideToc", "Hide table of contents")
|
||||||
|
: getMessage("showToc", "Show table of contents")
|
||||||
|
);
|
||||||
|
|
||||||
if (tocToggle.dataset.tocBound === "true") return;
|
if (tocToggle.dataset.tocBound === "true") return;
|
||||||
tocToggle.addEventListener("click", toggleToc);
|
tocToggle.addEventListener("click", toggleToc);
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export function getMessage(key, fallback) {
|
||||||
|
return window.TerminalThemeConfig?.messages?.[key] || fallback;
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<article class="post">
|
<article class="post">
|
||||||
<header>
|
<header>
|
||||||
<h1 class="post-title"
|
<h1 class="post-title"
|
||||||
th:with="title=${theme.config.archives_page.title ?: page.archives.title ?: 'Archives'}"
|
th:with="title=${theme.config.archives_page.title ?: #messages.msg('page.archives.title')}"
|
||||||
th:text="${title}">
|
th:text="${title}">
|
||||||
Archives
|
Archives
|
||||||
</h1>
|
</h1>
|
||||||
@@ -37,12 +37,12 @@
|
|||||||
<div class="pagination-buttons">
|
<div class="pagination-buttons">
|
||||||
<span th:if="${archives.hasPrevious()}">
|
<span th:if="${archives.hasPrevious()}">
|
||||||
<a data-pjax th:href="@{${archives.prevUrl}}" class="button prev inline">
|
<a data-pjax th:href="@{${archives.prevUrl}}" class="button prev inline">
|
||||||
<span class="button-text">< Prev</span>
|
<span class="button-text" th:text="'< ' + #{page.pagination.prev}">< Prev</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span th:if="${archives.hasNext()}">
|
<span th:if="${archives.hasNext()}">
|
||||||
<a data-pjax th:href="@{${archives.nextUrl}}" class="button inline next">
|
<a data-pjax th:href="@{${archives.nextUrl}}" class="button inline next">
|
||||||
<span class="button-text">Next ></span>
|
<span class="button-text" th:text="#{page.pagination.next} + ' >'">Next ></span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<article class="post">
|
<article class="post">
|
||||||
<header>
|
<header>
|
||||||
<h1 class="post-title"
|
<h1 class="post-title"
|
||||||
th:with="title=${theme.config.categories_page.title_s ?: page.categories.title ?: 'Categories'}"
|
th:with="title=${theme.config.categories_page.title_s ?: #messages.msg('page.categories.title')}"
|
||||||
th:text="${title}">
|
th:text="${title}">
|
||||||
Categories
|
Categories
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<article class="post">
|
<article class="post">
|
||||||
<header>
|
<header>
|
||||||
<h1 class="post-title"
|
<h1 class="post-title"
|
||||||
th:with="title=${theme.config.categories_page.title ?: page.category.title ?: 'Category'}"
|
th:with="title=${theme.config.categories_page.title ?: #messages.msg('page.category.title')}"
|
||||||
th:text="|${title}: ${category.spec.displayName} [${category.status.visiblePostCount ?: 0}]|">
|
th:text="|${title}: ${category.spec.displayName} [${category.status.visiblePostCount ?: 0}]|">
|
||||||
Category: Category name [n]
|
Category: Category name [n]
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html
|
<html
|
||||||
xmlns:th="https://www.thymeleaf.org"
|
xmlns:th="https://www.thymeleaf.org"
|
||||||
th:replace="~{modules/layout :: html(title = 'Error - ' + ${site.title}, header = null, content = ~{::content}, footer = null)}"
|
th:replace="~{modules/layout :: html(title = |#{page.error.title} - ${site.title}|, header = null, content = ~{::content}, footer = null)}"
|
||||||
>
|
>
|
||||||
<th:block th:fragment="content">
|
<th:block th:fragment="content">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
<article class="post">
|
<article class="post">
|
||||||
<header>
|
<header>
|
||||||
<h1 class="post-title"
|
<h1 class="post-title"
|
||||||
th:with="title=${theme.config.links_page.title ?: page.links.title ?: 'Links'}"
|
th:with="title=${theme.config.links_page.title ?: #messages.msg('page.links.title')}"
|
||||||
th:text="${title}">
|
th:text="${title}">
|
||||||
Links
|
Links
|
||||||
</h1>
|
</h1>
|
||||||
</header>
|
</header>
|
||||||
<section class="post-content link-section" th:each="group : ${groups}">
|
<section class="post-content link-section" th:each="group : ${groups}">
|
||||||
<div class="link-section-header">
|
<div class="link-section-header">
|
||||||
<h2 th:text="${!#strings.isEmpty(group.spec.displayName) ? group.spec.displayName:'links'}">
|
<h2 th:text="${!#strings.isEmpty(group.spec.displayName) ? group.spec.displayName : #messages.msg('page.links.title')}">
|
||||||
Links
|
Links
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
<th:block th:fragment="footer">
|
<th:block th:fragment="footer">
|
||||||
<div class="footer-inner">
|
<div class="footer-inner">
|
||||||
<div class="footer-copyright-engine">
|
<div class="footer-copyright-engine">
|
||||||
<span>Powered by </span>
|
<span th:text="#{footer.powered_by}">Powered by</span>
|
||||||
|
<span> </span>
|
||||||
<span>
|
<span>
|
||||||
<a target="_blank" href="http://www.halo.run">Halo</a>
|
<a target="_blank" href="http://www.halo.run">Halo</a>
|
||||||
</span>
|
</span>
|
||||||
<span> :: </span>
|
<span> :: </span>
|
||||||
<span>Theme </span>
|
<span th:text="#{footer.theme}">Theme</span>
|
||||||
|
<span> </span>
|
||||||
<a target="_blank" href="https://github.com/Erzbir/halo-theme-terminal">Terminal</a>
|
<a target="_blank" href="https://github.com/Erzbir/halo-theme-terminal">Terminal</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-copyright-site">
|
<div class="footer-copyright-site">
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
id="search-button"
|
id="search-button"
|
||||||
aria-label="Open Search"
|
th:attr="aria-label=#{header.search.open}"
|
||||||
type="button"
|
type="button"
|
||||||
data-header-action="open-search"
|
data-header-action="open-search"
|
||||||
th:if="${pluginFinder.available('PluginSearchWidget')}">
|
th:if="${pluginFinder.available('PluginSearchWidget')}">
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
id="color-scheme-trigger"
|
id="color-scheme-trigger"
|
||||||
class="color-scheme-trigger"
|
class="color-scheme-trigger"
|
||||||
type="button"
|
type="button"
|
||||||
aria-label="Selector Scheme"
|
th:attr="aria-label=#{header.color_scheme.open}"
|
||||||
aria-haspopup="listbox"
|
aria-haspopup="listbox"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-controls="color-scheme-menu">
|
aria-controls="color-scheme-menu">
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
id="color-scheme-menu"
|
id="color-scheme-menu"
|
||||||
class="color-scheme-menu"
|
class="color-scheme-menu"
|
||||||
role="listbox"
|
role="listbox"
|
||||||
aria-label="Color Scheme List"
|
th:attr="aria-label=#{header.color_scheme.list}"
|
||||||
hidden>
|
hidden>
|
||||||
<button
|
<button
|
||||||
class="color-scheme-option"
|
class="color-scheme-option"
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button id="theme-toggle" aria-label="Toggle Theme" type="button">
|
<button id="theme-toggle" th:attr="aria-label=#{header.theme.toggle}" type="button">
|
||||||
<svg class="icon-regular button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
|
<svg class="icon-regular button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
|
||||||
preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
|
preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
|
||||||
<path
|
<path
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
d="M11 0h2v4h-2zm1 12H8v2H4v2H2v4h2v2h10v-2h2v-4h-2v-2h-2zm0 2v2h2v4H4v-4h4v2h2v-2H8v-2zM8 6h6v2H8zm0 2v2H6V8zm8 2h-2V8h2zm0 0h2v2h-2zm4-8h2v2h-2zm0 2v2h-2V4zM2 2h2v2H2zm2 2h2v2H4zm20 7h-4v2h4z"/>
|
d="M11 0h2v4h-2zm1 12H8v2H4v2H2v4h2v2h10v-2h2v-4h-2v-2h-2zm0 2v2h2v4H4v-4h4v2h2v-2H8v-2zM8 6h6v2H8zm0 2v2H6V8zm8 2h-2V8h2zm0 0h2v2h-2zm4-8h2v2h-2zm0 2v2h-2V4zM2 2h2v2H2zm2 2h2v2H4zm20 7h-4v2h4z"/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<button id="pixel-toggle" aria-label="Toggle Pixel Style" type="button">
|
<button id="pixel-toggle" th:attr="aria-label=#{header.pixel_style.toggle}" type="button">
|
||||||
<svg class="icon-pixel button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
<svg class="icon-pixel button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
<path fill="currentColor"
|
<path fill="currentColor"
|
||||||
d="M22 17h2v2h-2Zm-1 2h1v2h-1Zm1-6V9h1V6h-4v3h2v4h1zm-3 8h2v1h-2Zm0-8h2v1h-2Zm-1 9h1v2h-1Zm0-8h1v1h-1Zm-1 1h1v1h-1Zm-1 1h1v8h-1Zm1-3V3h1V0h-3v3h1v10ZM16 1h1v1h-1Zm-1 12h1v1h-1Zm-1 1h1v10h-1Zm-4-3h1v13h2V11h1V8h-4v3zm-1 3h1v10H9Zm-1-1h1v1H8Zm-1 5h1v6H7ZM8 7h1V3H6v4h1v6h1V7zM6 17h1v1H6Zm-1 5h1v2H5Zm0-6h1v1H5Zm1-1v-4H2v4h1v1h2v-1Zm-3-1v-1h2v1Zm0 7h2v1H3Zm-1-2h1v2H2Zm-2-2h2v2H0Z"/>
|
d="M22 17h2v2h-2Zm-1 2h1v2h-1Zm1-6V9h1V6h-4v3h2v4h1zm-3 8h2v1h-2Zm0-8h2v1h-2Zm-1 9h1v2h-1Zm0-8h1v1h-1Zm-1 1h1v1h-1Zm-1 1h1v8h-1Zm1-3V3h1V0h-3v3h1v10ZM16 1h1v1h-1Zm-1 12h1v1h-1Zm-1 1h1v10h-1Zm-4-3h1v13h2V11h1V8h-4v3zm-1 3h1v10H9Zm-1-1h1v1H8Zm-1 5h1v6H7ZM8 7h1V3H6v4h1v6h1V7zM6 17h1v1H6Zm-1 5h1v2H5Zm0-6h1v1H5Zm1-1v-4H2v4h1v1h2v-1Zm-3-1v-1h2v1Zm0 7h2v1H3Zm-1-2h1v2H2Zm-2-2h2v2H0Z"/>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="sns-container">
|
<div class="sns-container">
|
||||||
<!-- Email -->
|
<!-- Email -->
|
||||||
<a class="sns-icon"
|
<a class="sns-icon"
|
||||||
aria-label="Find me on Email"
|
th:attr="aria-label=#{sns.email}"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
th:href="'mailto:'+${theme.config.sns.email}"
|
th:href="'mailto:'+${theme.config.sns.email}"
|
||||||
th:if="${not #strings.isEmpty(theme.config.sns.email)}">
|
th:if="${not #strings.isEmpty(theme.config.sns.email)}">
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<!-- GitHub -->
|
<!-- GitHub -->
|
||||||
<a class="sns-icon"
|
<a class="sns-icon"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
aria-label="Find me on GitHub"
|
th:attr="aria-label=#{sns.github}"
|
||||||
th:href="'https://github.com/'+${theme.config.sns.github}"
|
th:href="'https://github.com/'+${theme.config.sns.github}"
|
||||||
th:if="${not #strings.isEmpty(theme.config.sns.github)}">
|
th:if="${not #strings.isEmpty(theme.config.sns.github)}">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="icon-regular" viewBox="0 0 24 24">
|
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="icon-regular" viewBox="0 0 24 24">
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<!-- Discord -->
|
<!-- Discord -->
|
||||||
<a class="sns-icon"
|
<a class="sns-icon"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
aria-label="Find me on Discord"
|
th:attr="aria-label=#{sns.discord}"
|
||||||
th:href="${theme.config.sns.discord}"
|
th:href="${theme.config.sns.discord}"
|
||||||
th:if="${not #strings.isEmpty(theme.config.sns.discord)}">
|
th:if="${not #strings.isEmpty(theme.config.sns.discord)}">
|
||||||
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<!-- Telegram -->
|
<!-- Telegram -->
|
||||||
<a class="sns-icon"
|
<a class="sns-icon"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
aria-label="Find me on Telegram"
|
th:attr="aria-label=#{sns.telegram}"
|
||||||
th:href="'https://t.me/'+${theme.config.sns.telegram}"
|
th:href="'https://t.me/'+${theme.config.sns.telegram}"
|
||||||
th:if="${not #strings.isEmpty(theme.config.sns.telegram)}">
|
th:if="${not #strings.isEmpty(theme.config.sns.telegram)}">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="icon-regular" viewBox="0 0 24 24">
|
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="icon-regular" viewBox="0 0 24 24">
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
<!-- Facebook -->
|
<!-- Facebook -->
|
||||||
<a class="sns-icon"
|
<a class="sns-icon"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
aria-label="Find me on Facebook"
|
th:attr="aria-label=#{sns.facebook}"
|
||||||
th:href="'https://www.facebook.com/'+${theme.config.sns.facebook}"
|
th:href="'https://www.facebook.com/'+${theme.config.sns.facebook}"
|
||||||
th:if="${not #strings.isEmpty(theme.config.sns.facebook)}">
|
th:if="${not #strings.isEmpty(theme.config.sns.facebook)}">
|
||||||
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
<!-- Instagram -->
|
<!-- Instagram -->
|
||||||
<a class="sns-icon"
|
<a class="sns-icon"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
aria-label="Find me on Instagram"
|
th:attr="aria-label=#{sns.instagram}"
|
||||||
th:href="'https://www.instagram.com/'+${theme.config.sns.instagram}"
|
th:href="'https://www.instagram.com/'+${theme.config.sns.instagram}"
|
||||||
th:if="${not #strings.isEmpty(theme.config.sns.instagram)}">
|
th:if="${not #strings.isEmpty(theme.config.sns.instagram)}">
|
||||||
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
<!-- X -->
|
<!-- X -->
|
||||||
<a class="sns-icon"
|
<a class="sns-icon"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
aria-label="Find me on X"
|
th:attr="aria-label=#{sns.x}"
|
||||||
th:href="'https://x.com/'+${theme.config.sns.x}"
|
th:href="'https://x.com/'+${theme.config.sns.x}"
|
||||||
th:if="${not #strings.isEmpty(theme.config.sns.x)}">
|
th:if="${not #strings.isEmpty(theme.config.sns.x)}">
|
||||||
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
<a class="sns-icon"
|
<a class="sns-icon"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
th:href="@{/rss.xml}"
|
th:href="@{/rss.xml}"
|
||||||
aria-label="Find me on RSS"
|
th:attr="aria-label=#{sns.rss}"
|
||||||
th:if="${theme.config.sns.rss}">
|
th:if="${theme.config.sns.rss}">
|
||||||
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
|
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
|
||||||
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
|||||||
@@ -10,7 +10,14 @@
|
|||||||
preferTTL: /*[[${theme.config.style.prefer_ttl ?: 24}]]*/ 24,
|
preferTTL: /*[[${theme.config.style.prefer_ttl ?: 24}]]*/ 24,
|
||||||
pixelStyle: /*[[${theme.config.style.pixel_style}]]*/ false,
|
pixelStyle: /*[[${theme.config.style.pixel_style}]]*/ false,
|
||||||
pixelCssHref: /*[[@{/assets/dist/pixel.css?v={version}(version=${theme.spec.version})}]]*/ "",
|
pixelCssHref: /*[[@{/assets/dist/pixel.css?v={version}(version=${theme.spec.version})}]]*/ "",
|
||||||
customCss: /*[[${theme.config.style.custom}]]*/ ""
|
customCss: /*[[${theme.config.style.custom}]]*/ "",
|
||||||
|
messages: {
|
||||||
|
currentColorScheme: /*[[#{header.color_scheme.current}]]*/ "Current color scheme",
|
||||||
|
defaultColorScheme: /*[[#{header.color_scheme.default}]]*/ "Default",
|
||||||
|
showToc: /*[[#{toc.show}]]*/ "Show table of contents",
|
||||||
|
hideToc: /*[[#{toc.hide}]]*/ "Hide table of contents",
|
||||||
|
networkError: /*[[#{moment.network_error}]]*/ "Network error. Please try again."
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<script no-pjax>
|
<script no-pjax>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<img th:if="${media.type == 'PHOTO'}"
|
<img th:if="${media.type == 'PHOTO'}"
|
||||||
class="transform-gpu rounded-lg object-cover"
|
class="transform-gpu rounded-lg object-cover"
|
||||||
th:src="${media.url}"
|
th:src="${media.url}"
|
||||||
alt="photo"/>
|
th:alt="#{media.photo}"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<video th:if="${media.type == 'VIDEO'}"
|
<video th:if="${media.type == 'VIDEO'}"
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
<footer class="moment-footer">
|
<footer class="moment-footer">
|
||||||
<button class="moment-action-btn moment-upvote-btn"
|
<button class="moment-action-btn moment-upvote-btn"
|
||||||
th:attr="data-moment-action='upvote',data-moment-name=${name},data-count=${upvoteCount}">
|
th:attr="data-moment-action='upvote',data-moment-name=${name},data-count=${upvoteCount},aria-label=#{moment.upvote}">
|
||||||
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
|
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
|
||||||
fill="currentColor" width="16" height="16">
|
fill="currentColor" width="16" height="16">
|
||||||
<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
|
<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button class="moment-action-btn moment-comment-btn"
|
<button class="moment-action-btn moment-comment-btn"
|
||||||
th:attr="data-moment-action='toggle-comment',data-comment-target=${commentId}">
|
th:attr="data-moment-action='toggle-comment',data-comment-target=${commentId},aria-label=#{moment.comments}">
|
||||||
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
|
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
|
||||||
fill="currentColor" width="16" height="16">
|
fill="currentColor" width="16" height="16">
|
||||||
<path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/>
|
<path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/>
|
||||||
@@ -102,12 +102,12 @@
|
|||||||
<div class="pagination-buttons">
|
<div class="pagination-buttons">
|
||||||
<span th:if="${moments.hasPrevious()}">
|
<span th:if="${moments.hasPrevious()}">
|
||||||
<a data-pjax th:href="@{${moments.prevUrl}}" class="button inline prev">
|
<a data-pjax th:href="@{${moments.prevUrl}}" class="button inline prev">
|
||||||
<span class="button-text">< Prev</span>
|
<span class="button-text" th:text="'< ' + #{page.pagination.prev}">< Prev</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span th:if="${moments.hasNext()}">
|
<span th:if="${moments.hasNext()}">
|
||||||
<a data-pjax th:href="@{${moments.nextUrl}}" class="button inline next">
|
<a data-pjax th:href="@{${moments.nextUrl}}" class="button inline next">
|
||||||
<span class="button-text">Next </span>
|
<span class="button-text" th:text="#{page.pagination.next} + ' >'">Next ></span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@
|
|||||||
<nav id="toc" th:if="${theme.config.post_page.show_toc}" class="toc"
|
<nav id="toc" th:if="${theme.config.post_page.show_toc}" class="toc"
|
||||||
th:with="tocDefaultOpen=${theme.config.post_page.toc_default_open ?: 'auto'}"
|
th:with="tocDefaultOpen=${theme.config.post_page.toc_default_open ?: 'auto'}"
|
||||||
th:attr="data-default-open=${tocDefaultOpen == 'open' ? 'true' : (tocDefaultOpen == 'closed' ? 'false' : (theme.config.style.fullscreen_layout ? 'false' : 'true'))}">
|
th:attr="data-default-open=${tocDefaultOpen == 'open' ? 'true' : (tocDefaultOpen == 'closed' ? 'false' : (theme.config.style.fullscreen_layout ? 'false' : 'true'))}">
|
||||||
<button id="toc-toggle" class="toc-toggle" aria-label="Hide Table of Contents"></button>
|
<button id="toc-toggle" class="toc-toggle" th:attr="aria-label=#{toc.hide}"></button>
|
||||||
<div id="toc-content" class="toc-content"></div>
|
<div id="toc-content" class="toc-content"></div>
|
||||||
</nav>
|
</nav>
|
||||||
<nav class="pagination">
|
<nav class="pagination">
|
||||||
|
|||||||
+3
-3
@@ -7,7 +7,7 @@
|
|||||||
<article class="post">
|
<article class="post">
|
||||||
<header>
|
<header>
|
||||||
<h1 class="post-title"
|
<h1 class="post-title"
|
||||||
th:with="title=${theme.config.tags_page.title ?: page.tag.title ?: 'Tag'}"
|
th:with="title=${theme.config.tags_page.title ?: #messages.msg('page.tag.title')}"
|
||||||
th:text="|${title}: ${tag.spec.displayName} [${tag.status.visiblePostCount ?: 0}]|">
|
th:text="|${title}: ${tag.spec.displayName} [${tag.status.visiblePostCount ?: 0}]|">
|
||||||
Tag: Tag name [n]
|
Tag: Tag name [n]
|
||||||
</h1>
|
</h1>
|
||||||
@@ -28,12 +28,12 @@
|
|||||||
<div class="pagination-buttons">
|
<div class="pagination-buttons">
|
||||||
<span th:if="${posts.hasPrevious()}">
|
<span th:if="${posts.hasPrevious()}">
|
||||||
<a data-pjax th:href="@{${posts.prevUrl}}" class="button inline prev">
|
<a data-pjax th:href="@{${posts.prevUrl}}" class="button inline prev">
|
||||||
<span class="button-text">< Prev</span>
|
<span class="button-text" th:text="'< ' + #{page.pagination.prev}">< Prev</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span th:if="${posts.hasNext()}">
|
<span th:if="${posts.hasNext()}">
|
||||||
<a data-pjax th:href="@{${posts.nextUrl}}" class="button inline next">
|
<a data-pjax th:href="@{${posts.nextUrl}}" class="button inline next">
|
||||||
<span class="button-text">Next ></span>
|
<span class="button-text" th:text="#{page.pagination.next} + ' >'">Next ></span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
<article class="post">
|
<article class="post">
|
||||||
<header>
|
<header>
|
||||||
<h1 class="post-title"
|
<h1 class="post-title"
|
||||||
th:with="title=${theme.config.tags_page.title_s ?: page.tags.title ?: 'Tags'}"
|
th:with="title=${theme.config.tags_page.title_s ?: #messages.msg('page.tags.title')}"
|
||||||
th:text="${title}">
|
th:text="${title}">
|
||||||
Tags
|
Tags
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
Reference in New Issue
Block a user