mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
nostr plebs animation added
This commit is contained in:
@@ -5,6 +5,8 @@
|
|||||||
<div class="bg-21gray py-24 sm:py-32"
|
<div class="bg-21gray py-24 sm:py-32"
|
||||||
wire:ignore
|
wire:ignore
|
||||||
x-data="{
|
x-data="{
|
||||||
|
text: 'Animate',
|
||||||
|
char: -1,
|
||||||
width: '0',
|
width: '0',
|
||||||
loading: true,
|
loading: true,
|
||||||
loadingFollow: false,
|
loadingFollow: false,
|
||||||
@@ -55,6 +57,9 @@
|
|||||||
});
|
});
|
||||||
await ndkUser.fetchProfile();
|
await ndkUser.fetchProfile();
|
||||||
if (ndkUser.profile.image) {
|
if (ndkUser.profile.image) {
|
||||||
|
this.char = -1;
|
||||||
|
this.text = ndkUser.profile.name;
|
||||||
|
this.animate();
|
||||||
ndkUser.profile.npub = npub;
|
ndkUser.profile.npub = npub;
|
||||||
this.plebs.push(ndkUser);
|
this.plebs.push(ndkUser);
|
||||||
this.width = Math.round(counter / length * 100);
|
this.width = Math.round(counter / length * 100);
|
||||||
@@ -127,6 +132,16 @@
|
|||||||
window.$wireui.notify({title:'{{ __('Follow failed!') }}',icon:'error'});
|
window.$wireui.notify({title:'{{ __('Follow failed!') }}',icon:'error'});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
animate() {
|
||||||
|
let timer = setInterval(() => {
|
||||||
|
this.char++;
|
||||||
|
if (this.char == this.text.length) {
|
||||||
|
clearInterval(timer);
|
||||||
|
timer = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}, 50);
|
||||||
|
}
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="mx-auto grid max-w-7xl gap-y-20 gap-x-8 px-6 lg:px-8 xl:grid-cols-2">
|
<div class="mx-auto grid max-w-7xl gap-y-20 gap-x-8 px-6 lg:px-8 xl:grid-cols-2">
|
||||||
@@ -193,6 +208,10 @@
|
|||||||
<div
|
<div
|
||||||
x-show="loading"
|
x-show="loading"
|
||||||
class="relative block w-full rounded-lg border-2 border-dashed border-purple-300 p-12 text-center hover:border-purple-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
|
class="relative block w-full rounded-lg border-2 border-dashed border-purple-300 p-12 text-center hover:border-purple-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
|
||||||
|
<template x-for="(c, i) in text.split('')"><span
|
||||||
|
x-text="c"
|
||||||
|
class="opacity-0 transition ease-in text-2xl text-white"
|
||||||
|
:class="{'opacity-100':char>=i}"></span></template>
|
||||||
<div
|
<div
|
||||||
class="bg-purple-200 rounded h-6 mt-5"
|
class="bg-purple-200 rounded h-6 mt-5"
|
||||||
role="progressbar"
|
role="progressbar"
|
||||||
|
|||||||
@@ -6,14 +6,10 @@ export default defineConfig({
|
|||||||
plugins: [
|
plugins: [
|
||||||
viteStaticCopy({
|
viteStaticCopy({
|
||||||
targets: [
|
targets: [
|
||||||
{
|
// {
|
||||||
src: 'node_modules/disgus/dist/index.js',
|
// src: 'node_modules/js-confetti/dist/js-confetti.min.js',
|
||||||
dest: 'disgus/index.js'
|
// dest: 'js-confetti/js-confetti.min.js'
|
||||||
},
|
// }
|
||||||
{
|
|
||||||
src: 'node_modules/disgus/dist/style.css',
|
|
||||||
dest: 'disgus/style.js'
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
laravel({
|
laravel({
|
||||||
|
|||||||
@@ -3428,6 +3428,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"js-confetti@npm:^0.11.0":
|
||||||
|
version: 0.11.0
|
||||||
|
resolution: "js-confetti@npm:0.11.0"
|
||||||
|
checksum: 6bd280952842bb9cf0587042fe8f716423bc1e8a652145aeaefb68c70480be4477ae9ff556e569a7fa05763e8e24d0d2700d9cf88e7f210261e83069deb74dbf
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"js-tokens@npm:^4.0.0":
|
"js-tokens@npm:^4.0.0":
|
||||||
version: 4.0.0
|
version: 4.0.0
|
||||||
resolution: "js-tokens@npm:4.0.0"
|
resolution: "js-tokens@npm:4.0.0"
|
||||||
@@ -4925,6 +4932,7 @@ __metadata:
|
|||||||
"@tailwindcss/typography": ^0.5.0
|
"@tailwindcss/typography": ^0.5.0
|
||||||
alpinejs: ^3.0.6
|
alpinejs: ^3.0.6
|
||||||
autoprefixer: ^10.4.7
|
autoprefixer: ^10.4.7
|
||||||
|
js-confetti: ^0.11.0
|
||||||
laravel-echo: ^1.15.0
|
laravel-echo: ^1.15.0
|
||||||
laravel-vite-plugin: ^0.7.2
|
laravel-vite-plugin: ^0.7.2
|
||||||
leaflet.heat: ^0.2.0
|
leaflet.heat: ^0.2.0
|
||||||
|
|||||||
Reference in New Issue
Block a user