Skip to content

Commit c26cddf

Browse files
committed
Refactor go-back to back-arrow
1 parent 9f37b2b commit c26cddf

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

assets/css/index.css

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,26 @@ body > * {
9797
}
9898

9999
header {
100-
display: flex;
101-
align-items: end;
102-
justify-content: space-between;
100+
position: relative;
103101
}
104102

105103
header > a {
106104
white-space: nowrap;
107105
}
108106

107+
#back-arrow {
108+
font-size: var(--text-font-size-lg);
109+
position: absolute;
110+
text-decoration: none;
111+
top: 0;
112+
left: calc(var(--text-font-size-lg) * -1);
113+
}
114+
115+
#back-arrow:hover {
116+
transition: all ease 250ms;
117+
transform: translateX(-0.25rem);
118+
}
119+
109120
footer {
110121
display: flex;
111122
align-items: center;

layouts/_default/baseof.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h1>{{ .Page.Parent.Title }}</h1>
1616
{{ end }}
1717
{{ end }}
1818
{{ if .Page.Parent }}
19-
<a href="{{ .Parent.Permalink }}">go back</a>
19+
<a id="back-arrow" aria-label="Go back" href="{{ .Parent.Permalink }}"><-</a>
2020
{{ end }}
2121
</header>
2222
<main>

0 commit comments

Comments
 (0)