simple-content-site 3.1.1 → 3.1.3

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.
@@ -0,0 +1,76 @@
1
+ <script lang="ts" setup>
2
+ const props = withDefaults(defineProps<{ title?: string, description?: string, headline?: string }>(), {
3
+ title: 'title',
4
+ description: 'description',
5
+ })
6
+
7
+ const title = computed(() => (props.title || '').slice(0, 60))
8
+ const description = computed(() => (props.description || '').slice(0, 200))
9
+ </script>
10
+
11
+ <template>
12
+ <div class="w-full h-full flex flex-col justify-center bg-neutral-900">
13
+ <svg
14
+ class="absolute right-0 top-0 opacity-50"
15
+ width="629"
16
+ height="593"
17
+ viewBox="0 0 629 593"
18
+ fill="none"
19
+ xmlns="http://www.w3.org/2000/svg"
20
+ >
21
+ <g filter="url(#filter0_f_199_94966)">
22
+ <path
23
+ d="M628.5 -578L639.334 -94.4223L806.598 -548.281L659.827 -87.387L965.396 -462.344L676.925 -74.0787L1087.69 -329.501L688.776 -55.9396L1160.22 -164.149L694.095 -34.9354L1175.13 15.7948L692.306 -13.3422L1130.8 190.83L683.602 6.50012L1032.04 341.989L668.927 22.4412L889.557 452.891L649.872 32.7537L718.78 511.519L628.5 36.32L538.22 511.519L607.128 32.7537L367.443 452.891L588.073 22.4412L224.955 341.989L573.398 6.50012L126.198 190.83L564.694 -13.3422L81.8734 15.7948L562.905 -34.9354L96.7839 -164.149L568.224 -55.9396L169.314 -329.501L580.075 -74.0787L291.604 -462.344L597.173 -87.387L450.402 -548.281L617.666 -94.4223L628.5 -578Z"
24
+ fill="white"
25
+ />
26
+ </g>
27
+ <defs>
28
+ <filter
29
+ id="filter0_f_199_94966"
30
+ x="0.873535"
31
+ y="-659"
32
+ width="1255.25"
33
+ height="1251.52"
34
+ filterUnits="userSpaceOnUse"
35
+ color-interpolation-filters="sRGB"
36
+ >
37
+ <feFlood
38
+ flood-opacity="0"
39
+ result="BackgroundImageFix"
40
+ />
41
+ <feBlend
42
+ mode="normal"
43
+ in="SourceGraphic"
44
+ in2="BackgroundImageFix"
45
+ result="shape"
46
+ />
47
+ <feGaussianBlur
48
+ stdDeviation="40.5"
49
+ result="effect1_foregroundBlur_199_94966"
50
+ />
51
+ </filter>
52
+ </defs>
53
+ </svg>
54
+
55
+ <div class="pl-[100px]">
56
+ <p
57
+ v-if="headline"
58
+ class="uppercase text-[24px] text-emerald-500 mb-4 font-semibold"
59
+ >
60
+ {{ headline }}
61
+ </p>
62
+ <h1
63
+ v-if="title"
64
+ class="m-0 text-[75px] font-semibold mb-4 text-white flex items-center"
65
+ >
66
+ <span>{{ title }}</span>
67
+ </h1>
68
+ <p
69
+ v-if="description"
70
+ class="text-[32px] text-neutral-300 leading-tight w-[700px]"
71
+ >
72
+ {{ description }}
73
+ </p>
74
+ </div>
75
+ </div>
76
+ </template>
@@ -0,0 +1,73 @@
1
+ <script lang="ts" setup>
2
+ const props = withDefaults(defineProps<{ title?: string, description?: string, headline?: string }>(), {
3
+ title: 'title',
4
+ description: 'description',
5
+ })
6
+
7
+ const title = computed(() => (props.title || '').slice(0, 60))
8
+ const description = computed(() => (props.description || '').slice(0, 200))
9
+ </script>
10
+
11
+ <template>
12
+ <div class="w-full h-full flex items-center justify-center bg-neutral-900">
13
+ <svg
14
+ class="absolute right-0 top-0 opacity-50 "
15
+ width="629"
16
+ height="593"
17
+ viewBox="0 0 629 593"
18
+ fill="none"
19
+ xmlns="http://www.w3.org/2000/svg"
20
+ >
21
+ <g filter="url(#filter0_f_199_94966)">
22
+ <path
23
+ d="M628.5 -578L639.334 -94.4223L806.598 -548.281L659.827 -87.387L965.396 -462.344L676.925 -74.0787L1087.69 -329.501L688.776 -55.9396L1160.22 -164.149L694.095 -34.9354L1175.13 15.7948L692.306 -13.3422L1130.8 190.83L683.602 6.50012L1032.04 341.989L668.927 22.4412L889.557 452.891L649.872 32.7537L718.78 511.519L628.5 36.32L538.22 511.519L607.128 32.7537L367.443 452.891L588.073 22.4412L224.955 341.989L573.398 6.50012L126.198 190.83L564.694 -13.3422L81.8734 15.7948L562.905 -34.9354L96.7839 -164.149L568.224 -55.9396L169.314 -329.501L580.075 -74.0787L291.604 -462.344L597.173 -87.387L450.402 -548.281L617.666 -94.4223L628.5 -578Z"
24
+ fill="white"
25
+ />
26
+ </g>
27
+ <defs>
28
+ <filter
29
+ id="filter0_f_199_94966"
30
+ x="0.873535"
31
+ y="-659"
32
+ width="1255.25"
33
+ height="1251.52"
34
+ filterUnits="userSpaceOnUse"
35
+ color-interpolation-filters="sRGB"
36
+ >
37
+ <feFlood
38
+ flood-opacity="0"
39
+ result="BackgroundImageFix"
40
+ />
41
+ <feBlend
42
+ mode="normal"
43
+ in="SourceGraphic"
44
+ in2="BackgroundImageFix"
45
+ result="shape"
46
+ />
47
+ <feGaussianBlur
48
+ stdDeviation="40.5"
49
+ result="effect1_foregroundBlur_199_94966"
50
+ />
51
+ </filter>
52
+ </defs>
53
+ </svg>
54
+
55
+ <div class="flex flex-col justify-center p-8">
56
+ <div class="flex justify-center mb-8">
57
+ <AppHeaderLogo white />
58
+ </div>
59
+ <h1
60
+ v-if="title"
61
+ class="flex justify-center m-0 text-5xl font-semibold mb-4 text-white"
62
+ >
63
+ <span>{{ title }}</span>
64
+ </h1>
65
+ <p
66
+ v-if="description"
67
+ class="text-center text-2xl text-neutral-300 leading-tight"
68
+ >
69
+ {{ description }}
70
+ </p>
71
+ </div>
72
+ </div>
73
+ </template>
package/modules/config.ts CHANGED
@@ -7,6 +7,9 @@ import { getGitBranch, getGitEnv, getLocalGitInfo } from '../utils/git'
7
7
 
