Skip to content

Commit

Permalink
style: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lajbel committed Nov 10, 2024
1 parent 7d98181 commit e876854
Show file tree
Hide file tree
Showing 38 changed files with 88 additions and 128 deletions.
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"useTabs": false,
"htmlWhitespaceSensitivity": "strict",
"proseWrap": "always",
"bracketSameLine": true,
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"],
"overrides": [
{
Expand Down
3 changes: 1 addition & 2 deletions src/components/Content/Info.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ const { crew = "burpman", title = "Level Up!" } = Astro.props;
---

<aside
class="mb-4 mt-4 rounded-l-md rounded-r-box border-l-8 border-primary bg-base-200 px-4 py-2 text-base"
>
class="mb-4 mt-4 rounded-l-md rounded-r-box border-l-8 border-primary bg-base-200 px-4 py-2 text-base">
<div class="not-prose flex items-center gap-2 text-xl font-bold">
<img src={assets[crew].outlined} class="my-2 h-8" />
<p set:html={marked.parse(title)} />
Expand Down
3 changes: 1 addition & 2 deletions src/components/Content/Prose.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<div
class="prose prose-lg max-w-4xl text-pretty px-4 py-4 lg:prose-xl prose-headings:mb-6 prose-p:my-4 prose-a:text-primary prose-pre:my-2 prose-img:rounded-xl"
>
class="prose prose-lg max-w-4xl text-pretty px-4 py-4 lg:prose-xl prose-headings:mb-6 prose-p:my-4 prose-a:text-primary prose-pre:my-2 prose-img:rounded-xl">
<slot />
</div>
9 changes: 3 additions & 6 deletions src/components/Crew/CrewItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ export const CrewItem = component$<CrewItemProps>((props) => {
<div class="flex flex-1 flex-col gap-2 p-6">
<div
class="tooltip flex justify-around rounded-box border border-primary"
data-tip={crewItem.secret}
>
data-tip={crewItem.secret}>
<img
src={crewItem.outlined}
alt={crewItem.name}
Expand Down Expand Up @@ -136,8 +135,7 @@ export const CrewItem = component$<CrewItemProps>((props) => {
a.href = crewItem.sprite!;
a.download = `${props.crewItem}.png`;
a.click();
}}
>
}}>
Download Sprite
</btn>
<btn
Expand All @@ -147,8 +145,7 @@ export const CrewItem = component$<CrewItemProps>((props) => {
a.href = crewItem.outlined!;
a.download = `${props.crewItem}-o.png`;
a.click();
}}
>
}}>
Download Outlined ver.
</btn>
</div>
Expand Down
3 changes: 1 addition & 2 deletions src/components/Crew/CrewSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export const CrewSearch = component$<CrewSearchProps>(
</div>
<select
class="| join-item select select-bordered lg:hidden"
bind:value={tagFilter}
>
bind:value={tagFilter}>
<option selected value="">
no filter
</option>
Expand Down
3 changes: 1 addition & 2 deletions src/components/Crew/CrewTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ export const CrewTag = component$<CrewTagProps>(({ filter, value }) => {
<label
class={cn("hoverable badge badge-primary select-none", {
"badge-outline": filter.value !== value,
})}
>
})}>
<Slot />
<input
type="checkbox"
Expand Down
12 changes: 4 additions & 8 deletions src/components/Doc/DocEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,15 @@ export const Title = ({ parent }: Props) => {
class={cn({
"text-xl": !parent,
"text-lg": parent,
})}
>
})}>
<Slot />
</h2>
) : (
<h1
class={cn({
"text-xl": !parent,
"text-lg": parent,
})}
>
})}>
<Slot />
</h1>
);
Expand All @@ -46,14 +44,12 @@ export const DocEntry = component$(({ data, parent }: Props) => {
id={`${parentText}${data.name}`}
class={cn("gal-1 text-fira flex flex-col", {
"p-2": parent,
})}
>
})}>
<h1
class={cn({
"text-xl": !parent,
"text-lg": parent,
})}
>
})}>
<TypeName data={data} parent={parent} />
<TypeGenerics data={data} />
{optionalMark(data)}
Expand Down
3 changes: 1 addition & 2 deletions src/components/Doc/JSDocDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export const JSDocDescription = component$(({ data }: Props) => {
dangerouslySetInnerHTML={await marked.parseInline(
e.text,
{},
)}
></span>
)}></span>
</TypeLink>
)}
</>
Expand Down
3 changes: 1 addition & 2 deletions src/components/Doc/TypeLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ export const TypeLink = component$(({ name }: Props) => {
class={"type-btn hoverable text-primary"}
data-link-type={`${isTypesMember ? "/" : "/ctx/"}${name}`}
data-is-type={String(isType)}
onClick$={handleClick}
>
onClick$={handleClick}>
{name}
</span>
);
Expand Down
21 changes: 7 additions & 14 deletions src/components/Footer/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ import FooterNav from "./FooterNav.astro";

<FriendsBelow
friends={["bag", "ghosty", "ghostiny", "kat", "burpman", "mark"]}
offset={2}
>
offset={2}>
<footer class="w-full rounded bg-base-200 p-10 text-base text-base-content">
<div
class="grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4"
>
class="grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4">
<FooterNav title="KAPLAY">
<FooterLink href="/guides/install">
Installing KAPLAY
Expand All @@ -31,8 +29,7 @@ import FooterNav from "./FooterNav.astro";
</FooterLink>
<FooterLink
href="https://discord.com/invite/aQ6RuQm3TF"
external
>
external>
Ask questions on Discord
</FooterLink>
<FooterLink href="/presskit"> Press Kit </FooterLink>
Expand All @@ -46,8 +43,7 @@ import FooterNav from "./FooterNav.astro";
</FooterLink>
<FooterLink
href="https://discord.com/invite/aQ6RuQm3TF"
external
>
external>
Discord
</FooterLink>
<FooterLink href="https://www.youtube.com/@kaplayjs" external>
Expand All @@ -59,8 +55,7 @@ import FooterNav from "./FooterNav.astro";
<FooterLink
href="https://mastodon.gamedev.place/@kaplay"
external
rel="me"
>
rel="me">
Mastodon
</FooterLink>
<FooterLink href="https://kaplay.itch.io/" external>
Expand All @@ -73,8 +68,7 @@ import FooterNav from "./FooterNav.astro";
<FooterNav title="SUPPORT">
<a
href="https://opencollective.com/kaplay/donate"
target="_blank"
>
target="_blank">
<Image
src="https://opencollective.com/webpack/donate/[email protected]?color=blue"
width="300"
Expand All @@ -96,8 +90,7 @@ import FooterNav from "./FooterNav.astro";
<div class="divider"></div>

<aside
class="flex flex-col items-center justify-center gap-6 sm:flex-row sm:justify-between"
>
class="flex flex-col items-center justify-center gap-6 sm:flex-row sm:justify-between">
<div class="flex items-center justify-center gap-4">
<Image src={kaplayOutlined} alt="kaplay logo" height={70} />

Expand Down
3 changes: 1 addition & 2 deletions src/components/Footer/FooterLink.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const { href, external, rel } = Astro.props;
class="link-hover link"
{href}
target={external ? "_blank" : "_parent"}
rel={rel}
>
rel={rel}>
<slot />
</a>
9 changes: 3 additions & 6 deletions src/components/Land/About.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import AboutFeatured from "./AboutFeatured.astro";

<div class="min-h-screen p-4" id="about">
<div
class="flex min-h-screen w-full flex-col-reverse items-center justify-center gap-16 lg:flex-row"
>
class="flex min-h-screen w-full flex-col-reverse items-center justify-center gap-16 lg:flex-row">
<div class="max-w-xl">
<a
class="badge link badge-primary badge-lg my-4 h-fit font-medium"
href="https://itch.io/jam/kajam"
target="_blank"
>
target="_blank">
Win prizes making games with KAPLAY! KAJAM, join now! ->
</a>
<h1 class="text-pretty text-5xl font-bold">
Expand Down Expand Up @@ -51,8 +49,7 @@ import AboutFeatured from "./AboutFeatured.astro";
</a>
<a
class="btn btn-neutral"
href="https://discord.com/invite/aQ6RuQm3TF"
>
href="https://discord.com/invite/aQ6RuQm3TF">
Join to our Discord
</a>
<a class="btn btn-neutral" href="https://play.kaplayjs.com">
Expand Down
3 changes: 1 addition & 2 deletions src/components/Land/AboutFeatured.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ const { friend } = Astro.props;
---

<div
class="flex flex-1 flex-row items-center gap-4 rounded-box bg-base-200 p-4"
>
class="flex flex-1 flex-row items-center gap-4 rounded-box bg-base-200 p-4">
<div class="max-h-10 max-w-10">
<img src={assets[friend].outlined} alt="KAFriend" />
</div>
Expand Down
3 changes: 1 addition & 2 deletions src/components/Land/Blocks/BlockStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ export const BlockStack = component$<Props>(({ hideOnMobile }) => {
class={cn("hidden w-full flex-col gap-2 lg:flex-row", {
"lg:flex": hideOnMobile,
flex: !hideOnMobile,
})}
>
})}>
<Slot />
</div>
);
Expand Down
3 changes: 1 addition & 2 deletions src/components/Land/Example.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import exampleCode from "../../util/code.js?raw";

