- src/shared/i18n.ts: 공용 i18n 로더 (dotted-key + {{placeholder}} 보간)
- locales/server/ko-kr.json: 사이트 + 라우터 + 데이터팩 출력 사전
- EJS 뷰는 res.locals.t 미들웨어로 일괄 적용
- listEditor.js 등 클라이언트 JS 는 사전을 inline <script> 로 주입받아 tt() 헬퍼 사용
43 lines
1.5 KiB
Plaintext
43 lines
1.5 KiB
Plaintext
<!doctype html>
|
|
<html lang="ko">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title><%= t('list.browserTitle') %></title>
|
|
<link rel="stylesheet" href="/static/styles.css" />
|
|
</head>
|
|
<body class="siteBody">
|
|
<%- include('../partials/navbar', { userId }) %>
|
|
|
|
<main class="pageWrap">
|
|
<section class="dashboardHeader">
|
|
<div>
|
|
<a class="ghostLink" href="/op/dashboard"><%= t('common.back') %></a>
|
|
<h1 style="margin-top:20px;"><%= t('list.title') %></h1>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="cardRow horizontalScroll">
|
|
<% if (items.length === 0) { %>
|
|
<p class="muted"><%= t('site.empty') %></p>
|
|
<% } %>
|
|
<% items.forEach(function (item) { %>
|
|
<article class="packCard">
|
|
<a class="cardLink" href="/op/list/<%= item.key %>">
|
|
<h2><%= item.definition ? item.definition.name : item.key %></h2>
|
|
<p class="muted"><%= item.key %>.json</p>
|
|
<% if (item.definition) { %>
|
|
<ul class="metaList">
|
|
<li><%= t('dashboard.mcShort') %> <%= item.definition.mcVersion %></li>
|
|
<li><%= t('site.platform') %> <%= item.definition.platform.type %></li>
|
|
<li><%= t('site.modsFolder') %> <%= item.definition.modsFolder || t('site.noneFallback') %></li>
|
|
</ul>
|
|
<% } %>
|
|
</a>
|
|
</article>
|
|
<% }) %>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|