Skip to content

Commit 526d896

Browse files
committed
format
1 parent 879e8b8 commit 526d896

File tree

15 files changed

+107
-111
lines changed

15 files changed

+107
-111
lines changed

src/components/header.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
import HomeLink from "./homeLink.astro";
3-
import { Image } from "astro:assets";
4-
import Link from "./link.astro";
2+
import HomeLink from './homeLink.astro'
3+
import { Image } from 'astro:assets'
4+
import Link from './link.astro'
55
---
66

77
<header class="mb-14 flex flex-row place-content-between">

src/components/homeLink.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
import "@fontsource/montserrat/900.css";
3-
import Link from "./link.astro";
2+
import '@fontsource/montserrat/900.css'
3+
import Link from './link.astro'
44
5-
const pathname = Astro.url.pathname;
6-
const isActive = pathname === "/";
5+
const pathname = Astro.url.pathname
6+
const isActive = pathname === '/'
77
---
88

99
<Link

src/components/link.astro

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
22
interface Props {
3-
href: string;
4-
classList: (string | object)[];
5-
target?: "_self" | "_blank" | "_parent" | "_top";
3+
href: string
4+
classList: (string | object)[]
5+
target?: '_self' | '_blank' | '_parent' | '_top'
66
}
77
8-
const { classList, href, target = "_blank" } = Astro.props;
8+
const { classList, href, target = '_blank' } = Astro.props
99
---
1010

11-
<a class:list={classList} target={target} href={href}><slot /> </a>
11+
<a class:list={classList} {target} {href}>
12+
<slot />
13+
</a>

src/components/postTitle.astro

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
---
2-
import Color from "colorjs.io";
3-
import "@fontsource/montserrat/900.css";
2+
import Color from 'colorjs.io'
3+
import '@fontsource/montserrat/900.css'
44
55
interface Props {
6-
title: string;
7-
date: string;
6+
title: string
7+
date: string
88
}
99
10-
const { title, date } = Astro.props;
10+
const { title, date } = Astro.props
1111
12-
let lightStart = new Color("lab(63 59.32 -1.47)");
13-
let lightEnd = new Color("lab(33 42.09 -43.19)");
14-
let lightRange = lightStart.range(lightEnd);
15-
let darkStart = new Color("lab(81 32.36 -7.02)");
16-
let darkEnd = new Color("lab(78 19.97 -36.75)");
17-
let darkRange = darkStart.range(darkEnd);
18-
let today = new Date();
19-
let timeSinceFirstPost = (
20-
today.valueOf() - new Date(2018, 10, 30).valueOf()
21-
).valueOf();
22-
let timeSinceThisPost = (today.valueOf() - new Date(date).valueOf()).valueOf();
23-
let staleness = timeSinceThisPost / timeSinceFirstPost;
12+
const lightStart = new Color('lab(63 59.32 -1.47)')
13+
const lightEnd = new Color('lab(33 42.09 -43.19)')
14+
const lightRange = lightStart.range(lightEnd)
15+
const darkStart = new Color('lab(81 32.36 -7.02)')
16+
const darkEnd = new Color('lab(78 19.97 -36.75)')
17+
const darkRange = darkStart.range(darkEnd)
18+
const today = new Date()
19+
const timeSinceFirstPost = (today.valueOf() - new Date(2018, 10, 30).valueOf()).valueOf()
20+
const timeSinceThisPost = (today.valueOf() - new Date(date).valueOf()).valueOf()
21+
const staleness = timeSinceThisPost / timeSinceFirstPost
2422
---
2523

2624
<h2

src/content/config.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import { z, defineCollection } from "astro:content";
1+
import { z, defineCollection } from 'astro:content'
22

33
const blogCollection = defineCollection({
4-
type: "content",
5-
schema: z.object({
6-
title: z.string(),
7-
date: z.string(),
8-
spoiler: z.string(),
9-
}),
10-
});
4+
type: 'content',
5+
schema: z.object({
6+
title: z.string(),
7+
date: z.string(),
8+
spoiler: z.string(),
9+
}),
10+
})
1111

1212
export const collections = {
13-
posts: blogCollection,
14-
};
13+
posts: blogCollection,
14+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { Greeting } from "./greeting";
1+
export { Greeting } from './greeting'
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export { Counter } from "./counter";
2-
export { PostList } from "./post-list";
3-
export { PostPreview } from "./post-preview";
1+
export { Counter } from './counter'
2+
export { PostList } from './post-list'
3+
export { PostPreview } from './post-preview'

src/layouts/blogLayout.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
import Layout from "./layout.astro";
3-
import Header from "@/components/header.astro";
4-
import HomeLink from "@/components/homeLink.astro";
2+
import Layout from './layout.astro'
3+
import Header from '@/components/header.astro'
4+
import HomeLink from '@/components/homeLink.astro'
55
---
66

77
<Layout>

src/layouts/layout.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
import "@/styles/globals.css";
3-
import "@fontsource/merriweather";
4-
import { ViewTransitions } from "astro:transitions";
5-
import LoadingIndicator from "astro-loading-indicator/component";
2+
import '@/styles/globals.css'
3+
import '@fontsource/merriweather'
4+
import { ViewTransitions } from 'astro:transitions'
5+
import LoadingIndicator from 'astro-loading-indicator/component'
66
---
77

88
<!doctype html>

src/layouts/pageLayout.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
import Layout from "./layout.astro";
3-
import Header from "@/components/header.astro";
2+
import Layout from './layout.astro'
3+
import Header from '@/components/header.astro'
44
---
55

66
<Layout>

0 commit comments

Comments
 (0)