feat: add sitemap page with card grid layout
This commit is contained in:
43
js/sitemap.js
Normal file
43
js/sitemap.js
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
function renderSitemap() {
|
||||||
|
if (typeof sites === "undefined") return;
|
||||||
|
|
||||||
|
var projectContainer = document.getElementById("project-cards");
|
||||||
|
if (projectContainer) {
|
||||||
|
projectContainer.innerHTML = sites.projects.map(function (s) {
|
||||||
|
var subLink = "";
|
||||||
|
if (s.subLinks && s.subLinks.length > 0) {
|
||||||
|
subLink = s.subLinks.map(function (sl) {
|
||||||
|
return '<a href="' + sl.url + '" class="site-card-sublink" target="_blank" rel="noopener">' + sl.label + ' ↗</a>';
|
||||||
|
}).join("");
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
'<div class="site-card-wrapper">' +
|
||||||
|
'<a href="' + s.url + '" class="site-card" target="_blank" rel="noopener">' +
|
||||||
|
'<div class="site-card-icon">' + s.icon + "</div>" +
|
||||||
|
'<div class="site-card-name">' + s.name + "</div>" +
|
||||||
|
'<div class="site-card-desc">' + s.description + "</div>" +
|
||||||
|
"</a>" +
|
||||||
|
subLink +
|
||||||
|
"</div>"
|
||||||
|
);
|
||||||
|
}).join("");
|
||||||
|
}
|
||||||
|
|
||||||
|
var infraContainer = document.getElementById("infra-cards");
|
||||||
|
if (infraContainer) {
|
||||||
|
infraContainer.innerHTML = sites.infra.map(function (s) {
|
||||||
|
return (
|
||||||
|
'<a href="' + s.url + '" class="infra-card" target="_blank" rel="noopener">' +
|
||||||
|
'<div class="infra-card-icon">' + s.icon + "</div>" +
|
||||||
|
'<div class="infra-card-name">' + s.name + "</div>" +
|
||||||
|
'<div class="infra-card-desc">' + s.description + "</div>" +
|
||||||
|
"</a>"
|
||||||
|
);
|
||||||
|
}).join("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
renderSitemap();
|
||||||
|
});
|
||||||
47
sitemap/index.html
Normal file
47
sitemap/index.html
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Sitemap — tolelom.xyz</title>
|
||||||
|
<meta name="description" content="tolelom.xyz 서비스 및 인프라 목록">
|
||||||
|
<meta property="og:title" content="Sitemap — tolelom.xyz">
|
||||||
|
<meta property="og:description" content="tolelom.xyz 서비스 및 인프라 목록">
|
||||||
|
<meta property="og:url" content="https://tolelom.xyz/sitemap/">
|
||||||
|
<meta property="og:type" content="website">
|
||||||
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>👨💻</text></svg>">
|
||||||
|
<link rel="stylesheet" href="../css/style.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="nav">
|
||||||
|
<div class="nav-inner">
|
||||||
|
<a href="/" class="nav-logo">김성민</a>
|
||||||
|
<a href="/" class="nav-link">← 포트폴리오</a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main class="container">
|
||||||
|
<div class="sitemap-header">
|
||||||
|
<h1 class="sitemap-title">tolelom.xyz</h1>
|
||||||
|
<p class="sitemap-subtitle">서비스 & 인프라 목록</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h2 class="sitemap-section-title">프로젝트</h2>
|
||||||
|
<div id="project-cards" class="card-grid"></div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h2 class="sitemap-section-title">인프라</h2>
|
||||||
|
<div id="infra-cards" class="infra-grid"></div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<footer class="footer">
|
||||||
|
<p><a href="/">← 포트폴리오로 돌아가기</a></p>
|
||||||
|
</footer>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script src="../data/sites.js"></script>
|
||||||
|
<script src="../js/sitemap.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user