Optimize studio-sample: shared CSS, mobile nav, SEO, a11y, working filter

- Extract duplicated per-page CSS into one shared style.css
- Add CSS-only hamburger menu for ≤720px (was overflowing)
- Add meta description / Open Graph / favicon to all pages
- Unify footers, fix dead links, distinct <title>s
- :focus-visible outlines, aria-hidden on decorative text, contrast bumps
- Make works.html category filter actually filter (data-cat)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-23 20:07:46 +08:00
parent 39f099aacf
commit 8e31d73376
6 changed files with 1057 additions and 1654 deletions

View File

@@ -3,587 +3,24 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>STUDIO SAMPLE</title>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
"Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP",
"Noto Sans TC", system-ui, sans-serif;
background-color: #ffffff;
color: #333333;
line-height: 1.6;
}
/* ─── NAV ─────────────────────────────────────────────── */
nav {
position: sticky;
top: 0;
z-index: 100;
background: #ffffff;
border-bottom: 1px solid #eeeeee;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 clamp(16px, 5vw, 64px);
height: 56px;
}
.nav-logo {
font-size: 18px;
font-weight: 800;
letter-spacing: 0.12em;
color: #e53935;
text-transform: uppercase;
text-decoration: none;
}
.nav-links {
display: flex;
gap: clamp(16px, 3vw, 40px);
list-style: none;
}
.nav-links a {
font-size: 13px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: #555555;
text-decoration: none;
transition: color 0.2s;
}
.nav-links a:hover {
color: #e53935;
}
/* ─── HERO ────────────────────────────────────────────── */
#hero {
min-height: calc(100vh - 56px);
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
padding: clamp(48px, 8vw, 96px) clamp(24px, 8vw, 96px);
background: #f7f7f7;
position: relative;
overflow: hidden;
}
.hero-bg-text {
position: absolute;
right: -0.05em;
bottom: -0.15em;
font-size: clamp(120px, 18vw, 280px);
font-weight: 900;
letter-spacing: -0.02em;
color: #eeeeee;
user-select: none;
line-height: 1;
pointer-events: none;
}
.hero-eyebrow {
font-size: clamp(11px, 1.2vw, 13px);
font-weight: 700;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #e53935;
margin-bottom: 20px;
}
.hero-title {
font-size: clamp(36px, 6vw, 80px);
font-weight: 800;
letter-spacing: -0.02em;
color: #111111;
line-height: 1.1;
margin-bottom: 24px;
max-width: 12em;
}
.hero-title em {
font-style: normal;
color: #e53935;
}
.hero-sub {
font-size: clamp(14px, 1.6vw, 18px);
color: #666666;
max-width: 38em;
margin-bottom: 40px;
}
.btn {
display: inline-block;
padding: 14px 32px;
font-size: 14px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
text-decoration: none;
border: 2px solid #e53935;
transition: background 0.2s, color 0.2s;
}
.btn-primary {
background: #e53935;
color: #ffffff;
}
.btn-primary:hover {
background: #c62828;
border-color: #c62828;
}
.btn-outline {
background: transparent;
color: #e53935;
margin-left: 12px;
}
.btn-outline:hover {
background: #e53935;
color: #ffffff;
}
/* ─── SECTION COMMON ──────────────────────────────────── */
section {
padding: clamp(56px, 8vw, 96px) clamp(24px, 8vw, 96px);
}
.section-label {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.25em;
text-transform: uppercase;
color: #e53935;
margin-bottom: 12px;
}
.section-title {
font-size: clamp(24px, 3.5vw, 40px);
font-weight: 800;
letter-spacing: -0.01em;
color: #111111;
margin-bottom: 16px;
}
.section-lead {
font-size: clamp(14px, 1.5vw, 17px);
color: #666666;
max-width: 42em;
margin-bottom: 48px;
}
/* ─── FEATURES ────────────────────────────────────────── */
#features {
background: #ffffff;
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 2px;
background: #eeeeee;
border: 2px solid #eeeeee;
}
.feature-card {
background: #ffffff;
padding: clamp(24px, 3vw, 40px);
}
.feature-num {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.15em;
color: #e53935;
margin-bottom: 16px;
}
.feature-title {
font-size: clamp(16px, 1.8vw, 20px);
font-weight: 800;
color: #111111;
margin-bottom: 10px;
}
.feature-desc {
font-size: clamp(13px, 1.3vw, 15px);
color: #666666;
line-height: 1.7;
}
/* ─── WORKS ───────────────────────────────────────────── */
#works {
background: #f7f7f7;
}
.works-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 24px;
}
.work-card {
background: #ffffff;
border: 1px solid #eeeeee;
overflow: hidden;
}
.work-thumb {
width: 100%;
aspect-ratio: 16/9;
background: #eeeeee;
display: flex;
align-items: center;
justify-content: center;
font-size: clamp(32px, 4vw, 48px);
font-weight: 900;
letter-spacing: -0.02em;
color: #cccccc;
}
.work-thumb.red { background: #fde8e8; color: #e53935; }
.work-thumb.dark { background: #222222; color: #444444; }
.work-thumb.gray { background: #e8e8e8; color: #bbbbbb; }
.work-body {
padding: 20px 24px;
}
.work-tag {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.15em;
text-transform: uppercase;
color: #e53935;
margin-bottom: 6px;
}
.work-title {
font-size: clamp(15px, 1.6vw, 18px);
font-weight: 700;
color: #111111;
margin-bottom: 6px;
}
.work-desc {
font-size: 13px;
color: #777777;
}
/* ─── ABOUT ───────────────────────────────────────────── */
#about {
background: #111111;
color: #ffffff;
}
#about .section-title {
color: #ffffff;
}
#about .section-lead {
color: #999999;
}
#about .section-label {
color: #e53935;
}
.about-layout {
display: grid;
grid-template-columns: 1fr 1fr;
gap: clamp(32px, 6vw, 80px);
align-items: start;
}
@media (max-width: 640px) {
.about-layout { grid-template-columns: 1fr; }
}
.about-stats {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2px;
background: #2a2a2a;
border: 2px solid #2a2a2a;
}
.stat-box {
background: #1a1a1a;
padding: 28px 24px;
}
.stat-num {
font-size: clamp(28px, 4vw, 44px);
font-weight: 800;
color: #e53935;
letter-spacing: -0.02em;
line-height: 1;
margin-bottom: 6px;
}
.stat-label {
font-size: 12px;
color: #666666;
letter-spacing: 0.1em;
text-transform: uppercase;
}
.about-text p {
font-size: clamp(14px, 1.5vw, 16px);
color: #aaaaaa;
line-height: 1.8;
margin-bottom: 20px;
}
/* ─── CONTACT ─────────────────────────────────────────── */
#contact {
background: #ffffff;
}
.contact-layout {
display: grid;
grid-template-columns: 1fr 1fr;
gap: clamp(32px, 6vw, 80px);
align-items: start;
}
@media (max-width: 640px) {
.contact-layout { grid-template-columns: 1fr; }
}
.form-group {
margin-bottom: 20px;
}
label {
display: block;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: #555555;
margin-bottom: 8px;
}
input, textarea, select {
width: 100%;
padding: 12px 16px;
border: 1px solid #dddddd;
border-radius: 0;
font-size: 14px;
font-family: inherit;
color: #333333;
background: #ffffff;
outline: none;
transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus {
border-color: #e53935;
}
textarea {
min-height: 120px;
resize: vertical;
}
.contact-info {
display: flex;
flex-direction: column;
gap: 32px;
}
.contact-item-label {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #e53935;
margin-bottom: 6px;
}
.contact-item-value {
font-size: clamp(14px, 1.5vw, 16px);
color: #333333;
}
.contact-item-sub {
font-size: 13px;
color: #888888;
margin-top: 2px;
}
/* ─── PROCESS ────────────────────────────────────────── */
#process {
background: #f7f7f7;
}
.process-steps {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 0;
counter-reset: step;
}
.process-step {
padding: clamp(28px, 3vw, 44px) clamp(20px, 2.5vw, 36px);
border-right: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
position: relative;
}
.process-step:last-child {
border-right: none;
}
@media (max-width: 640px) {
.process-step { border-right: none; }
}
.step-num {
font-size: clamp(40px, 6vw, 64px);
font-weight: 900;
color: #eeeeee;
line-height: 1;
margin-bottom: 12px;
letter-spacing: -0.03em;
}
.step-title {
font-size: clamp(15px, 1.6vw, 18px);
font-weight: 800;
color: #111111;
margin-bottom: 8px;
}
.step-desc {
font-size: clamp(13px, 1.2vw, 14px);
color: #777777;
line-height: 1.7;
}
/* ─── NEWS ────────────────────────────────────────────── */
#news {
background: #ffffff;
}
.news-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 24px;
}
.news-card {
border-top: 2px solid #eeeeee;
padding-top: 20px;
}
.news-card:first-child {
border-top-color: #e53935;
}
.news-date {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.15em;
color: #aaaaaa;
margin-bottom: 8px;
text-transform: uppercase;
}
.news-title {
font-size: clamp(15px, 1.6vw, 18px);
font-weight: 700;
color: #111111;
margin-bottom: 8px;
line-height: 1.4;
}
.news-excerpt {
font-size: 13px;
color: #777777;
line-height: 1.7;
margin-bottom: 14px;
}
.news-link {
font-size: 12px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: #e53935;
text-decoration: none;
}
.news-link:hover {
text-decoration: underline;
}
/* ─── FOOTER ──────────────────────────────────────────── */
footer {
background: #111111;
padding: 32px clamp(24px, 8vw, 96px);
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 16px;
}
.footer-nav {
display: flex;
gap: clamp(16px, 3vw, 32px);
list-style: none;
}
.footer-nav a {
font-size: 12px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: #555555;
text-decoration: none;
transition: color 0.2s;
}
.footer-nav a:hover {
color: #e53935;
}
.footer-logo {
font-size: 16px;
font-weight: 800;
letter-spacing: 0.12em;
color: #e53935;
text-transform: uppercase;
}
.footer-copy {
font-size: 12px;
color: #555555;
letter-spacing: 0.05em;
}
</style>
<meta name="theme-color" content="#e53935">
<meta name="description" content="Studio Sample — 東京設計與前端工作室。品牌識別、網頁設計開發、印刷編輯,無框架、無廢話的高品質作品。">
<meta property="og:type" content="website">
<meta property="og:locale" content="zh_TW">
<meta property="og:site_name" content="Studio Sample">
<meta property="og:title" content="Studio Sample — Design &amp; Front-End Studio">
<meta property="og:description" content="東京設計與前端工作室。品牌識別、網頁設計開發、印刷編輯。無框架、無廢話。">
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><rect width='64' height='64' rx='8' fill='%23e53935'/><text x='32' y='45' font-family='Arial,sans-serif' font-size='42' font-weight='bold' fill='white' text-anchor='middle'>S</text></svg>">
<link rel="stylesheet" href="style.css">
<title>Studio Sample — Design &amp; Front-End Studio</title>
</head>
<body>
<!-- ─── NAV ─────────────────────────────────────────────── -->
<nav>
<a class="nav-logo" href="#hero">Studio Sample</a>
<input type="checkbox" id="nav-toggle" class="nav-toggle">
<label class="nav-burger" for="nav-toggle" aria-label="開啟選單"></label>
<ul class="nav-links">
<li><a href="services.html">Services</a></li>
<li><a href="works.html">Works</a></li>
@@ -595,12 +32,12 @@
<!-- ─── HERO ──────────────────────────────────────────────── -->
<section id="hero">
<div class="hero-bg-text">SAMPLE</div>
<div class="hero-bg-text" aria-hidden="true">SAMPLE</div>
<p class="hero-eyebrow">Welcome to Studio Sample</p>
<h1 class="hero-title">Make it<br><em>simple.</em><br>Make it real.</h1>
<p class="hero-sub">
這是一個通用的靜態網站範例。乾淨的版面、流體排版、無框架依賴。<br>
A clean static site template. No frameworks. Just HTML & CSS.
A clean static site template. No frameworks. Just HTML &amp; CSS.
</p>
<div>
<a class="btn btn-primary" href="#works">View Works</a>
@@ -774,13 +211,13 @@
<p class="news-date">2026 — Feb</p>
<h3 class="news-title">為什麼我們不用任何前端框架</h3>
<p class="news-excerpt">框架解決了很多問題,但也帶來同樣多的問題。這篇文章說明我們如何在沒有框架的情況下交付高品質作品。</p>
<a class="news-link" href="#">Read More →</a>
<a class="news-link" href="timeline.html">Read More →</a>
</div>
<div class="news-card">
<p class="news-date">2025 — Dec</p>
<h3 class="news-title">2025 回顧48 個專案3 個人</h3>
<p class="news-excerpt">這一年我們做了哪些事?學到了什麼?又有什麼想在 2026 年做得更好?年度總結在此。</p>
<a class="news-link" href="#">Read More →</a>
<a class="news-link" href="timeline.html">Read More →</a>
</div>
</div>
</section>
@@ -847,7 +284,7 @@
<ul class="footer-nav">
<li><a href="services.html">Services</a></li>
<li><a href="works.html">Works</a></li>
<li><a href="#about">About</a></li>
<li><a href="timeline.html">Timeline</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
<div class="footer-copy">© 2026 Studio Sample. All rights reserved.</div>