Skip to content

Commit 37d3c87

Browse files
committed
style: 🎨 format with prettier
1 parent 89cf4a0 commit 37d3c87

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+368
-313
lines changed

app.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const isDark = usePreferredDark();
4949
/>
5050
</Head>
5151

52-
<Body class="bg-black text-white overscroll-none" />
52+
<Body class="overscroll-none bg-black text-white" />
5353

5454
<VitePwaManifest />
5555
<NuxtLoadingIndicator />

assets/css/tailwind.css

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,78 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4-
4+
55
@layer base {
66
:root {
77
--background: 0 0% 100%;
88
--foreground: 240 10% 3.9%;
9-
9+
1010
--muted: 240 4.8% 95.9%;
1111
--muted-foreground: 240 3.8% 46.1%;
12-
12+
1313
--popover: 0 0% 100%;
1414
--popover-foreground: 240 10% 3.9%;
15-
15+
1616
--card: 0 0% 100%;
1717
--card-foreground: 240 10% 3.9%;
18-
18+
1919
--border: 240 5.9% 90%;
2020
--input: 240 5.9% 90%;
21-
21+
2222
--primary: 240 5.9% 10%;
2323
--primary-foreground: 0 0% 98%;
24-
24+
2525
--secondary: 240 4.8% 95.9%;
2626
--secondary-foreground: 240 5.9% 10%;
27-
27+
2828
--accent: 240 4.8% 95.9%;
2929
--accent-foreground: 240 5.9% 10%;
30-
30+
3131
--destructive: 0 84.2% 60.2%;
3232
--destructive-foreground: 0 0% 98%;
33-
33+
3434
--ring: 240 10% 3.9%;
35-
35+
3636
--radius: 0.5rem;
3737
}
38-
38+
3939
.dark {
4040
--background: 240 10% 3.9%;
4141
--foreground: 0 0% 98%;
42-
42+
4343
--muted: 240 3.7% 15.9%;
4444
--muted-foreground: 240 5% 64.9%;
45-
45+
4646
--popover: 240 10% 3.9%;
4747
--popover-foreground: 0 0% 98%;
48-
48+
4949
--card: 240 10% 3.9%;
5050
--card-foreground: 0 0% 98%;
51-
51+
5252
--border: 240 3.7% 15.9%;
5353
--input: 240 3.7% 15.9%;
54-
54+
5555
--primary: 0 0% 98%;
5656
--primary-foreground: 240 5.9% 10%;
57-
57+
5858
--secondary: 240 3.7% 15.9%;
5959
--secondary-foreground: 0 0% 98%;
60-
60+
6161
--accent: 240 3.7% 15.9%;
6262
--accent-foreground: 0 0% 98%;
63-
63+
6464
--destructive: 0 62.8% 30.6%;
6565
--destructive-foreground: 0 0% 98%;
66-
66+
6767
--ring: 240 4.9% 83.9%;
6868
}
6969
}
70-
70+
7171
@layer base {
7272
* {
7373
@apply border-border;
7474
}
7575
body {
7676
@apply bg-background text-foreground;
7777
}
78-
}
78+
}

components.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
"components": "@/components",
1414
"utils": "@/lib/utils"
1515
}
16-
}
16+
}

components/MyPost.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const props = defineProps<Props>();
1212
const sortedPosts = computed(() =>
1313
props.posts.toSorted((a, b) => {
1414
return new Date(b.postedAt).getTime() - new Date(a.postedAt).getTime();
15-
})
15+
}),
1616
);
1717
1818
const api = ref<CarouselApi>();
@@ -39,7 +39,7 @@ const currentPost = computed(() => sortedPosts.value[current.value - 1]);
3939
const timeAgo = useTimeAgo(currentPost.value.postedAt);
4040
const lateDuration = useLateDuration(
4141
new Date(currentPost.value.takenAt),
42-
currentPost.value.lateInSeconds
42+
currentPost.value.lateInSeconds,
4343
);
4444
</script>
4545