<div
class="flex min-h-screen w-full flex-col justify-center gap-6 p-4 lg:flex-row"
id="example"
>
id="example">
<div class="w-full max-w-xl">
<h2 class="text-5xl font-semibold">
An API based on <span class="text-primary">blocks</span>
Expand Down
9 changes: 3 additions & 6 deletions src/components/Land/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ const externalLinks = [

<ul
tabindex="0"
class="menu dropdown-content z-[1] w-56 gap-2 rounded-box bg-base-200 p-6 shadow"
>
class="menu dropdown-content z-[1] w-56 gap-2 rounded-box bg-base-200 p-6 shadow">
{
[...internalLinks, ...externalLinks].map((link) => (
<li>
Expand All @@ -86,8 +85,7 @@ const externalLinks = [
"btn-ghost": !link.highlight,
},
]}
href={link.url}
>
href={link.url}>
{link.name}
<img
src={link.icon}
Expand Down Expand Up @@ -149,8 +147,7 @@ const externalLinks = [
"btn-ghost": !link.highlight,
},
]}
href={link.url}
>
href={link.url}>
{link.name}
<img
src={link.icon}
Expand Down
6 changes: 2 additions & 4 deletions src/components/Land/TestimonialSection.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import FriendsBelow from "../Util/FriendsBelow.astro";

<div
class="flex min-h-screen w-full flex-col items-center gap-6 p-4"
id="testimonials"
>
id="testimonials">
<h2 class="text-5xl font-bold">Voices of KAPLAYERS</h2>
<p class="text-center">
What our users say about KAPLAY. We are proud to have such a great
Expand All @@ -19,8 +18,7 @@ import FriendsBelow from "../Util/FriendsBelow.astro";
<FriendsBelow
friends={[testimonial.friend as "mark"]}
offset={3}
limited
>
limited>
<Testimonial testimonial={testimonial} />
</FriendsBelow>
))
Expand Down
Loading

0 comments on commit e876854

Please sign in to comment.