File tree 5 files changed +25
-23
lines changed
5 files changed +25
-23
lines changed Original file line number Diff line number Diff line change
1
+ import type { CollectionEntry } from "astro:content" ;
2
+ import { navigate } from "astro:transitions/client" ;
1
3
import { Pagination } from "@ark-ui/solid" ;
2
4
import type { Page } from "astro" ;
3
- import type { CollectionEntry } from "astro:content " ;
4
- import { For , type Component } from "solid-js " ;
5
+ import { type Component , For } from "solid-js " ;
6
+ import { paginationStyles } from "~/styles/pagination " ;
5
7
import TablerChevronLeft from "~icons/tabler/chevron-left" ;
6
8
import TablerChevronRight from "~icons/tabler/chevron-right" ;
7
- import { navigate } from "astro:transitions/client" ;
8
- import { paginationStyles } from "~/styles/pagination" ;
9
9
10
10
export const ProjectPagination : Component < {
11
11
page : Page < CollectionEntry < "projects" > > ;
@@ -26,7 +26,9 @@ export const ProjectPagination: Component<{
26
26
< For each = { api ( ) . pages } >
27
27
{ ( page , index ) =>
28
28
page . type === "page" ? (
29
- < Pagination . Item { ...page } class = { paginationStyles . item } > { page . value } </ Pagination . Item >
29
+ < Pagination . Item { ...page } class = { paginationStyles . item } >
30
+ { page . value }
31
+ </ Pagination . Item >
30
32
) : (
31
33
< Pagination . Ellipsis index = { index ( ) } >
32
34
…
Original file line number Diff line number Diff line change 1
- import { splitProps , type ParentComponent } from "solid-js" ;
1
+ import { type ParentComponent , splitProps } from "solid-js" ;
2
2
import { css } from "styled-system/css" ;
3
- import { Box , HStack , type BoxProps } from "styled-system/jsx" ;
3
+ import { Box , type BoxProps , HStack } from "styled-system/jsx" ;
4
4
5
5
interface CardProps extends BoxProps {
6
6
title : string ;
Original file line number Diff line number Diff line change 1
1
---
2
2
import " @fontsource-variable/jetbrains-mono" ;
3
3
import " ./app.css" ;
4
+ import { ClientRouter } from " astro:transitions" ;
4
5
import Footer from " ~/components/Footer.astro" ;
5
6
import Navbar from " ~/components/Navbar" ;
6
- import { ClientRouter } from " astro:transitions" ;
7
7
8
8
interface Props {
9
9
title? : string ;
Original file line number Diff line number Diff line change 1
1
---
2
- import type { GetStaticPaths , Page } from " astro" ;
3
2
import { CollectionEntry , getCollection } from " astro:content" ;
3
+ import type { GetStaticPaths , Page } from " astro" ;
4
4
import { css } from " styled-system/css" ;
5
5
import MDContainer from " ~/components/MDContainer.astro" ;
6
6
import ProjectCard from " ~/components/ProjectCard.astro" ;
7
7
import { ProjectPagination } from " ~/components/ProjectPagination" ;
8
8
import BaseLayout from " ~/layouts/BaseLayout.astro" ;
9
9
10
10
export const getStaticPaths = (async ({ paginate }) => {
11
- const projects = (await getCollection (" projects" )).sort (
12
- (a , b ) => b .data .priority - a .data .priority ,
13
- );
11
+ const projects = (await getCollection (" projects" )).sort (
12
+ (a , b ) => b .data .priority - a .data .priority ,
13
+ );
14
14
15
- return paginate (projects , { pageSize: 3 });
15
+ return paginate (projects , { pageSize: 3 });
16
16
}) satisfies GetStaticPaths ;
17
17
18
18
interface Props {
19
- page: Page <CollectionEntry <" projects" >>;
19
+ page: Page <CollectionEntry <" projects" >>;
20
20
}
21
21
22
22
const { page } = Astro .props ;
Original file line number Diff line number Diff line change 1
1
import { css } from "styled-system/css" ;
2
- import { buttonStyles } from "./button" ;
3
2
import { token } from "styled-system/tokens" ;
3
+ import { buttonStyles } from "./button" ;
4
4
5
5
export const paginationStyles = {
6
6
root : css ( {
@@ -11,16 +11,16 @@ export const paginationStyles = {
11
11
} ) ,
12
12
trigger : buttonStyles ( { icon : true } ) ,
13
13
item : css ( {
14
- cursor : "pointer" ,
15
- fontVariantNumeric : "tabular-nums" ,
16
- backgroundColor : "bg.canvas" ,
17
- px : "2" ,
18
- fontSize : "lg" ,
14
+ cursor : "pointer" ,
15
+ fontVariantNumeric : "tabular-nums" ,
16
+ backgroundColor : "bg.canvas" ,
17
+ px : "2" ,
18
+ fontSize : "lg" ,
19
19
"&[data-selected]" : {
20
20
textDecoration : "underline" ,
21
- textDecorationThickness : token . var ( "borderWidths.normal" ) ,
22
- backgroundColor : "fg.default" ,
23
- color : "bg.canvas"
21
+ textDecorationThickness : token . var ( "borderWidths.normal" ) ,
22
+ backgroundColor : "fg.default" ,
23
+ color : "bg.canvas" ,
24
24
} ,
25
25
} ) ,
26
26
} ;
You can’t perform that action at this time.
0 commit comments