Skip to content

Commit d6987df

Browse files
committed
format
1 parent 6dccbbb commit d6987df

10 files changed

Lines changed: 85 additions & 19 deletions

File tree

.prettierrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import config from "@hyperz111/prettier-config";
33
export default {
44
...config,
55
bracketSameLine: true,
6-
plugins: ["prettier-plugin-svelte"],
6+
plugins: ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
7+
tailwindStylesheet: "./src/styles/index.css",
78
overrides: [
89
{
910
files: "*.svelte",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"mdsvex": "^0.12.6",
3030
"prettier": "^3.4.2",
3131
"prettier-plugin-svelte": "^3.3.3",
32+
"prettier-plugin-tailwindcss": "^0.7.1",
3233
"tailwindcss": "^4.1.15",
3334
"vite": "^7.0.4"
3435
},

pnpm-lock.yaml

Lines changed: 64 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/navigation.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
};
2525
</script>
2626

27-
<nav class="flex justify-between items-center p-4 fixed w-dvw top-0 left-0 {navbarTheme}">
27+
<nav class="fixed top-0 left-0 flex w-dvw items-center justify-between p-4 {navbarTheme}">
2828
<a class="font-black" href="/">Hyper-Z11</a>
29-
<button class="flex md:hidden" onclick={toggle(true)}><Icon icon="mdi:menu" class="w-5 h-5" /></button>
30-
<ul class="hidden md:flex flex-row gap-4">
29+
<button class="flex md:hidden" onclick={toggle(true)}><Icon icon="mdi:menu" class="h-5 w-5" /></button>
30+
<ul class="hidden flex-row gap-4 md:flex">
3131
{#each menu as { name, icon, url } (url)}
3232
<li>
3333
<a href={url} class="flex items-center gap-1" onclick={() => setTimeout(toggle(false), 100)}
@@ -42,17 +42,17 @@
4242
<!--- Mobile sidebar -->
4343
{#if opened}
4444
<button
45-
class="fixed z-98 top-0 left-0 h-dvh w-dvw backdrop-brightness-50"
45+
class="fixed top-0 left-0 z-98 h-dvh w-dvw backdrop-brightness-50"
4646
onclick={toggle(false)}
4747
aria-label="layer"
4848
in:fade
4949
out:fade></button>
5050

5151
<ul
52-
class="flex flex-col gap-4 fixed z-100 top-0 right-0 h-dvh {navbarTheme} p-5 w-35"
52+
class="fixed top-0 right-0 z-100 flex h-dvh flex-col gap-4 {navbarTheme} w-35 p-5"
5353
in:slide={{ axis: "x" }}
5454
out:slide={{ axis: "x" }}>
55-
<li class="flex justify-between items-center">
55+
<li class="flex items-center justify-between">
5656
<button onclick={toggleTheme}><Icon icon={themeIcons[getTheme()]} /></button>
5757
<button onclick={toggle(false)}><Icon icon="mdi:close" /></button>
5858
</li>

src/routes/+error.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
<Head {config} />
1515
</svelte:head>
1616

17-
<section class="flex justify-center items-center h-3/4">
17+
<section class="flex h-3/4 items-center justify-center">
1818
<div class="text-center">
19-
<h2 class="text-6xl font-extrabold my-2">{page.status}</h2>
19+
<h2 class="my-2 text-6xl font-extrabold">{page.status}</h2>
2020
<p class="text-sm text-gray-500">If you in here, let me explain this.</p>
2121
<p class="text-sm text-gray-500">
2222
You have a message <span class="font-bold text-gray-200">"{page.error.message}"</span>

src/routes/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
<Nav menu={navbarMenu} />
5050

51-
<main class="p-3 pt-16 grow {baseTheme}">
51+
<main class="grow p-3 pt-16 {baseTheme}">
5252
{@render children()}
5353
</main>
5454

src/routes/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
<Head {config} />
1414

15-
<h2 class="text-xl font-extrabold text-center">Welcome to My Homepage 🎉</h2>
16-
<img class="w-1/2 md:w-1/4 mx-auto" src="/memes/meme-1.png" alt="Salam akal sehat" />
15+
<h2 class="text-center text-xl font-extrabold">Welcome to My Homepage 🎉</h2>
16+
<img class="mx-auto w-1/2 md:w-1/4" src="/memes/meme-1.png" alt="Salam akal sehat" />

src/routes/about/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<Head {config} />
2626

2727
<section id="about">
28-
<img class="w-1/3 mx-auto border-4 rounded border-gray-700" src="/favicon.png" alt="Profile" />
28+
<img class="mx-auto w-1/3 rounded border-4 border-gray-700" src="/favicon.png" alt="Profile" />
2929
<h2>About</h2>
3030
<p class="**:inline">
3131
Hello, i'm <b>Hyper-Z11</b> (he/him). The {yearsOld} years old beginner programmer. My real name is

src/routes/blogs/+page.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
<svelte:head></svelte:head>
1616
<Head {config} />
1717

18-
<section class="grid grid-cols-1 md:grid-cols-2 gap-4">
18+
<section class="grid grid-cols-1 gap-4 md:grid-cols-2">
1919
{#each data.blogs as { title, description, date, slug } (date)}
2020
<div class="py-2">
2121
<h3 class="text-3xl font-extrabold">{title}</h3>
22-
<p class="text-sm text-gray-500 my-1">{formatDate(date)}</p>
23-
<p class="text-sm my-2">{description}</p>
22+
<p class="my-1 text-sm text-gray-500">{formatDate(date)}</p>
23+
<p class="my-2 text-sm">{description}</p>
2424
<a class="text-blue-500 hover:text-blue-400" href="/blogs/{slug}">Read more</a>
2525
</div>
2626
{/each}

src/routes/blogs/[slug]/+page.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<Head {config} />
1616

17-
<h1 class="text-4xl font-black my-2">{data.frontmatter.title}</h1>
17+
<h1 class="my-2 text-4xl font-black">{data.frontmatter.title}</h1>
1818
<p class="my-4 text-xs text-gray-400">
1919
{formatDate(data.frontmatter.date)} - {data.frontmatter.readingTime}
2020
</p>
@@ -31,7 +31,7 @@
3131
}
3232
3333
:global(.blog pre.code-highlight > .badge) {
34-
@apply absolute text-white right-3 px-2 py-1 bg-neutral-700 transition-opacity duration-500 opacity-0 font-sans text-sm font-extrabold uppercase;
34+
@apply absolute right-3 bg-neutral-700 px-2 py-1 font-sans text-sm font-extrabold text-white uppercase opacity-0 transition-opacity duration-500;
3535
}
3636
3737
:global(.blog pre.code-highlight:focus > .badge) {
@@ -47,7 +47,7 @@
4747
}
4848
4949
:global(.blog h2, .blog h3, .blog h4, .blog h5, .blog h6) {
50-
@apply font-black mb-2 mt-4;
50+
@apply mt-4 mb-2 font-black;
5151
}
5252
5353
:global(.blog h2) {

0 commit comments

Comments
 (0)