aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/css/default.css57
-rw-r--r--themes/default/layouts/_default/single.html8
-rw-r--r--themes/default/layouts/partials/pagination.html14
3 files changed, 39 insertions, 40 deletions
diff --git a/assets/css/default.css b/assets/css/default.css
index d783af7..804966b 100644
--- a/assets/css/default.css
+++ b/assets/css/default.css
@@ -802,7 +802,7 @@ summary:after,
[type="submit"],
micro-tags a,
micro-expand label,
-paginator-navigation a,
+nav[data-type="pagination"] a,
micro-author micro-summary > a {
align-items: center;
appearance: none;
@@ -828,7 +828,7 @@ button:hover,
[type="submit"]:hover,
micro-tags a:hover,
micro-expand label:hover,
-paginator-navigation a:hover,
+nav[data-type="pagination"] a:hover,
micro-author micro-summary > a:hover {
border: 1px solid;
border-color: #aaa;
@@ -836,7 +836,7 @@ micro-author micro-summary > a:hover {
}
button svg,
-paginator-navigation svg,
+nav[data-type="pagination"] svg,
micro-author micro-summary > a svg {
height: 1.25rem;
width: 1.25rem;
@@ -1457,7 +1457,7 @@ tab-bar nav a:hover {
text-decoration: underline;
}
-column-base[position="middle"] > nav {
+column-base[position="middle"] > nav:first-child {
align-items: center;
background-color: #fefefe;
background-color: var(--background);
@@ -1473,31 +1473,31 @@ column-base[position="middle"] > nav {
height: 4rem;
}
-column-base[position="middle"] > nav section h2,
-column-base[position="middle"] > nav section small {
+column-base[position="middle"] > nav:first-child section h2,
+column-base[position="middle"] > nav:first-child section small {
margin: 0;
}
micro-author micro-header > *,
-column-base[position="middle"] > nav section h2,
-column-base[position="middle"] > nav section small {
+column-base[position="middle"] > nav:first-child section h2,
+column-base[position="middle"] > nav:first-child section small {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
-column-base[position="middle"] > nav section {
+column-base[position="middle"] > nav:first-child section {
line-height: 1.25;
padding: 0 0.5rem;
margin-right: 0.5rem;
}
-column-base[position="middle"] > footer {
+column-base[position="middle"] > footer:last-child {
margin: 1rem 0.25rem;
}
-column-base[position="middle"] main > footer {
- margin: 1rem 0;
+column-base[position="middle"] main > footer:last-child {
+ margin: 2rem 0 1rem 0;
}
icon-button,
@@ -1597,7 +1597,7 @@ code-block header language-label a:hover {
text-decoration: underline;
}
-paginator-navigation {
+nav[data-type="pagination"] {
padding: 1rem 0.25rem 0 0.25rem;
display: flex;
align-items: center;
@@ -1605,7 +1605,7 @@ paginator-navigation {
flex-wrap: wrap;
}
-paginator-navigation a {
+nav[data-type="pagination"] a {
margin: 0 0.25rem 0.5rem 0.25rem;
font-size: 85%;
display: flex;
@@ -1613,7 +1613,7 @@ paginator-navigation a {
justify-content: center;
}
-paginator-navigation a[title="hidden"] {
+nav[data-type="pagination"] a[title="hidden"] {
visibility: hidden;
}
@@ -2163,7 +2163,8 @@ link-card article a {
outline: none;
}
-[hidden] {
+[hidden],
+nav[hidden] {
display: none;
}
@@ -2268,15 +2269,15 @@ link-card article a {
@media screen and (max-width: 1080px) {
column-base[position="left"],
search-entry,
- column-base[position="middle"] > nav section {
+ column-base[position="middle"] > nav:first-child section {
display: none;
}
- column-base[position="middle"] > nav {
+ column-base[position="middle"] > nav:first-child {
justify-content: space-between;
overflow-x: auto;
overflow-y: hidden;
}
- column-base[position="middle"] > nav icon-navigator[hidden] {
+ column-base[position="middle"] > nav:first-child icon-navigator[hidden] {
display: inline;
}
tag-deck {
@@ -2297,7 +2298,7 @@ link-card article a {
display: block;
max-width: 100%;
}
- column-base[position="middle"] > nav {
+ column-base[position="middle"] > nav:first-child {
position: fixed;
box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.2);
}
@@ -2335,11 +2336,11 @@ link-card article a {
tab-bar:focus,
tab-bar:focus-within,
tab-bar:focus-visible,
- column-base[position="middle"] > nav:active,
- column-base[position="middle"] > nav:hover,
- column-base[position="middle"] > nav:focus,
- column-base[position="middle"] > nav:focus-within,
- column-base[position="middle"] > nav:focus-visible {
+ column-base[position="middle"] > nav:first-child:active,
+ column-base[position="middle"] > nav:first-child:hover,
+ column-base[position="middle"] > nav:first-child:focus,
+ column-base[position="middle"] > nav:first-child:focus-within,
+ column-base[position="middle"] > nav:first-child:focus-visible {
box-shadow: 1rem -0.2rem 1rem -1rem inset, -1rem -0.2rem 1rem -1rem inset;
}
}
@@ -2374,8 +2375,8 @@ link-card article a {
:target::before {
display: none;
}
- column-base[position="middle"] > footer,
- column-base[position="middle"] > nav {
+ column-base[position="middle"] > nav:first-child,
+ column-base[position="middle"] > footer:last-child {
display: none;
}
}
@@ -2485,7 +2486,7 @@ text-animation[vibrate] span {
animation: up 0.125s infinite, left 0.15s infinite;
}
-main > *:not(nav):not(paginator-navigation) {
+main > * {
animation: paint ease-in 0.25s;
}
diff --git a/themes/default/layouts/_default/single.html b/themes/default/layouts/_default/single.html
index b257617..5e87246 100644
--- a/themes/default/layouts/_default/single.html
+++ b/themes/default/layouts/_default/single.html
@@ -38,17 +38,17 @@
{{- end -}}
{{- with or .Next .Prev -}}
- <paginator-navigation>
- <a href="{{ $nextHref }}" title="{{ $nextTitle }}">
+ <nav data-type="pagination">
+ <a rel="next" href="{{ $nextHref }}" title="{{ $nextTitle }}">
{{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-left.svg")) }}
<header>Newer</header>
</a>
- <a href="{{ $prevHref }}" title="{{ $prevTitle }}">
+ <a rel="prev" href="{{ $prevHref }}" title="{{ $prevTitle }}">
<header>Older</header>
{{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-right.svg")) }}
</a>
- </paginator-navigation>
+ </nav>
{{- end -}}
{{- $filteredPages := partial "function-filters-content.html" (.Site.RegularPages.Related .) -}}
diff --git a/themes/default/layouts/partials/pagination.html b/themes/default/layouts/partials/pagination.html
index 8aec5b4..3e5acd8 100644
--- a/themes/default/layouts/partials/pagination.html
+++ b/themes/default/layouts/partials/pagination.html
@@ -3,8 +3,6 @@
{{- $prevTitle := "hidden" -}}
{{- $nextTitle := "hidden" -}}
{{- $lastTitle := "hidden" -}}
- {{- $prevRel := "prev" -}}
- {{- $nextRel := "next" -}}
{{- $firstHref := "/" -}}
{{- $prevHref := "/" -}}
{{- $nextHref := "/" -}}
@@ -30,23 +28,23 @@
{{- $lastTitle = "Oldest" -}}
{{- end -}}
- <paginator-navigation{{ if le .TotalPages 1 }} hidden="" {{ end }}>
- <a href="{{ $firstHref }}" title="{{ $firstTitle }}" >
+ <nav{{ if le .TotalPages 1 }} hidden="" {{ end }} data-type="pagination">
+ <a rel="first" href="{{ $firstHref }}" title="{{ $firstTitle }}" >
<header>{{ $firstTitle }}</header>
</a>
- <a rel="{{ $prevRel }}" href="{{ $prevHref }}" title="{{ $prevTitle }}">
+ <a rel="prev" href="{{ $prevHref }}" title="{{ $prevTitle }}">
{{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-left.svg")) }}
<header>{{ $prevTitle }}</header>
</a>
- <a rel="{{ $nextRel }}" href="{{ $nextHref }}" title="{{ $nextTitle }}">
+ <a rel="next" href="{{ $nextHref }}" title="{{ $nextTitle }}">
<header>{{ $nextTitle }}</header>
{{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-right.svg")) }}
</a>
- <a href="{{ $lastHref }}" title="{{ $lastTitle }}">
+ <a rel="last" href="{{ $lastHref }}" title="{{ $lastTitle }}" data-count="{{ .TotalPages }}">
<header>{{ $lastTitle }}</header>
</a>
- </paginator-navigation>
+ </nav>
{{- end -}}