mirror of
https://github.com/Fluffy-Bean/website.git
synced 2025-05-14 08:02:16 +00:00
style: format code with Prettier
This commit fixes the style issues introduced in 54e79be
according to the output
from Prettier.
Details: None
This commit is contained in:
parent
54e79beb30
commit
7884f0a028
3 changed files with 22 additions and 18 deletions
|
@ -5,12 +5,12 @@ import mdx from "@astrojs/mdx";
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
output: "static",
|
output: "static",
|
||||||
markdown: {
|
markdown: {
|
||||||
syntaxHighlight: "shiki",
|
syntaxHighlight: "shiki",
|
||||||
shikiConfig: {
|
shikiConfig: {
|
||||||
theme: syntaxTheme
|
theme: syntaxTheme,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
integrations: [mdx()]
|
integrations: [mdx()],
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,22 +3,24 @@ title: Astro is hard....
|
||||||
description: Arugh
|
description: Arugh
|
||||||
pubDate: 2024-05-28
|
pubDate: 2024-05-28
|
||||||
tags:
|
tags:
|
||||||
- astro
|
- astro
|
||||||
- typescript
|
- typescript
|
||||||
---
|
---
|
||||||
|
|
||||||
import Note from "../../components/Note.astro";
|
import Note from "../../components/Note.astro";
|
||||||
|
|
||||||
<Note text="I have no clue what I'm doing :3" />
|
<Note text="I have no clue what I'm doing :3" />
|
||||||
|
|
||||||
- I've been trying to learn typescript through trying astro
|
- I've been trying to learn typescript through trying astro
|
||||||
- Astro is hard, due to all the issues I've encountered
|
- Astro is hard, due to all the issues I've encountered
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
export async function getTagsBySlug(postTags: string[]): Promise<CollectionEntry<"tags">[]> {
|
export async function getTagsBySlug(
|
||||||
|
postTags: string[],
|
||||||
|
): Promise<CollectionEntry<"tags">[]> {
|
||||||
// Collect all the tags from collections
|
// Collect all the tags from collections
|
||||||
const allTags: CollectionEntry<"tags">[] = await getCollection("tags");
|
const allTags: CollectionEntry<"tags">[] = await getCollection("tags");
|
||||||
|
|
||||||
// Loop through all the tags in a post and the tags in the collections
|
// Loop through all the tags in a post and the tags in the collections
|
||||||
// To see if they match, if they do we'll return them
|
// To see if they match, if they do we'll return them
|
||||||
const tags: CollectionEntry<"tags">[] = [];
|
const tags: CollectionEntry<"tags">[] = [];
|
||||||
|
@ -27,7 +29,7 @@ export async function getTagsBySlug(postTags: string[]): Promise<CollectionEntry
|
||||||
if (allTag.slug === postTag) tags.push(allTag);
|
if (allTag.slug === postTag) tags.push(allTag);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Yeet
|
// Yeet
|
||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,10 +30,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// If its a clickable element
|
// If its a clickable element
|
||||||
a.pill, button.pill {
|
a.pill,
|
||||||
|
button.pill {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
||||||
&:hover, &:focus-visible {
|
&:hover,
|
||||||
|
&:focus-visible {
|
||||||
border: 2px solid $accent;
|
border: 2px solid $accent;
|
||||||
background-color: rgba($accent, 0.1);
|
background-color: rgba($accent, 0.1);
|
||||||
outline: 0 solid transparent;
|
outline: 0 solid transparent;
|
||||||
|
|
Loading…
Add table
Reference in a new issue