{
if (!parent) return
const dpr = window.devicePixelRatio || 1
- const rect = parent.getBoundingClientRect()
+
+ const parentWidth = parent.parentElement?.offsetWidth || parent.offsetWidth || window.innerWidth
+ const parentHeight = parent.parentElement?.offsetHeight || parent.offsetHeight || window.innerHeight
+
+ const width = Math.max(parentWidth, 300)
+ const height = Math.max(parentHeight, 300)
- canvas.width = rect.width * dpr
- canvas.height = rect.height * dpr
+ canvas.width = width * dpr
+ canvas.height = height * dpr
- canvas.style.width = `${rect.width}px`
- canvas.style.height = `${rect.height}px`
+ canvas.style.width = `${width}px`
+ canvas.style.height = `${height}px`
if (context.value) {
context.value.setTransform(dpr, 0, 0, dpr, 0, 0)
}
- const { columns, rows } = calculateGrid(rect.width, rect.height)
+ const { columns, rows } = calculateGrid(width, height)
initializeLetters(columns, rows)
drawLetters()
}
@@ -243,4 +248,22 @@ watch([() => props.glitchSpeed, () => props.smooth], () => {
}
animate()
})
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/src/content/Backgrounds/Lightning/Lightning.vue b/src/content/Backgrounds/Lightning/Lightning.vue
index efbecf4..5663561 100644
--- a/src/content/Backgrounds/Lightning/Lightning.vue
+++ b/src/content/Backgrounds/Lightning/Lightning.vue
@@ -1,5 +1,5 @@
-
+
+
+
diff --git a/src/content/Backgrounds/Particles/Particles.vue b/src/content/Backgrounds/Particles/Particles.vue
index 991a1a9..4483af7 100644
--- a/src/content/Backgrounds/Particles/Particles.vue
+++ b/src/content/Backgrounds/Particles/Particles.vue
@@ -1,5 +1,5 @@
-
+
+
+
diff --git a/src/content/Backgrounds/Silk/Silk.vue b/src/content/Backgrounds/Silk/Silk.vue
index 93a9d26..f52585b 100644
--- a/src/content/Backgrounds/Silk/Silk.vue
+++ b/src/content/Backgrounds/Silk/Silk.vue
@@ -125,8 +125,28 @@ const initSilk = () => {
const resize = () => {
if (!container || !camera) return
- const width = container.offsetWidth
- const height = container.offsetHeight
+
+ let width = container.offsetWidth
+ let height = container.offsetHeight
+
+ let parent = container.parentElement
+ while (parent && (!width || !height)) {
+ if (parent.offsetWidth && parent.offsetHeight) {
+ width = parent.offsetWidth
+ height = parent.offsetHeight
+ break
+ }
+ parent = parent.parentElement
+ }
+
+ if (!width || !height) {
+ width = window.innerWidth
+ height = window.innerHeight
+ }
+
+ width = Math.max(width, 300)
+ height = Math.max(height, 300)
+
renderer!.setSize(width, height)
camera.perspective({ aspect: width / height })
@@ -168,6 +188,10 @@ const initSilk = () => {
gl.canvas.style.width = '100%'
gl.canvas.style.height = '100%'
gl.canvas.style.display = 'block'
+ gl.canvas.style.position = 'absolute'
+ gl.canvas.style.top = '0'
+ gl.canvas.style.left = '0'
+ gl.canvas.style.zIndex = '1'
let lastTime = 0
const update = (t: number) => {
@@ -230,3 +254,20 @@ watch(
() => {}
)
+
+
diff --git a/src/css/base.css b/src/css/base.css
index 17a1520..c7a57a9 100644
--- a/src/css/base.css
+++ b/src/css/base.css
@@ -27,4 +27,42 @@ body {
.back-to-top {
background: #0b0b0b !important;
border: 1px solid #142216;
+}
+
+/* Mobile toast container fixes */
+@media (max-width: 640px) {
+ .p-toast {
+ position: fixed !important;
+ bottom: 1rem !important;
+ right: 1rem !important;
+ left: 1rem !important;
+ width: auto !important;
+ max-width: calc(100vw - 2rem) !important;
+ }
+
+ .p-toast-message {
+ max-width: 100% !important;
+ min-width: unset !important;
+ width: 100% !important;
+ margin: 0 !important;
+ font-size: 0.875rem !important;
+ padding: 0.75rem !important;
+ box-sizing: border-box !important;
+ }
+
+ .p-toast-message-content {
+ padding: 0.5rem !important;
+ gap: 0.5rem !important;
+ }
+
+ .p-toast-message-text {
+ word-wrap: break-word !important;
+ overflow-wrap: break-word !important;
+ hyphens: auto !important;
+ }
+
+ .p-toast-message-summary {
+ font-size: 0.875rem !important;
+ line-height: 1.25 !important;
+ }
}
\ No newline at end of file
diff --git a/src/demo/Animations/AnimatedContentDemo.vue b/src/demo/Animations/AnimatedContentDemo.vue
index 2928401..799c811 100644
--- a/src/demo/Animations/AnimatedContentDemo.vue
+++ b/src/demo/Animations/AnimatedContentDemo.vue
@@ -5,7 +5,7 @@
-
+
console.log('✅ Animation Complete!')">
diff --git a/src/demo/Backgrounds/AuroraDemo.vue b/src/demo/Backgrounds/AuroraDemo.vue
index 5e5c722..83a6abb 100644
--- a/src/demo/Backgrounds/AuroraDemo.vue
+++ b/src/demo/Backgrounds/AuroraDemo.vue
@@ -4,7 +4,7 @@
+ :intensity="intensity" class="w-full" />
diff --git a/src/demo/Backgrounds/LetterGlitchDemo.vue b/src/demo/Backgrounds/LetterGlitchDemo.vue
index e8edcd0..bb75061 100644
--- a/src/demo/Backgrounds/LetterGlitchDemo.vue
+++ b/src/demo/Backgrounds/LetterGlitchDemo.vue
@@ -10,7 +10,7 @@
:center-vignette="showCenterVignette"
:outer-vignette="showOuterVignette"
:smooth="smooth"
- class="w-full h-96"
+ class="w-full h-full"
/>
diff --git a/src/demo/Backgrounds/LightningDemo.vue b/src/demo/Backgrounds/LightningDemo.vue
index e69c0dc..084a571 100644
--- a/src/demo/Backgrounds/LightningDemo.vue
+++ b/src/demo/Backgrounds/LightningDemo.vue
@@ -4,7 +4,7 @@
+ :size="size" class="w-full h-full" />
diff --git a/src/demo/Backgrounds/ParticlesDemo.vue b/src/demo/Backgrounds/ParticlesDemo.vue
index 6db089a..0bf30b4 100644
--- a/src/demo/Backgrounds/ParticlesDemo.vue
+++ b/src/demo/Backgrounds/ParticlesDemo.vue
@@ -6,7 +6,7 @@
+ :disable-rotation="disableRotation" class="w-full h-full" />
diff --git a/src/demo/Backgrounds/SilkDemo.vue b/src/demo/Backgrounds/SilkDemo.vue
index 1dc9001..8be0cd5 100644
--- a/src/demo/Backgrounds/SilkDemo.vue
+++ b/src/demo/Backgrounds/SilkDemo.vue
@@ -4,7 +4,7 @@
+ class="w-full h-full" />
diff --git a/src/demo/Backgrounds/WavesDemo.vue b/src/demo/Backgrounds/WavesDemo.vue
index 7e5a3ed..ba87eee 100644
--- a/src/demo/Backgrounds/WavesDemo.vue
+++ b/src/demo/Backgrounds/WavesDemo.vue
@@ -3,7 +3,7 @@
-
+
diff --git a/src/demo/Components/CardSwapDemo.vue b/src/demo/Components/CardSwapDemo.vue
index b549d46..f52ceec 100644
--- a/src/demo/Components/CardSwapDemo.vue
+++ b/src/demo/Components/CardSwapDemo.vue
@@ -14,7 +14,7 @@
-
+
diff --git a/src/pages/LandingPage.vue b/src/pages/LandingPage.vue
index 8b200ea..187dfe3 100644
--- a/src/pages/LandingPage.vue
+++ b/src/pages/LandingPage.vue
@@ -1,7 +1,12 @@
-
-
+
+
@@ -19,6 +24,7 @@ import PlasmaWave from '@/components/landing/PlasmaWave/PlasmaWave.vue'
import Footer from '@/components/landing/Footer/Footer.vue'
import FeatureCards from '@/components/landing/FeatureCards/FeatureCards.vue'
import StartBuilding from '@/components/landing/StartBuilding/StartBuilding.vue'
+import heroImage from '@/assets/common/hero.webp'
const isMobile = ref(false)
const checkIsMobile = () => {