8
8
  interface SimpleContentSiteOptions {
9
9
  excludeContent?: string[]
10
+ experimental?: {
11
+ prerender?: boolean
12
+ }
10
13
  }
11
14
 
12
15
  const log = logger.withTag('SimpleContentSite')
@@ -17,6 +20,9 @@ export default defineNuxtModule<SimpleContentSiteOptions>({
17
20
  },
18
21
  defaults: {
19
22
  excludeContent: [],
23
+ experimental: {
24
+ prerender: false,
25
+ },
20
26
  },
21
27
  async setup(_options, nuxt) {
22
28
  const { resolve } = createResolver(import.meta.url)
@@ -1,6 +1,7 @@
1
- import { defineNuxtModule, createResolver } from '@nuxt/kit'
1
+ import { defineNuxtModule, createResolver, useNuxt } from '@nuxt/kit'
2
2
 
3
3
  const { resolve } = createResolver(import.meta.url)
4
+
4
5
  export default defineNuxtModule({
5
6
  meta: {
6
7
  // todo: rename this module to fit it's purpose
@@ -24,4 +25,28 @@ export default defineNuxtModule({
24
25
  loadComposableIfNotFound('useSitePage')
25
26
  })
26
27
  },
28
+ hooks: {
29
+ 'nitro:config'(nitroConfig) {
30
+ const nuxt = useNuxt()
31
+
32
+ // @ts-expect-error this cannot be typed from sibling module...
33
+ if (nuxt.options.runtimeConfig?.scs?.experimental?.prerender !== true) {
34
+ return
35
+ }
36
+
37
+ const i18nOptions = nuxt.options.i18n
38
+
39
+ const routes: string[] = []
40
+ if (!i18nOptions) {
41
+ routes.push('/')
42
+ }
43
+ else {
44
+ routes.push(...(i18nOptions.locales?.map(locale => typeof locale === 'string' ? `/${locale}` : `/${locale.code}`) || []))
45
+ }
46
+
47
+ nitroConfig.prerender = nitroConfig.prerender || {}
48
+ nitroConfig.prerender.routes = nitroConfig.prerender.routes || []
49
+ nitroConfig.prerender.routes.push(...(routes || []))
50
+ },
51
+ },
27
52
  })
package/nuxt.config.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { extendViteConfig, createResolver, useNuxt } from '@nuxt/kit'
1
+ import { extendViteConfig, createResolver } from '@nuxt/kit'
2
2
 
3
3
  const { resolve } = createResolver(import.meta.url)
4
4
 
@@ -58,32 +58,12 @@ export default defineNuxtConfig({
58
58
  compatibilityDate: '2025-07-22',
59
59
  vite: {
60
60
  optimizeDeps: {
61
- include: [
62
- ],
61
+ include: [],
63
62
  },
64
63
  resolve: {
65
64
  dedupe: ['vue', '@vue/runtime-core', '@vue/runtime-dom', '@vue/reactivity', '@vue/shared'],
66
65
  },
67
66
  },
68
- hooks: {
69
- 'nitro:config'(nitroConfig) {
70
- const nuxt = useNuxt()
71
-
72
- const i18nOptions = nuxt.options.i18n
73
-
74
- const routes: string[] = []
75
- if (!i18nOptions) {
76
- routes.push('/')
77
- }
78
- else {
79
- routes.push(...(i18nOptions.locales?.map(locale => typeof locale === 'string' ? `/${locale}` : `/${locale.code}`) || []))
80
- }
81
-
82
- nitroConfig.prerender = nitroConfig.prerender || {}
83
- nitroConfig.prerender.routes = nitroConfig.prerender.routes || []
84
- nitroConfig.prerender.routes.push(...(routes || []))
85
- },
86
- },
87
67
  icon: {
88
68
  provider: 'iconify',
89
69
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "simple-content-site",
3
3
  "description": "Nuxt layer for simple website with basic functions.",
4
- "version": "3.1.1",
4
+ "version": "3.1.3",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
7
7
  "repository": {
@@ -32,23 +32,28 @@
32
32
  "@nuxtjs/i18n": "^10.2.1",
33
33
  "@nuxtjs/mdc": "^0.20.0",
34
34
  "@nuxtjs/robots": "^6.0.6",
35
+ "@resvg/resvg-js": "^2.6.2",
36
+ "@resvg/resvg-wasm": "^2.6.2",
37
+ "@takumi-rs/core": "^0.73.1",
38
+ "@takumi-rs/wasm": "^0.73.1",
35
39
  "@vueuse/core": "^14.2.1",
36
40
  "defu": "^6.1.4",
37
41
  "exsolve": "^1.0.8",
38
42
  "git-url-parse": "^16.1.0",
43
+ "h3": "^1.15.10",
39
44
  "minimark": "^0.2.0",
40
45
  "motion-v": "^1.9.0",
41
46
  "nuxt-og-image": "^6.2.5",
42
47
  "pkg-types": "^2.3.0",
48
+ "satori": "^0.26.0",
43
49
  "scule": "^1.3.0",
44
50
  "tailwindcss": "^4.1.18",
45
51
  "ufo": "^1.6.3",
46
52
  "zod": "^4.3.5",
47
- "zod-to-json-schema": "^3.25.1",
48
- "h3": "^1.15.10"
53
+ "zod-to-json-schema": "^3.25.1"
49
54
  },
50
55
  "peerDependencies": {
51
- "nuxt": "4.x",
52
- "@vue/runtime-core": "3.5.27"
56
+ "@vue/runtime-core": "3.5.27",
57
+ "nuxt": "4.x"
53
58
  }
54
59
  }