style: Try biome
This commit is contained in:
parent
54b4349667
commit
7ed39cd0df
11 changed files with 180 additions and 152 deletions
30
biome.json
Normal file
30
biome.json
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
|
||||||
|
"vcs": {
|
||||||
|
"enabled": false,
|
||||||
|
"clientKind": "git",
|
||||||
|
"useIgnoreFile": false
|
||||||
|
},
|
||||||
|
"files": {
|
||||||
|
"ignoreUnknown": false,
|
||||||
|
"ignore": []
|
||||||
|
},
|
||||||
|
"formatter": {
|
||||||
|
"enabled": true,
|
||||||
|
"indentStyle": "tab"
|
||||||
|
},
|
||||||
|
"organizeImports": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"linter": {
|
||||||
|
"enabled": true,
|
||||||
|
"rules": {
|
||||||
|
"recommended": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"javascript": {
|
||||||
|
"formatter": {
|
||||||
|
"quoteStyle": "double"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
const description = "Just my little website do be gay and do crime on~";
|
const description = "Just my little website do be gay and do crime on~";
|
||||||
const embedImage = "https://aria.coffee/static/img/sites/avatar.png";
|
const embedImage = "https://aria.coffee/static/img/sites/avatar.png";
|
||||||
const embedColour = "#380A84"
|
const embedColour = "#380A84";
|
||||||
|
|
||||||
const { pageTitle } = Astro.props;
|
const { pageTitle } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
import { useState } from 'preact/hooks';
|
import { useState } from "preact/hooks";
|
||||||
|
|
||||||
export default function Greeting({ messages }) {
|
export default function Greeting({ messages }) {
|
||||||
|
const randomMessage = () =>
|
||||||
const randomMessage = () => messages[(Math.floor(Math.random() * messages.length))];
|
messages[Math.floor(Math.random() * messages.length)];
|
||||||
|
|
||||||
const [greeting, setGreeting] = useState(messages[0]);
|
const [greeting, setGreeting] = useState(messages[0]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h3>{greeting}! Thank you for visiting!</h3>
|
<h3>{greeting}! Thank you for visiting!</h3>
|
||||||
<button class="greetButton px-2 rounded-xl" onClick={() => setGreeting(randomMessage())}>
|
<button
|
||||||
|
class="greetButton px-2 rounded-xl"
|
||||||
|
onClick={() => setGreeting(randomMessage())}
|
||||||
|
>
|
||||||
New Greeting
|
New Greeting
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,14 +4,14 @@ import { glob } from "astro/loaders";
|
||||||
import { z, defineCollection } from "astro:content";
|
import { z, defineCollection } from "astro:content";
|
||||||
// Define a `loader` and `schema` for each collection
|
// Define a `loader` and `schema` for each collection
|
||||||
const blog = defineCollection({
|
const blog = defineCollection({
|
||||||
loader: glob({ pattern: '**/[^_]*.md', base: "./src/blog" }),
|
loader: glob({ pattern: "**/[^_]*.md", base: "./src/blog" }),
|
||||||
schema: z.object({
|
schema: z.object({
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
pubDate: z.date(),
|
pubDate: z.date(),
|
||||||
description: z.string(),
|
description: z.string(),
|
||||||
author: z.string(),
|
author: z.string(),
|
||||||
tags: z.array(z.string())
|
tags: z.array(z.string()),
|
||||||
})
|
}),
|
||||||
});
|
});
|
||||||
// Export a single `collections` object to register your collection(s)
|
// Export a single `collections` object to register your collection(s)
|
||||||
export const collections = { blog };
|
export const collections = { blog };
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
import NavHeader from "../components/NavHeader.astro"
|
import NavHeader from "../components/NavHeader.astro";
|
||||||
import Favicon from "../components/Favicon.astro";
|
import Favicon from "../components/Favicon.astro";
|
||||||
import Footer from "../components/Footer.astro";
|
import Footer from "../components/Footer.astro";
|
||||||
import "../styles/aria.css";
|
import "../styles/aria.css";
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
---
|
---
|
||||||
import { getCollection, render } from 'astro:content';
|
import { getCollection, render } from "astro:content";
|
||||||
import MarkdownPostLayout from '../../layouts/MarkdownPostLayout.astro';
|
import MarkdownPostLayout from "../../layouts/MarkdownPostLayout.astro";
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const posts = await getCollection('blog');
|
const posts = await getCollection("blog");
|
||||||
return posts.map(post => ({
|
return posts.map((post) => ({
|
||||||
params: { slug: post.id }, props: { post },
|
params: { slug: post.id },
|
||||||
|
props: { post },
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import rss from '@astrojs/rss';
|
import rss from "@astrojs/rss";
|
||||||
import { getCollection } from "astro:content";
|
import { getCollection } from "astro:content";
|
||||||
|
|
||||||
export async function GET(context) {
|
export async function GET(context) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ export async function getStaticPaths() {
|
||||||
|
|
||||||
return uniqueTags.map((tag) => {
|
return uniqueTags.map((tag) => {
|
||||||
const filteredPosts = allPosts.filter((post: any) =>
|
const filteredPosts = allPosts.filter((post: any) =>
|
||||||
post.data.tags.includes(tag)
|
post.data.tags.includes(tag),
|
||||||
);
|
);
|
||||||
return {
|
return {
|
||||||
params: { tag },
|
params: { tag },
|
||||||
|
|
|
@ -4,9 +4,7 @@ import { getCollection } from "astro:content";
|
||||||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||||||
import Partition from "../../components/Partition.astro";
|
import Partition from "../../components/Partition.astro";
|
||||||
const allPosts = await getCollection("blog");
|
const allPosts = await getCollection("blog");
|
||||||
const tags = [
|
const tags = [...new Set(allPosts.map((post: any) => post.data.tags).flat())];
|
||||||
...new Set(allPosts.map((post: any) => post.data.tags).flat()),
|
|
||||||
];
|
|
||||||
const pageTitle = "Tag Index";
|
const pageTitle = "Tag Index";
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -1,38 +1,36 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Noto Sans";
|
font-family: "Noto Sans";
|
||||||
src:
|
src: local("Noto Sans"), url("/static/fonts/NotoSans-Regular.ttf")
|
||||||
local("Noto Sans"),
|
format("truetype");
|
||||||
url("/static/fonts/NotoSans-Regular.ttf") format("truetype");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Comic Shanns";
|
font-family: "Comic Shanns";
|
||||||
src:
|
src: local("Comic Shanns Regular"), url("/static/fonts/comic shanns.otf")
|
||||||
local("Comic Shanns Regular"),
|
format("opentype"), url("/static/fonts/comic shanns 2.ttf")
|
||||||
url("/static/fonts/comic shanns.otf") format("opentype"),
|
format("truetype");
|
||||||
url("/static/fonts/comic shanns 2.ttf") format("truetype");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Comic Mono";
|
font-family: "Comic Mono";
|
||||||
src:
|
src: local("Comic Mono"), url("/static/fonts/ComicMono.ttf") format("ttf"),
|
||||||
local("Comic Mono"),
|
url("https://dtinth.github.io/comic-mono-font/ComicMono.ttf")
|
||||||
url("/static/fonts/ComicMono.ttf") format("ttf"),
|
format("truetype");
|
||||||
url("https://dtinth.github.io/comic-mono-font/ComicMono.ttf") format("truetype")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--first-colour: #16111a;
|
--first-colour: #16111a;
|
||||||
--second-colour: #21042c;
|
--second-colour: #21042c;
|
||||||
--third-colour: #2E236C;
|
--third-colour: #2e236c;
|
||||||
--fourth-colour: #F5EFFF;
|
--fourth-colour: #f5efff;
|
||||||
|
|
||||||
--border: #27272a;
|
--border: #27272a;
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
background-color: var(--first-colour);
|
background-color: var(--first-colour);
|
||||||
font-family: "Comic Mono", "Comic Shanns", "Comic Sans", "Comic Sans MS", "Chalkboard", "ChalkboardSE-Regular", "Noto Sans", sans-serif;
|
font-family: "Comic Mono", "Comic Shanns", "Comic Sans", "Comic Sans MS",
|
||||||
|
"Chalkboard", "ChalkboardSE-Regular", "Noto Sans", sans-serif;
|
||||||
font-size: larger;
|
font-size: larger;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -60,7 +58,6 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--fourth-colour);
|
color: var(--fourth-colour);
|
||||||
text-decoration: underline 2px;
|
text-decoration: underline 2px;
|
||||||
|
@ -68,7 +65,6 @@ a {
|
||||||
text-decoration-color: #00000000;
|
text-decoration-color: #00000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration-color: #fff;
|
text-decoration-color: #fff;
|
||||||
transition: text-decoration-color 0.25s;
|
transition: text-decoration-color 0.25s;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue