Skip to content

Commit 097930f

Browse files
committed
Fix back arrow
1 parent 0fa0255 commit 097930f

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

assets/css/index.css

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,15 @@ header > a {
105105
}
106106

107107
#back-arrow {
108-
font-size: var(--text-font-size-lg);
109108
position: absolute;
110109
text-decoration: none;
111110
top: 0;
112111
left: calc(var(--text-font-size-lg) * -1);
113112
}
114113

115-
#back-arrow:hover {
116-
transition: all ease 250ms;
117-
transform: translateX(-0.25rem);
114+
#back-arrow:hover > svg {
115+
transition: stroke ease 250ms;
116+
stroke: var(--text-accent-color) ;
118117
}
119118

120119
footer {
@@ -125,7 +124,6 @@ footer {
125124

126125
h1 {
127126
font-size: var(--text-font-size-lg);
128-
line-height: var(--text-line-height-lg);
129127
}
130128

131129
p,

layouts/_default/baseof.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ <h1>{{ .Page.Parent.Title }}</h1>
1616
{{ end }}
1717
{{ end }}
1818
{{ if .Page.Parent }}
19-
<a id="back-arrow" aria-label="Go back" href="{{ .Parent.Permalink }}"><-</a>
19+
<a id="back-arrow" aria-label="Go back" href="{{ .Parent.Permalink }}">
20+
{{ partial "back-arrow.html" . }}
21+
</a>
2022
{{ end }}
2123
</header>
2224
<main>

layouts/partials/back-arrow.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<svg
2+
xmlns="http://www.w3.org/2000/svg"
3+
fill="none"
4+
viewBox="0 0 24 24"
5+
stroke-width="1.5"
6+
stroke="currentColor"
7+
height="1.5rem"
8+
width="1.5rem"
9+
>
10+
<path
11+
stroke-linecap="round"
12+
stroke-linejoin="round"
13+
d="M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"
14+
/>
15+
</svg>

0 commit comments

Comments
 (0)