Skip to content

Commit 97e9f9c

Browse files
committed
rename to v-gsap // add playground to docs
1 parent 70de43d commit 97e9f9c

File tree

13 files changed

+1735
-49
lines changed

13 files changed

+1735
-49
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,15 @@
77
Install the module to your Nuxt application with one command:
88

99
```bash
10-
npx nuxi module add v-gsap-nuxt
10+
npx nuxi module add v-gsap
1111
```
1212

1313
That's it! You can now use My Module in your Nuxt app ✨
1414

1515
## Docs
1616

17-
1817
### Find the full docs and examples here: [Documentation](https://v-gsap-nuxt.vercel.app/)
1918

20-
2119
## Contribution
2220

2321
<details>

docs/assets/css/tailwind.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

docs/components/BoxComponent.vue

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<template>
2+
<div
3+
class="relative bg-white/5 border border-white/10 rounded-lg flex flex-col items-center justify-center gap-3 w-full aspect-[3/2]"
4+
:style="{ overflow: `${overflow}` }"
5+
>
6+
<slot />
7+
8+
<div class="Crosshair">
9+
<div
10+
class="Vertical absolute inset-y-0 left-1/2 translate-x-[-50%] w-[1px] bg-white/5 z-[-1]"
11+
/>
12+
<div
13+
class="Horizontal absolute inset-x-0 top-1/2 translate-y-[-50%] h-[1px] bg-white/5 z-[-1]"
14+
/>
15+
</div>
16+
17+
<div class="absolute top-2 left-4 text-white/80">
18+
<pre>title</pre>
19+
</div>
20+
21+
<button
22+
class="text-white/25 absolute bottom-2 inset-x-0 px-4 overflow-scroll text-[14px]"
23+
@click="copy(code)"
24+
>
25+
<pre v-html="code?.trim()" />
26+
</button>
27+
</div>
28+
</template>
29+
30+
<script setup lang="ts">
31+
withDefaults(
32+
defineProps<{
33+
title?: string
34+
crosshair?: boolean
35+
code?: string
36+
overflow?: string
37+
}>(),
38+
{
39+
crosshair: true,
40+
overflow: 'hidden',
41+
},
42+
)
43+
44+
function copy(code?: string) {
45+
if (!code) return
46+
navigator.clipboard.writeText(code)
47+
48+
alert('Copied to clipboard')
49+
}
50+
</script>

docs/components/DemoComponent.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<template>
2+
<button
3+
type="button"
4+
class="z-[999] text-white !bg-gradient-to-r to-green-600 from-green-700 shadow-2xl shadow-black font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 focus:outline-none"
5+
>
6+
Hello World
7+
</button>
8+
</template>

docs/content/0.index.md

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ main:
88

99
:ellipsis{right=0px width=75% blur=150px}
1010

11-
::block-hero
12-
---
11+
## ::block-hero
12+
1313
cta:
14-
- Get started
15-
- /installation/getting-started
16-
secondary:
17-
- Open on GitHub →
18-
- https://github.com/holux-design/v-gsap-nuxt
14+
15+
- Get started
16+
- /installation/getting-started
17+
secondary:
18+
- Open on GitHub →
19+
- https://github.com/holux-design/v-gsap-nuxt
20+
1921
---
2022

2123
#title
@@ -30,18 +32,24 @@ Write [GSAP](https://gsap.com/) Animations directly in your Nuxt Website as Dire
3032
```
3133

3234
#extra
33-
::list
34-
- **v-gsap** directive directly on elements
35-
- **Zero-Configuration** needed
36-
- **Readable** syntax
37-
- **Dumbed-down** predefined Animations
35+
::list
36+
37+
- **v-gsap** directive directly on elements
38+
- **Zero-Configuration** needed
39+
- **Readable** syntax
40+
- **Dumbed-down** predefined Animations
3841
::
3942

4043
#support
41-
::terminal
42-
---
43-
content:
44-
- npx nuxi module add v-gsap-nuxt
45-
---
46-
::
47-
::
44+
::terminal
45+
46+
---
47+
48+
content:
49+
50+
- npx nuxi module add v-gsap
51+
52+
---
53+
54+
::
55+
::
Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
11
# Getting Started
22

3-
`v-gsap-nuxt` is a batteries-included module for easy access to the power of GSAP
4-
3+
`v-gsap` is a batteries-included module for easy access to the power of GSAP
54

65
## Auto install
76

8-
97
```bash [npx]
10-
npx nuxi module add v-gsap-nuxt
8+
npx nuxi module add v-gsap
119
```
1210

13-
1411
## Install manually
1512

1613
1. Install from npm
1714

1815
::code-group
1916

20-
```bash [npm]
21-
npm i v-gsap-nuxt
22-
```
17+
```bash [npm]
18+
npm i v-gsap
19+
```
20+
2321
::
2422

2523
2. Add module to your `nuxt.config.ts`
2624

2725
::code-group
2826

29-
```ts [nuxt.config.ts]
30-
modules: [
31-
'v-gsap-nuxt'
32-
]
33-
```
34-
::
27+
```ts [nuxt.config.ts]
28+
modules: ["v-gsap"];
29+
```
30+
31+
::

docs/nuxt.config.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default defineNuxtConfig({
22
// https://github.com/nuxt-themes/docus
33
extends: ['@nuxt-themes/docus'],
44

5-
modules: [],
5+
modules: ['../src/module', '@nuxtjs/tailwindcss'],
66
devtools: { enabled: true },
77
compatibilityDate: '2024-10-24',
88

@@ -12,4 +12,18 @@ export default defineNuxtConfig({
1212
dir: '../.vercel/output',
1313
},
1414
},
15+
16+
vgsap: {
17+
presets: [
18+
{
19+
name: 'rotate',
20+
modifiers: 'inifinitely.to',
21+
value: {
22+
rotate: '360deg',
23+
ease: 'linear',
24+
duration: 10,
25+
},
26+
},
27+
],
28+
},
1529
})

0 commit comments

Comments
 (0)