Skip to content

Commit f39a984

Browse files
authored
feat: add not found (#5)
* feat: add page not found styles * refactor: change nav items to use grid
1 parent 1115fa3 commit f39a984

File tree

4 files changed

+39
-17
lines changed

4 files changed

+39
-17
lines changed

src/components/ContentNav/ContentNav.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,19 @@ const ContentNav: FC<ContentNavProps> = ({
2020
);
2121
return (
2222
<div className="content-nav">
23-
<button>
24-
{Chevron}
25-
{prevText}
26-
</button>
23+
<div className="nav-item prev">
24+
<a href="">
25+
{Chevron}
26+
<span>{prevText}</span>
27+
</a>
28+
</div>
2729
{current && <div className="current middle">{current}</div>}
28-
<button>
29-
{nextText}
30-
{Chevron}
31-
</button>
30+
<div className="nav-item next">
31+
<a href="">
32+
<span>{nextText}</span>
33+
{Chevron}
34+
</a>
35+
</div>
3236
{current && <div className="current bottom">{current}</div>}
3337
</div>
3438
);

src/styles/components/content-nav.css

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
.content-nav {
2-
@apply flex gap-y-2 justify-between border-b border-b-gray-200 pb-4 flex-wrap mt-5 sm:flex-nowrap dark:border-b-gray-700;
3-
button {
4-
@apply flex items-center gap-2 text-gray-500 hover:underline focus-visible:underline px-0 w-2/4 sm:w-auto dark:text-gray-300;
5-
&:first-of-type img {
6-
@apply rotate-90;
2+
@apply flex gap-y-2 justify-between border-b border-b-gray-200 pb-4 flex-wrap mt-5 sm:flex-nowrap dark:border-b-gray-700 sm:grid sm:grid-cols-3;
3+
4+
.nav-item {
5+
a {
6+
@apply flex items-center gap-2 text-gray-500 hover:underline focus-visible:underline px-0 sm:w-auto dark:text-gray-300 w-full;
77
}
8-
&:last-of-type {
9-
@apply justify-end;
10-
img {
11-
@apply -rotate-90;
8+
&.prev {
9+
a img {
10+
@apply rotate-90;
11+
}
12+
}
13+
&.next {
14+
a {
15+
@apply justify-end;
16+
img {
17+
@apply -rotate-90;
18+
}
1219
}
1320
}
1421
}
22+
1523
.current {
1624
@apply text-2xs text-center sm:text-xs;
1725
&.middle {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.not-found {
2+
@apply pt-6 flex-grow justify-center;
3+
.heading {
4+
@apply text-lg min-[420px]:text-xl transition-font-size xs:text-2xl;
5+
}
6+
.button {
7+
@apply mr-auto;
8+
}
9+
}

src/styles/main.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
@import "./components/content-nav.css";
1111
@import "./components/card-grid.css";
1212
@import "./components/switchback.css";
13+
@import "./components/not-found.css";

0 commit comments

Comments
 (0)