Skip to content

Commit 2f8fb92

Browse files
dearcloud09claude
andcommitted
Improve back-to-home navigation UX
Changes: - Change back link text from ".." to "Home" for clarity - Add .back-link class with visible border and padding - Increase clickable area (8px vertical, 16px horizontal padding) - Add hover effect (background color change) - Support both light and dark modes This addresses user feedback that ".." was too small to click easily. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 709e225 commit 2f8fb92

3 files changed

Lines changed: 38 additions & 2 deletions

File tree

‎_config.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ favicon: "favicon.svg" # name+extension of favicon (which must be put on the roo
1515

1616
theme_config:
1717
appearance: "auto" # can be "light", "dark" or "auto"
18-
back_home_text: ".." # customize text for homepage link in post layout
18+
back_home_text: "Home" # customize text for homepage link in post layout
1919
date_format: "%Y-%m-%d" # customize how date is formatted
2020
show_description: false # show blog description in home page
2121
lowercase_titles: true # show titles in lowercase in lists

‎_includes/back_link.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<a href="{{ "/" | relative_url }}">{{ site.theme_config.back_home_text }}</a>
1+
<a href="{{ "/" | relative_url }}" class="back-link">{{ site.theme_config.back_home_text }}</a>

‎_sass/no-style-please.scss‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,39 @@ img {
136136
display: block;
137137
margin: 0 auto;
138138
}
139+
140+
// Back link styling for better UX
141+
.back-link {
142+
display: inline-block;
143+
padding: 8px 16px;
144+
margin-bottom: 1.5rem;
145+
border: thin solid black;
146+
border-radius: 4px;
147+
text-decoration: none;
148+
transition: all 0.2s ease;
149+
150+
&:hover {
151+
background: black;
152+
color: white;
153+
}
154+
}
155+
156+
body[a="dark"] .back-link {
157+
border-color: #30363d;
158+
159+
&:hover {
160+
background: #30363d;
161+
color: #c9d1d9;
162+
}
163+
}
164+
165+
@media (prefers-color-scheme: dark) {
166+
body[a="auto"] .back-link {
167+
border-color: #30363d;
168+
169+
&:hover {
170+
background: #30363d;
171+
color: #c9d1d9;
172+
}
173+
}
174+
}

0 commit comments

Comments
 (0)