Skip to content

Commit

Permalink
Add .prettierrc configuration file and update styles in Prose.astro, …
Browse files Browse the repository at this point in the history
…TableOfContents.astro, and BaseLayout.astro
  • Loading branch information
bhekanik committed Feb 11, 2024
1 parent 0b82dd7 commit fcb85f9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 25 deletions.
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"singleQuote": false,
"trailingComma": "all"
}
6 changes: 0 additions & 6 deletions src/components/Prose.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<div
font-size:
1.125rem;
line-height:
1.75;
margin-bottom:
1rem;
class="prose max-w-none md:prose-lg lg:prose-xl prose-pre:max-w-[75ch] prose-pre:mx-auto prose-zinc prose-p:max-w-[80ch] prose-p:text-xl prose-p:mb-4 prose-p:font-body prose-headings:font-headings prose-a:border-b-[1px] prose-a:border-[hsl(var(--links-hovered))] prose-a:text-[hsl(var(--links))] hover:prose-a:text-[hsl(var(--links-hovered))] prose-a:no-underline"
>
<slot />
Expand Down
14 changes: 7 additions & 7 deletions src/components/TableOfContents.astro
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
import { type CollectionEntry } from "astro:content";
import { cn } from "../utils/cn";
import Link from "./Link.astro";
import { type CollectionEntry } from "astro:content"
import { cn } from "../utils/cn"
import Link from "./Link.astro"
export interface Props {
thought: CollectionEntry<"thoughts">;
thought: CollectionEntry<"thoughts">
}
const { thought } = Astro.props;
const { headings } = await thought.render();
const { thought } = Astro.props
const { headings } = await thought.render()
---

{
Expand All @@ -25,7 +25,7 @@ const { headings } = await thought.render();
? "ml-4 border-l border-[hsl(var(--links))] pl-4"
: heading.depth === 4
? "ml-8 border-l border-[hsl(var(--links))] pl-4"
: ""
: "",
)}
>
<Link href={`#${heading.slug}`}>{heading.text}</Link>
Expand Down
24 changes: 12 additions & 12 deletions src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
import "@fontsource-variable/jetbrains-mono";
import "@fontsource/ibm-plex-sans";
import "@fontsource/oswald";
import "@fontsource/permanent-marker";
import "@fontsource-variable/jetbrains-mono"
import "@fontsource/ibm-plex-sans"
import "@fontsource/oswald"
import "@fontsource/permanent-marker"
import { AstroSeo } from "@astrolib/seo";
import { ViewTransitions } from "astro:transitions";
import Footer from "../components/Footer.astro";
import Header from "../components/Header.astro";
import PostHog from "../components/PostHog.astro";
import { AstroSeo } from "@astrolib/seo"
import { ViewTransitions } from "astro:transitions"
import Footer from "../components/Footer.astro"
import Header from "../components/Header.astro"
import PostHog from "../components/PostHog.astro"
// import "../styles/global.css";
const { pageTitle, description, title, imageUrl } = Astro.props;
const { pageTitle, description, title, imageUrl } = Astro.props
---

<html lang="en">
Expand Down Expand Up @@ -148,7 +148,6 @@ const { pageTitle, description, title, imageUrl } = Astro.props;
}

body {
position: relative;
display: grid;
grid-template:
"header" auto
Expand All @@ -173,7 +172,8 @@ const { pageTitle, description, title, imageUrl } = Astro.props;
line-height: 1.1;
}
</style>
</head><body>
</head>
<body>
<Header />
<h1
class="page-header text-center text-5xl p-8 border-b-[1px] border-[hsl(var(--muted))] uppercase"
Expand Down

0 comments on commit fcb85f9

Please sign in to comment.