From d0b1a02d306ad11ebfdefcc015c7f0060b262340 Mon Sep 17 00:00:00 2001 From: Utkarsh-Singhal-26 Date: Thu, 21 Aug 2025 18:38:38 +0530 Subject: [PATCH 1/2] Added Background --- src/constants/Categories.ts | 3 +- src/constants/Components.ts | 1 + src/constants/code/Backgrounds/prismCode.ts | 10 + src/content/Backgrounds/Prism/Prism.vue | 459 ++++++++++++++++++++ src/demo/Backgrounds/PrismDemo.vue | 174 ++++++++ 5 files changed, 646 insertions(+), 1 deletion(-) create mode 100644 src/constants/code/Backgrounds/prismCode.ts create mode 100644 src/content/Backgrounds/Prism/Prism.vue create mode 100644 src/demo/Backgrounds/PrismDemo.vue diff --git a/src/constants/Categories.ts b/src/constants/Categories.ts index af8a54e..da10bcc 100644 --- a/src/constants/Categories.ts +++ b/src/constants/Categories.ts @@ -1,5 +1,5 @@ // Highlighted sidebar items -export const NEW = ['Target Cursor', 'Ripple Grid', 'Magic Bento', 'Galaxy', 'Text Type', 'Glass Surface', 'Sticker Peel', 'Scroll Stack', 'Faulty Terminal', 'Pill Nav', 'Card Nav', 'Logo Loop']; +export const NEW = ['Prism', 'Target Cursor', 'Ripple Grid', 'Magic Bento', 'Galaxy', 'Glass Surface', 'Sticker Peel', 'Scroll Stack', 'Faulty Terminal', 'Pill Nav', 'Card Nav', 'Logo Loop']; export const UPDATED = []; // Used for main sidebar navigation @@ -95,6 +95,7 @@ export const CATEGORIES = [ { name: 'Backgrounds', subcategories: [ + 'Prism', 'Aurora', 'Beams', 'Dark Veil', diff --git a/src/constants/Components.ts b/src/constants/Components.ts index d3658e7..2e7535c 100644 --- a/src/constants/Components.ts +++ b/src/constants/Components.ts @@ -105,6 +105,7 @@ const backgrounds = { 'galaxy': () => import('../demo/Backgrounds/GalaxyDemo.vue'), 'faulty-terminal': () => import('../demo/Backgrounds/FaultyTerminalDemo.vue'), 'light-rays': () => import('../demo/Backgrounds/LightRaysDemo.vue'), + 'prism': () => import('../demo/Backgrounds/PrismDemo.vue'), }; export const componentMap = { diff --git a/src/constants/code/Backgrounds/prismCode.ts b/src/constants/code/Backgrounds/prismCode.ts new file mode 100644 index 0000000..741bd49 --- /dev/null +++ b/src/constants/code/Backgrounds/prismCode.ts @@ -0,0 +1,10 @@ +import code from '@content/Backgrounds/Prism/Prism.vue?raw'; +import { createCodeObject } from '../../../types/code'; + +export const prism = createCodeObject(code, 'Backgrounds/Prism', { + installation: `npm install ogl`, + usage: ` +` +}); diff --git a/src/content/Backgrounds/Prism/Prism.vue b/src/content/Backgrounds/Prism/Prism.vue new file mode 100644 index 0000000..f33ab11 --- /dev/null +++ b/src/content/Backgrounds/Prism/Prism.vue @@ -0,0 +1,459 @@ + + + diff --git a/src/demo/Backgrounds/PrismDemo.vue b/src/demo/Backgrounds/PrismDemo.vue new file mode 100644 index 0000000..16b553a --- /dev/null +++ b/src/demo/Backgrounds/PrismDemo.vue @@ -0,0 +1,174 @@ + + + + + From 66f32ab73617e55866990a068a122d04e89f0ed7 Mon Sep 17 00:00:00 2001 From: Utkarsh-Singhal-26 Date: Thu, 21 Aug 2025 18:41:16 +0530 Subject: [PATCH 2/2] Added Prism Usage --- src/constants/code/Backgrounds/prismCode.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/constants/code/Backgrounds/prismCode.ts b/src/constants/code/Backgrounds/prismCode.ts index 741bd49..f620522 100644 --- a/src/constants/code/Backgrounds/prismCode.ts +++ b/src/constants/code/Backgrounds/prismCode.ts @@ -3,7 +3,22 @@ import { createCodeObject } from '../../../types/code'; export const prism = createCodeObject(code, 'Backgrounds/Prism', { installation: `npm install ogl`, - usage: ` + usage: ` + `