Skip to content

Commit a988f1f

Browse files
author
shdancer
committed
feat: finish celebration
1 parent baa065d commit a988f1f

Some content is hidden

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

47 files changed

+422
-92
lines changed

.vitepress/theme/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import './main.css'
22
import DefaultTheme from 'vitepress/theme'
3+
import 'element-plus/dist/index.css'
4+
import ElementPlus from 'element-plus'
35

46
let customRoutes = [{
57
"path": "/version",
@@ -32,6 +34,8 @@ export default {
3234
return false
3335
}
3436
}
37+
38+
app.use(ElementPlus)
3539
}
3640
}
3741
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
},
2727
"packageManager": "[email protected]+sha1.a58c038faac410c947dbdb93eb30994037d0fce2",
2828
"dependencies": {
29-
"@vueuse/core": "^13.1.0"
29+
"@vueuse/core": "^13.1.0",
30+
"element-plus": "^2.9.7"
3031
}
3132
}

pnpm-lock.yaml

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

src/celebration/gallery.md

Lines changed: 10 additions & 0 deletions

src/celebration/hole.md

Lines changed: 10 additions & 0 deletions

src/components/BlessingBar.vue

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { computed, onMounted, ref, watch } from 'vue';
2+
import { computed, ref } from 'vue';
33
import { useFetch } from '@vueuse/core';
44
55
const floorNumber = 114514
@@ -10,39 +10,47 @@ const positionString = computed(() => {
1010
return `${position.value}%`
1111
})
1212
13+
const stop = ref(false)
1314
14-
const { isFetching, error, data } = useFetch(`/api/floors/${floorNumber}/_special?order_by=id&size=100&sort=asc&offset=0`).get().json()
15+
16+
const { isFetching, error, data } = useFetch(`/api/floors/${floorNumber}/_special?order_by=like&size=100&sort=asc&offset=0`).get().json()
1517
1618
const messages: any = computed(() =>
1719
data.value?.map(item => ({
1820
content: item.content,
1921
name: item.anonyname,
20-
}))?.filter(item => !item.content.includes("!()")) ?? []
22+
}))?.filter(item => !item.content.includes("![]")) ?? []
2123
)
2224
const interval = setInterval(() => {
25+
if (stop.value) {
26+
return
27+
}
2328
position.value -= 0.003
2429
if (position.value > 100) {
2530
position.value = 0
2631
}
2732
}, 10)
2833
34+
function toHole() {
35+
window.location.href = "/celebration/hole"
36+
}
2937
3038
3139
</script>
3240

3341
<template>
3442
<div class="bg-gray-100 rounded-xl shadow-inner overflow-hidden p-3 flex ">
35-
<div class="flex items-center gap-4 flex-nowrap move">
36-
<div v-for="message in messages">
37-
<div class="flex text-nowrap">
38-
<b>
39-
{{ message.content }}
40-
</b>
41-
<i>
42-
by
43-
{{ message.name }}
44-
</i>
45-
</div>
43+
<div class="flex items-center gap-4 flex-nowrap move" @mouseenter="stop = true" @mouseleave="stop = false"
44+
@click="toHole">
45+
<div v-for="message in messages"
46+
class="flex text-nowrap pl-2 pr-2 p-1 shadow-md rounded-md hover:shadow-lg transition-all duration-300 ease-in-out hover:bg-gray-200 cursor-pointer">
47+
<b class="max-w-64 text-ellipsis overflow-hidden mr-2 inline-block">
48+
{{ message.content }}
49+
</b>
50+
<i>
51+
by
52+
{{ message.name }}
53+
</i>
4654
</div>
4755
</div>
4856

-1.14 MB
Binary file not shown.
-709 KB
Binary file not shown.
-797 KB
Binary file not shown.
-875 KB
Binary file not shown.

0 commit comments

Comments
 (0)