mirror of
https://git.aria.coffee/BuyMyAria/aria.coffee.git
synced 2025-06-15 12:59:55 +00:00
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,15 +1,18 @@
|
|||
import { useState } from 'preact/hooks';
|
||||
import { useState } from "preact/hooks";
|
||||
|
||||
export default function Greeting({messages}) {
|
||||
|
||||
const randomMessage = () => messages[(Math.floor(Math.random() * messages.length))];
|
||||
export default function Greeting({ messages }) {
|
||||
const randomMessage = () =>
|
||||
messages[Math.floor(Math.random() * messages.length)];
|
||||
|
||||
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())}>
|
||||
<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" }),
|
||||
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())
|
||||
})
|
||||
tags: z.array(z.string()),
|
||||
}),
|
||||
});
|
||||
// Export a single `collections` object to register your collection(s)
|
||||
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";
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
---
|
||||
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 },
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import rss from '@astrojs/rss';
|
||||
import rss from "@astrojs/rss";
|
||||
import { getCollection } from "astro:content";
|
||||
|
||||
export async function GET(context) {
|
||||
|
|
|
@ -14,7 +14,7 @@ export async function getStaticPaths() {
|
|||
|
||||
return uniqueTags.map((tag) => {
|
||||
const filteredPosts = allPosts.filter((post: any) =>
|
||||
post.data.tags.includes(tag)
|
||||
post.data.tags.includes(tag),
|
||||
);
|
||||
return {
|
||||
params: { tag },
|
||||
|
|
|
@ -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,38 +1,36 @@
|
|||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
src:
|
||||
local("Noto Sans"),
|
||||
url("/static/fonts/NotoSans-Regular.ttf") format("truetype");
|
||||
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");
|
||||
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")
|
||||
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;
|
||||
--third-colour: #2e236c;
|
||||
--fourth-colour: #f5efff;
|
||||
|
||||
--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-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;
|
||||
|
@ -60,7 +58,6 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
a {
|
||||
color: var(--fourth-colour);
|
||||
text-decoration: underline 2px;
|
||||
|
@ -68,24 +65,23 @@ a {
|
|||
text-decoration-color: #00000000;
|
||||
}
|
||||
|
||||
|
||||
a:hover {
|
||||
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 {
|
||||
|
@ -97,7 +93,7 @@ a:hover {
|
|||
|
||||
.linked-buttons {
|
||||
outline-style: dashed;
|
||||
width:fit-content;
|
||||
width: fit-content;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
|
@ -105,7 +101,7 @@ a:hover {
|
|||
background-color: var(--second-colour);
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
display:flex;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* flex: content; */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue