Skip to content

Commit

Permalink
run format
Browse files Browse the repository at this point in the history
  • Loading branch information
itsMapleLeaf committed Apr 15, 2024
1 parent 8062df8 commit 7105703
Show file tree
Hide file tree
Showing 136 changed files with 776 additions and 775 deletions.
10 changes: 5 additions & 5 deletions src/components/Accordion.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
import type { HTMLAttributes } from "astro/types"
import ChevronIcon from "~/icons/ChevronIcon.jsx"
import type { HTMLAttributes } from "astro/types";
import ChevronIcon from "~/icons/ChevronIcon.jsx";
export type Props = HTMLAttributes<"details"> & {
summary: string
}
summary: string;
};
const { summary, class: className, ...attrs } = Astro.props
const { summary, class: className, ...attrs } = Astro.props;
---

<details class:list={["group", className]} {...attrs}>
Expand Down
18 changes: 9 additions & 9 deletions src/components/Avatar.astro
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
import { getEntry } from "astro:content"
import { resolveImage } from "~/content/authors/_resolveImage.js"
import { getEntry } from "astro:content";
import { resolveImage } from "~/content/authors/_resolveImage.js";
type Props = {
name?: string
image?: string
lg?: boolean
}
name?: string;
image?: string;
lg?: boolean;
};
let { name, image, lg = false } = Astro.props
let { name, image, lg = false } = Astro.props;
if (!image && name) {
const author = await getEntry("authors", name)
image = author && (await resolveImage(author))?.src
const author = await getEntry("authors", name);
image = author && (await resolveImage(author))?.src;
}
---

Expand Down
32 changes: 16 additions & 16 deletions src/components/BaseHead.astro
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
---
import smartypants from "smartypants"
import siteInfo from "~/data/site-info"
import "~/styles/fonts.css"
import Favicon from "./Favicon.astro"
import SEO from "./SEO.astro"
import smartypants from "smartypants";
import siteInfo from "~/data/site-info";
import "~/styles/fonts.css";
import Favicon from "./Favicon.astro";
import SEO from "./SEO.astro";
export type Props = {
title?: string
rawTitle?: string
description?: string
image?: { src: string; alt: string }
canonicalURL?: URL | null
pageType?: "website" | "article"
}
title?: string;
rawTitle?: string;
description?: string;
image?: { src: string; alt: string };
canonicalURL?: URL | null;
pageType?: "website" | "article";
};
const twitterHandle = "astrodotbuild"
const twitterHandle = "astrodotbuild";
const {
rawTitle,
description = siteInfo.description,
image = siteInfo.image,
canonicalURL = new URL(Astro.request.url, Astro.site),
pageType = "website",
} = Astro.props
} = Astro.props;
const title = rawTitle ?? [Astro.props.title, siteInfo.name].filter(Boolean).join(" | ")
const title = rawTitle ?? [Astro.props.title, siteInfo.name].filter(Boolean).join(" | ");
const resolvedImage = {
src: new URL(image.src, Astro.site).toString(),
alt: image.alt,
}
};
---

<!-- High Priority Global Metadata -->
Expand Down
2 changes: 1 addition & 1 deletion src/components/Blockquote.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { Icon } from "astro-icon"
import { Icon } from "astro-icon";
---

<figure class="relative my-8 border-y-[3px] border-astro-gray-500 py-4">
Expand Down
6 changes: 3 additions & 3 deletions src/components/BlogContentImage.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
export interface Props {
src: ImageMetadata
alt?: string
src: ImageMetadata;
alt?: string;
}
const { src, alt = "" } = Astro.props
const { src, alt = "" } = Astro.props;
---

<img
Expand Down
6 changes: 3 additions & 3 deletions src/components/Callout.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import { Icon } from "astro-icon"
import { Icon } from "astro-icon";
export type Props = {
title?: string
}
title?: string;
};
---

