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 embedImage = "https://aria.coffee/static/img/sites/avatar.png";
|
||||
const embedColour = "#380A84"
|
||||
const embedColour = "#380A84";
|
||||
|
||||
const { pageTitle } = Astro.props;
|
||||
---
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
import { useState } from 'preact/hooks';
|
||||
import { useState } from "preact/hooks";
|
||||
|
||||
export default function Greeting({messages}) {
|
||||
export default function Greeting({ messages }) {
|
||||
const randomMessage = () =>
|
||||
messages[Math.floor(Math.random() * messages.length)];
|
||||
|
||||
const randomMessage = () => messages[(Math.floor(Math.random() * messages.length))];
|
||||
const [greeting, setGreeting] = useState(messages[0]);
|
||||
|
||||
const [greeting, setGreeting] = useState(messages[0]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h3>{greeting}! Thank you for visiting!</h3>
|
||||
<button class="greetButton px-2 rounded-xl" onClick={() => setGreeting(randomMessage())}>
|
||||
New Greeting
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<h3>{greeting}! Thank you for visiting!</h3>
|
||||
<button
|
||||
class="greetButton px-2 rounded-xl"
|
||||
onClick={() => setGreeting(randomMessage())}
|
||||
>
|
||||
New Greeting
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -4,14 +4,14 @@ import { glob } from "astro/loaders";
|
|||
import { z, defineCollection } from "astro:content";
|
||||
// Define a `loader` and `schema` for each collection
|
||||
const blog = defineCollection({
|
||||
loader: glob({ pattern: '**/[^_]*.md', base: "./src/blog" }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
pubDate: z.date(),
|
||||
description: z.string(),
|
||||
author: z.string(),
|
||||
tags: z.array(z.string())
|
||||
})
|
||||
loader: glob({ pattern: "**/[^_]*.md", base: "./src/blog" }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
pubDate: z.date(),
|
||||
description: z.string(),
|
||||
author: z.string(),
|
||||
tags: z.array(z.string()),
|
||||
}),
|
||||
});
|
||||
// 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 Footer from "../components/Footer.astro";
|
||||
import "../styles/aria.css";
|
||||
|
|
|
@ -7,25 +7,25 @@ import "../styles/aria.css";
|
|||
const pageTitle = "About Aria";
|
||||
|
||||
const identity = {
|
||||
firstName: "Aria",
|
||||
country: "Australia",
|
||||
occupation: "Phone & Computer Repair Tech",
|
||||
hobbies: ["gaming", "software/game development", "3D printing"],
|
||||
firstName: "Aria",
|
||||
country: "Australia",
|
||||
occupation: "Phone & Computer Repair Tech",
|
||||
hobbies: ["gaming", "software/game development", "3D printing"],
|
||||
};
|
||||
|
||||
const skills = ["Rust", "GDScript", "FFMPEG"];
|
||||
|
||||
const currentSystem = {
|
||||
name: "I/O",
|
||||
operatingSystem: "EndeavourOS",
|
||||
host: "X570 Phantom Gaming 4",
|
||||
shell: "zsh",
|
||||
mainDisplay: "Gigabyte M27U",
|
||||
mainDisplayRtings: "https://www.rtings.com/monitor/reviews/gigabyte/m27u",
|
||||
cpu: "AMD Ryzen 9 5900X",
|
||||
gpu: "AMD Radeon RX 7800 XT",
|
||||
ram: "48GB",
|
||||
localIP: "192.168.20.2",
|
||||
name: "I/O",
|
||||
operatingSystem: "EndeavourOS",
|
||||
host: "X570 Phantom Gaming 4",
|
||||
shell: "zsh",
|
||||
mainDisplay: "Gigabyte M27U",
|
||||
mainDisplayRtings: "https://www.rtings.com/monitor/reviews/gigabyte/m27u",
|
||||
cpu: "AMD Ryzen 9 5900X",
|
||||
gpu: "AMD Radeon RX 7800 XT",
|
||||
ram: "48GB",
|
||||
localIP: "192.168.20.2",
|
||||
};
|
||||
|
||||
const skillColor = "#F5A8B7";
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
---
|
||||
import { getCollection, render } from 'astro:content';
|
||||
import MarkdownPostLayout from '../../layouts/MarkdownPostLayout.astro';
|
||||
import { getCollection, render } from "astro:content";
|
||||
import MarkdownPostLayout from "../../layouts/MarkdownPostLayout.astro";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await getCollection('blog');
|
||||
return posts.map(post => ({
|
||||
params: { slug: post.id }, props: { post },
|
||||
}));
|
||||
const posts = await getCollection("blog");
|
||||
return posts.map((post) => ({
|
||||
params: { slug: post.id },
|
||||
props: { post },
|
||||
}));
|
||||
}
|
||||
|
||||
const { post } = Astro.props;
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import rss from '@astrojs/rss';
|
||||
import rss from "@astrojs/rss";
|
||||
import { getCollection } from "astro:content";
|
||||
|
||||
export async function GET(context) {
|
||||
const posts = await getCollection("blog");
|
||||
return rss({
|
||||
title: "Aria | Blog",
|
||||
description: "Just me being a silly little thing",
|
||||
site: context.site,
|
||||
items: posts.map((post) => ({
|
||||
title: post.data.title,
|
||||
pubDate: post.data.pubDate,
|
||||
description: post.data.description,
|
||||
link: `/posts/${post.id}/`,
|
||||
})),
|
||||
customData: `<language>en-us</language>`,
|
||||
});
|
||||
const posts = await getCollection("blog");
|
||||
return rss({
|
||||
title: "Aria | Blog",
|
||||
description: "Just me being a silly little thing",
|
||||
site: context.site,
|
||||
items: posts.map((post) => ({
|
||||
title: post.data.title,
|
||||
pubDate: post.data.pubDate,
|
||||
description: post.data.description,
|
||||
link: `/posts/${post.id}/`,
|
||||
})),
|
||||
customData: `<language>en-us</language>`,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -6,21 +6,21 @@ import BlogEntry from "../../components/BlogEntry.astro";
|
|||
import Partition from "../../components/Partition.astro";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const allPosts = await getCollection("blog");
|
||||
const allPosts = await getCollection("blog");
|
||||
|
||||
const uniqueTags = [
|
||||
...new Set(allPosts.map((post: any) => post.data.tags).flat()),
|
||||
];
|
||||
const uniqueTags = [
|
||||
...new Set(allPosts.map((post: any) => post.data.tags).flat()),
|
||||
];
|
||||
|
||||
return uniqueTags.map((tag) => {
|
||||
const filteredPosts = allPosts.filter((post: any) =>
|
||||
post.data.tags.includes(tag)
|
||||
);
|
||||
return {
|
||||
params: { tag },
|
||||
props: { posts: filteredPosts },
|
||||
};
|
||||
});
|
||||
return uniqueTags.map((tag) => {
|
||||
const filteredPosts = allPosts.filter((post: any) =>
|
||||
post.data.tags.includes(tag),
|
||||
);
|
||||
return {
|
||||
params: { tag },
|
||||
props: { posts: filteredPosts },
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
const { tag } = Astro.params;
|
||||
|
|
|
@ -4,9 +4,7 @@ import { getCollection } from "astro:content";
|
|||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||||
import Partition from "../../components/Partition.astro";
|
||||
const allPosts = await getCollection("blog");
|
||||
const tags = [
|
||||
...new Set(allPosts.map((post: any) => post.data.tags).flat()),
|
||||
];
|
||||
const tags = [...new Set(allPosts.map((post: any) => post.data.tags).flat())];
|
||||
const pageTitle = "Tag Index";
|
||||
---
|
||||
|
||||
|
|
|
@ -1,124 +1,120 @@
|
|||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
src:
|
||||
local("Noto Sans"),
|
||||
url("/static/fonts/NotoSans-Regular.ttf") format("truetype");
|
||||
font-family: "Noto Sans";
|
||||
src: local("Noto Sans"), url("/static/fonts/NotoSans-Regular.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Comic Shanns";
|
||||
src:
|
||||
local("Comic Shanns Regular"),
|
||||
url("/static/fonts/comic shanns.otf") format("opentype"),
|
||||
url("/static/fonts/comic shanns 2.ttf") format("truetype");
|
||||
font-family: "Comic Shanns";
|
||||
src: local("Comic Shanns Regular"), url("/static/fonts/comic shanns.otf")
|
||||
format("opentype"), url("/static/fonts/comic shanns 2.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Comic Mono";
|
||||
src:
|
||||
local("Comic Mono"),
|
||||
url("/static/fonts/ComicMono.ttf") format("ttf"),
|
||||
url("https://dtinth.github.io/comic-mono-font/ComicMono.ttf") format("truetype")
|
||||
font-family: "Comic Mono";
|
||||
src: local("Comic Mono"), url("/static/fonts/ComicMono.ttf") format("ttf"),
|
||||
url("https://dtinth.github.io/comic-mono-font/ComicMono.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
:root {
|
||||
--first-colour: #16111a;
|
||||
--second-colour: #21042c;
|
||||
--third-colour: #2E236C;
|
||||
--fourth-colour: #F5EFFF;
|
||||
--first-colour: #16111a;
|
||||
--second-colour: #21042c;
|
||||
--third-colour: #2e236c;
|
||||
--fourth-colour: #f5efff;
|
||||
|
||||
--border: #27272a;
|
||||
--border: #27272a;
|
||||
}
|
||||
|
||||
html {
|
||||
background-color: var(--first-colour);
|
||||
font-family: "Comic Mono", "Comic Shanns", "Comic Sans", "Comic Sans MS", "Chalkboard", "ChalkboardSE-Regular", "Noto Sans", sans-serif;
|
||||
font-size: larger;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: var(--first-colour);
|
||||
font-family: "Comic Mono", "Comic Shanns", "Comic Sans", "Comic Sans MS",
|
||||
"Chalkboard", "ChalkboardSE-Regular", "Noto Sans", sans-serif;
|
||||
font-size: larger;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
body {
|
||||
/* margin: 0 auto; */
|
||||
/* width: 100%; */
|
||||
/* max-width: 40em; */
|
||||
padding: 2em;
|
||||
/* padding: 1rem; */
|
||||
/* line-height: 1.5; */
|
||||
color: var(--fourth-colour);
|
||||
/* margin: 0 auto; */
|
||||
/* width: 100%; */
|
||||
/* max-width: 40em; */
|
||||
padding: 2em;
|
||||
/* padding: 1rem; */
|
||||
/* line-height: 1.5; */
|
||||
color: var(--fourth-colour);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 899px) {
|
||||
body {
|
||||
width: 95%;
|
||||
padding-top: 0.5em;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
body {
|
||||
width: 95%;
|
||||
padding-top: 0.5em;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
a {
|
||||
color: var(--fourth-colour);
|
||||
text-decoration: underline 2px;
|
||||
text-underline-offset: 2px;
|
||||
text-decoration-color: #00000000;
|
||||
color: var(--fourth-colour);
|
||||
text-decoration: underline 2px;
|
||||
text-underline-offset: 2px;
|
||||
text-decoration-color: #00000000;
|
||||
}
|
||||
|
||||
|
||||
a:hover {
|
||||
text-decoration-color: #fff;
|
||||
transition: text-decoration-color 0.25s;
|
||||
text-decoration-color: #fff;
|
||||
transition: text-decoration-color 0.25s;
|
||||
}
|
||||
|
||||
/* h1 { */
|
||||
/* margin: 1rem 0; */
|
||||
/* font-size: 2.5rem; */
|
||||
/* margin: 1rem 0; */
|
||||
/* font-size: 2.5rem; */
|
||||
/* } */
|
||||
|
||||
/* footer { */
|
||||
/* display: flex; */
|
||||
/* gap: 1rem; */
|
||||
/* margin-top: 2rem; */
|
||||
/* background-color: var(--third-colour); */
|
||||
/* border-radius: 4px; */
|
||||
/* padding: 0.5rem; */
|
||||
/* display: flex; */
|
||||
/* gap: 1rem; */
|
||||
/* margin-top: 2rem; */
|
||||
/* background-color: var(--third-colour); */
|
||||
/* border-radius: 4px; */
|
||||
/* padding: 0.5rem; */
|
||||
/* } */
|
||||
|
||||
.badge {
|
||||
image-rendering: pixelated;
|
||||
min-width: 88px;
|
||||
min-height: 31px;
|
||||
padding: 4px;
|
||||
image-rendering: pixelated;
|
||||
min-width: 88px;
|
||||
min-height: 31px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.linked-buttons {
|
||||
outline-style: dashed;
|
||||
width:fit-content;
|
||||
display: inline-flex;
|
||||
outline-style: dashed;
|
||||
width: fit-content;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.container {
|
||||
background-color: var(--second-colour);
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
/* flex: content; */
|
||||
background-color: var(--second-colour);
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* flex: content; */
|
||||
}
|
||||
|
||||
.greetButton {
|
||||
color: var(--fourth-colour);
|
||||
background-color: var(--second-colour);
|
||||
border-color: var(--second-colour);
|
||||
transition-duration: 0.4s;
|
||||
color: var(--fourth-colour);
|
||||
background-color: var(--second-colour);
|
||||
border-color: var(--second-colour);
|
||||
transition-duration: 0.4s;
|
||||
}
|
||||
|
||||
.greetButton:hover {
|
||||
color: var(--third-colour);
|
||||
background-color: var(--fourth-colour);
|
||||
border-color: var(--fourth-colour);
|
||||
}
|
||||
color: var(--third-colour);
|
||||
background-color: var(--fourth-colour);
|
||||
border-color: var(--fourth-colour);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue