nuxt-og-image 4.0.1 → 4.0.2
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/LICENSE.md +9 -9
- package/README.md +75 -75
- package/dist/client/200.html +25 -22
- package/dist/client/404.html +25 -22
- package/dist/client/_nuxt/BCzYJAay.js +1 -0
- package/dist/client/_nuxt/{CbgzOxfU.js → BD9UVO-6.js} +1 -1
- package/dist/client/_nuxt/BIguuW30.js +1 -0
- package/dist/client/_nuxt/{0qbUsQ6_.js → BJGgnGWZ.js} +1 -1
- package/dist/client/_nuxt/BLhTXw86.js +1 -0
- package/dist/client/_nuxt/BZ3P6AVf.js +1 -0
- package/dist/client/_nuxt/{Csvi84BS.js → BnfnAR_u.js} +1 -1
- package/dist/client/_nuxt/Bu73EIfS.js +1 -0
- package/dist/client/_nuxt/C4Ro8ZjH.js +1 -0
- package/dist/client/_nuxt/C5-9kuJc.js +1 -0
- package/dist/client/_nuxt/CGXjegLJ.js +1 -0
- package/dist/client/_nuxt/CMnybHwx.js +1 -0
- package/dist/client/_nuxt/COcR7UxN.js +1 -0
- package/dist/client/_nuxt/C_wU0A-3.js +3834 -0
- package/dist/client/_nuxt/DL4Dju3v.js +1 -0
- package/dist/client/_nuxt/DdAYiE08.js +1 -0
- package/dist/client/_nuxt/{JJNjxVar.js → DhRVplvY.js} +1 -1
- package/dist/client/_nuxt/{Lr4bgMV6.js → I3KQ5pkt.js} +1 -1
- package/dist/client/_nuxt/XF954dHc.js +1 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/a938c56b-6345-454a-9e52-026adcc92670.json +1 -0
- package/dist/client/_nuxt/{entry.0k2jyAbH.css → entry.CpT28PgB.css} +1 -1
- package/dist/client/_nuxt/error-404.DNn2eSPw.css +1 -0
- package/dist/client/_nuxt/error-500.B_Aslu6N.css +1 -0
- package/dist/client/index.html +25 -22
- package/dist/module.d.mts +2 -106
- package/dist/module.d.ts +2 -106
- package/dist/module.json +1 -1
- package/dist/module.mjs +21 -16
- package/dist/runtime/app/components/Templates/Community/BrandedLogo.vue +29 -29
- package/dist/runtime/app/components/Templates/Community/Frame.vue +64 -64
- package/dist/runtime/app/components/Templates/Community/Nuxt.vue +185 -185
- package/dist/runtime/app/components/Templates/Community/NuxtSeo.vue +137 -137
- package/dist/runtime/app/components/Templates/Community/Pergel.vue +103 -103
- package/dist/runtime/app/components/Templates/Community/SimpleBlog.vue +35 -35
- package/dist/runtime/app/components/Templates/Community/UnJs.vue +108 -108
- package/dist/runtime/app/components/Templates/Community/Wave.vue +34 -34
- package/dist/runtime/app/components/Templates/Community/WithEmoji.vue +28 -28
- package/dist/runtime/app/composables/defineOgImage.js +20 -7
- package/dist/runtime/app/utils/plugins.js +5 -1
- package/dist/runtime/logger.d.ts +2 -0
- package/dist/runtime/logger.js +8 -0
- package/dist/runtime/server/og-image/context.d.ts +1 -1
- package/dist/runtime/server/og-image/context.js +28 -22
- package/dist/runtime/server/og-image/satori/plugins/imageSrc.js +16 -9
- package/dist/runtime/server/plugins/prerender.js +6 -1
- package/dist/runtime/server/routes/debug.json.js +1 -1
- package/dist/runtime/server/tsconfig.json +3 -3
- package/dist/runtime/server/util/logger.d.ts +1 -1
- package/dist/runtime/shared.js +13 -3
- package/dist/runtime/types.d.ts +4 -0
- package/package.json +29 -30
- package/virtual.d.ts +71 -71
- package/dist/client/_nuxt/B1Z2YEe0.js +0 -1
- package/dist/client/_nuxt/BHpzmqOf.js +0 -1
- package/dist/client/_nuxt/C6J8XiCD.js +0 -1
- package/dist/client/_nuxt/CLXkKSjS.js +0 -1
- package/dist/client/_nuxt/Cm25um3E.js +0 -1
- package/dist/client/_nuxt/Cmhojp3q.js +0 -1
- package/dist/client/_nuxt/Cv7ZOjGq.js +0 -1
- package/dist/client/_nuxt/D0xWnrgR.js +0 -1
- package/dist/client/_nuxt/D9W_gRNE.js +0 -1
- package/dist/client/_nuxt/DMFdBl0X.js +0 -1
- package/dist/client/_nuxt/builds/meta/a089ef48-3edd-438e-9106-89949d355348.json +0 -1
- package/dist/client/_nuxt/error-404.LcFwT6vm.css +0 -1
- package/dist/client/_nuxt/error-500.DzDak7Sw.css +0 -1
- package/dist/client/_nuxt/spWmiL_5.js +0 -3834
package/dist/module.d.mts
CHANGED
|
@@ -3,111 +3,7 @@ import { AddComponentOptions } from '@nuxt/kit';
|
|
|
3
3
|
import { ResvgRenderOptions } from '@resvg/resvg-js';
|
|
4
4
|
import { SatoriOptions } from 'satori';
|
|
5
5
|
import { SharpOptions } from 'sharp';
|
|
6
|
-
import {
|
|
7
|
-
import { NitroOptions } from 'nitropack';
|
|
8
|
-
|
|
9
|
-
type IconifyEmojiIconSets = 'twemoji' | 'noto' | 'fluent-emoji' | 'fluent-emoji-flat' | 'fluent-emoji-high-contrast' | 'noto-v1' | 'emojione' | 'emojione-monotone' | 'emojione-v1' | 'streamline-emojis' | 'openmoji';
|
|
10
|
-
interface OgImageComponent {
|
|
11
|
-
path?: string;
|
|
12
|
-
pascalName: string;
|
|
13
|
-
kebabName: string;
|
|
14
|
-
hash: string;
|
|
15
|
-
category: 'app' | 'community' | 'pro';
|
|
16
|
-
credits?: string;
|
|
17
|
-
}
|
|
18
|
-
interface ScreenshotOptions {
|
|
19
|
-
colorScheme?: 'dark' | 'light';
|
|
20
|
-
selector?: string;
|
|
21
|
-
mask?: string;
|
|
22
|
-
/**
|
|
23
|
-
* The width of the screenshot.
|
|
24
|
-
*
|
|
25
|
-
* @default 1200
|
|
26
|
-
*/
|
|
27
|
-
width: number;
|
|
28
|
-
/**
|
|
29
|
-
* The height of the screenshot.
|
|
30
|
-
*
|
|
31
|
-
* @default 630
|
|
32
|
-
*/
|
|
33
|
-
height: number;
|
|
34
|
-
/**
|
|
35
|
-
* How long to wait before taking the screenshot. Useful for waiting for animations.
|
|
36
|
-
*/
|
|
37
|
-
delay?: number;
|
|
38
|
-
}
|
|
39
|
-
interface OgImageOptions<T extends keyof OgImageComponents = 'NuxtSeo'> {
|
|
40
|
-
/**
|
|
41
|
-
* The width of the screenshot.
|
|
42
|
-
*
|
|
43
|
-
* @default 1200
|
|
44
|
-
*/
|
|
45
|
-
width?: number;
|
|
46
|
-
/**
|
|
47
|
-
* The height of the screenshot.
|
|
48
|
-
*
|
|
49
|
-
* @default 630
|
|
50
|
-
*/
|
|
51
|
-
height?: number;
|
|
52
|
-
/**
|
|
53
|
-
* The alt text for the image.
|
|
54
|
-
*/
|
|
55
|
-
alt?: string;
|
|
56
|
-
/**
|
|
57
|
-
* Use a prebuilt image instead of generating one.
|
|
58
|
-
*
|
|
59
|
-
* Should be an absolute URL.
|
|
60
|
-
*/
|
|
61
|
-
url?: string;
|
|
62
|
-
/**
|
|
63
|
-
* The name of the component to render.
|
|
64
|
-
*/
|
|
65
|
-
component?: T | string;
|
|
66
|
-
/**
|
|
67
|
-
* Props to pass to the component.
|
|
68
|
-
*/
|
|
69
|
-
props?: OgImageComponents[T] | Record<string, any>;
|
|
70
|
-
renderer?: 'chromium' | 'satori';
|
|
71
|
-
extension?: 'png' | 'jpeg' | 'jpg';
|
|
72
|
-
emojis?: IconifyEmojiIconSets;
|
|
73
|
-
/**
|
|
74
|
-
* Provide a static HTML template to render the OG Image instead of a component.
|
|
75
|
-
*/
|
|
76
|
-
html?: string;
|
|
77
|
-
resvg?: ResvgRenderOptions;
|
|
78
|
-
satori?: SatoriOptions;
|
|
79
|
-
screenshot?: Partial<ScreenshotOptions>;
|
|
80
|
-
sharp?: SharpOptions;
|
|
81
|
-
fonts?: InputFontConfig[];
|
|
82
|
-
cacheMaxAgeSeconds?: number;
|
|
83
|
-
/**
|
|
84
|
-
* @internal
|
|
85
|
-
*/
|
|
86
|
-
_query?: Record<string, any>;
|
|
87
|
-
}
|
|
88
|
-
interface FontConfig {
|
|
89
|
-
name: string;
|
|
90
|
-
style?: string;
|
|
91
|
-
weight?: string | number;
|
|
92
|
-
path?: string;
|
|
93
|
-
key?: string;
|
|
94
|
-
absolutePath?: boolean;
|
|
95
|
-
}
|
|
96
|
-
type InputFontConfig = (`${string}:${number}` | string | FontConfig);
|
|
97
|
-
interface RuntimeCompatibilitySchema {
|
|
98
|
-
chromium: 'chrome-launcher' | 'on-demand' | 'playwright' | false;
|
|
99
|
-
['css-inline']: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
100
|
-
resvg: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
101
|
-
satori: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
102
|
-
sharp: 'node' | false;
|
|
103
|
-
wasm?: NitroOptions['wasm'];
|
|
104
|
-
}
|
|
105
|
-
type CompatibilityFlags = Partial<Omit<RuntimeCompatibilitySchema, 'wasm'>>;
|
|
106
|
-
interface CompatibilityFlagEnvOverrides {
|
|
107
|
-
dev?: CompatibilityFlags;
|
|
108
|
-
runtime?: CompatibilityFlags;
|
|
109
|
-
prerender?: CompatibilityFlags;
|
|
110
|
-
}
|
|
6
|
+
import { OgImageOptions, InputFontConfig, CompatibilityFlagEnvOverrides, OgImageComponent } from '../dist/runtime/types.js';
|
|
111
7
|
|
|
112
8
|
interface ModuleOptions {
|
|
113
9
|
/**
|
|
@@ -121,7 +17,7 @@ interface ModuleOptions {
|
|
|
121
17
|
*
|
|
122
18
|
* You can use this to change the default template, image sizing and more.
|
|
123
19
|
*
|
|
124
|
-
* @default { component: '
|
|
20
|
+
* @default { component: 'NuxtSeo', width: 1200, height: 630, cache: true, cacheTtl: 24 * 60 * 60 * 1000 }
|
|
125
21
|
*/
|
|
126
22
|
defaults: OgImageOptions;
|
|
127
23
|
/**
|
package/dist/module.d.ts
CHANGED
|
@@ -3,111 +3,7 @@ import { AddComponentOptions } from '@nuxt/kit';
|
|
|
3
3
|
import { ResvgRenderOptions } from '@resvg/resvg-js';
|
|
4
4
|
import { SatoriOptions } from 'satori';
|
|
5
5
|
import { SharpOptions } from 'sharp';
|
|
6
|
-
import {
|
|
7
|
-
import { NitroOptions } from 'nitropack';
|
|
8
|
-
|
|
9
|
-
type IconifyEmojiIconSets = 'twemoji' | 'noto' | 'fluent-emoji' | 'fluent-emoji-flat' | 'fluent-emoji-high-contrast' | 'noto-v1' | 'emojione' | 'emojione-monotone' | 'emojione-v1' | 'streamline-emojis' | 'openmoji';
|
|
10
|
-
interface OgImageComponent {
|
|
11
|
-
path?: string;
|
|
12
|
-
pascalName: string;
|
|
13
|
-
kebabName: string;
|
|
14
|
-
hash: string;
|
|
15
|
-
category: 'app' | 'community' | 'pro';
|
|
16
|
-
credits?: string;
|
|
17
|
-
}
|
|
18
|
-
interface ScreenshotOptions {
|
|
19
|
-
colorScheme?: 'dark' | 'light';
|
|
20
|
-
selector?: string;
|
|
21
|
-
mask?: string;
|
|
22
|
-
/**
|
|
23
|
-
* The width of the screenshot.
|
|
24
|
-
*
|
|
25
|
-
* @default 1200
|
|
26
|
-
*/
|
|
27
|
-
width: number;
|
|
28
|
-
/**
|
|
29
|
-
* The height of the screenshot.
|
|
30
|
-
*
|
|
31
|
-
* @default 630
|
|
32
|
-
*/
|
|
33
|
-
height: number;
|
|
34
|
-
/**
|
|
35
|
-
* How long to wait before taking the screenshot. Useful for waiting for animations.
|
|
36
|
-
*/
|
|
37
|
-
delay?: number;
|
|
38
|
-
}
|
|
39
|
-
interface OgImageOptions<T extends keyof OgImageComponents = 'NuxtSeo'> {
|
|
40
|
-
/**
|
|
41
|
-
* The width of the screenshot.
|
|
42
|
-
*
|
|
43
|
-
* @default 1200
|
|
44
|
-
*/
|
|
45
|
-
width?: number;
|
|
46
|
-
/**
|
|
47
|
-
* The height of the screenshot.
|
|
48
|
-
*
|
|
49
|
-
* @default 630
|
|
50
|
-
*/
|
|
51
|
-
height?: number;
|
|
52
|
-
/**
|
|
53
|
-
* The alt text for the image.
|
|
54
|
-
*/
|
|
55
|
-
alt?: string;
|
|
56
|
-
/**
|
|
57
|
-
* Use a prebuilt image instead of generating one.
|
|
58
|
-
*
|
|
59
|
-
* Should be an absolute URL.
|
|
60
|
-
*/
|
|
61
|
-
url?: string;
|
|
62
|
-
/**
|
|
63
|
-
* The name of the component to render.
|
|
64
|
-
*/
|
|
65
|
-
component?: T | string;
|
|
66
|
-
/**
|
|
67
|
-
* Props to pass to the component.
|
|
68
|
-
*/
|
|
69
|
-
props?: OgImageComponents[T] | Record<string, any>;
|
|
70
|
-
renderer?: 'chromium' | 'satori';
|
|
71
|
-
extension?: 'png' | 'jpeg' | 'jpg';
|
|
72
|
-
emojis?: IconifyEmojiIconSets;
|
|
73
|
-
/**
|
|
74
|
-
* Provide a static HTML template to render the OG Image instead of a component.
|
|
75
|
-
*/
|
|
76
|
-
html?: string;
|
|
77
|
-
resvg?: ResvgRenderOptions;
|
|
78
|
-
satori?: SatoriOptions;
|
|
79
|
-
screenshot?: Partial<ScreenshotOptions>;
|
|
80
|
-
sharp?: SharpOptions;
|
|
81
|
-
fonts?: InputFontConfig[];
|
|
82
|
-
cacheMaxAgeSeconds?: number;
|
|
83
|
-
/**
|
|
84
|
-
* @internal
|
|
85
|
-
*/
|
|
86
|
-
_query?: Record<string, any>;
|
|
87
|
-
}
|
|
88
|
-
interface FontConfig {
|
|
89
|
-
name: string;
|
|
90
|
-
style?: string;
|
|
91
|
-
weight?: string | number;
|
|
92
|
-
path?: string;
|
|
93
|
-
key?: string;
|
|
94
|
-
absolutePath?: boolean;
|
|
95
|
-
}
|
|
96
|
-
type InputFontConfig = (`${string}:${number}` | string | FontConfig);
|
|
97
|
-
interface RuntimeCompatibilitySchema {
|
|
98
|
-
chromium: 'chrome-launcher' | 'on-demand' | 'playwright' | false;
|
|
99
|
-
['css-inline']: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
100
|
-
resvg: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
101
|
-
satori: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
102
|
-
sharp: 'node' | false;
|
|
103
|
-
wasm?: NitroOptions['wasm'];
|
|
104
|
-
}
|
|
105
|
-
type CompatibilityFlags = Partial<Omit<RuntimeCompatibilitySchema, 'wasm'>>;
|
|
106
|
-
interface CompatibilityFlagEnvOverrides {
|
|
107
|
-
dev?: CompatibilityFlags;
|
|
108
|
-
runtime?: CompatibilityFlags;
|
|
109
|
-
prerender?: CompatibilityFlags;
|
|
110
|
-
}
|
|
6
|
+
import { OgImageOptions, InputFontConfig, CompatibilityFlagEnvOverrides, OgImageComponent } from '../dist/runtime/types.js';
|
|
111
7
|
|
|
112
8
|
interface ModuleOptions {
|
|
113
9
|
/**
|
|
@@ -121,7 +17,7 @@ interface ModuleOptions {
|
|
|
121
17
|
*
|
|
122
18
|
* You can use this to change the default template, image sizing and more.
|
|
123
19
|
*
|
|
124
|
-
* @default { component: '
|
|
20
|
+
* @default { component: 'NuxtSeo', width: 1200, height: 630, cache: true, cacheTtl: 24 * 60 * 60 * 1000 }
|
|
125
21
|
*/
|
|
126
22
|
defaults: OgImageOptions;
|
|
127
23
|
/**
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as fs from 'node:fs';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
4
|
-
import { useNuxt, tryResolveModule, addTemplate, resolvePath, loadNuxtModuleInstance, createResolver, defineNuxtModule,
|
|
4
|
+
import { useNuxt, tryResolveModule, addTemplate, resolvePath, loadNuxtModuleInstance, createResolver, defineNuxtModule, addImports, addBuildPlugin, hasNuxtModule, addServerPlugin, addServerHandler, addComponentsDir, addComponent, addPlugin } from '@nuxt/kit';
|
|
5
5
|
import { defu } from 'defu';
|
|
6
6
|
import { installNuxtSiteConfig } from 'nuxt-site-config/kit';
|
|
7
7
|
import { hash } from 'ohash';
|
|
@@ -19,6 +19,7 @@ import { pathToFileURL } from 'node:url';
|
|
|
19
19
|
import MagicString from 'magic-string';
|
|
20
20
|
import { stripLiteral } from 'strip-literal';
|
|
21
21
|
import { createUnplugin } from 'unplugin';
|
|
22
|
+
import { logger } from '../dist/runtime/logger.js';
|
|
22
23
|
import { Launcher } from 'chrome-launcher';
|
|
23
24
|
import { $fetch } from 'ofetch';
|
|
24
25
|
|
|
@@ -205,6 +206,7 @@ async function setupBuildHandler(config, resolve, nuxt = useNuxt()) {
|
|
|
205
206
|
nitroConfig.alias.bufferutil = "unenv/runtime/mock/proxy-cjs";
|
|
206
207
|
nitroConfig.alias["utf-8-validate"] = "unenv/runtime/mock/proxy-cjs";
|
|
207
208
|
nitroConfig.alias.queue = "unenv/runtime/mock/proxy-cjs";
|
|
209
|
+
nitroConfig.alias["chromium-bidi"] = "unenv/runtime/mock/proxy-cjs";
|
|
208
210
|
});
|
|
209
211
|
nuxt.hooks.hook("nitro:init", async (nitro) => {
|
|
210
212
|
const target = resolveNitroPreset(nitro.options);
|
|
@@ -544,13 +546,12 @@ const module = defineNuxtModule({
|
|
|
544
546
|
},
|
|
545
547
|
async setup(config, nuxt) {
|
|
546
548
|
const { resolve } = createResolver(import.meta.url);
|
|
547
|
-
const {
|
|
548
|
-
const logger = useLogger(name);
|
|
549
|
+
const { version } = await readPackageJSON(resolve("../package.json"));
|
|
549
550
|
logger.level = config.debug || nuxt.options.debug ? 4 : 3;
|
|
550
551
|
if (config.enabled === false) {
|
|
551
552
|
logger.debug("The module is disabled, skipping setup.");
|
|
552
|
-
["defineOgImage", "defineOgImageComponent", "defineOgImageScreenshot"].forEach((
|
|
553
|
-
addImports({ name
|
|
553
|
+
["defineOgImage", "defineOgImageComponent", "defineOgImageScreenshot"].forEach((name) => {
|
|
554
|
+
addImports({ name, from: resolve(`./runtime/app/composables/mock`) });
|
|
554
555
|
});
|
|
555
556
|
return;
|
|
556
557
|
}
|
|
@@ -723,13 +724,17 @@ const module = defineNuxtModule({
|
|
|
723
724
|
route: "/__og-image__/static/**",
|
|
724
725
|
handler: resolve(`${basePath}/image`)
|
|
725
726
|
});
|
|
726
|
-
nuxt.options.
|
|
727
|
-
|
|
727
|
+
if (!nuxt.options.dev) {
|
|
728
|
+
nuxt.options.optimization.treeShake.composables.client["nuxt-og-image"] = [];
|
|
729
|
+
}
|
|
730
|
+
["defineOgImage", "defineOgImageComponent", "defineOgImageScreenshot"].forEach((name) => {
|
|
728
731
|
addImports({
|
|
729
|
-
name
|
|
730
|
-
from: resolve(`./runtime/app/composables/${
|
|
732
|
+
name,
|
|
733
|
+
from: resolve(`./runtime/app/composables/${name}`)
|
|
731
734
|
});
|
|
732
|
-
nuxt.options.
|
|
735
|
+
if (!nuxt.options.dev) {
|
|
736
|
+
nuxt.options.optimization.treeShake.composables.client["nuxt-og-image"].push(name);
|
|
737
|
+
}
|
|
733
738
|
});
|
|
734
739
|
if (!config.zeroRuntime || nuxt.options.dev) {
|
|
735
740
|
await addComponentsDir({
|
|
@@ -742,10 +747,10 @@ const module = defineNuxtModule({
|
|
|
742
747
|
// new
|
|
743
748
|
"OgImage",
|
|
744
749
|
"OgImageScreenshot"
|
|
745
|
-
].forEach((
|
|
750
|
+
].forEach((name) => {
|
|
746
751
|
addComponent({
|
|
747
|
-
name
|
|
748
|
-
filePath: resolve(`./runtime/app/components/OgImage/${
|
|
752
|
+
name,
|
|
753
|
+
filePath: resolve(`./runtime/app/components/OgImage/${name}`),
|
|
749
754
|
...config.componentOptions
|
|
750
755
|
});
|
|
751
756
|
});
|
|
@@ -809,10 +814,10 @@ const module = defineNuxtModule({
|
|
|
809
814
|
extendTypes("nuxt-og-image", ({ typesPath }) => {
|
|
810
815
|
const componentImports = ogImageComponentCtx.components.map((component) => {
|
|
811
816
|
const relativeComponentPath = relative$1(resolve(nuxt.options.rootDir, nuxt.options.buildDir, "module"), component.path);
|
|
812
|
-
const
|
|
813
|
-
return
|
|
817
|
+
const name = config.componentDirs.sort((a, b) => b.length - a.length).reduce((name2, dir) => {
|
|
818
|
+
return name2.replace(new RegExp(`^${dir}`), "");
|
|
814
819
|
}, component.pascalName);
|
|
815
|
-
return ` '${
|
|
820
|
+
return ` '${name}': typeof import('${relativeComponentPath}')['default']`;
|
|
816
821
|
}).join("\n");
|
|
817
822
|
return `
|
|
818
823
|
declare module 'nitropack' {
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* @credits Full Stack Heroes <https://fullstackheroes.com/>
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
withDefaults(defineProps<{
|
|
7
|
-
title?: string
|
|
8
|
-
logo?: string
|
|
9
|
-
}>(), {
|
|
10
|
-
title: 'title',
|
|
11
|
-
logo: 'https://nuxt.com/assets/design-kit/logo-white.png',
|
|
12
|
-
})
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<div
|
|
17
|
-
:style="{ backgroundImage: 'linear-gradient(to right, #24243e, #302b63, #0f0c29)' }"
|
|
18
|
-
class="h-full w-full flex items-start justify-start"
|
|
19
|
-
>
|
|
20
|
-
<div class="flex items-start justify-start h-full">
|
|
21
|
-
<div class="flex flex-col justify-between w-full h-full p-20">
|
|
22
|
-
<img :src="logo" height="50">
|
|
23
|
-
<h1 class="text-[60px] text-white font-bold text-left">
|
|
24
|
-
{{ title }}
|
|
25
|
-
</h1>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* @credits Full Stack Heroes <https://fullstackheroes.com/>
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
withDefaults(defineProps<{
|
|
7
|
+
title?: string
|
|
8
|
+
logo?: string
|
|
9
|
+
}>(), {
|
|
10
|
+
title: 'title',
|
|
11
|
+
logo: 'https://nuxt.com/assets/design-kit/logo-white.png',
|
|
12
|
+
})
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div
|
|
17
|
+
:style="{ backgroundImage: 'linear-gradient(to right, #24243e, #302b63, #0f0c29)' }"
|
|
18
|
+
class="h-full w-full flex items-start justify-start"
|
|
19
|
+
>
|
|
20
|
+
<div class="flex items-start justify-start h-full">
|
|
21
|
+
<div class="flex flex-col justify-between w-full h-full p-20">
|
|
22
|
+
<img :src="logo" height="50">
|
|
23
|
+
<h1 class="text-[60px] text-white font-bold text-left">
|
|
24
|
+
{{ title }}
|
|
25
|
+
</h1>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* @credits @arashsheyda <https://github.com/arashsheyda>
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
withDefaults(defineProps<{
|
|
7
|
-
title?: string
|
|
8
|
-
description?: string
|
|
9
|
-
bg?: string
|
|
10
|
-
icon?: string
|
|
11
|
-
logo?: string
|
|
12
|
-
image?: string
|
|
13
|
-
username?: string
|
|
14
|
-
socials?: { name: string, icon: string }[]
|
|
15
|
-
}>(), {
|
|
16
|
-
bg: 'linear-gradient(to bottom right, #171717, #131313)',
|
|
17
|
-
})
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<template>
|
|
21
|
-
<div
|
|
22
|
-
class="relative h-full w-full flex items-center justify-center bg-neutral-900 text-white border-2 border-white"
|
|
23
|
-
:style="{ backgroundImage: bg }"
|
|
24
|
-
>
|
|
25
|
-
<div
|
|
26
|
-
v-if="image"
|
|
27
|
-
class="absolute inset-0 w-full h-full bg-center opacity-10"
|
|
28
|
-
:style="{ backgroundImage: `url(${image})` }"
|
|
29
|
-
/>
|
|
30
|
-
<div class="flex flex-col items-center text-center">
|
|
31
|
-
<h1 class="flex gap-4 text-7xl font-bold">
|
|
32
|
-
<Icon
|
|
33
|
-
v-if="icon"
|
|
34
|
-
:name="icon"
|
|
35
|
-
/>
|
|
36
|
-
{{ title }}
|
|
37
|
-
</h1>
|
|
38
|
-
<p class="text-2xl max-w-3xl">
|
|
39
|
-
{{ description }}
|
|
40
|
-
</p>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
<img
|
|
44
|
-
v-if="logo"
|
|
45
|
-
:src="logo"
|
|
46
|
-
class="absolute bottom-0 left-0 p-5"
|
|
47
|
-
style="height: 125px; width: 153px;"
|
|
48
|
-
>
|
|
49
|
-
<div class="absolute bottom-5 right-5 flex gap-4">
|
|
50
|
-
<div
|
|
51
|
-
v-if="username"
|
|
52
|
-
class="absolute bottom-12 right-8 font-bold"
|
|
53
|
-
>
|
|
54
|
-
{{ username }}
|
|
55
|
-
</div>
|
|
56
|
-
<Icon
|
|
57
|
-
v-for="social of socials"
|
|
58
|
-
:key="social.name"
|
|
59
|
-
:name="social.icon!"
|
|
60
|
-
class="w-7 h-7"
|
|
61
|
-
/>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* @credits @arashsheyda <https://github.com/arashsheyda>
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
withDefaults(defineProps<{
|
|
7
|
+
title?: string
|
|
8
|
+
description?: string
|
|
9
|
+
bg?: string
|
|
10
|
+
icon?: string
|
|
11
|
+
logo?: string
|
|
12
|
+
image?: string
|
|
13
|
+
username?: string
|
|
14
|
+
socials?: { name: string, icon: string }[]
|
|
15
|
+
}>(), {
|
|
16
|
+
bg: 'linear-gradient(to bottom right, #171717, #131313)',
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div
|
|
22
|
+
class="relative h-full w-full flex items-center justify-center bg-neutral-900 text-white border-2 border-white"
|
|
23
|
+
:style="{ backgroundImage: bg }"
|
|
24
|
+
>
|
|
25
|
+
<div
|
|
26
|
+
v-if="image"
|
|
27
|
+
class="absolute inset-0 w-full h-full bg-center opacity-10"
|
|
28
|
+
:style="{ backgroundImage: `url(${image})` }"
|
|
29
|
+
/>
|
|
30
|
+
<div class="flex flex-col items-center text-center">
|
|
31
|
+
<h1 class="flex gap-4 text-7xl font-bold">
|
|
32
|
+
<Icon
|
|
33
|
+
v-if="icon"
|
|
34
|
+
:name="icon"
|
|
35
|
+
/>
|
|
36
|
+
{{ title }}
|
|
37
|
+
</h1>
|
|
38
|
+
<p class="text-2xl max-w-3xl">
|
|
39
|
+
{{ description }}
|
|
40
|
+
</p>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<img
|
|
44
|
+
v-if="logo"
|
|
45
|
+
:src="logo"
|
|
46
|
+
class="absolute bottom-0 left-0 p-5"
|
|
47
|
+
style="height: 125px; width: 153px;"
|
|
48
|
+
>
|
|
49
|
+
<div class="absolute bottom-5 right-5 flex gap-4">
|
|
50
|
+
<div
|
|
51
|
+
v-if="username"
|
|
52
|
+
class="absolute bottom-12 right-8 font-bold"
|
|
53
|
+
>
|
|
54
|
+
{{ username }}
|
|
55
|
+
</div>
|
|
56
|
+
<Icon
|
|
57
|
+
v-for="social of socials"
|
|
58
|
+
:key="social.name"
|
|
59
|
+
:name="social.icon!"
|
|
60
|
+
class="w-7 h-7"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|