Skip to content

Commit 4e9a1bd

Browse files
committed
nuxt3 rewrite
1 parent 9f0d5d8 commit 4e9a1bd

File tree

264 files changed

+11745
-20040
lines changed

Some content is hidden

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

264 files changed

+11745
-20040
lines changed

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,5 @@ sw.*
9595
# Others
9696
.yarn
9797
.netlify
98+
.output
99+
.data

Diff for: .node-version

-1
This file was deleted.

Diff for: .npmrc

-2
This file was deleted.

Diff for: @types/runtimeConfig.d.ts

-20
This file was deleted.

Diff for: @types/vue.shim.d.ts

-4
This file was deleted.

Diff for: CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
<h1 align="center">eggsy.xyz Changelog</h1>
22

3+
## ⚠️ 7.0.0
4+
5+
Complete rewrite in Nuxt 3, updating all the modules and converting all code from Vue 2 to Vue 3.
6+
7+
**⚠️ Breaking Changes:**
8+
9+
- ❌ Daily songs page integration as well as Firebase related stuff are removed.
10+
311
## 6.0.0
412

513
Modernized layouts, pages, components, deleted bunch of unnecessary complications, simplified blog pages and revamped colors.

Diff for: app.vue

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<script setup lang="ts">
2+
const colorMode = useColorMode()
3+
4+
useHead(() => {
5+
let string = "eggsy.xyz"
6+
7+
return {
8+
titleTemplate: `%s - ${string}`,
9+
htmlAttrs: {
10+
class: `min-h-screen ${colorMode.preference} ${colorMode.value}`,
11+
},
12+
meta: [
13+
{
14+
hid: "og:site_name",
15+
name: "og:site_name",
16+
content: string,
17+
},
18+
],
19+
}
20+
})
21+
</script>
22+
23+
<template>
24+
<div class="min-h-screen bg-gray-50 dark:bg-neutral-900">
25+
<Navbar class="pt-10" />
26+
27+
<!-- Nuxt component -->
28+
<main class="responsive-screen min-h-screen pb-8">
29+
<NuxtLoadingIndicator />
30+
<NuxtPage />
31+
</main>
32+
33+
<!-- Footer -->
34+
<Footer />
35+
36+
<!-- Go to top button -->
37+
<GoTop />
38+
39+
<!-- Sponsor Popup -->
40+
<SponsorPopup />
41+
</div>
42+
</template>
File renamed without changes.

Diff for: assets/css/main.scss

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@use "body.scss";
2+
@use "scrollbar.scss";
3+
@use "transitions.scss";
File renamed without changes.

Diff for: src/stylesheets/modules/tippy.scss renamed to assets/css/modules/tippy.scss

+9-10
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
Author: Voknehzyr (@voknehzyr)
44
*/
55

6-
.tippy-tooltip.discord-theme {
6+
.tippy-box[data-theme~="discord"] {
77
background-color: black;
88
box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.5);
99
}
1010