<aside class="my-4 border-l-4 border-astro-purple bg-astro-purple-dark px-6 py-4 text-white">
Expand Down
10 changes: 5 additions & 5 deletions src/components/Card.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
export type Props = {
background?: "neutral" | "blue-purple" | "blue-green" | "red-pink"
isLink?: boolean
className?: string
}
background?: "neutral" | "blue-purple" | "blue-green" | "red-pink";
isLink?: boolean;
className?: string;
};
const { background = "neutral", isLink = false, className } = Astro.props
const { background = "neutral", isLink = false, className } = Astro.props;
---

<article
Expand Down
8 changes: 4 additions & 4 deletions src/components/CardBody.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
import type { HTMLAttributes, HTMLTag } from "astro/types"
import type { HTMLAttributes, HTMLTag } from "astro/types";
export type Props<T extends HTMLTag> = HTMLAttributes<T> & {
as?: T
}
as?: T;
};
const { as: Component = "div", class: className, href, ...attrs } = Astro.props
const { as: Component = "div", class: className, href, ...attrs } = Astro.props;
---

<Component
Expand Down
6 changes: 3 additions & 3 deletions src/components/CardFooter.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import type { HTMLAttributes } from "astro/types"
import type { HTMLAttributes } from "astro/types";
export type Props = HTMLAttributes<"footer">
export type Props = HTMLAttributes<"footer">;
const { class: className, ...attrs } = Astro.props
const { class: className, ...attrs } = Astro.props;
---

<footer class:list={["mt-auto", className]} {...attrs}>
Expand Down
6 changes: 3 additions & 3 deletions src/components/CardGrid.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import type { HTMLAttributes } from "astro/types"
import type { HTMLAttributes } from "astro/types";
export type Props = HTMLAttributes<"div">
export type Props = HTMLAttributes<"div">;
const { class: className, ...attrs } = Astro.props
const { class: className, ...attrs } = Astro.props;
---

<div class:list={["grid gap-8 lg:gap-10", className]} {...attrs}>
Expand Down
12 changes: 6 additions & 6 deletions src/components/CardGridGroup.astro
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
export type Props = {
title?: string
title?: string;
cta?: {
text: string
href: string
}
}
text: string;
href: string;
};
};
const { title, cta } = Astro.props
const { title, cta } = Astro.props;
---

<section class="flex flex-col gap-4 lg:gap-6 w-full">
Expand Down
8 changes: 4 additions & 4 deletions src/components/CardHeading.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
type Props = {
lg?: boolean
class?: string
}
lg?: boolean;
class?: string;
};
const { lg = false, class: className } = Astro.props
const { lg = false, class: className } = Astro.props;
---

<h3 class:list={[lg && "xl:heading-2 xl:text-[3.5rem]", "heading-3 text-gray-100", className]}>
Expand Down
14 changes: 7 additions & 7 deletions src/components/CatalogSubmitCallout.astro
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
import SidebarPanel, { type Props as PanelProps } from "./SidebarPanel.astro"
import SidebarPanel, { type Props as PanelProps } from "./SidebarPanel.astro";
export type Props = Omit<PanelProps, "slot"> & {
title: string
title: string;
cta: {
href: string
text: string
}
}
href: string;
text: string;
};
};
const { title, cta, ...attrs } = Astro.props
const { title, cta, ...attrs } = Astro.props;
---

<SidebarPanel alt {...attrs}>
Expand Down
10 changes: 5 additions & 5 deletions src/components/Checkbox.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
import type { HTMLAttributes } from "astro/types"
import type { RequireSome } from "~/helpers/types.js"
import type { HTMLAttributes } from "astro/types";
import type { RequireSome } from "~/helpers/types.js";
export type Props = RequireSome<HTMLAttributes<"input">, "id" | "name"> & {
label: string
}
label: string;
};
const { id, name, label, class: className, ...attrs } = Astro.props
const { id, name, label, class: className, ...attrs } = Astro.props;
---

<label
Expand Down
2 changes: 1 addition & 1 deletion src/components/CodeBlock.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import ChevronIcon from "~/icons/ChevronIcon.jsx"
import ChevronIcon from "~/icons/ChevronIcon.jsx";
---

