@nextblock-cms/db 0.2.10 → 0.2.11
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/package.json +13 -3
- package/supabase/config.toml +319 -0
- package/supabase/migrations/20250513194738_setup_roles_and_profiles.sql +41 -0
- package/supabase/migrations/20250513194910_auto_create_profile_trigger.sql +48 -0
- package/supabase/migrations/20250513194916_rls_for_profiles.sql +85 -0
- package/supabase/migrations/20250514125634_fix_recursive_rls_policies.sql +51 -0
- package/supabase/migrations/20250514143016_setup_languages_table.sql +66 -0
- package/supabase/migrations/20250514171549_create_pages_table.sql +73 -0
- package/supabase/migrations/20250514171550_create_posts_table.sql +61 -0
- package/supabase/migrations/20250514171552_create_media_table.sql +45 -0
- package/supabase/migrations/20250514171553_create_blocks_table.sql +54 -0
- package/supabase/migrations/20250514171615_create_navigation_table.sql +56 -0
- package/supabase/migrations/20250514171627_rls_policies_for_content_tables.sql +70 -0
- package/supabase/migrations/20250515194800_add_translation_group_id.sql +39 -0
- package/supabase/migrations/20250520171900_add_translation_group_to_nav_items.sql +21 -0
- package/supabase/migrations/20250521143933_seed_homepage_and_nav.sql +64 -0
- package/supabase/migrations/20250523145833_add_feature_image_to_posts.sql +8 -0
- package/supabase/migrations/20250523151737_add_rls_to_media_table.sql +18 -0
- package/supabase/migrations/20250526110400_add_image_dimensions_to_media.sql +14 -0
- package/supabase/migrations/20250526153321_optimize_rls_policies.sql +188 -0
- package/supabase/migrations/20250526172513_resolve_select_policy_overlaps.sql +96 -0
- package/supabase/migrations/20250526172853_resolve_remaining_rls_v5.sql +107 -0
- package/supabase/migrations/20250526173538_finalize_rls_cleanup_v7.sql +110 -0
- package/supabase/migrations/20250526174710_separate_write_policies_v8.sql +147 -0
- package/supabase/migrations/20250526175359_fix_languages_select_rls_v9.sql +81 -0
- package/supabase/migrations/20250526182940_fix_nav_read_policy_v10.sql +27 -0
- package/supabase/migrations/20250526183239_fix_posts_read_rls_v11.sql +59 -0
- package/supabase/migrations/20250526183746_fix_media_select_rls_v12.sql +39 -0
- package/supabase/migrations/20250526184205_consolidate_content_read_rls_v13.sql +61 -0
- package/supabase/migrations/20250526185854_optimize_indexes.sql +47 -0
- package/supabase/migrations/20250526190900_debug_blocks_rls.sql +56 -0
- package/supabase/migrations/20250526191217_consolidate_blocks_select_rls.sql +79 -0
- package/supabase/migrations/20250526192822_fix_handle_languages_update_search_path.sql +32 -0
- package/supabase/migrations/20250527150500_fix_blocks_rls_policy.sql +54 -0
- package/supabase/migrations/20250602150602_add_blur_data_url_to_media.sql +4 -0
- package/supabase/migrations/20250602150959_add_variants_to_media.sql +4 -0
- package/supabase/migrations/20250618124000_create_get_my_claim_function.sql +5 -0
- package/supabase/migrations/20250618124100_create_logos_table.sql +29 -0
- package/supabase/migrations/20250618130000_fix_linter_warnings.sql +58 -0
- package/supabase/migrations/20250618151500_revert_storage_rls.sql +6 -0
- package/supabase/migrations/20250619084800_reinstate_storage_rls.sql +13 -0
- package/supabase/migrations/20250619092430_widen_logo_insert_policy.sql +6 -0
- package/supabase/migrations/20250619093122_fix_get_my_claim_volatility.sql +5 -0
- package/supabase/migrations/20250619104249_consolidated_logo_rls_fix.sql +56 -0
- package/supabase/migrations/20250619110700_fix_logo_rls_again.sql +59 -0
- package/supabase/migrations/20250619113200_add_file_path_to_media.sql +4 -0
- package/supabase/migrations/20250619124100_fix_rls_performance_warnings.sql +74 -0
- package/supabase/migrations/20250619195500_create_site_settings_table.sql +28 -0
- package/supabase/migrations/20250619201500_add_anon_read_to_site_settings.sql +7 -0
- package/supabase/migrations/20250619202000_add_is_active_to_languages.sql +5 -0
- package/supabase/migrations/20250620085700_fix_site_settings_write_rls.sql +27 -0
- package/supabase/migrations/20250620095500_fix_profiles_read_rls.sql +11 -0
- package/supabase/migrations/20250620100000_use_security_definer_for_rls.sql +39 -0
- package/supabase/migrations/20250620130000_add_public_read_to_logos.sql +4 -0
- package/supabase/migrations/20250708091700_create_translations_table.sql +55 -0
- package/supabase/migrations/20250708093403_seed_translations_table.sql +20 -0
- package/supabase/migrations/20250708110600_fix_translations_rls_policies.sql +11 -0
- package/supabase/migrations/20250708112300_add_new_translations.sql +9 -0
- package/supabase/migrations/20250709120000_create_revisions_tables.sql +109 -0
- package/supabase/migrations/20251001113000_add_folder_to_media.sql +14 -0
- package/supabase/migrations/20251112113736_fix_search_path_functions.sql +74 -0
- package/supabase/migrations/20251112124444_fix_rls_performance.sql +63 -0
- package/supabase/migrations/20251112125935_fix_combined_policies.sql +194 -0
- package/supabase/migrations/20251112132146_fix_foreign_key_indexes.sql +21 -0
- package/supabase/migrations/20251112132525_cleanup_unused_indexes.sql +10 -0
- package/supabase/migrations/20251112132822_fix_final_indexes.sql +14 -0
- package/supabase/migrations/20251112140000_scaffold_foundational_content.sql +95 -0
- package/supabase/migrations/20251112141000_seed_homepage_blocks.sql +656 -0
- package/supabase/migrations/20251112142000_seed_how_it_works_post_blocks.sql +100 -0
- package/supabase/migrations/20251112143000_seed_additional_translations.sql +102 -0
- package/supabase/migrations/20251112145000_grant_public_schema_usage.sql +6 -0
- package/supabase/migrations/20251112145500_grant_select_on_public_tables.sql +19 -0
- package/supabase/migrations/20251117093000_add_admin_created_flag.sql +21 -0
- package/supabase/migrations/20251117103000_relax_profile_username_constraint.sql +6 -0
- package/supabase/migrations/20251117110000_relax_profiles_site_settings_rls_for_signup.sql +20 -0
- package/supabase/migrations/20251117112000_fix_handle_new_user_role_enum.sql +45 -0
- package/supabase/migrations/20251117113000_cleanup_rls_duplicates.sql +20 -0
- package/supabase/migrations/20251117200000_media_service_role_insert.sql +14 -0
- package/supabase/migrations/20251117201500_media_service_role_select.sql +11 -0
- package/supabase/migrations/20251117203000_media_admin_writer_select.sql +11 -0
- package/supabase/migrations/20251117204500_fix_media_permissions.sql +43 -0
- package/lib/supabase/client.d.ts +0 -9
- package/lib/supabase/middleware.d.ts +0 -2
- package/lib/supabase/server.d.ts +0 -7
- package/lib/supabase/ssg-client.d.ts +0 -2
- package/lib/supabase/types.d.ts +0 -635
|
@@ -0,0 +1,656 @@
|
|
|
1
|
+
-- supabase/migrations/20251112141000_seed_homepage_blocks.sql
|
|
2
|
+
-- Populates the English Home page with structured blocks sourced from the landing page brief.
|
|
3
|
+
|
|
4
|
+
DO $seed$
|
|
5
|
+
DECLARE
|
|
6
|
+
v_en_lang_id BIGINT;
|
|
7
|
+
v_home_page_id BIGINT;
|
|
8
|
+
v_blog_page_id BIGINT;
|
|
9
|
+
BEGIN
|
|
10
|
+
SELECT id INTO v_en_lang_id
|
|
11
|
+
FROM public.languages
|
|
12
|
+
WHERE code = 'en'
|
|
13
|
+
LIMIT 1;
|
|
14
|
+
|
|
15
|
+
IF v_en_lang_id IS NULL THEN
|
|
16
|
+
RAISE EXCEPTION 'English language (code = en) not found. Run the language seed migration first.';
|
|
17
|
+
END IF;
|
|
18
|
+
|
|
19
|
+
SELECT id INTO v_home_page_id
|
|
20
|
+
FROM public.pages
|
|
21
|
+
WHERE slug = 'home'
|
|
22
|
+
AND language_id = v_en_lang_id
|
|
23
|
+
ORDER BY created_at DESC
|
|
24
|
+
LIMIT 1;
|
|
25
|
+
|
|
26
|
+
IF v_home_page_id IS NULL THEN
|
|
27
|
+
RAISE EXCEPTION 'Published English Home page not found. Run the page/post seed migration first.';
|
|
28
|
+
END IF;
|
|
29
|
+
|
|
30
|
+
SELECT id INTO v_blog_page_id
|
|
31
|
+
FROM public.pages
|
|
32
|
+
WHERE slug = 'articles'
|
|
33
|
+
AND language_id = v_en_lang_id
|
|
34
|
+
ORDER BY created_at DESC
|
|
35
|
+
LIMIT 1;
|
|
36
|
+
|
|
37
|
+
IF v_blog_page_id IS NULL THEN
|
|
38
|
+
RAISE EXCEPTION 'Published English Articles page not found. Run the page/post seed migration first.';
|
|
39
|
+
END IF;
|
|
40
|
+
|
|
41
|
+
DELETE FROM public.blocks
|
|
42
|
+
WHERE page_id = v_home_page_id;
|
|
43
|
+
|
|
44
|
+
DELETE FROM public.blocks
|
|
45
|
+
WHERE page_id = v_blog_page_id;
|
|
46
|
+
|
|
47
|
+
INSERT INTO public.blocks (page_id, language_id, block_type, content, "order")
|
|
48
|
+
VALUES
|
|
49
|
+
(
|
|
50
|
+
v_home_page_id,
|
|
51
|
+
v_en_lang_id,
|
|
52
|
+
'hero',
|
|
53
|
+
$${
|
|
54
|
+
"container_type": "container",
|
|
55
|
+
"background": {
|
|
56
|
+
"type": "gradient",
|
|
57
|
+
"gradient": {
|
|
58
|
+
"type": "linear",
|
|
59
|
+
"direction": "135deg",
|
|
60
|
+
"stops": [
|
|
61
|
+
{ "color": "#111827", "position": 0 },
|
|
62
|
+
{ "color": "#1f2937", "position": 45 },
|
|
63
|
+
{ "color": "#0f172a", "position": 100 }
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 2 },
|
|
68
|
+
"column_gap": "xl",
|
|
69
|
+
"padding": { "top": "xl", "bottom": "xl" },
|
|
70
|
+
"column_blocks": [
|
|
71
|
+
[
|
|
72
|
+
{
|
|
73
|
+
"block_type": "text",
|
|
74
|
+
"content": {
|
|
75
|
+
"html_content": "<h1 class='text-4xl md:text-5xl font-semibold tracking-tight text-white text-center'>Build Blazing-Fast, Modern Websites. Visually.</h1>"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"block_type": "text",
|
|
80
|
+
"content": {
|
|
81
|
+
"html_content": "<p class='text-xl text-muted-foreground text-center max-w-3xl mx-auto'>NextBlock is the open-source, developer-first Next.js CMS that merges 100% Lighthouse scores with a powerful visual block editor.</p>"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"block_type": "button",
|
|
86
|
+
"content": {
|
|
87
|
+
"text": "Get Started",
|
|
88
|
+
"url": "/docs/get-started",
|
|
89
|
+
"variant": "default",
|
|
90
|
+
"size": "lg"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"block_type": "button",
|
|
95
|
+
"content": {
|
|
96
|
+
"text": "View on GitHub",
|
|
97
|
+
"url": "https://github.com/Webman-Dev/nextblock-monorepo",
|
|
98
|
+
"variant": "outline",
|
|
99
|
+
"size": "lg"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"block_type": "text",
|
|
104
|
+
"content": {
|
|
105
|
+
"html_content": "<div class='flex flex-wrap justify-center gap-6 text-sm uppercase tracking-wide text-muted-foreground mt-6'><a href='https://github.com/Webman-Dev' target='_blank' rel='noopener noreferrer'>GitHub</a><a href='https://x.com/NextBlockCMS' target='_blank' rel='noopener noreferrer'>X</a><a href='https://www.linkedin.com/in/nextblock/' target='_blank' rel='noopener noreferrer'>LinkedIn</a><a href='https://dev.to/nextblockcms' target='_blank' rel='noopener noreferrer'>Dev.to</a><a href='https://www.npmjs.com/~nextblockcms' target='_blank' rel='noopener noreferrer'>npm</a></div>"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
[
|
|
110
|
+
{
|
|
111
|
+
"block_type": "text",
|
|
112
|
+
"content": {
|
|
113
|
+
"html_content": "<div class='p-6 border border-white/30 rounded-3xl bg-slate-900/70 backdrop-blur space-y-4 text-white shadow-2xl'><div><p class='text-xs text-white/70 uppercase tracking-wide'>Why teams switch</p><p class='text-2xl font-semibold mt-2'>100% Lighthouse</p><p class='text-sm text-white/80'>Edge-rendered marketing sites, launches, and docs with uncompromising performance.</p></div><ul class='space-y-2 text-sm text-white/80'><li>Next.js 15 with ISR and edge caching</li><li>Supabase auth, data, and storage</li><li>Notion-style block editor powered by Tiptap</li></ul><div class='rounded-3xl overflow-hidden border border-white/20'><img src='/images/NBcover.webp' alt='Nextblock cover showcasing dashboards and blocks' class='w-full h-auto object-cover' /></div></div>"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
]
|
|
118
|
+
}$$::jsonb,
|
|
119
|
+
0
|
|
120
|
+
),
|
|
121
|
+
(
|
|
122
|
+
v_home_page_id,
|
|
123
|
+
v_en_lang_id,
|
|
124
|
+
'section',
|
|
125
|
+
$${
|
|
126
|
+
"container_type": "container",
|
|
127
|
+
"background": { "type": "none" },
|
|
128
|
+
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 1 },
|
|
129
|
+
"column_gap": "lg",
|
|
130
|
+
"padding": { "top": "xl", "bottom": "xl" },
|
|
131
|
+
"column_blocks": [
|
|
132
|
+
[
|
|
133
|
+
{
|
|
134
|
+
"block_type": "heading",
|
|
135
|
+
"content": {
|
|
136
|
+
"level": 2,
|
|
137
|
+
"text_content": "Key Features: The Three Pillars of NextBlock",
|
|
138
|
+
"textAlign": "center"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"block_type": "text",
|
|
143
|
+
"content": {
|
|
144
|
+
"html_content": "<p class='text-lg text-muted-foreground text-center max-w-3xl mx-auto'>NextBlock is a holistic platform that unites performance, editorial experience, and developer control so every stakeholder delivers their best work.</p>"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"block_type": "text",
|
|
149
|
+
"content": {
|
|
150
|
+
"html_content": "<div class='grid gap-6 md:grid-cols-3 mt-10'><div class='p-6 rounded-2xl border border-white/10 bg-white/5'><h3 class='text-xl font-semibold mb-3'>Built for Speed. Obsessed with Performance.</h3><p class='text-sm text-muted-foreground'>Architected for 100% Lighthouse scores with global delivery and near-instant FCP.</p><ul class='mt-4 space-y-2 text-sm text-muted-foreground'><li><strong>Edge Caching & ISR:</strong> Serve pages worldwide with stale-while-revalidate.</li><li><strong>Critical CSS Inlining:</strong> Inline above-the-fold styles to eliminate render blocking.</li><li><strong>Advanced Image Optimization:</strong> AVIF output and blurred placeholders for instant paint.</li><li><strong>Intelligent Script Loading:</strong> Defer non-critical scripts to keep TTI silky smooth.</li></ul></div><div class='p-6 rounded-2xl border border-white/10 bg-white/[0.04]'><h3 class='text-xl font-semibold mb-3'>An Editing Experience Creators Will Love.</h3><p class='text-sm text-muted-foreground'>A low-code, Notion-style block editor empowers teams to ship pages without engineering help.</p><ul class='mt-4 space-y-2 text-sm text-muted-foreground'><li><strong>Notion-Style Editor:</strong> Slash commands, inline widgets, and drag-and-drop layouts.</li><li><strong>Seamless Bilingual Support:</strong> Manage every locale from a single interface.</li><li><strong>Content Revision History:</strong> Restore any previous version with a click.</li><li><strong>Organized Media Library:</strong> Folders, tags, and bulk actions keep assets tidy.</li></ul></div><div class='p-6 rounded-2xl border border-white/15 bg-gradient-to-br from-violet-600/20 to-blue-500/20'><h3 class='text-xl font-semibold mb-3'>Your Stack, Your Rules. Infinitely Extensible.</h3><p class='text-sm text-muted-foreground'>Open-source control with a clean Nx monorepo and a typed SDK for limitless customization.</p><ul class='mt-4 space-y-2 text-sm text-muted-foreground'><li><strong>Open Source & Self-Hosted:</strong> Own the code, the infra, and the data forever.</li><li><strong>Nx Monorepo Architecture:</strong> Share code, manage dependencies, and scale confidently.</li><li><strong>Developer SDK & CLI:</strong> Scaffold blocks, themes, and projects in minutes.</li><li><strong>Themable & Composable:</strong> Tailwind + shadcn/ui foundations for deep theming.</li></ul></div></div>"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
]
|
|
155
|
+
}$$::jsonb,
|
|
156
|
+
1
|
|
157
|
+
),
|
|
158
|
+
(
|
|
159
|
+
v_home_page_id,
|
|
160
|
+
v_en_lang_id,
|
|
161
|
+
'section',
|
|
162
|
+
$${
|
|
163
|
+
"container_type": "container",
|
|
164
|
+
"background": {
|
|
165
|
+
"type": "gradient",
|
|
166
|
+
"gradient": {
|
|
167
|
+
"type": "linear",
|
|
168
|
+
"direction": "160deg",
|
|
169
|
+
"stops": [
|
|
170
|
+
{ "color": "hsl(var(--primary))", "position": 0 },
|
|
171
|
+
{ "color": "hsl(var(--primary) / 0.35)", "position": 100 }
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 1 },
|
|
176
|
+
"column_gap": "lg",
|
|
177
|
+
"padding": { "top": "xl", "bottom": "xl" },
|
|
178
|
+
"column_blocks": [
|
|
179
|
+
[
|
|
180
|
+
{
|
|
181
|
+
"block_type": "heading",
|
|
182
|
+
"content": {
|
|
183
|
+
"level": 2,
|
|
184
|
+
"text_content": "Built with the Best.",
|
|
185
|
+
"textAlign": "center"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"block_type": "text",
|
|
190
|
+
"content": {
|
|
191
|
+
"html_content": "<p class='text-white/80 text-center max-w-2xl mx-auto'>Every layer of NextBlock leans on proven developer-first technology so the platform feels familiar, performant, and trustworthy from day one.</p><div class='grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-4 mt-8 text-sm font-semibold text-center text-white'><div class='p-3 rounded-xl border border-white/30 bg-white/5'>Next.js</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>React</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>Supabase</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>Tailwind CSS</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>shadcn/ui</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>Tiptap</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>Vercel</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>Nx</div></div>"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"block_type": "heading",
|
|
196
|
+
"content": {
|
|
197
|
+
"level": 2,
|
|
198
|
+
"text_content": "Powerful for Developers. Intuitive for Editors.",
|
|
199
|
+
"textAlign": "center"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"block_type": "text",
|
|
204
|
+
"content": {
|
|
205
|
+
"html_content": "<div class='grid md:grid-cols-2 gap-6 mt-8 text-white'><div class='p-6 rounded-2xl border border-white/20 bg-white/5'><h3 class='text-lg font-semibold mb-4'>For Content Creators & Editors</h3><ul class='space-y-3 text-sm text-white/80'><li><strong>Intuitive Block Editor:</strong> Drag-and-drop layouts with a Notion-like interface.</li><li><strong>Rich Content Blocks:</strong> Deploy heroes, galleries, testimonials, and more in one click.</li><li><strong>Effortless Media Management:</strong> Organize assets with folders, tags, and bulk actions.</li><li><strong>Worry-Free Revisions:</strong> Automatic version history with instant restore.</li><li><strong>Built-in Bilingual Support:</strong> Publish multi-language content from a single workspace.</li><li><strong>Real-time Collaboration Prep:</strong> Presence indicators and content locks prevent collisions.</li></ul></div><div class='p-6 rounded-2xl border border-white/25 bg-gradient-to-br from-white/10 to-white/5'><h3 class='text-lg font-semibold mb-4'>For Developers & Agencies</h3><ul class='space-y-3 text-sm text-white/80'><li><strong>Next.js 15 Core:</strong> Server Components, ISR, and Edge Functions ready out of the box.</li><li><strong>Supabase Integration:</strong> Postgres, auth, storage, and real-time APIs without glue code.</li><li><strong>Monorepo Ready:</strong> Nx-powered dev experience for scalable architectures.</li><li><strong>Extensible Block SDK:</strong> Ship fully typed custom blocks and widgets.</li><li><strong>Powerful CLI:</strong> Scaffold projects, modules, and admin flows from the terminal.</li><li><strong>Full Self-Hosting Control:</strong> Deploy anywhere for complete ownership.</li></ul></div></div>"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
]
|
|
210
|
+
}$$::jsonb,
|
|
211
|
+
2
|
|
212
|
+
),
|
|
213
|
+
(
|
|
214
|
+
v_home_page_id,
|
|
215
|
+
v_en_lang_id,
|
|
216
|
+
'section',
|
|
217
|
+
$${
|
|
218
|
+
"container_type": "container",
|
|
219
|
+
"background": { "type": "none" },
|
|
220
|
+
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 1 },
|
|
221
|
+
"column_gap": "lg",
|
|
222
|
+
"padding": { "top": "xl", "bottom": "xl" },
|
|
223
|
+
"column_blocks": [
|
|
224
|
+
[
|
|
225
|
+
{
|
|
226
|
+
"block_type": "heading",
|
|
227
|
+
"content": {
|
|
228
|
+
"level": 2,
|
|
229
|
+
"text_content": "More Than a CMS. An Ecosystem.",
|
|
230
|
+
"textAlign": "center"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"block_type": "text",
|
|
235
|
+
"content": {
|
|
236
|
+
"html_content": "<p class='text-muted-foreground text-center max-w-3xl mx-auto'>NextBlock is building a sustainable open-core roadmap so the platform grows with your business.</p>"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"block_type": "text",
|
|
241
|
+
"content": {
|
|
242
|
+
"html_content": "<div class='grid md:grid-cols-2 gap-6 mt-10'><div class='p-6 rounded-2xl border border-white/10 bg-white/5'><p class='text-xs uppercase tracking-wide text-muted-foreground mb-2'>Coming Soon</p><h3 class='text-xl font-semibold mb-2'>NextBlock Commerce</h3><p class='text-sm text-muted-foreground'>Transform your site into a composable storefront. The premium module ships product management, seamless Stripe payments, and e-commerce blocks that drop directly into the editor.</p></div><div class='p-6 rounded-2xl border border-white/10 bg-white/5'><p class='text-xs uppercase tracking-wide text-muted-foreground mb-2'>Build the Future</p><h3 class='text-xl font-semibold mb-2'>Plugin & Block Marketplace</h3><p class='text-sm text-muted-foreground'>A community-driven marketplace invites developers to publish and monetize custom blocks, themes, and plugins—turning NextBlock into an extensible ecosystem.</p></div></div>"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"block_type": "heading",
|
|
247
|
+
"content": {
|
|
248
|
+
"level": 2,
|
|
249
|
+
"text_content": "Join Our Community.",
|
|
250
|
+
"textAlign": "center"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"block_type": "text",
|
|
255
|
+
"content": {
|
|
256
|
+
"html_content": "<p class='text-muted-foreground text-center max-w-3xl mx-auto'>NextBlock is being built in the open. Star the repo, share feedback, and help define the future of performance-first content management.</p>"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"block_type": "text",
|
|
261
|
+
"content": {
|
|
262
|
+
"html_content": "<div class='grid gap-4 md:grid-cols-3 mt-8 text-sm'><a class='p-4 rounded-2xl border border-white/20 bg-white/5 hover:bg-white/10 transition' href='https://github.com/Webman-Dev' target='_blank' rel='noopener noreferrer'><strong class='block text-base'>GitHub</strong><span class='text-muted-foreground'>Star the repo & contribute</span></a><a class='p-4 rounded-2xl border border-white/20 bg-white/5 hover:bg-white/10 transition' href='https://x.com/NextBlockCMS' target='_blank' rel='noopener noreferrer'><strong class='block text-base'>X (Twitter)</strong><span class='text-muted-foreground'>Follow updates & announcements</span></a><a class='p-4 rounded-2xl border border-white/20 bg-white/5 hover:bg-white/10 transition' href='https://dev.to/nextblockcms' target='_blank' rel='noopener noreferrer'><strong class='block text-base'>Dev.to</strong><span class='text-muted-foreground'>Read technical deep dives</span></a><a class='p-4 rounded-2xl border border-white/20 bg-white/5 hover:bg-white/10 transition' href='https://www.linkedin.com/in/nextblock/' target='_blank' rel='noopener noreferrer'><strong class='block text-base'>LinkedIn</strong><span class='text-muted-foreground'>Connect with the project</span></a><a class='p-4 rounded-2xl border border-white/20 bg-white/5 hover:bg-white/10 transition' href='https://www.npmjs.com/~nextblockcms' target='_blank' rel='noopener noreferrer'><strong class='block text-base'>npm</strong><span class='text-muted-foreground'>View published packages</span></a><a class='p-4 rounded-2xl border border-white/20 bg-white/5 hover:bg-white/10 transition' href='https://github.com/Webman-Dev/nextblock-monorepo/discussions' target='_blank' rel='noopener noreferrer'><strong class='block text-base'>Discussions</strong><span class='text-muted-foreground'>Join the GitHub discussions</span></a></div>"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
]
|
|
267
|
+
}$$::jsonb,
|
|
268
|
+
3
|
|
269
|
+
),
|
|
270
|
+
(
|
|
271
|
+
v_home_page_id,
|
|
272
|
+
v_en_lang_id,
|
|
273
|
+
'section',
|
|
274
|
+
$${
|
|
275
|
+
"container_type": "container",
|
|
276
|
+
"background": {
|
|
277
|
+
"type": "gradient",
|
|
278
|
+
"gradient": {
|
|
279
|
+
"type": "linear",
|
|
280
|
+
"direction": "120deg",
|
|
281
|
+
"stops": [
|
|
282
|
+
{ "color": "hsl(var(--primary))", "position": 0 },
|
|
283
|
+
{ "color": "hsl(var(--primary) / 0.4)", "position": 100 }
|
|
284
|
+
]
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 1 },
|
|
288
|
+
"column_gap": "lg",
|
|
289
|
+
"padding": { "top": "xl", "bottom": "xl" },
|
|
290
|
+
"column_blocks": [
|
|
291
|
+
[
|
|
292
|
+
{
|
|
293
|
+
"block_type": "text",
|
|
294
|
+
"content": {
|
|
295
|
+
"html_content": "<h2 class='text-3xl md:text-4xl font-semibold text-center text-[hsl(var(--accent-foreground))]'>Have Questions or Want to Collaborate?</h2>"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"block_type": "text",
|
|
300
|
+
"content": {
|
|
301
|
+
"html_content": "<p class='text-center text-base text-[hsla(var(--accent-foreground),0.8)] max-w-2xl mx-auto'>NextBlock partners with early adopters to co-build features, sponsor modules, and shape the product direction.</p>"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"block_type": "button",
|
|
306
|
+
"content": {
|
|
307
|
+
"text": "Get in Touch",
|
|
308
|
+
"url": "mailto:hello@nextblockcms.com",
|
|
309
|
+
"variant": "default",
|
|
310
|
+
"size": "lg"
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
]
|
|
314
|
+
]
|
|
315
|
+
}$$::jsonb,
|
|
316
|
+
4
|
|
317
|
+
);
|
|
318
|
+
|
|
319
|
+
INSERT INTO public.blocks (page_id, language_id, block_type, content, "order")
|
|
320
|
+
VALUES
|
|
321
|
+
(
|
|
322
|
+
v_blog_page_id,
|
|
323
|
+
v_en_lang_id,
|
|
324
|
+
'hero',
|
|
325
|
+
$${
|
|
326
|
+
"container_type": "container",
|
|
327
|
+
"background": {
|
|
328
|
+
"type": "gradient",
|
|
329
|
+
"gradient": {
|
|
330
|
+
"type": "linear",
|
|
331
|
+
"direction": "120deg",
|
|
332
|
+
"stops": [
|
|
333
|
+
{ "color": "#0f172a", "position": 0 },
|
|
334
|
+
{ "color": "#1d2a44", "position": 100 }
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 2 },
|
|
339
|
+
"column_gap": "lg",
|
|
340
|
+
"padding": { "top": "xl", "bottom": "xl" },
|
|
341
|
+
"column_blocks": [
|
|
342
|
+
[
|
|
343
|
+
{
|
|
344
|
+
"block_type": "text",
|
|
345
|
+
"content": {
|
|
346
|
+
"html_content": "<p class='text-sm uppercase tracking-[0.3em] text-primary/70 text-center md:text-left'>The Nextblock Journal</p>"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"block_type": "text",
|
|
351
|
+
"content": {
|
|
352
|
+
"html_content": "<h2 class='text-3xl md:text-4xl font-semibold text-white text-center md:text-left'>Deep dives into performance, DX, and visual editing.</h2>"
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"block_type": "text",
|
|
357
|
+
"content": {
|
|
358
|
+
"html_content": "<p class='text-muted-foreground text-lg max-w-xl mx-auto md:mx-0 text-center md:text-left'>Explore architectural walkthroughs, Supabase recipes, and block editor experiments written by the Nextblock core team.</p>"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"block_type": "button",
|
|
363
|
+
"content": {
|
|
364
|
+
"text": "Explore Articles",
|
|
365
|
+
"url": "/articles#latest",
|
|
366
|
+
"variant": "default",
|
|
367
|
+
"size": "lg"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"block_type": "button",
|
|
372
|
+
"content": {
|
|
373
|
+
"text": "Subscribe for Updates",
|
|
374
|
+
"url": "https://github.com/Webman-Dev/nextblock-monorepo/discussions",
|
|
375
|
+
"variant": "outline",
|
|
376
|
+
"size": "lg"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
[
|
|
381
|
+
{
|
|
382
|
+
"block_type": "text",
|
|
383
|
+
"content": {
|
|
384
|
+
"html_content": "<div class='h-full flex items-center justify-center rounded-3xl overflow-hidden border border-white/10 bg-white/5 shadow-2xl p-2'><img src='/images/developer.webp' alt='Developer working with the Nextblock stack' class='w-full object-cover rounded-2xl' style='max-width: 350px;' /></div>"
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
]
|
|
388
|
+
]
|
|
389
|
+
}$$::jsonb,
|
|
390
|
+
0
|
|
391
|
+
),
|
|
392
|
+
(
|
|
393
|
+
v_blog_page_id,
|
|
394
|
+
v_en_lang_id,
|
|
395
|
+
'posts_grid',
|
|
396
|
+
$${
|
|
397
|
+
"postsPerPage": 6,
|
|
398
|
+
"columns": 3,
|
|
399
|
+
"showPagination": true,
|
|
400
|
+
"title": "Latest Deep Dives"
|
|
401
|
+
}$$::jsonb,
|
|
402
|
+
1
|
|
403
|
+
);
|
|
404
|
+
|
|
405
|
+
DELETE FROM public.navigation_items
|
|
406
|
+
WHERE menu_key = 'HEADER'
|
|
407
|
+
AND language_id = v_en_lang_id;
|
|
408
|
+
|
|
409
|
+
INSERT INTO public.navigation_items (language_id, menu_key, label, url, "order", page_id)
|
|
410
|
+
VALUES
|
|
411
|
+
(v_en_lang_id, 'HEADER', 'Home', '/', 0, v_home_page_id),
|
|
412
|
+
(v_en_lang_id, 'HEADER', 'Articles', '/articles', 1, v_blog_page_id);
|
|
413
|
+
END;
|
|
414
|
+
$seed$;
|
|
415
|
+
|
|
416
|
+
SELECT id AS home_page_id
|
|
417
|
+
FROM public.pages
|
|
418
|
+
WHERE slug = 'home'
|
|
419
|
+
AND language_id = (SELECT id FROM public.languages WHERE code = 'en' LIMIT 1)
|
|
420
|
+
ORDER BY created_at DESC
|
|
421
|
+
LIMIT 1;
|
|
422
|
+
|
|
423
|
+
SELECT id AS blog_page_id
|
|
424
|
+
FROM public.pages
|
|
425
|
+
WHERE slug = 'articles'
|
|
426
|
+
AND language_id = (SELECT id FROM public.languages WHERE code = 'en' LIMIT 1)
|
|
427
|
+
ORDER BY created_at DESC
|
|
428
|
+
LIMIT 1;
|
|
429
|
+
|
|
430
|
+
-- Seed French blocks for Accueil and Articles
|
|
431
|
+
DO $seed_fr$
|
|
432
|
+
DECLARE
|
|
433
|
+
v_fr_lang_id BIGINT;
|
|
434
|
+
v_home_page_fr_id BIGINT;
|
|
435
|
+
v_blog_page_fr_id BIGINT;
|
|
436
|
+
BEGIN
|
|
437
|
+
SELECT id INTO v_fr_lang_id FROM public.languages WHERE code = 'fr' LIMIT 1;
|
|
438
|
+
IF v_fr_lang_id IS NULL THEN
|
|
439
|
+
RAISE EXCEPTION 'French language (code = fr) not found. Run the language seed migration first.';
|
|
440
|
+
END IF;
|
|
441
|
+
|
|
442
|
+
SELECT id INTO v_home_page_fr_id FROM public.pages WHERE slug = 'accueil' AND language_id = v_fr_lang_id ORDER BY created_at DESC LIMIT 1;
|
|
443
|
+
SELECT id INTO v_blog_page_fr_id FROM public.pages WHERE slug = 'articles' AND language_id = v_fr_lang_id ORDER BY created_at DESC LIMIT 1;
|
|
444
|
+
|
|
445
|
+
IF v_home_page_fr_id IS NULL THEN
|
|
446
|
+
RAISE EXCEPTION 'French home page not found.';
|
|
447
|
+
END IF;
|
|
448
|
+
IF v_blog_page_fr_id IS NULL THEN
|
|
449
|
+
RAISE EXCEPTION 'French articles page not found.';
|
|
450
|
+
END IF;
|
|
451
|
+
|
|
452
|
+
DELETE FROM public.blocks WHERE page_id IN (v_home_page_fr_id, v_blog_page_fr_id);
|
|
453
|
+
|
|
454
|
+
DELETE FROM public.navigation_items
|
|
455
|
+
WHERE menu_key = 'HEADER'
|
|
456
|
+
AND language_id = v_fr_lang_id;
|
|
457
|
+
|
|
458
|
+
INSERT INTO public.navigation_items (language_id, menu_key, label, url, "order", page_id)
|
|
459
|
+
VALUES
|
|
460
|
+
(v_fr_lang_id, 'HEADER', 'Accueil', '/accueil', 0, v_home_page_fr_id),
|
|
461
|
+
(v_fr_lang_id, 'HEADER', 'Articles', '/articles', 1, v_blog_page_fr_id);
|
|
462
|
+
|
|
463
|
+
INSERT INTO public.blocks (page_id, language_id, block_type, content, "order")
|
|
464
|
+
VALUES
|
|
465
|
+
(
|
|
466
|
+
v_home_page_fr_id,
|
|
467
|
+
v_fr_lang_id,
|
|
468
|
+
'hero',
|
|
469
|
+
$${
|
|
470
|
+
"container_type": "container",
|
|
471
|
+
"background": {
|
|
472
|
+
"type": "gradient",
|
|
473
|
+
"gradient": {
|
|
474
|
+
"type": "linear",
|
|
475
|
+
"direction": "135deg",
|
|
476
|
+
"stops": [
|
|
477
|
+
{ "color": "#111827", "position": 0 },
|
|
478
|
+
{ "color": "#1f2937", "position": 45 },
|
|
479
|
+
{ "color": "#0f172a", "position": 100 }
|
|
480
|
+
]
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 2 },
|
|
484
|
+
"column_gap": "xl",
|
|
485
|
+
"padding": { "top": "xl", "bottom": "xl" },
|
|
486
|
+
"column_blocks": [
|
|
487
|
+
[
|
|
488
|
+
{ "block_type": "text", "content": { "html_content": "<h1 class='text-4xl md:text-5xl font-semibold tracking-tight text-white text-center'>Créez des sites modernes ultra-rapides. Visuellement.</h1>" } },
|
|
489
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-xl text-muted-foreground text-center max-w-3xl mx-auto'>NextBlock est un CMS Next.js open-source et orienté développeurs, alliant scores Lighthouse parfaits et éditeur visuel puissant.</p>" } },
|
|
490
|
+
{ "block_type": "button", "content": { "text": "Commencer", "url": "/docs/get-started", "variant": "default", "size": "lg" } },
|
|
491
|
+
{ "block_type": "button", "content": { "text": "Voir sur GitHub", "url": "https://github.com/Webman-Dev/nextblock-monorepo", "variant": "outline", "size": "lg" } },
|
|
492
|
+
{ "block_type": "text", "content": { "html_content": "<div class='flex flex-wrap justify-center gap-6 text-sm uppercase tracking-wide text-muted-foreground mt-6'><a href='https://github.com/Webman-Dev' target='_blank' rel='noopener noreferrer'>GitHub</a><a href='https://x.com/NextBlockCMS' target='_blank' rel='noopener noreferrer'>X</a><a href='https://www.linkedin.com/in/nextblock/' target='_blank' rel='noopener noreferrer'>LinkedIn</a><a href='https://dev.to/nextblockcms' target='_blank' rel='noopener noreferrer'>Dev.to</a><a href='https://www.npmjs.com/~nextblockcms' target='_blank' rel='noopener noreferrer'>npm</a></div>" } }
|
|
493
|
+
],
|
|
494
|
+
[
|
|
495
|
+
{ "block_type": "text", "content": { "html_content": "<div class='p-6 border border-white/30 rounded-3xl bg-slate-900/70 backdrop-blur space-y-4 text-white shadow-2xl'><div><p class='text-xs text-white/70 uppercase tracking-wide'>Pourquoi migrer</p><p class='text-2xl font-semibold mt-2'>100% Lighthouse</p><p class='text-sm text-white/80'>Sites marketing et docs rendus à l'edge avec des performances irréprochables.</p></div><ul class='space-y-2 text-sm text-white/80'><li>Next.js 15 avec ISR et cache edge</li><li>Supabase pour l'auth, les données et le stockage</li><li>Éditeur de blocs type Notion sur Tiptap</li></ul><div class='rounded-3xl overflow-hidden border border-white/20'><img src='/images/NBcover.webp' alt='Couverture Nextblock avec tableaux de bord et blocs' class='w-full h-auto object-cover' /></div></div>" } }
|
|
496
|
+
]
|
|
497
|
+
]
|
|
498
|
+
}$$::jsonb,
|
|
499
|
+
0
|
|
500
|
+
),
|
|
501
|
+
(
|
|
502
|
+
v_home_page_fr_id,
|
|
503
|
+
v_fr_lang_id,
|
|
504
|
+
'section',
|
|
505
|
+
$${
|
|
506
|
+
"container_type": "container",
|
|
507
|
+
"background": { "type": "none" },
|
|
508
|
+
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 1 },
|
|
509
|
+
"column_gap": "lg",
|
|
510
|
+
"padding": { "top": "xl", "bottom": "xl" },
|
|
511
|
+
"column_blocks": [
|
|
512
|
+
[
|
|
513
|
+
{ "block_type": "heading", "content": { "level": 2, "text_content": "Fonctionnalités clés : les trois piliers de NextBlock", "textAlign": "center" } },
|
|
514
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-lg text-muted-foreground text-center max-w-3xl mx-auto'>NextBlock unifie performances, expérience éditoriale et contrôle développeur pour que chaque équipe livre son meilleur travail.</p>" } },
|
|
515
|
+
{ "block_type": "text", "content": { "html_content": "<div class='grid gap-6 md:grid-cols-3 mt-10'><div class='p-6 rounded-2xl border border-white/10 bg-white/5'><h3 class='text-xl font-semibold mb-3'>Conçu pour la vitesse. Obsédé par la performance.</h3><p class='text-sm text-muted-foreground'>Pensé pour des scores Lighthouse parfaits avec une diffusion mondiale et un FCP quasi instantané.</p><ul class='mt-4 space-y-2 text-sm text-muted-foreground'><li><strong>Edge Caching & ISR :</strong> servez vos pages partout avec stale-while-revalidate.</li><li><strong>Critical CSS :</strong> styles above-the-fold en ligne pour éviter les blocages.</li><li><strong>Optimisation d'images avancée :</strong> AVIF et placeholders floutés pour un rendu immédiat.</li><li><strong>Chargement intelligent des scripts :</strong> différé pour garder un TTI fluide.</li></ul></div><div class='p-6 rounded-2xl border border-white/10 bg-white/[0.04]'><h3 class='text-xl font-semibold mb-3'>Une expérience d'édition que les créateurs adorent.</h3><p class='text-sm text-muted-foreground'>Un éditeur façon Notion pour publier sans dépendre des développeurs.</p><ul class='mt-4 space-y-2 text-sm text-muted-foreground'><li><strong>Modèles visuels :</strong> héros, galeries, témoignages prêts à l'emploi.</li><li><strong>Média simplifié :</strong> dossiers, tags et actions groupées.</li><li><strong>Restauration sans stress :</strong> historique complet pour retrouver la bonne version.</li><li><strong>Publication multilingue :</strong> gérez plusieurs langues depuis un seul espace.</li></ul></div><div class='p-6 rounded-2xl border border-white/10 bg-white/5'><h3 class='text-xl font-semibold mb-3'>Pensé pour les devs, prêt pour les équipes.</h3><p class='text-sm text-muted-foreground'>Un socle Next.js + Supabase modulaire, extensible et auto-hébergeable.</p><ul class='mt-4 space-y-2 text-sm text-muted-foreground'><li><strong>SDK de blocs :</strong> composants typés et extensibles.</li><li><strong>CLI prêt à l'emploi :</strong> générez modules et flux admin en minutes.</li><li><strong>Monorepo Nx :</strong> dépendances lisibles et maintenables.</li><li><strong>Liberté d'hébergement :</strong> gardez la maîtrise complète de vos données.</li></ul></div></div>" } }
|
|
516
|
+
]
|
|
517
|
+
]
|
|
518
|
+
}$$::jsonb,
|
|
519
|
+
1
|
|
520
|
+
),
|
|
521
|
+
(
|
|
522
|
+
v_home_page_fr_id,
|
|
523
|
+
v_fr_lang_id,
|
|
524
|
+
'section',
|
|
525
|
+
$${
|
|
526
|
+
"container_type": "container",
|
|
527
|
+
"background": {
|
|
528
|
+
"type": "gradient",
|
|
529
|
+
"gradient": {
|
|
530
|
+
"type": "linear",
|
|
531
|
+
"direction": "160deg",
|
|
532
|
+
"stops": [
|
|
533
|
+
{ "color": "hsl(var(--primary))", "position": 0 },
|
|
534
|
+
{ "color": "hsl(var(--primary) / 0.35)", "position": 100 }
|
|
535
|
+
]
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 1 },
|
|
539
|
+
"column_gap": "lg",
|
|
540
|
+
"padding": { "top": "xl", "bottom": "xl" },
|
|
541
|
+
"column_blocks": [
|
|
542
|
+
[
|
|
543
|
+
{ "block_type": "heading", "content": { "level": 2, "text_content": "Conçu avec les meilleurs outils.", "textAlign": "center" } },
|
|
544
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-white/80 text-center max-w-2xl mx-auto'>Chaque couche de NextBlock repose sur des technologies éprouvées pour offrir une expérience familière, performante et fiable.</p><div class='grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-4 mt-8 text-sm font-semibold text-center text-white'><div class='p-3 rounded-xl border border-white/30 bg-white/5'>Next.js</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>React</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>Supabase</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>Tailwind CSS</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>shadcn/ui</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>Tiptap</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>Vercel</div><div class='p-3 rounded-xl border border-white/30 bg-white/5'>Nx</div></div>" } },
|
|
545
|
+
{ "block_type": "heading", "content": { "level": 2, "text_content": "Puissant pour les développeurs. Intuitif pour les éditeurs.", "textAlign": "center" } },
|
|
546
|
+
{ "block_type": "text", "content": { "html_content": "<div class='grid md:grid-cols-2 gap-6 mt-8 text-white'><div class='p-6 rounded-2xl border border-white/20 bg-white/5'><h3 class='text-lg font-semibold mb-4'>Pour les créateurs de contenu</h3><ul class='space-y-3 text-sm text-white/80'><li><strong>Éditeur de blocs :</strong> glisser-déposer façon Notion.</li><li><strong>Blocs riches :</strong> héros, galeries, témoignages.</li><li><strong>Médiathèque :</strong> dossiers, tags et actions groupées.</li><li><strong>Versions sécurisées :</strong> historique et restauration instantanée.</li><li><strong>Support bilingue :</strong> gérez plusieurs langues depuis un seul espace.</li><li><strong>Collaboration prête :</strong> présences et verrous pour éviter les conflits.</li></ul></div><div class='p-6 rounded-2xl border border-white/25 bg-gradient-to-br from-white/10 to-white/5'><h3 class='text-lg font-semibold mb-4'>Pour développeurs et agences</h3><ul class='space-y-3 text-sm text-white/80'><li><strong>Next.js 15 :</strong> Server Components, ISR et Edge prêts à l'emploi.</li><li><strong>Supabase :</strong> Postgres, auth, stockage, temps réel.</li><li><strong>Monorepo Nx :</strong> dépendances lisibles et centrales.</li><li><strong>SDK de blocs :</strong> widgets typés et extensibles.</li><li><strong>CLI :</strong> générez modules et flux admin en minutes.</li><li><strong>Auto-hébergement :</strong> gardez la maîtrise de vos données.</li></ul></div></div>" } }
|
|
547
|
+
]
|
|
548
|
+
]
|
|
549
|
+
}$$::jsonb,
|
|
550
|
+
2
|
|
551
|
+
),
|
|
552
|
+
(
|
|
553
|
+
v_home_page_fr_id,
|
|
554
|
+
v_fr_lang_id,
|
|
555
|
+
'section',
|
|
556
|
+
$${
|
|
557
|
+
"container_type": "container",
|
|
558
|
+
"background": { "type": "none" },
|
|
559
|
+
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 1 },
|
|
560
|
+
"column_gap": "lg",
|
|
561
|
+
"padding": { "top": "xl", "bottom": "xl" },
|
|
562
|
+
"column_blocks": [
|
|
563
|
+
[
|
|
564
|
+
{ "block_type": "heading", "content": { "level": 2, "text_content": "Plus qu'un CMS. Un écosystème.", "textAlign": "center" } },
|
|
565
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-muted-foreground text-center max-w-3xl mx-auto'>NextBlock construit une feuille de route open-core durable qui évolue avec votre activité.</p>" } },
|
|
566
|
+
{ "block_type": "text", "content": { "html_content": "<div class='grid md:grid-cols-2 gap-6 mt-10'><div class='p-6 rounded-2xl border border-white/10 bg-white/5'><p class='text-xs uppercase tracking-wide text-muted-foreground mb-2'>Bientôt</p><h3 class='text-xl font-semibold mb-2'>NextBlock Commerce</h3><p class='text-sm text-muted-foreground'>Transformez votre site en vitrine composable. Module premium avec gestion produits, paiement Stripe et blocs e-commerce prêts à l'emploi.</p></div><div class='p-6 rounded-2xl border border-white/10 bg-white/5'><p class='text-xs uppercase tracking-wide text-muted-foreground mb-2'>Construisez le futur</p><h3 class='text-xl font-semibold mb-2'>Marketplace de plugins & blocs</h3><p class='text-sm text-muted-foreground'>Une marketplace communautaire pour publier et monétiser blocs, thèmes et plugins — pour un écosystème extensible.</p></div></div>" } },
|
|
567
|
+
{ "block_type": "heading", "content": { "level": 2, "text_content": "Rejoignez la communauté.", "textAlign": "center" } },
|
|
568
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-muted-foreground text-center max-w-3xl mx-auto'>NextBlock se construit en public. Ajoutez une étoile, partagez vos retours et façonnez l'avenir du CMS orienté performance.</p>" } },
|
|
569
|
+
{ "block_type": "text", "content": { "html_content": "<div class='grid gap-4 md:grid-cols-3 mt-8 text-sm'><a class='p-4 rounded-2xl border border-white/20 bg-white/5 hover:bg-white/10 transition' href='https://github.com/Webman-Dev' target='_blank' rel='noopener noreferrer'><strong class='block text-base'>GitHub</strong><span class='text-muted-foreground'>Ajoutez une étoile & contribuez</span></a><a class='p-4 rounded-2xl border border-white/20 bg-white/5 hover:bg-white/10 transition' href='https://x.com/NextBlockCMS' target='_blank' rel='noopener noreferrer'><strong class='block text-base'>X (Twitter)</strong><span class='text-muted-foreground'>Suivez les annonces</span></a><a class='p-4 rounded-2xl border border-white/20 bg-white/5 hover:bg-white/10 transition' href='https://dev.to/nextblockcms' target='_blank' rel='noopener noreferrer'><strong class='block text-base'>Dev.to</strong><span class='text-muted-foreground'>Lisez nos articles techniques</span></a><a class='p-4 rounded-2xl border border-white/20 bg-white/5 hover:bg-white/10 transition' href='https://www.linkedin.com/in/nextblock/' target='_blank' rel='noopener noreferrer'><strong class='block text-base'>LinkedIn</strong><span class='text-muted-foreground'>Connectez-vous au projet</span></a><a class='p-4 rounded-2xl border border-white/20 bg-white/5 hover:bg-white/10 transition' href='https://www.npmjs.com/~nextblockcms' target='_blank' rel='noopener noreferrer'><strong class='block text-base'>npm</strong><span class='text-muted-foreground'>Consultez les packages publiés</span></a><a class='p-4 rounded-2xl border border-white/20 bg-white/5 hover:bg-white/10 transition' href='https://github.com/Webman-Dev/nextblock-monorepo/discussions' target='_blank' rel='noopener noreferrer'><strong class='block text-base'>Discussions</strong><span class='text-muted-foreground'>Rejoignez la discussion sur GitHub</span></a></div>" } }
|
|
570
|
+
]
|
|
571
|
+
]
|
|
572
|
+
}$$::jsonb,
|
|
573
|
+
3
|
|
574
|
+
),
|
|
575
|
+
(
|
|
576
|
+
v_home_page_fr_id,
|
|
577
|
+
v_fr_lang_id,
|
|
578
|
+
'section',
|
|
579
|
+
$${
|
|
580
|
+
"container_type": "container",
|
|
581
|
+
"background": {
|
|
582
|
+
"type": "gradient",
|
|
583
|
+
"gradient": {
|
|
584
|
+
"type": "linear",
|
|
585
|
+
"direction": "120deg",
|
|
586
|
+
"stops": [
|
|
587
|
+
{ "color": "hsl(var(--primary))", "position": 0 },
|
|
588
|
+
{ "color": "hsl(var(--primary) / 0.4)", "position": 100 }
|
|
589
|
+
]
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 1 },
|
|
593
|
+
"column_gap": "lg",
|
|
594
|
+
"padding": { "top": "xl", "bottom": "xl" },
|
|
595
|
+
"column_blocks": [
|
|
596
|
+
[
|
|
597
|
+
{ "block_type": "text", "content": { "html_content": "<h2 class='text-3xl md:text-4xl font-semibold text-center text-[hsl(var(--accent-foreground))]'>Des questions ou envie de collaborer ?</h2>" } },
|
|
598
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-center text-base text-[hsla(var(--accent-foreground),0.8)] max-w-2xl mx-auto'>NextBlock co-construit avec des partenaires : fonctionnalités, modules sponsorisés et direction produit.</p>" } },
|
|
599
|
+
{ "block_type": "button", "content": { "text": "Nous contacter", "url": "mailto:hello@nextblockcms.com", "variant": "default", "size": "lg" } }
|
|
600
|
+
]
|
|
601
|
+
]
|
|
602
|
+
}$$::jsonb,
|
|
603
|
+
4
|
|
604
|
+
);
|
|
605
|
+
|
|
606
|
+
INSERT INTO public.blocks (page_id, language_id, block_type, content, "order")
|
|
607
|
+
VALUES
|
|
608
|
+
(
|
|
609
|
+
v_blog_page_fr_id,
|
|
610
|
+
v_fr_lang_id,
|
|
611
|
+
'hero',
|
|
612
|
+
$${
|
|
613
|
+
"container_type": "container",
|
|
614
|
+
"background": {
|
|
615
|
+
"type": "gradient",
|
|
616
|
+
"gradient": {
|
|
617
|
+
"type": "linear",
|
|
618
|
+
"direction": "120deg",
|
|
619
|
+
"stops": [
|
|
620
|
+
{ "color": "#0f172a", "position": 0 },
|
|
621
|
+
{ "color": "#1d2a44", "position": 100 }
|
|
622
|
+
]
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 2 },
|
|
626
|
+
"column_gap": "lg",
|
|
627
|
+
"padding": { "top": "xl", "bottom": "xl" },
|
|
628
|
+
"column_blocks": [
|
|
629
|
+
[
|
|
630
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-sm uppercase tracking-[0.3em] text-primary/70 text-center md:text-left'>Le journal Nextblock</p>" } },
|
|
631
|
+
{ "block_type": "text", "content": { "html_content": "<h2 class='text-3xl md:text-4xl font-semibold text-white text-center md:text-left'>Plongées dans la performance, l''expérience dev et l''édition visuelle.</h2>" } },
|
|
632
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-lg max-w-xl mx-auto md:mx-0 text-center md:text-left text-white'>Walkthroughs d''architecture, recettes Supabase et expérimentations éditeur écrits par l''équipe Nextblock.</p>" } },
|
|
633
|
+
{ "block_type": "button", "content": { "text": "Explorer les articles", "url": "/articles#latest", "variant": "default", "size": "lg" } },
|
|
634
|
+
{ "block_type": "button", "content": { "text": "S''abonner aux mises à jour", "url": "https://github.com/Webman-Dev/nextblock-monorepo/discussions", "variant": "outline", "size": "lg" } }
|
|
635
|
+
],
|
|
636
|
+
[
|
|
637
|
+
{ "block_type": "text", "content": { "html_content": "<div class='rounded-3xl overflow-hidden border border-white/10 bg-white/5 shadow-2xl p-2'><img src='/images/developer.webp' alt='Développeur travaillant avec la stack Nextblock' class='w-full object-cover rounded-2xl' style='max-width: 350px;' /></div>" } }
|
|
638
|
+
]
|
|
639
|
+
]
|
|
640
|
+
}$$::jsonb,
|
|
641
|
+
0
|
|
642
|
+
),
|
|
643
|
+
(
|
|
644
|
+
v_blog_page_fr_id,
|
|
645
|
+
v_fr_lang_id,
|
|
646
|
+
'posts_grid',
|
|
647
|
+
$${
|
|
648
|
+
"postsPerPage": 6,
|
|
649
|
+
"columns": 3,
|
|
650
|
+
"showPagination": true,
|
|
651
|
+
"title": "Derniers articles"
|
|
652
|
+
}$$::jsonb,
|
|
653
|
+
1
|
|
654
|
+
);
|
|
655
|
+
END;
|
|
656
|
+
$seed_fr$;
|