11-
.tippy-tooltip[data-inertia][data-state="visible"] {
11+
.tippy-box[data-inertia][data-state="visible"] {
1212
transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
1313
}
1414

15-
.tippy-popper[x-placement^="top"] .tippy-tooltip[data-animation="discord-anim"] {
15+
.tippy-box[data-placement^="top"][data-animation="discord-anim"] {
1616
transform-origin: center !important;
1717

1818
&[data-state="hidden"] {
@@ -25,7 +25,7 @@
2525
}
2626
}
2727

28-
.tippy-popper[x-placement^="bottom"] .tippy-tooltip[data-animation="discord-anim"] {
28+
.tippy-box[data-placement^="bottom"][data-animation="discord-anim"] {
2929
&[data-state="hidden"] {
3030
opacity: 0;
3131
transform: scale(0.9) translateY(11px);
@@ -36,20 +36,19 @@
3636
}
3737
}
3838

39-
.tippy-popper[x-placement^="top"] .tippy-tooltip.discord-theme .tippy-arrow {
39+
.tippy-box[data-placement^="top"][data-theme~="discord"] .tippy-arrow {
4040
border-top-color: black;
4141
filter: drop-shadow(0 2px 16px 0 rgba(0, 0, 0, 0.5));
4242
}
4343

44-
.tippy-popper[x-placement^="bottom"] .tippy-tooltip.discord-theme .tippy-arrow {
44+
.tippy-box[data-placement^="bottom"][data-theme~="discord"] .tippy-arrow {
4545
border-bottom-color: black;
4646
filter: drop-shadow(0 2px 16px 0 rgba(0, 0, 0, 0.5));
4747
}
4848

49-
.tippy-tooltip.discord-theme .tippy-content {
50-
font-family: "Inter", sans-serif;
51-
padding: 1.5px 4px;
52-
color: rgba(255, 255, 255, 0.95);
49+
.tippy-box[data-theme~="discord"] .tippy-content {
50+
padding: 4px 8px;
51+
color: rgba(255, 255, 255, 0.95) !important;
5352
font-weight: 500;
5453
letter-spacing: 0.4px;
5554
font-size: 0.965em;
File renamed without changes.

Diff for: assets/css/tailwind.css

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
@layer base {
6+
.responsive-screen {
7+
@apply max-w-screen-lg mx-auto px-6 md:px-0;
8+
}
9+
}
10+
11+
@layer components {
12+
.card-base {
13+
@apply border-[0.1px] p-4 bg-neutral-100 hover:bg-neutral-200/40 border-neutral-200 transition-colors dark:bg-neutral-800/30 dark:border-neutral-800/80 dark:hover:bg-neutral-800/40 dark:text-white/80 dark:hover:text-white;
14+
}
15+
16+
.focus-ring {
17+
@apply ring-offset-2 focus:outline-none focus:ring-1 ring-offset-gray-50 ring-gray-300 dark:ring-offset-neutral-900 dark:ring-neutral-800 dark:focus:ring-offset-neutral-900 dark:focus:ring-neutral-800;
18+
}
19+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: components/Blog/ImageContainer.vue

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<div class="flex flex-col gap-2 md:grid md:grid-flow-col md:auto-cols-fr">
3+
<slot />
4+
</div>
5+
</template>

Diff for: components/Blog/Notification.vue

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<script setup lang="ts">
2+
interface Props {
3+
type?: string
4+
title?: string
5+
}
6+
7+
const props = withDefaults(defineProps<Props>(), {
8+
type: "information",
9+
title: "",
10+
})
11+
12+
const getIcon = computed(() => {
13+
if (props.type === "warning") return "❗️"
14+
else if (props.type === "danger") return "🚨"
15+
else if (props.type === "success") return ""
16+
else return "💡"
17+
})
18+
</script>
19+
20+
<template>
21+
<div
22+
class="notification flex flex-col md:items-center md:flex-row gap-x-4 gap-y-2"
23+
:class="type"
24+
>
25+
<span class="text-xl md:text-lg">{{ getIcon }}</span>
26+
27+
<div>
28+
<h1 v-if="title">{{ title }}</h1>
29+
30+
<p v-if="!!$slots.default">
31+
<slot />
32+
</p>
33+
</div>
34+
</div>
35+
</template>
36+
37+
<style lang="scss" scoped>
38+
.notification,
39+
.nuxt-content .notification {
40+
@apply rounded-lg border-[0.1px] my-5 p-4 bg-opacity-25 bg-neutral-300 border-neutral-200 dark:bg-neutral-800/30 dark:border-neutral-800;
41+
42+
h1 {
43+
@apply font-medium text-lg m-0 hover:no-underline;
44+
}
45+
46+
p,
47+
p strong,
48+
a {
49+
@apply m-0 dark:text-white/70;
50+
}
51+
52+
a {
53+
@apply font-medium text-current underline hover:underline;
54+
}
55+
}
56+
</style>

Diff for: components/Blog/PrevNext.vue

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<script setup lang="ts">
2+
import { SmartLink } from "#components"
3+
4+
interface Props {
5+
path: string
6+
}
7+
8+
const props = defineProps<Props>()
9+
10+
const { data: surroundPosts, status } = await useAsyncData(
11+
`${props.path}-surround`,
12+
() => {
13+
return queryCollectionItemSurroundings("posts", props.path).order(
14+
"createdAt",
15+
"DESC",
16+
)
17+
},
18+
)
19+
20+
const prev = computed(() => surroundPosts.value?.[0] || null)
21+
const next = computed(() => surroundPosts.value?.[1] || null)
22+
</script>
23+
24+
<template>
25+
<Transition name="fade" mode="out-in">
26+
<div
27+
v-if="status !== 'pending'"
28+
class="grid gap-x-4 gap-y-2 grid-cols-1 md:grid-cols-2"
29+
>
30+
<Component
31+
:is="prev ? SmartLink : 'div'"
32+
:href="prev && prev.path"
33+
class="rounded-lg card-base flex items-center space-x-2"
34+
:class="
35+
!prev
36+
? 'cursor-not-allowed'
37+
: 'dark:hover:text-white hover:bg-opacity-40'
38+
"
39+
>
40+
<Icon name="heroicons:chevron-left" class="h-4 w-4 flex-shrink-0" />
41+
42+
<span v-if="prev" class="truncate">{{ prev.title }}</span>
43+
<span v-else class="truncate">Eski Gönderi Yok</span>
44+
</Component>
45+
46+
<Component
47+
:is="next ? SmartLink : 'div'"
48+
:href="next && next.path"
49+
:class="[
50+
'rounded-lg card-base flex items-center space-x-2 justify-end',
51+
!next
52+
? 'cursor-not-allowed'
53+
: 'dark:hover:text-white hover:bg-opacity-40',
54+
]"
55+
>
56+
<span v-if="next" class="truncate">{{ next.title }}</span>
57+
<span v-else class="truncate">Yeni Gönderi Yok</span>
58+
59+
<Icon name="heroicons:chevron-right" class="h-4 w-4 flex-shrink-0" />
60+
</Component>
61+
</div>
62+
</Transition>
63+
</template>
File renamed without changes.

0 commit comments

Comments
 (0)