<div data-code-block class="bg-blue-purple-gradient p-0.5 shadow-sm">
Expand Down
22 changes: 11 additions & 11 deletions src/components/CommunityProject.astro
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
import { Image } from "astro:assets"
import bgImage from "../assets/blog/community-day-2023/bg.webp"
import { Image } from "astro:assets";
import bgImage from "../assets/blog/community-day-2023/bg.webp";
export interface Props {
creator: string
github: string
name: string
link: string
description: string
fact: string
img?: ImageMetadata
linkTextOverride?: string
creator: string;
github: string;
name: string;
link: string;
description: string;
fact: string;
img?: ImageMetadata;
linkTextOverride?: string;
}
const { creator, github, name, link, description, fact, img, linkTextOverride } = Astro.props
const { creator, github, name, link, description, fact, img, linkTextOverride } = Astro.props;
---

<div class="grid grid-cols-1">
Expand Down
6 changes: 3 additions & 3 deletions src/components/ExternalLink.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import type { HTMLAttributes } from "astro/types"
import type { RequireSome } from "~/helpers/types.js"
import type { HTMLAttributes } from "astro/types";
import type { RequireSome } from "~/helpers/types.js";
export type Props = RequireSome<HTMLAttributes<"a">, "href">
export type Props = RequireSome<HTMLAttributes<"a">, "href">;
---

<a target="_blank" rel="noopener noreferer" {...Astro.props}>
Expand Down
22 changes: 11 additions & 11 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
import siteInfo from "~/data/site-info.js"
import NewsLetterSignup from "./NewsLetterSignup.astro"
import SocialLinks from "./SocialLinks.astro"
import siteInfo from "~/data/site-info.js";
import NewsLetterSignup from "./NewsLetterSignup.astro";
import SocialLinks from "./SocialLinks.astro";
type Link = {
href: string
text: string
}
href: string;
text: string;
};
type LinkGroup = {
title: string
items: Link[]
}
title: string;
items: Link[];
};
const groups: LinkGroup[] = [
{
Expand Down Expand Up @@ -90,9 +90,9 @@ const groups: LinkGroup[] = [
},
],
},
]
];
const socialLinks = siteInfo.socialLinks
const socialLinks = siteInfo.socialLinks;
---

<footer class="container">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import MenuIcon from "~/icons/MenuIcon.jsx";
export interface Props {
header?: "default" | "transparent";
header?: "default" | "transparent";
}
const { header = "default" } = Astro.props;
Expand Down
14 changes: 7 additions & 7 deletions src/components/HeaderDrawerContent.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
import siteInfo from "~/data/site-info.js"
import ChevronIcon from "~/icons/ChevronIcon.jsx"
import LayersIcon from "~/icons/LayersIcon.jsx"
import OpenBookIcon from "~/icons/OpenBookIcon.jsx"
import PaletteIcon from "~/icons/PaletteIcon.jsx"
import SocialLinks from "./SocialLinks.astro"
import siteInfo from "~/data/site-info.js";
import ChevronIcon from "~/icons/ChevronIcon.jsx";
import LayersIcon from "~/icons/LayersIcon.jsx";
import OpenBookIcon from "~/icons/OpenBookIcon.jsx";
import PaletteIcon from "~/icons/PaletteIcon.jsx";
import SocialLinks from "./SocialLinks.astro";
const socialLinks = siteInfo.socialLinks.filter((link) => !link.footerOnly)
const socialLinks = siteInfo.socialLinks.filter((link) => !link.footerOnly);
---

<nav
Expand Down
10 changes: 5 additions & 5 deletions src/components/HeaderNav.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
import siteInfo from "~/data/site-info.js"
import AstroLogo from "./AstroLogo.astro"
import ResourcesMenu from "./ResourcesMenu.astro"
import SocialLinks from "./SocialLinks.astro"
import siteInfo from "~/data/site-info.js";
import AstroLogo from "./AstroLogo.astro";
import ResourcesMenu from "./ResourcesMenu.astro";
import SocialLinks from "./SocialLinks.astro";
const socialLinks = siteInfo.socialLinks.filter((link) => !link.footerOnly)
const socialLinks = siteInfo.socialLinks.filter((link) => !link.footerOnly);
---

<a href="/" data-astro-prefetch title="Home" data-home-link>
Expand Down
Loading

0 comments on commit 7105703

Please sign in to comment.