Skip to content

Commit 217038e

Browse files
committed
feat(nav): 各セクションにアンカーリンクを追加
トップページの全メジャーセクションにアンカーリンク機能を追加しました。 - CATEGORIES, NEWS, SPONSORS, FAQ にそれぞれ id を設定 - 各見出しをアンカーリンク化(URL共有・ブックマーク可能に) - セクション間のスペーシングを統一(pt-36) - ヘッダー高を考慮した適切な padding-top に調整 Ref: #26
1 parent 9c5b12e commit 217038e

File tree

2 files changed

+26
-17
lines changed

2 files changed

+26
-17
lines changed

_includes/faq.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<section id="faq">
2-
<div class="text-center mb-16 pt-12">
3-
<h1 class="text-5xl sm:text-6xl font-bold uppercase tracking-wider border-b-10 border-teal-500 inline-block" style="font-family: 'League Gothic', sans-serif; color: #221C35;">FAQ</h1>
4-
<p class="text-xl mt-2" style="color: #444444;">よくある質問と回答</p>
2+
<div class="text-center pt-24 mb-16">
3+
<a href="#faq" style="text-decoration: none;">
4+
<h1 class="text-5xl sm:text-6xl font-bold uppercase tracking-wider border-b-10 border-teal-500 inline-block" style="font-family: 'League Gothic', sans-serif; color: #221C35;">FAQ</h1>
5+
<p class="text-xl mt-2" style="color: #444444;">よくある質問と回答</p>
6+
</a>
57
</div>
68
<div class="qanda">
79
{% for faq in site.data.faq %}
@@ -19,4 +21,4 @@ <h1 class="text-5xl sm:text-6xl font-bold uppercase tracking-wider border-b-10 b
1921
{% endif %}
2022
{% endfor %}
2123
</div>
22-
</section>
24+
</section>

index.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,18 @@ layout: plain
111111
</div>
112112
</div>
113113

114-
<div class="text-center mt-8">
114+
<div class="text-center mt-12">
115115
<a class="button-push" href="/about">開催概要を見る</a>
116116
</div>
117117
</div>
118118

119-
<div class="mt-24">
119+
<div class="pt-36" id="categories">
120120
<div class="text-center mb-8">
121-
<h1 class='text-5xl sm:text-6xl font-bold uppercase tracking-wider border-b-10 border-teal-500 inline-block'
122-
style="font-family: 'League Gothic', sans-serif; color: #221C35;">CATEGORIES</h1>
123-
<p class="text-xl mt-2" style="color: #444444;">カテゴリー</p>
121+
<a href="#categories" style="text-decoration: none;">
122+
<h1 class='text-5xl sm:text-6xl font-bold uppercase tracking-wider border-b-10 border-teal-500 inline-block'
123+
style="font-family: 'League Gothic', sans-serif; color: #221C35;">CATEGORIES</h1>
124+
<p class="text-xl mt-2" style="color: #444444;">カテゴリー</p>
125+
</a>
124126
</div>
125127
<!-- カテゴリーカード -->
126128
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6 mt-8">
@@ -197,12 +199,15 @@ layout: plain
197199
</div>
198200
</div>
199201
</div>
202+
200203
<!-- NEWS セクション -->
201-
<div class="pt-24" id="news">
204+
<div class="pt-36" id="news">
202205
<div class="text-center mb-16">
203-
<h1 class='text-5xl sm:text-6xl font-bold uppercase tracking-wider border-b-10 border-teal-500 inline-block'
204-
style="font-family: 'League Gothic', sans-serif; color: #221C35;">NEWS</h1>
205-
<p class="text-xl mt-2" style="color: #444444;">お知らせ</p>
206+
<a href="#news" style="text-decoration: none;">
207+
<h1 class='text-5xl sm:text-6xl font-bold uppercase tracking-wider border-b-10 border-teal-500 inline-block'
208+
style="font-family: 'League Gothic', sans-serif; color: #221C35;">NEWS</h1>
209+
<p class="text-xl mt-2" style="color: #444444;">お知らせ</p>
210+
</a>
206211
</div>
207212
<!-- お知らせ一覧(最新3件) -->
208213
{% assign latest_news = site.posts | where: "categories", "news" | sort: "date" | reverse | limit: 3 %}
@@ -218,11 +223,13 @@ layout: plain
218223
</div>
219224
-->
220225
</div>
221-
<div class="mt-24">
226+
<div class="pt-36" id="sponsors">
222227
<div class="text-center mb-16">
223-
<h1 class='text-5xl sm:text-6xl font-bold uppercase tracking-wider border-b-10 border-teal-500 inline-block'
224-
style="font-family: 'League Gothic', sans-serif; color: #221C35;">SPONSORS</h1>
225-
<p class="text-xl mt-2" style="color: #444444;">スポンサー</p>
228+
<a href="#sponsors" style="text-decoration: none;">
229+
<h1 class='text-5xl sm:text-6xl font-bold uppercase tracking-wider border-b-10 border-teal-500 inline-block'
230+
style="font-family: 'League Gothic', sans-serif; color: #221C35;">SPONSORS</h1>
231+
<p class="text-xl mt-2" style="color: #444444;">スポンサー</p>
232+
</a>
226233
</div>
227234
<div class="text-center mb-16">
228235
<p class="text-xl mb-12" style="color: #444444;">Coolest Projects Japanはスポンサーのご協力により開催されています。協賛くださいました、皆様ありがとうございます。</p>

0 commit comments

Comments
 (0)