@nuxtify/pages 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +203 -0
- package/dist/module.cjs +5 -0
- package/dist/module.d.mts +139 -0
- package/dist/module.d.ts +139 -0
- package/dist/module.json +13 -0
- package/dist/module.mjs +138 -0
- package/dist/runtime/components/EmailSubscribeForm.vue +215 -0
- package/dist/runtime/components/FooterCallToAction.vue +38 -0
- package/dist/runtime/components/app/AppAnnouncementBar.vue +40 -0
- package/dist/runtime/components/app/AppBar.vue +128 -0
- package/dist/runtime/components/app/AppDialog.vue +40 -0
- package/dist/runtime/components/app/AppFooter.vue +150 -0
- package/dist/runtime/components/app/AppLoading.vue +16 -0
- package/dist/runtime/components/app/AppLogo.vue +55 -0
- package/dist/runtime/components/app/AppNavigationDrawer.vue +101 -0
- package/dist/runtime/components/app/AppToast.vue +18 -0
- package/dist/runtime/composables/dialog.d.ts +13 -0
- package/dist/runtime/composables/dialog.js +15 -0
- package/dist/runtime/composables/nuxtify.d.ts +2 -0
- package/dist/runtime/composables/nuxtify.js +2 -0
- package/dist/runtime/composables/state.d.ts +15 -0
- package/dist/runtime/composables/state.js +10 -0
- package/dist/runtime/layouts/DefaultLayout.vue +33 -0
- package/dist/runtime/pages/DynamicSlug.vue +23 -0
- package/dist/runtime/pages/IndexPage.vue +23 -0
- package/dist/runtime/server/composables/client.d.ts +1 -0
- package/dist/runtime/server/composables/client.js +1 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/server/utils/client.d.ts +1 -0
- package/dist/runtime/server/utils/client.js +1 -0
- package/dist/runtime/utils/email.d.ts +5 -0
- package/dist/runtime/utils/email.js +26 -0
- package/dist/runtime/utils/formRules.d.ts +18 -0
- package/dist/runtime/utils/formRules.js +22 -0
- package/dist/runtime/utils/icons.d.ts +1 -0
- package/dist/runtime/utils/icons.js +1 -0
- package/dist/runtime/utils/io.d.ts +2 -0
- package/dist/runtime/utils/io.js +19 -0
- package/dist/runtime/utils/math.d.ts +2 -0
- package/dist/runtime/utils/math.js +13 -0
- package/dist/runtime/utils/text.d.ts +23 -0
- package/dist/runtime/utils/text.js +159 -0
- package/dist/runtime/utils/time.d.ts +2 -0
- package/dist/runtime/utils/time.js +7 -0
- package/dist/runtime/utils/url.d.ts +9 -0
- package/dist/runtime/utils/url.js +27 -0
- package/dist/runtime/utils/util.d.ts +7 -0
- package/dist/runtime/utils/util.js +5 -0
- package/dist/runtime/utils/youtube.d.ts +1 -0
- package/dist/runtime/utils/youtube.js +13 -0
- package/dist/types.d.mts +7 -0
- package/dist/types.d.ts +7 -0
- package/package.json +60 -0
package/README.md
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
<div align=center>
|
|
2
|
+
<img src="https://nuxtify.dev/img/nuxtify-wordmark-dark.png"/>
|
|
3
|
+
</div>
|
|
4
|
+
<p align=center>
|
|
5
|
+
Build progressively enhanced web apps and sites with Nuxt and Vuetify.
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
# Nuxtify Pages
|
|
9
|
+
|
|
10
|
+
<!-- [![npm version][npm-version-src]][npm-version-href]
|
|
11
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
12
|
+
[![License][license-src]][license-href]
|
|
13
|
+
[![Nuxtify Docs][nuxtify-src]][nuxtify-href] -->
|
|
14
|
+
<!-- [π Online playground](https://stackblitz.com/github/nuxtify-dev/pages?file=playground%2Fapp.vue) -->
|
|
15
|
+
|
|
16
|
+
> [!NOTE]
|
|
17
|
+
> **Early Access Preview:**
|
|
18
|
+
> This module is under active development. While it is already used to power a [handful of sites](https://nuxtify.dev/showcase) in production, expect things to change frequently. I will do my best to call out breaking changes in the [changelog](https://github.com/nuxtify-dev/pages/blob/main/CHANGELOG.md).
|
|
19
|
+
|
|
20
|
+
### Table of Contents
|
|
21
|
+
|
|
22
|
+
- βΎοΈ [Why Nuxtify?](#why-nuxtify)
|
|
23
|
+
- β¨ [Features](#features)
|
|
24
|
+
- π [Quick Start](#quick-start)
|
|
25
|
+
- π§ [Configuration](#configuration)
|
|
26
|
+
- β
[Updates](#updates)
|
|
27
|
+
- β€οΈ [Contributing](#contributing)
|
|
28
|
+
- π [Local Development](#local-development)
|
|
29
|
+
- βοΈ [License](#license)
|
|
30
|
+
|
|
31
|
+
## <a name="why-nuxtify">βΎοΈ Why Nuxtify?</a>
|
|
32
|
+
|
|
33
|
+
Nuxtify is a collection of [Nuxt modules](https://nuxt.com/docs/guide/concepts/modules) that help you stay organized, maintain focus, and _ship weirdly fast_.
|
|
34
|
+
|
|
35
|
+
It's built on a loosely opinionated stack that eliminates decision fatigue and ensures consistency across projects. This extensible approach gives you incredible control over your site's structure and style.
|
|
36
|
+
|
|
37
|
+
Once you add a Nuxtify module (like this one) to a new or existing Nuxt project, you can use any of the components, composables, and other features instantly β no imports necessary. And more importantly, you can override these defaults with your own version at any time.
|
|
38
|
+
|
|
39
|
+
**This unlocks a powerful way of working.**
|
|
40
|
+
|
|
41
|
+
Use the defaults when they're helpful, and progressively upgrade when they're not.
|
|
42
|
+
|
|
43
|
+
This means you can:
|
|
44
|
+
|
|
45
|
+
- Setup a new project using the default configuration in a matter of minutes.
|
|
46
|
+
- Use the default footer component, but completely change the navigation component.
|
|
47
|
+
- Change the colors of all the buttons with one line of code.
|
|
48
|
+
- Override the default button component with a style of your choosing.
|
|
49
|
+
- And much more...
|
|
50
|
+
|
|
51
|
+
In short, Nuxtify helps you build faster, iterate smarter, and maintain consistency β without sacrificing control or creativity.
|
|
52
|
+
|
|
53
|
+
## <a name="features">β¨ Features</a>
|
|
54
|
+
|
|
55
|
+
Nuxtify builds on the amazing features of [Vue](https://vuejs.org/guide/introduction), [Nuxt](https://nuxt.com/docs/getting-started/introduction), and [Vuetify](https://vuetifyjs.com/en/introduction/why-vuetify/).
|
|
56
|
+
|
|
57
|
+
### π‘ Intuitive UI & UX
|
|
58
|
+
|
|
59
|
+
- Ready to use components, page templates, and layouts so you can _ship weirdly fast_
|
|
60
|
+
- Easily override any component with [Vuetify global defaults](https://vuetifyjs.com/en/features/global-configuration/)
|
|
61
|
+
- Icons powered by [Material Design Icons](https://pictogrammers.com/library/mdi/) via [Vuetify icon fonts](https://vuetifyjs.com/en/features/icon-fonts/)
|
|
62
|
+
- Fully responsive and adapts to all modern browsers and devices
|
|
63
|
+
- (coming soon) Light and dark mode toggle
|
|
64
|
+
|
|
65
|
+
### π Premium DX
|
|
66
|
+
|
|
67
|
+
- Zero-config with sensible defaults for common use cases
|
|
68
|
+
- All components use the modern [Vue Composition API](https://vuejs.org/guide/extras/composition-api-faq) and [Single File Component (SFC) syntax](https://vuejs.org/guide/scaling-up/sfc.html)
|
|
69
|
+
- [TypeScript](https://www.typescriptlang.org/) auto-complete and type safety for all components
|
|
70
|
+
- [ESLint](https://eslint.org/) support out of the box using flat config (v9)
|
|
71
|
+
- Identify performance gaps and seamlessly manage your app with [Nuxt Devtools](https://devtools.nuxt.com/)
|
|
72
|
+
- Clean, elegant code that's easy to understand and customize
|
|
73
|
+
- Loosely opinionated, leveraging ecosystem standards so you're not locked into outdated dependencies and practices
|
|
74
|
+
|
|
75
|
+
### π€ Smart SEO, Security, & Performance
|
|
76
|
+
|
|
77
|
+
- Fully tree shakeable for small bundle sizes
|
|
78
|
+
- Optimized caching and rendering strategies for each page with [hybrid rendering](https://nuxt.com/docs/guide/concepts/rendering#hybrid-rendering)
|
|
79
|
+
- (coming soon) Robots, sitemaps, schema.org, social share images, broken links, and more powered by [Nuxt SEO](https://nuxtseo.com/)
|
|
80
|
+
- (coming soon) Fast, responsive, optimized images for [20+ image providers](https://image.nuxt.com/get-started/providers) powered by [Nuxt Image](https://image.nuxt.com/)
|
|
81
|
+
- (coming soon) Load third-party scripts with better performance, privacy, security powered by [Nuxt Scripts](https://scripts.nuxt.com/)
|
|
82
|
+
- (coming soon) Optimal security patterns and principles powered by [Nuxt Security](https://nuxt.com/modules/security)
|
|
83
|
+
|
|
84
|
+
### π Host Anywhere
|
|
85
|
+
|
|
86
|
+
- Deploy to any Node.js server, static host, or serverless edge CDN environment with [20+ hosting providers](https://nuxt.com/deploy) supported
|
|
87
|
+
|
|
88
|
+
## <a name="quick-start">π Quick Start</a>
|
|
89
|
+
|
|
90
|
+
To use this module in your [new](https://nuxt.com/docs/getting-started/installation) or existing Nuxt project:
|
|
91
|
+
|
|
92
|
+
### 1. Install the module
|
|
93
|
+
|
|
94
|
+
Install the module in your Nuxt application with one command:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npx nuxi@latest module add @nuxtify/pages
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 2. Update Nuxt config
|
|
101
|
+
|
|
102
|
+
Add the `@nuxtify/pages` module to `nuxt.config.ts` and configure it:
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
// nuxt.config.ts
|
|
106
|
+
|
|
107
|
+
export default defineNuxtConfig({
|
|
108
|
+
modules: [
|
|
109
|
+
'@nuxtify/pages'
|
|
110
|
+
],
|
|
111
|
+
nuxtify: {
|
|
112
|
+
/* module specific options */
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Read the [π documentation](https://nuxtify.dev/docs) for a complete guide on how to configure and use this module.
|
|
118
|
+
|
|
119
|
+
### 3. Start building!
|
|
120
|
+
|
|
121
|
+
Develop and [deploy](https://nuxt.com/docs/getting-started/deployment) your Nuxt app like any other.
|
|
122
|
+
|
|
123
|
+
## <a name="configuration">π§ Configuration</a>
|
|
124
|
+
|
|
125
|
+
### Module configuration
|
|
126
|
+
|
|
127
|
+
To see the full config, check out the [types](https://github.com/nuxtify-dev/pages/blob/main/src/types.ts).
|
|
128
|
+
|
|
129
|
+
### Overriding the defaults
|
|
130
|
+
|
|
131
|
+
Nuxtify comes pre-configured with sensible defaults. Both for how the module functions and for the corresponding Nuxt [directory](https://nuxt.com/docs/guide/directory-structure).
|
|
132
|
+
|
|
133
|
+
If you need to override a [component](https://nuxt.com/docs/guide/directory-structure/components), [page](https://nuxt.com/docs/guide/directory-structure/pages), or [layout](https://nuxt.com/docs/guide/directory-structure/layouts), create the a file with the same name in your project (in the appropriate directory).
|
|
134
|
+
|
|
135
|
+
If you need to override a [composable](https://nuxt.com/docs/guide/directory-structure/composables) or [utils](https://nuxt.com/docs/guide/directory-structure/utils) utility function, create a function with the same name in your project (in the appropriate directory).
|
|
136
|
+
|
|
137
|
+
## <a name="updates">β
Updates</a>
|
|
138
|
+
|
|
139
|
+
[β¨ Release Notes](/CHANGELOG.md)
|
|
140
|
+
|
|
141
|
+
It's easy to stay up to date with the latest version of Nuxtify. Just update to the latest package using your favorite package manager.
|
|
142
|
+
|
|
143
|
+
**Minor and patch versions**
|
|
144
|
+
```bash
|
|
145
|
+
npm update @nuxtify/pages --save
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Major versions**
|
|
149
|
+
```bash
|
|
150
|
+
npm install @nuxtify/pages@latest --save
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## <a name="contributing">β€οΈ Contributing</a>
|
|
154
|
+
|
|
155
|
+
I invite you to contribute and help improve Nuxtify!
|
|
156
|
+
|
|
157
|
+
Here are a few ways you can get involved:
|
|
158
|
+
|
|
159
|
+
- **Reporting Bugs:** If you come across any bugs or issues, please [open a new issue](https://github.com/nuxtify-dev/pages/issues/new).
|
|
160
|
+
- **Suggestions:** Have ideas to enhance Nuxtify? I'd love to hear them! You can [open a new issue](https://github.com/nuxtify-dev/pages/issues/new) describing your feature request or suggestion.
|
|
161
|
+
- **Local Development:** contribute directly to the framework with a pull request. Just follow the instructions below.
|
|
162
|
+
|
|
163
|
+
## <a name="local-development">π Local Development</a>
|
|
164
|
+
|
|
165
|
+
### CLI commands
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# Install dependencies
|
|
169
|
+
npm install
|
|
170
|
+
|
|
171
|
+
# Generate type stubs
|
|
172
|
+
npm run dev:prepare
|
|
173
|
+
|
|
174
|
+
# Develop with the playground
|
|
175
|
+
npm run dev
|
|
176
|
+
|
|
177
|
+
# Build the playground
|
|
178
|
+
npm run dev:build
|
|
179
|
+
|
|
180
|
+
# Run ESLint
|
|
181
|
+
npm run lint
|
|
182
|
+
|
|
183
|
+
# Run Vitest
|
|
184
|
+
npm run test
|
|
185
|
+
npm run test:watch
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Learn about [authoring Nuxt modules](https://nuxt.com/docs/guide/going-further/modules).
|
|
189
|
+
|
|
190
|
+
## <a name="license">βοΈ License</a>
|
|
191
|
+
|
|
192
|
+
[MIT](https://github.com/nuxtify-dev/pages/blob/main/LICENSE)
|
|
193
|
+
|
|
194
|
+
<!-- Badges -->
|
|
195
|
+
|
|
196
|
+
[npm-version-src]: https://img.shields.io/npm/v/@nuxtify/pages/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
197
|
+
[npm-version-href]: https://npmjs.com/package/@nuxtify/pages
|
|
198
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/@nuxtify/pages.svg?style=flat&colorA=020420&colorB=00DC82
|
|
199
|
+
[npm-downloads-href]: https://npm.chart.dev/@nuxtify/pages
|
|
200
|
+
[license-src]: https://img.shields.io/npm/l/@nuxtify/pages.svg?style=flat&colorA=020420&colorB=00DC82
|
|
201
|
+
[license-href]: https://npmjs.com/package/@nuxtify/pages
|
|
202
|
+
[nuxtify-src]: https://img.shields.io/badge/Nuxtify_Docs-00DC82
|
|
203
|
+
[nuxtify-href]: https://nuxtify.dev/docs
|
package/dist/module.cjs
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
|
|
3
|
+
interface Link {
|
|
4
|
+
text: string;
|
|
5
|
+
to?: string;
|
|
6
|
+
href?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
openInNew?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface FooterLinks {
|
|
11
|
+
title: string;
|
|
12
|
+
links: Link[];
|
|
13
|
+
}
|
|
14
|
+
interface BrandOptions {
|
|
15
|
+
/**
|
|
16
|
+
* The name of the brand.
|
|
17
|
+
*
|
|
18
|
+
* @default "nuxtify-pages"
|
|
19
|
+
*/
|
|
20
|
+
name?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The domain of the brand.
|
|
23
|
+
*
|
|
24
|
+
* @default ""
|
|
25
|
+
*/
|
|
26
|
+
domain?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The tagline of the brand.
|
|
29
|
+
*
|
|
30
|
+
* @default ""
|
|
31
|
+
*/
|
|
32
|
+
tagline?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The logo of the brand.
|
|
35
|
+
*/
|
|
36
|
+
logo?: {
|
|
37
|
+
/**
|
|
38
|
+
* The URL of the light logo. Recommended 5:1 aspect ratio (e.g. 400 x 80 px).
|
|
39
|
+
*
|
|
40
|
+
* @default ""
|
|
41
|
+
*/
|
|
42
|
+
lightUrl?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The URL of the dark logo. Recommended 5:1 aspect ratio (e.g. 400 x 80 px).
|
|
45
|
+
*
|
|
46
|
+
* @default ""
|
|
47
|
+
*/
|
|
48
|
+
darkUrl?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The width of the logo.
|
|
51
|
+
*
|
|
52
|
+
* @default 200
|
|
53
|
+
*/
|
|
54
|
+
width?: number;
|
|
55
|
+
/**
|
|
56
|
+
* The width of the logo on mobile.
|
|
57
|
+
*
|
|
58
|
+
* @default 150
|
|
59
|
+
*/
|
|
60
|
+
mobileWidth?: number;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
interface PagesOptions {
|
|
64
|
+
policies: {
|
|
65
|
+
privacyUrl: string;
|
|
66
|
+
termsUrl: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
interface ModuleOptions {
|
|
70
|
+
/**
|
|
71
|
+
* Brand options
|
|
72
|
+
*/
|
|
73
|
+
brand?: BrandOptions;
|
|
74
|
+
/**
|
|
75
|
+
* Pages options
|
|
76
|
+
*/
|
|
77
|
+
pages?: PagesOptions;
|
|
78
|
+
/**
|
|
79
|
+
* Announcement banner options
|
|
80
|
+
*/
|
|
81
|
+
announcement?: {
|
|
82
|
+
show?: boolean;
|
|
83
|
+
message?: string;
|
|
84
|
+
buttonText?: string;
|
|
85
|
+
buttonUrl?: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Navigation options
|
|
89
|
+
*/
|
|
90
|
+
navigation?: {
|
|
91
|
+
primary?: Link[];
|
|
92
|
+
secondary?: Link[];
|
|
93
|
+
footerPrimary?: FooterLinks[];
|
|
94
|
+
footerSecondary?: Link[];
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Footer options
|
|
98
|
+
*/
|
|
99
|
+
footer?: {
|
|
100
|
+
copyright?: string;
|
|
101
|
+
credits?: {
|
|
102
|
+
creator?: {
|
|
103
|
+
name?: string;
|
|
104
|
+
domain?: string;
|
|
105
|
+
};
|
|
106
|
+
prependText?: string;
|
|
107
|
+
appendText?: string;
|
|
108
|
+
showPoweredBy?: boolean;
|
|
109
|
+
};
|
|
110
|
+
cta?: {
|
|
111
|
+
show?: boolean;
|
|
112
|
+
title?: string;
|
|
113
|
+
subtitle?: string;
|
|
114
|
+
color?: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Email options
|
|
119
|
+
*/
|
|
120
|
+
email?: {
|
|
121
|
+
general?: string;
|
|
122
|
+
support?: string;
|
|
123
|
+
provider?: {
|
|
124
|
+
defaultSubmitUrl?: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Style options
|
|
129
|
+
*/
|
|
130
|
+
style?: {
|
|
131
|
+
btn?: {
|
|
132
|
+
rounded?: boolean;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
138
|
+
|
|
139
|
+
export { _default as default };
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
|
|
3
|
+
interface Link {
|
|
4
|
+
text: string;
|
|
5
|
+
to?: string;
|
|
6
|
+
href?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
openInNew?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface FooterLinks {
|
|
11
|
+
title: string;
|
|
12
|
+
links: Link[];
|
|
13
|
+
}
|
|
14
|
+
interface BrandOptions {
|
|
15
|
+
/**
|
|
16
|
+
* The name of the brand.
|
|
17
|
+
*
|
|
18
|
+
* @default "nuxtify-pages"
|
|
19
|
+
*/
|
|
20
|
+
name?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The domain of the brand.
|
|
23
|
+
*
|
|
24
|
+
* @default ""
|
|
25
|
+
*/
|
|
26
|
+
domain?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The tagline of the brand.
|
|
29
|
+
*
|
|
30
|
+
* @default ""
|
|
31
|
+
*/
|
|
32
|
+
tagline?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The logo of the brand.
|
|
35
|
+
*/
|
|
36
|
+
logo?: {
|
|
37
|
+
/**
|
|
38
|
+
* The URL of the light logo. Recommended 5:1 aspect ratio (e.g. 400 x 80 px).
|
|
39
|
+
*
|
|
40
|
+
* @default ""
|
|
41
|
+
*/
|
|
42
|
+
lightUrl?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The URL of the dark logo. Recommended 5:1 aspect ratio (e.g. 400 x 80 px).
|
|
45
|
+
*
|
|
46
|
+
* @default ""
|
|
47
|
+
*/
|
|
48
|
+
darkUrl?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The width of the logo.
|
|
51
|
+
*
|
|
52
|
+
* @default 200
|
|
53
|
+
*/
|
|
54
|
+
width?: number;
|
|
55
|
+
/**
|
|
56
|
+
* The width of the logo on mobile.
|
|
57
|
+
*
|
|
58
|
+
* @default 150
|
|
59
|
+
*/
|
|
60
|
+
mobileWidth?: number;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
interface PagesOptions {
|
|
64
|
+
policies: {
|
|
65
|
+
privacyUrl: string;
|
|
66
|
+
termsUrl: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
interface ModuleOptions {
|
|
70
|
+
/**
|
|
71
|
+
* Brand options
|
|
72
|
+
*/
|
|
73
|
+
brand?: BrandOptions;
|
|
74
|
+
/**
|
|
75
|
+
* Pages options
|
|
76
|
+
*/
|
|
77
|
+
pages?: PagesOptions;
|
|
78
|
+
/**
|
|
79
|
+
* Announcement banner options
|
|
80
|
+
*/
|
|
81
|
+
announcement?: {
|
|
82
|
+
show?: boolean;
|
|
83
|
+
message?: string;
|
|
84
|
+
buttonText?: string;
|
|
85
|
+
buttonUrl?: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Navigation options
|
|
89
|
+
*/
|
|
90
|
+
navigation?: {
|
|
91
|
+
primary?: Link[];
|
|
92
|
+
secondary?: Link[];
|
|
93
|
+
footerPrimary?: FooterLinks[];
|
|
94
|
+
footerSecondary?: Link[];
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Footer options
|
|
98
|
+
*/
|
|
99
|
+
footer?: {
|
|
100
|
+
copyright?: string;
|
|
101
|
+
credits?: {
|
|
102
|
+
creator?: {
|
|
103
|
+
name?: string;
|
|
104
|
+
domain?: string;
|
|
105
|
+
};
|
|
106
|
+
prependText?: string;
|
|
107
|
+
appendText?: string;
|
|
108
|
+
showPoweredBy?: boolean;
|
|
109
|
+
};
|
|
110
|
+
cta?: {
|
|
111
|
+
show?: boolean;
|
|
112
|
+
title?: string;
|
|
113
|
+
subtitle?: string;
|
|
114
|
+
color?: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Email options
|
|
119
|
+
*/
|
|
120
|
+
email?: {
|
|
121
|
+
general?: string;
|
|
122
|
+
support?: string;
|
|
123
|
+
provider?: {
|
|
124
|
+
defaultSubmitUrl?: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Style options
|
|
129
|
+
*/
|
|
130
|
+
style?: {
|
|
131
|
+
btn?: {
|
|
132
|
+
rounded?: boolean;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
138
|
+
|
|
139
|
+
export { _default as default };
|
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { defineNuxtModule, createResolver, installModule, addLayout, addComponentsDir, addImportsDir, addServerImportsDir, extendPages } from '@nuxt/kit';
|
|
2
|
+
import { defu } from 'defu';
|
|
3
|
+
|
|
4
|
+
const module = defineNuxtModule({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "nuxtify-pages",
|
|
7
|
+
configKey: "nuxtify",
|
|
8
|
+
compatibility: {
|
|
9
|
+
nuxt: ">=3.16.0",
|
|
10
|
+
bridge: false
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
defaults: {
|
|
14
|
+
// Brand
|
|
15
|
+
brand: {
|
|
16
|
+
name: "nuxtify-pages",
|
|
17
|
+
domain: "",
|
|
18
|
+
tagline: "",
|
|
19
|
+
logo: {
|
|
20
|
+
lightUrl: "",
|
|
21
|
+
darkUrl: "",
|
|
22
|
+
width: 200,
|
|
23
|
+
mobileWidth: 150
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
// Pages
|
|
27
|
+
pages: {
|
|
28
|
+
policies: {
|
|
29
|
+
privacyUrl: "/privacy",
|
|
30
|
+
termsUrl: "/terms"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
// Announcement
|
|
34
|
+
announcement: {
|
|
35
|
+
show: false,
|
|
36
|
+
message: "",
|
|
37
|
+
buttonText: "",
|
|
38
|
+
buttonUrl: ""
|
|
39
|
+
},
|
|
40
|
+
// Navigation
|
|
41
|
+
navigation: {
|
|
42
|
+
primary: [],
|
|
43
|
+
secondary: [],
|
|
44
|
+
footerPrimary: [],
|
|
45
|
+
footerSecondary: []
|
|
46
|
+
},
|
|
47
|
+
// Footer
|
|
48
|
+
footer: {
|
|
49
|
+
copyright: "",
|
|
50
|
+
credits: {
|
|
51
|
+
creator: {
|
|
52
|
+
name: "",
|
|
53
|
+
domain: ""
|
|
54
|
+
},
|
|
55
|
+
prependText: "",
|
|
56
|
+
appendText: "",
|
|
57
|
+
showPoweredBy: true
|
|
58
|
+
},
|
|
59
|
+
cta: {
|
|
60
|
+
show: false,
|
|
61
|
+
title: "",
|
|
62
|
+
subtitle: "",
|
|
63
|
+
color: "indigo"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
// Email
|
|
67
|
+
email: {
|
|
68
|
+
general: "",
|
|
69
|
+
support: "",
|
|
70
|
+
provider: {
|
|
71
|
+
defaultSubmitUrl: ""
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
// Style
|
|
75
|
+
style: {
|
|
76
|
+
btn: {
|
|
77
|
+
rounded: true
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
async setup(_options, _nuxt) {
|
|
82
|
+
const resolver = createResolver(import.meta.url);
|
|
83
|
+
await installModule("vuetify-nuxt-module", {
|
|
84
|
+
vuetifyOptions: {
|
|
85
|
+
icons: {
|
|
86
|
+
defaultSet: "mdi-svg"
|
|
87
|
+
},
|
|
88
|
+
theme: {
|
|
89
|
+
themes: {
|
|
90
|
+
light: {
|
|
91
|
+
colors: {
|
|
92
|
+
primary: "#020420",
|
|
93
|
+
secondary: "#00DC82",
|
|
94
|
+
background: "#fff"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
defaults: {
|
|
100
|
+
VBtn: { color: "secondary", variant: "flat", class: "text-none" },
|
|
101
|
+
VAlert: {
|
|
102
|
+
VBtn: { color: "inherit" }
|
|
103
|
+
},
|
|
104
|
+
VFooter: {
|
|
105
|
+
VBtn: { color: "inherit" }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
_nuxt.options.appConfig.nuxtify = defu(_nuxt.options.appConfig.nuxtify, {
|
|
111
|
+
..._options
|
|
112
|
+
});
|
|
113
|
+
addLayout({
|
|
114
|
+
src: resolver.resolve("./runtime/layouts/DefaultLayout.vue")
|
|
115
|
+
}, "default");
|
|
116
|
+
addComponentsDir({
|
|
117
|
+
path: resolver.resolve("./runtime/components")
|
|
118
|
+
});
|
|
119
|
+
addImportsDir(resolver.resolve("./runtime/composables"));
|
|
120
|
+
addServerImportsDir(resolver.resolve("./runtime/server/composables"));
|
|
121
|
+
addImportsDir(resolver.resolve("./runtime/utils"));
|
|
122
|
+
addServerImportsDir(resolver.resolve("./runtime/server/utils"));
|
|
123
|
+
extendPages((pages) => {
|
|
124
|
+
pages.unshift({
|
|
125
|
+
name: "index",
|
|
126
|
+
path: "/",
|
|
127
|
+
file: resolver.resolve("./runtime/pages/IndexPage.vue")
|
|
128
|
+
});
|
|
129
|
+
pages.unshift({
|
|
130
|
+
name: "slug",
|
|
131
|
+
path: "/:slug",
|
|
132
|
+
file: resolver.resolve("./runtime/pages/DynamicSlug.vue")
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
export { module as default };
|