Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
andyluss committed Jan 3, 2025
1 parent fc79e0c commit b48a6ae
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 55 deletions.
60 changes: 30 additions & 30 deletions src/cards/IndexCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,44 @@ import FormattedDate from "../components/FormattedDate.astro";
import { type Collection, type Post } from "../utils/content";
interface Props {
collection: Collection;
post: Post;
index: number;
width?: string;
height?: string;
collection: Collection;
post: Post;
index: number;
width?: string;
height?: string;
}
const {
collection,
post,
index,
width = "128px",
height = "128px",
collection,
post,
index,
width = "128px",
height = "128px",
} = Astro.props;
function border(post: Post) {
return [
post.data.level >= 2 ? "border-2 border-double" : "border border-solid",
post.data.level >= 3
? "border-fuchsia-500"
: post.data.level === 2
? "border-orange-500"
: post.data.level === 1
? "border-blue-500"
: "border-blue-100",
];
return [
post.data.level >= 2 ? "border-2 border-double" : "border border-solid",
post.data.level >= 3
? "border-fuchsia-500"
: post.data.level === 2
? "border-orange-500"
: post.data.level === 1
? "border-green-500"
: "border-blue-200",
];
}
function star(post: Post) {
const bgColor =
post.data.level >= 3
? "bg-fuchsia-500"
: post.data.level === 2
? "bg-orange-500"
: post.data.level === 1
? "bg-blue-500"
: "bg-blue-100";
return `w-3.5 text-[10px] leading-3 pt-[2px] rounded text-center ${bgColor}`;
const bgColor =
post.data.level >= 3
? "bg-fuchsia-500"
: post.data.level === 2
? "bg-orange-500"
: post.data.level === 1
? "bg-green-500"
: "bg-blue-200";
return `w-3.5 text-[10px] leading-3 pt-[2px] rounded text-center ${bgColor}`;
}
---

Expand Down Expand Up @@ -81,7 +81,7 @@ function star(post: Post) {
width: var(--width);
height: var(--height);
padding: 4px;
/* margin: 1px; */
margin: 1px;
box-sizing: border-box;
}
.post * {
Expand Down
26 changes: 13 additions & 13 deletions src/cards/LevelCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
import type { Collection, Level, LevelItem, Tag } from "../utils/content";
interface Props {
level: Level;
levels: LevelItem[];
collection: Collection;
tag?: Tag;
width?: string;
height?: string;
level: Level;
levels: LevelItem[];
collection: Collection;
tag?: Tag;
width?: string;
height?: string;
}
const {
level,
levels,
collection,
tag,
width = "256px",
height = "64px",
level,
levels,
collection,
tag,
width = "256px",
height = "128px",
} = Astro.props;
---

Expand Down Expand Up @@ -45,4 +45,4 @@ const {
width: var(--width);
height: var(--height);
}
</style>
</style>
24 changes: 12 additions & 12 deletions src/cards/TagCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
import type { Collection, Level, Tag, TagItem } from "../utils/content";
interface Props {
tag: Tag;
tags: TagItem[];
collection: Collection;
level?: Level;
width?: string;
height?: string;
tag: Tag;
tags: TagItem[];
collection: Collection;
level?: Level;
width?: string;
height?: string;
}
const {
tag,
tags,
collection,
level,
width = "1024px",
height = "64px",
tag,
tags,
collection,
level,
width = "512px",
height = "128px",
} = Astro.props;
---

Expand Down

0 comments on commit b48a6ae

Please sign in to comment.