-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest1.html
More file actions
415 lines (374 loc) · 21.4 KB
/
Copy pathtest1.html
File metadata and controls
415 lines (374 loc) · 21.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>日々是好日</title>
<meta name="description" content="書く・聴く・撮る。静かな美意識でまとめたブログ+作品アーカイブ。" />
<meta name="theme-color" content="#e6ebef" />
<meta property="og:title" content="静かな青|Simple × Cool × Narrative" />
<meta property="og:description" content="書く・聴く・撮る。静かな美意識でまとめたブログ+作品アーカイブ。" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://images.unsplash.com/photo-1506744038136-46273834b3fb?q=80&w=1200&auto=format&fit=crop" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;600;700&family=Playfair+Display:wght@500;700&display=swap" rel="stylesheet">
<style>
:root{
/* 寒色×ミニマル(Ader系の淡青グレー) */
--bg:#E6EBEF; /* ペールグレー */
--paper:#F7FAFC; /* うっすら青み */
--panel:#FFFFFF;
--ink:#222831; /* テキスト */
--muted:#6b7280; /* 補助テキスト */
--line:#e2e8f0; /* 罫線 */
--accent:#6BA4FF; /* 淡い青 */
--accent-ink:#0f172a;
--soft:#eef5ff; /* アクセントのソフト版 */
--radius:18px;
--shadow:0 10px 30px rgba(15,23,42,0.08);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{margin:0;background:linear-gradient(180deg,var(--bg),#f5f8fb);color:var(--ink);font-family:"Noto Sans JP",system-ui,-apple-system,Segoe UI,Roboto,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
/* ヘッダー */
.header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,0.7);backdrop-filter:saturate(140%) blur(10px);border-bottom:1px solid var(--line)}
.wrap{max-width:1120px;margin:auto;padding:16px 20px}
.row{display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand{display:flex;align-items:center;gap:10px;font-weight:700}
.logo{width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,#9ec5ff,#bcd6ff 60%,#dfeaff);box-shadow:inset 0 0 0 1px rgba(255,255,255,.6),0 6px 20px rgba(107,164,255,.25)}
.brand span{font-family:"Playfair Display",serif;letter-spacing:.3px}
nav{display:flex;gap:10px;flex-wrap:wrap}
.tab{padding:10px 14px;border-radius:999px;border:1px solid var(--line);background:#fff;transition:.2s}
.tab[aria-current="page"], .tab:hover{border-color:#cfe0ff;background:var(--soft)}
/* ヒーロー */
.hero{padding:56px 20px 28px}
.hero .inner{max-width:1120px;margin:auto;display:grid;grid-template-columns:1.2fr .8fr;gap:28px}
.title{font-family:"Playfair Display",serif;font-size:clamp(28px,5vw,44px);line-height:1.15;margin:0 0 10px}
.lead{color:var(--muted);font-size:16px}
.hero-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.hero-card img{aspect-ratio:16/9;object-fit:cover}
.hero-card .cap{padding:14px 16px;color:#334155;font-size:14px}
/* セクションコンテナ */
main{padding:8px 20px 64px}
section{max-width:1120px;margin:18px auto 0}
/* 検索&タグ */
.controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 12px}
.controls input[type="search"]{flex:1;min-width:220px;padding:10px 12px;border:1px solid var(--line);border-radius:999px;background:#fff}
.chip{padding:8px 12px;border:1px solid var(--line);border-radius:999px;background:#fff;font-size:13px;color:#334155;cursor:pointer;user-select:none}
.chip.active,.chip:hover{border-color:#cfe0ff;background:var(--soft)}
/* ブログカード */
.grid{display:grid;gap:18px}
.blog-grid{grid-template-columns:repeat(12,1fr)}
.card{grid-column:span 12;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;transition:transform .18s ease}
.card:hover{transform:translateY(-2px)}
.card .ph{height:180px;background:#dce9ff}
.card .body{padding:16px}
.meta{display:flex;gap:10px;align-items:center;color:#64748b;font-size:12px}
.title-sm{font-weight:700;margin:10px 0 6px;font-size:18px}
.excerpt{color:#475569;font-size:14px}
/* フォト */
.photo-grid{grid-template-columns:repeat(12,1fr)}
.photo{grid-column:span 6;background:var(--panel);border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:var(--shadow)}
.photo img{aspect-ratio:4/5;object-fit:cover}
/* モーダル(写真の静かな拡大) */
.lightbox{position:fixed;inset:0;background:rgba(15,23,42,.75);backdrop-filter:blur(4px);display:none;align-items:center;justify-content:center;padding:24px}
.lightbox.open{display:flex}
.lightbox figure{background:#0b1220;border:1px solid #1f2a44;border-radius:16px;max-width:min(92vw,980px);box-shadow:0 20px 60px rgba(0,0,0,.35);overflow:hidden}
.lightbox img{max-height:72vh;width:100%;object-fit:contain;display:block}
.lightbox figcaption{padding:10px 14px;color:#cbd5e1;font-size:13px}
/* YouTube / Music 埋め込み */
.emb{position:relative;aspect-ratio:16/9;background:#e2e8f0;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.emb iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
/* About / Post */
.about{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:20px;box-shadow:var(--shadow)}
.md h1,.md h2,.md h3{font-family:"Playfair Display",serif}
.md h1{font-size:32px;margin:16px 0 8px}
.md h2{font-size:24px;margin:16px 0 8px}
.md h3{font-size:18px;margin:14px 0 6px}
.md p{margin:0 0 12px}
.md ul{margin:8px 0 12px 20px}
/* フッター */
footer{border-top:1px solid var(--line);padding:18px 20px;color:#64748b}
/* レスポンシブ */
@media (max-width:960px){
.hero .inner{grid-template-columns:1fr;gap:16px}
.photo{grid-column:span 12}
}
@media (min-width:720px){
.card{grid-column:span 6}
}
@media (min-width:1040px){
.card{grid-column:span 4}
}
/* フェード用 */
.fade{opacity:0;transform:translateY(8px);transition:opacity .6s ease, transform .6s ease}
.fade.show{opacity:1;transform:none}
</style>
</head>
<body>
<header class="header">
<div class="wrap row">
<div class="brand">
<div class="logo" aria-hidden></div>
<span>静かな青</span>
</div>
<nav aria-label="主要ナビ">
<a class="tab" data-route="home" aria-current="page">Home</a>
<a class="tab" data-route="blog">Blog</a>
<a class="tab" data-route="photo">Photo</a>
<a class="tab" data-route="music">Music</a>
<a class="tab" data-route="youtube">YouTube</a>
<a class="tab" data-route="about">About</a>
</nav>
</div>
</header>
<section class="hero" data-page="home">
<div class="inner">
<div>
<h1 class="title">静けさの中に、思考と音を残す場所。</h1>
<p class="lead">書く・聴く・撮る──その全部をひとつの呼吸でまとめた、シンプルで寒色の世界。
余白を怖がらず、言葉と作品が静かに届く設計です。</p>
</div>
<div class="hero-card fade">
<img src="https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?q=80&w=1600&auto=format&fit=crop" alt="淡い青の空と建築のミニマル写真">
<div class="cap">Simple × Cool × Narrative — Blog を中心に、Photo / Music / YouTube へ枝葉のように広がります。</div>
</div>
</div>
</section>
<main>
<!-- Blog -->
<section data-page="blog" hidden>
<div class="wrap">
<h2 class="title" style="font-size:28px">Blog</h2>
<p class="lead">思想・観察・歌と言葉のメモ。センスの語彙と、日々の呼吸。</p>
<div class="controls">
<input id="blogSearch" type="search" placeholder="キーワード検索(タイトル / タグ / 抜粋)" aria-label="ブログ検索">
<div id="tagChips" role="listbox" aria-label="タグフィルタ"></div>
</div>
<div class="grid blog-grid" id="blogGrid"></div>
</div>
</section>
<!-- Photo -->
<section data-page="photo" hidden>
<div class="wrap">
<h2 class="title" style="font-size:28px">Photo</h2>
<p class="lead">ギャラリーではなく、1枚ずつ“静かに”味わうための構成。</p>
<div class="grid photo-grid" id="photoGrid"></div>
</div>
</section>
<!-- Music -->
<section data-page="music" hidden>
<div class="wrap">
<h2 class="title" style="font-size:28px">Music</h2>
<p class="lead">深夜2時の空気を閉じ込めた音。Spotify / SoundCloud 埋め込みに短い解説を添えて。</p>
<div class="grid" style="grid-template-columns:repeat(12,1fr);gap:18px">
<article class="card" style="grid-column:span 12">
<div class="emb"><iframe src="https://open.spotify.com/embed/playlist/37i9dQZF1DX4sWSpwq3LiO" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture"></iframe></div>
<div class="body"><div class="title-sm">Playlist — 静かな青</div><p class="excerpt">寒色の空気感を作るための選曲。低域は控えめ、余白のあるミックス。</p></div>
</article>
<article class="card" style="grid-column:span 12">
<div class="emb"><iframe src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/293&color=%236BA4FF&inverse=false&auto_play=false&show_user=true"></iframe></div>
<div class="body"><div class="title-sm">Demo — 夜の歩幅</div><p class="excerpt">人の呼吸に近いテンポで、抑制の美学を。</p></div>
</article>
</div>
</div>
</section>
<!-- YouTube -->
<section data-page="youtube" hidden>
<div class="wrap">
<h2 class="title" style="font-size:28px">YouTube</h2>
<p class="lead">分析・弾き語り・断片の思考。動画にも“静けさの設計”を。</p>
<div class="grid" style="grid-template-columns:repeat(12,1fr);gap:18px">
<article class="card" style="grid-column:span 12">
<div class="emb"><iframe src="https://www.youtube.com/embed?listType=playlist&list=PL9tYv1-EXAMPLE"></iframe></div>
<div class="body"><div class="title-sm">Playlist — 声と言葉の分析</div><p class="excerpt">音域・呼吸・言葉の密度を、やわらかく解説。</p></div>
</article>
</div>
</div>
</section>
<!-- Post(Markdownビュー) -->
<section data-page="post" hidden>
<div class="wrap">
<article id="postView" class="about" style="max-width:860px;margin:auto"></article>
</div>
</section>
<!-- About -->
<section data-page="about" hidden>
<div class="wrap about">
<h2 class="title" style="font-size:28px;margin:0 0 8px">About</h2>
<p style="margin:0 0 8px;color:#334155">書く・聴く・撮るは同じ呼吸。余白を怖がらないことで、伝わる力は静かに強くなると信じています。</p>
<ul style="margin:0;color:#475569;font-size:14px;line-height:1.7">
<li>このサイトは GitHub Pages でホストできる “1ファイル” 設計。</li>
<li>Blog を中心に、Photo / Music / YouTube へ枝葉のように展開。</li>
<li>色数は抑え、寒色と余白で世界観を統一。</li>
</ul>
</div>
</section>
</main>
<div class="lightbox" id="lightbox" role="dialog" aria-modal="true" aria-label="写真拡大表示">
<figure>
<img alt="拡大画像">
<figcaption id="lbcap"></figcaption>
</figure>
</div>
<footer>
<div class="wrap row" style="justify-content:space-between">
<small>© 静かな青 — Simple × Cool × Narrative</small>
<small><a href="#" id="toTop">Top</a></small>
</div>
</footer>
<script>
// ====== ルーター(タブでセクション切替|GitHub PagesでもOK) ======
const tabs = document.querySelectorAll('.tab');
const pages = document.querySelectorAll('[data-page]');
function show(page){
pages.forEach(sec=>{ sec.hidden = (sec.dataset.page!==page); });
tabs.forEach(t=> t.setAttribute('aria-current', t.dataset.route===page ? 'page' : 'false'));
window.scrollTo({top:0,behavior:'smooth'});
document.querySelectorAll('.fade').forEach(el=>{ setTimeout(()=>el.classList.add('show'),80); })
location.hash = page==='home' ? '' : `#${page}`;
}
// ====== Blog(Markdown読み込み+検索/タグ) ======
// GitHub Pages では /posts/ 以下に .md を置く想定
const postsManifest = [
{slug:'sense-subtract', date:'2025-10-01', tags:['感覚と思考','センス'], title:'センスは「引き算の勇気」', excerpt:'余白を怖がらないと、言葉の密度が上がる。整い過ぎない調和の話。', md:'posts/sense-subtract.md', img:''},
{slug:'write-breath', date:'2025-09-28', tags:['声と言葉','文章術'], title:'呼吸のテンポで文章を書く', excerpt:'読点の位置を「息継ぎ」に合わせるだけで、読み心地は変わる。', md:'posts/write-breath.md', img:''},
{slug:'sky-negative', date:'2025-09-22', tags:['日常と観察','写真'], title:'静けさの撮り方:空の余白', excerpt:'建築を端に寄せ、広い空に青のグラデーションを。', md:'posts/sky-negative.md', img:''},
];
const blogGrid = document.getElementById('blogGrid');
const searchInput = document.getElementById('blogSearch');
const tagChips = document.getElementById('tagChips');
function createEyecatch(title='静かな青', note=''){ // Canvasで淡青グラデ生成
const w=1200,h=630, c=document.createElement('canvas'); c.width=w; c.height=h; const x=c.getContext('2d');
const g=x.createLinearGradient(0,0,w,h); g.addColorStop(0,'#dfeaff'); g.addColorStop(.55,'#bcd6ff'); g.addColorStop(1,'#9ec5ff');
x.fillStyle=g; x.fillRect(0,0,w,h);
x.fillStyle='rgba(255,255,255,.35)'; for(let i=0;i<8;i++){ x.beginPath(); x.arc(80+i*140, 120+i*40, 60+i*10, 0, Math.PI*2); x.fill();}
x.fillStyle='#0f172a'; x.font='700 44px "Playfair Display", serif'; x.fillText(title.slice(0,18), 48, 120);
x.font='500 20px "Noto Sans JP"'; x.fillText(note.slice(0,26), 48, 160);
return c.toDataURL('image/png');
}
function uniqueTags(){
const s=new Set(); postsManifest.forEach(p=>p.tags?.forEach(t=>s.add(t))); return Array.from(s);
}
function buildTagChips(){
const tags=uniqueTags();
tagChips.innerHTML = ['すべて',...tags].map(t=>`<button class="chip" data-tag="${t}">${t}</button>`).join('');
tagChips.querySelectorAll('.chip').forEach(ch=>{
ch.addEventListener('click',()=>{
tagChips.querySelectorAll('.chip').forEach(c=>c.classList.remove('active'));
ch.classList.add('active');
applyFilter();
})
});
const first=tagChips.querySelector('.chip'); first.classList.add('active');
}
function applyFilter(){
const q = (searchInput?.value||'').toLowerCase();
const active = tagChips.querySelector('.chip.active')?.dataset.tag || 'すべて';
const list = postsManifest.filter(p=>{
const inSearch = [p.title,p.excerpt,(p.tags||[]).join(' ')].join(' ').toLowerCase().includes(q);
const inTag = active==='すべて' || (p.tags||[]).includes(active);
return inSearch && inTag;
}).sort((a,b)=> new Date(b.date)-new Date(a.date));
renderPosts(list);
}
function renderPosts(list=postsManifest){
blogGrid.innerHTML = list.map(p=>{
const cover = p.img && p.img.length>4 ? p.img : createEyecatch(p.title, (p.tags||[])[0]||'');
return `<article class="card fade" data-slug="${p.slug}">
<div class="ph"><img src="${cover}" alt="${p.title}" style="width:100%;height:100%;object-fit:cover"></div>
<div class="body">
<div class="meta"><span>${new Date(p.date).toLocaleDateString('ja-JP')}</span><span>•</span><span>${(p.tags||[]).join(', ')}</span></div>
<div class="title-sm">${p.title}</div>
<p class="excerpt">${p.excerpt}</p>
</div>
</article>`
}).join('');
setTimeout(()=>document.querySelectorAll('.card.fade').forEach(el=>el.classList.add('show')), 40);
blogGrid.querySelectorAll('.card').forEach(el=>{
el.addEventListener('click',()=>openPost(el.dataset.slug));
});
}
function mdToHtml(md){ // シンプルMarkdown→HTML
let h = md
.replace(/^###### (.*$)/gim,'<h6>$1</h6>')
.replace(/^##### (.*$)/gim,'<h5>$1</h5>')
.replace(/^#### (.*$)/gim,'<h4>$1</h4>')
.replace(/^### (.*$)/gim,'<h3>$1</h3>')
.replace(/^## (.*$)/gim,'<h2>$1</h2>')
.replace(/^# (.*$)/gim,'<h1>$1</h1>')
.replace(/\*\*(.*?)\*\*/gim,'<strong>$1</strong>')
.replace(/\*(.*?)\*/gim,'<em>$1</em>')
.replace(/`([^`]+)`/g,'<code>$1</code>')
.replace(/\[(.*?)\]\((.*?)\)/g,'<a href="$2" target="_blank" rel="noopener">$1<\/a>')
.replace(/^\s*\- (.*$)/gim,'<li>$1</li>');
h = h.replace(/(<li>.*<\/li>)/gms,'<ul>$1</ul>');
h = h.split(/\n\n+/).map(p=>/^<h\d|<ul|<li|<img|<blockquote|<pre|<p|<code/.test(p)?p:`<p>${p}</p>`).join('\n');
return h;
}
async function openPost(slug){
const p = postsManifest.find(x=>x.slug===slug);
if(!p) return;
const res = await fetch(p.md).catch(()=>null);
let content = res && res.ok ? await res.text() : `# ${p.title}\n\n${p.excerpt}\n\n(Markdown ファイルが見つかりませんでした)`;
const view = document.getElementById('postView');
view.innerHTML = `<h1 style="font-family:'Playfair Display',serif;margin:0 0 6px">${p.title}</h1>
<div class="meta" style="margin:0 0 14px"><span>${new Date(p.date).toLocaleDateString('ja-JP')}</span><span>•</span><span>${(p.tags||[]).join(', ')}</span></div>
<div class="ey" style="margin:0 0 16px"><img src="${p.img&&p.img.length>4?p.img:createEyecatch(p.title,(p.tags||[])[0]||'')}" alt="eyecatch" style="width:100%;border-radius:12px"></div>
<div class="md" style="line-height:1.85;color:#334155">${mdToHtml(content)}</div>`;
show('post');
location.hash = `post/${slug}`;
}
// ====== Photo(同じまま) ======
const photos = [
{src:'https://images.unsplash.com/photo-1519681393784-d120267933ba?q=80&w=1200&auto=format&fit=crop', cap:'朝の冷たい窓の光'},
{src:'https://images.unsplash.com/photo-1520763185298-1b434c919102?q=80&w=1200&auto=format&fit=crop', cap:'余白のある海辺'},
{src:'https://images.unsplash.com/photo-1482192596544-9eb780fc7f66?q=80&w=1200&auto=format&fit=crop', cap:'夜に溶ける街の音'},
{src:'https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?q=80&w=1200&auto=format&fit=crop', cap:'青のグラデーション'}
];
const photoGrid = document.getElementById('photoGrid');
function renderPhotos(){
photoGrid.innerHTML = photos.map(p=>{
return `<figure class="photo fade"><img src="${p.src}" alt="${p.cap}"><figcaption style="padding:10px 12px;color:#475569;font-size:13px">${p.cap}</figcaption></figure>`
}).join('');
setTimeout(()=>document.querySelectorAll('.photo.fade').forEach(el=>el.classList.add('show')), 40);
photoGrid.querySelectorAll('img').forEach((img,i)=>{
img.addEventListener('click',()=>openLightbox(photos[i]));
})
}
// ライトボックス
const lb = document.getElementById('lightbox');
const lbImg = lb.querySelector('img');
const lbCap = document.getElementById('lbcap');
function openLightbox(item){
lbImg.src = item.src; lbImg.alt = item.cap; lbCap.textContent = item.cap; lb.classList.add('open');
}
lb.addEventListener('click', e=>{ if(e.target===lb || e.target.tagName!=='IMG'){ lb.classList.remove('open'); } });
// スクロールトップ
document.getElementById('toTop').addEventListener('click', e=>{e.preventDefault();window.scrollTo({top:0,behavior:'smooth'});});
// IntersectionObserverでゆるくフェード
const io = new IntersectionObserver((entries)=>{
entries.forEach(ent=>{ if(ent.isIntersecting){ ent.target.classList.add('show'); io.unobserve(ent.target);} });
},{threshold:.1});
document.querySelectorAll('.fade').forEach(el=>io.observe(el));
// 初期表示(ハッシュ対応)
const initialHash = location.hash?.replace('#','') || 'home';
if(initialHash.startsWith('post/')){
const slug = initialHash.split('/')[1];
openPost(slug);
}else{
show(initialHash);
}
// 初期レンダリング
renderPhotos();
buildTagChips();
applyFilter();
// 検索イベント
document.getElementById('blogSearch')?.addEventListener('input', applyFilter);
tabs.forEach(t=>t.addEventListener('click', e=>{ e.preventDefault(); show(t.dataset.route); }));
</script>
</body>
</html>