@@ -66,18 +66,18 @@ const lateDuration = useLateDuration(
6666
<RealMojis
6767
v-if="currentPost.realMojis.length"
6868
:real-mojis="currentPost.realMojis"
69-
class="-mt-4 justify-center z-10"
69+
class="z-10 -mt-4 justify-center"
7070
size="xs"
7171
/>
7272

7373
<p
7474
v-if="currentPost?.caption"
75-
class="text-md mt-3 md:mt-4 px-3 font-medium sm:mt-2 text-center text-balance select-text"
75+
class="text-md mt-3 select-text text-balance px-3 text-center font-medium sm:mt-2 md:mt-4"
7676
>
7777
{{ currentPost.caption }}
7878
</p>
7979

80-
<p v-else class="text-md mt-3 md:mt-4 px-3 font-medium sm:mt-2 text-center">
80+
<p v-else class="text-md mt-3 px-3 text-center font-medium sm:mt-2 md:mt-4">
8181
Add a caption...
8282
</p>
8383

components/RealMojis.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ withDefaults(defineProps<Props>(), {
1616
<Avatar
1717
v-for="realMoji in realMojis.slice(0, 5)"
1818
:key="realMoji.id"
19-
class="ring-2 ring-black -mr-1"
19+
class="-mr-1 ring-2 ring-black"
2020
:size="size"
2121
>
2222
<AvatarImage :src="realMoji.media.url" :alt="realMoji.user.username" />

components/post/Post.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const props = defineProps<Props>();
1313
const sortedPosts = computed(() =>
1414
props.posts.toSorted((a, b) => {
1515
return new Date(b.postedAt).getTime() - new Date(a.postedAt).getTime();
16-
})
16+
}),
1717
);
1818

1919
const api = ref<CarouselApi>();
@@ -67,7 +67,7 @@ const currentPost = computed(() => sortedPosts.value[current.value - 1]);
6767
</Carousel>
6868
</div>
6969

70-
<div v-if="posts.length > 1" class="flex justify-center text-xl -mb-2">
70+
<div v-if="posts.length > 1" class="-mb-2 flex justify-center text-xl">
7171
<span v-for="i in totalCount" :key="i">
7272
<span
7373
class="cursor-pointer"

components/post/PostBody.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ useDraggable(secondaryEl, {
8181

8282
<template>
8383
<div class="relative w-screen max-w-full">
84-
<AspectRatio :ratio="3 / 4" class="relative bg-zinc-900 rounded-xl">
84+
<AspectRatio :ratio="3 / 4" class="relative rounded-xl bg-zinc-900">
8585
<Transition>
8686
<img
8787
ref="primaryEl"
8888
:key="imageSrc"
8989
:src="imageSrc"
90-
class="absolute rounded-xl h-full w-full"
90+
class="absolute h-full w-full rounded-xl"
9191
:alt="alt(!isSecondaryLarge)"
9292
loading="lazy"
9393
:width="primary.width"
@@ -98,7 +98,7 @@ useDraggable(secondaryEl, {
9898

9999
<div
100100
ref="secondaryEl"
101-
class="absolute top-0 left-0 mx-3 mt-3 w-1/3 rounded-xl bg-zinc-800"
101+
class="absolute left-0 top-0 mx-3 mt-3 w-1/3 rounded-xl bg-zinc-800"
102102
draggable
103103
@click="isSecondaryLarge = !isSecondaryLarge"
104104
>

components/post/PostFooter.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ defineProps<Props>();
1313

1414
<NuxtLink
1515
v-if="!hideComments"
16-
class="text-sm block px-4 text-gray-400 mt-2"
16+
class="mt-2 block px-4 text-sm text-gray-400"
1717
:class="{ 'mt-0.5': caption }"
1818
to="/"
1919
>

components/post/PostHeader.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const props = defineProps<{
1111
const timeAgo = useTimeAgo(props.post.takenAt);
1212
const lateDuration = useLateDuration(
1313
new Date(props.post.takenAt),
14-
props.post.lateInSeconds
14+
props.post.lateInSeconds,
1515
);
1616
1717
// share

components/ui/aspect-ratio/AspectRatio.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
2-
import { AspectRatio, type AspectRatioProps } from 'radix-vue'
2+
import { AspectRatio, type AspectRatioProps } from "radix-vue";
33
4-
const props = defineProps<AspectRatioProps>()
4+
const props = defineProps<AspectRatioProps>();
55
</script>
66

77
<template>

components/ui/aspect-ratio/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { default as AspectRatio } from './AspectRatio.vue'
1+
export { default as AspectRatio } from "./AspectRatio.vue";

components/ui/avatar/Avatar.vue

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<script setup lang="ts">
2-
import { AvatarRoot } from 'radix-vue'
3-
import { avatarVariant } from '.'
4-
import { cn } from '@/lib/utils'
2+
import { AvatarRoot } from "radix-vue";
3+
import { avatarVariant } from ".";
4+
import { cn } from "@/lib/utils";
55
66
interface Props {
7-
size?: NonNullable<Parameters<typeof avatarVariant>[0]>['size']
8-
shape?: NonNullable<Parameters<typeof avatarVariant>[0]>['shape']
9-
class?: string
7+
size?: NonNullable<Parameters<typeof avatarVariant>[0]>["size"];
8+
shape?: NonNullable<Parameters<typeof avatarVariant>[0]>["shape"];
9+
class?: string;
1010
}
1111
1212
const props = withDefaults(defineProps<Props>(), {
13-
size: 'sm',
14-
shape: 'circle',
15-
})
13+
size: "sm",
14+
shape: "circle",
15+
});
1616
</script>
1717

1818
<template>

components/ui/avatar/AvatarFallback.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
2-
import { AvatarFallback, type AvatarFallbackProps } from 'radix-vue'
2+
import { AvatarFallback, type AvatarFallbackProps } from "radix-vue";
33
4-
const props = defineProps<AvatarFallbackProps>()
4+
const props = defineProps<AvatarFallbackProps>();
55
</script>
66

77
<template>

components/ui/avatar/AvatarImage.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
2-
import { AvatarImage, type AvatarImageProps } from 'radix-vue'
2+
import { AvatarImage, type AvatarImageProps } from "radix-vue";
33
4-
const props = defineProps<AvatarImageProps>()
4+
const props = defineProps<AvatarImageProps>();
55
</script>
66

77
<template>

components/ui/avatar/index.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { cva } from 'class-variance-authority'
1+
import { cva } from "class-variance-authority";
22

3-
export { default as Avatar } from './Avatar.vue'
4-
export { default as AvatarImage } from './AvatarImage.vue'
5-
export { default as AvatarFallback } from './AvatarFallback.vue'
3+
export { default as Avatar } from "./Avatar.vue";
4+
export { default as AvatarImage } from "./AvatarImage.vue";
5+
export { default as AvatarFallback } from "./AvatarFallback.vue";
66

77
export const avatarVariant = cva(
8-
'inline-flex items-center justify-center font-semibold text-foreground select-none shrink-0 bg-secondary overflow-hidden',
8+
"inline-flex items-center justify-center font-semibold text-foreground select-none shrink-0 bg-secondary overflow-hidden",
99
{
1010
variants: {
1111
size: {
@@ -19,5 +19,5 @@ export const avatarVariant = cva(
1919
square: "rounded-md",
2020
},
2121
},
22-
}
22+
},
2323
);

components/ui/button/Button.vue

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<script setup lang="ts">
2-
import { Primitive, type PrimitiveProps } from 'radix-vue'
3-
import { buttonVariants } from '.'
4-
import { cn } from '@/lib/utils'
2+
import { Primitive, type PrimitiveProps } from "radix-vue";
3+
import { buttonVariants } from ".";
4+
import { cn } from "@/lib/utils";
55
66
interface Props extends PrimitiveProps {
7-
variant?: NonNullable<Parameters<typeof buttonVariants>[0]>['variant']
8-
size?: NonNullable<Parameters<typeof buttonVariants>[0]>['size']
9-
as?: string
7+
variant?: NonNullable<Parameters<typeof buttonVariants>[0]>["variant"];
8+
size?: NonNullable<Parameters<typeof buttonVariants>[0]>["size"];
9+
as?: string;
1010
}
1111
1212
withDefaults(defineProps<Props>(), {
13-
as: 'button',
14-
})
13+
as: "button",
14+
});
1515
</script>
1616

1717
<template>

components/ui/button/index.ts

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
import { cva } from 'class-variance-authority'
1+
import { cva } from "class-variance-authority";
22

3-
export { default as Button } from './Button.vue'
3+
export { default as Button } from "./Button.vue";
44

55
export const buttonVariants = cva(
6-
'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
6+
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
77
{
88
variants: {
99
variant: {
10-
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
10+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
1111
destructive:
12-
'bg-destructive text-destructive-foreground hover:bg-destructive/90',
12+
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
1313
outline:
14-
'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
14+
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
1515
secondary:
16-
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
17-
ghost: 'hover:bg-accent hover:text-accent-foreground',
18-
link: 'text-primary underline-offset-4 hover:underline',
16+
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
17+
ghost: "hover:bg-accent hover:text-accent-foreground",
18+
link: "text-primary underline-offset-4 hover:underline",
1919
},
2020
size: {
21-
default: 'h-10 px-4 py-2',
22-
sm: 'h-9 rounded-md px-3',
23-
lg: 'h-11 rounded-md px-8',
24-
icon: 'h-10 w-10',
21+
default: "h-10 px-4 py-2",
22+
sm: "h-9 rounded-md px-3",
23+
lg: "h-11 rounded-md px-8",
24+
icon: "h-10 w-10",
2525
},
2626
},
2727
defaultVariants: {
28-
variant: 'default',
29-
size: 'default',
28+
variant: "default",
29+
size: "default",
3030
},
3131
},
32-
)
32+
);

0 commit comments

Comments
 (0)