@nextblock-cms/db 0.2.19 → 0.2.21
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 +1 -1
- package/supabase/migrations/20250521143933_seed_homepage_and_nav.sql +0 -12
- package/supabase/migrations/20251112140000_scaffold_foundational_content.sql +19 -6
- package/supabase/migrations/20251112141000_seed_homepage_blocks.sql +69 -72
- package/supabase/migrations/20251126100000_seed_site_logo.sql +33 -0
- package/supabase/migrations/20251126133000_fix_blocks_rls.sql +49 -0
package/package.json
CHANGED
|
@@ -40,18 +40,6 @@ BEGIN
|
|
|
40
40
|
VALUES (fr_lang_id, admin_user_id, 'Accueil', 'accueil', 'published', 'Page d''accueil', 'Ceci est la page d''accueil.', home_page_translation_group)
|
|
41
41
|
RETURNING id INTO fr_home_page_id;
|
|
42
42
|
|
|
43
|
-
-- Seed initial content block for English Homepage (optional)
|
|
44
|
-
IF en_home_page_id IS NOT NULL THEN
|
|
45
|
-
INSERT INTO public.blocks (page_id, language_id, block_type, content, "order")
|
|
46
|
-
VALUES (en_home_page_id, en_lang_id, 'text', '{"html_content": "<p>Welcome to the English homepage!</p><p>This content is dynamically managed by the CMS.</p>"}', 0);
|
|
47
|
-
END IF;
|
|
48
|
-
|
|
49
|
-
-- Seed initial content block for French Homepage (optional)
|
|
50
|
-
IF fr_home_page_id IS NOT NULL THEN
|
|
51
|
-
INSERT INTO public.blocks (page_id, language_id, block_type, content, "order")
|
|
52
|
-
VALUES (fr_home_page_id, fr_lang_id, 'text', '{"html_content": "<p>Bienvenue sur la page d''accueil en français !</p><p>Ce contenu est géré dynamiquement par le CMS.</p>"}', 0);
|
|
53
|
-
END IF;
|
|
54
|
-
|
|
55
43
|
-- Seed English Navigation Item for Homepage (linked to the English page, but URL is root)
|
|
56
44
|
INSERT INTO public.navigation_items (language_id, menu_key, label, url, "order", page_id, translation_group_id)
|
|
57
45
|
VALUES (en_lang_id, 'HEADER', 'Home', '/', 0, en_home_page_id, home_nav_translation_group);
|
|
@@ -63,20 +63,33 @@ on conflict (language_id, slug) do update
|
|
|
63
63
|
status = excluded.status,
|
|
64
64
|
translation_group_id = excluded.translation_group_id;
|
|
65
65
|
|
|
66
|
+
-- Seed the featured image media record
|
|
67
|
+
v_feature_media_id := gen_random_uuid();
|
|
68
|
+
|
|
69
|
+
insert into public.media (id, file_name, object_key, file_type, size_bytes)
|
|
70
|
+
values (v_feature_media_id, 'programmer-upscaled.webp', '/images/programmer-upscaled.webp', 'image/webp', 100000)
|
|
71
|
+
on conflict (object_key) do update
|
|
72
|
+
set file_name = excluded.file_name,
|
|
73
|
+
file_type = excluded.file_type,
|
|
74
|
+
size_bytes = excluded.size_bytes
|
|
75
|
+
returning id into v_feature_media_id;
|
|
76
|
+
|
|
66
77
|
-- seed the flagship How It Works blog post in EN + FR
|
|
67
|
-
insert into public.posts (language_id, title, slug, status, translation_group_id)
|
|
68
|
-
values (v_en_lang_id, 'How NextBlock Works: A Look Under the Hood', 'how-nextblock-works', 'published', v_how_it_works_post_group_id)
|
|
78
|
+
insert into public.posts (language_id, title, slug, status, translation_group_id, feature_image_id)
|
|
79
|
+
values (v_en_lang_id, 'How NextBlock Works: A Look Under the Hood', 'how-nextblock-works', 'published', v_how_it_works_post_group_id, v_feature_media_id)
|
|
69
80
|
on conflict (language_id, slug) do update
|
|
70
81
|
set title = excluded.title,
|
|
71
82
|
status = excluded.status,
|
|
72
|
-
translation_group_id = excluded.translation_group_id
|
|
83
|
+
translation_group_id = excluded.translation_group_id,
|
|
84
|
+
feature_image_id = excluded.feature_image_id;
|
|
73
85
|
|
|
74
|
-
insert into public.posts (language_id, title, slug, status, translation_group_id)
|
|
75
|
-
values (v_fr_lang_id, 'Comment NextBlock Fonctionne : Regard Sous le Capot', 'comment-nextblock-fonctionne', 'published', v_how_it_works_post_group_id)
|
|
86
|
+
insert into public.posts (language_id, title, slug, status, translation_group_id, feature_image_id)
|
|
87
|
+
values (v_fr_lang_id, 'Comment NextBlock Fonctionne : Regard Sous le Capot', 'comment-nextblock-fonctionne', 'published', v_how_it_works_post_group_id, v_feature_media_id)
|
|
76
88
|
on conflict (language_id, slug) do update
|
|
77
89
|
set title = excluded.title,
|
|
78
90
|
status = excluded.status,
|
|
79
|
-
translation_group_id = excluded.translation_group_id
|
|
91
|
+
translation_group_id = excluded.translation_group_id,
|
|
92
|
+
feature_image_id = excluded.feature_image_id;
|
|
80
93
|
|
|
81
94
|
-- Feature image for the flagship post can be set later via CMS; no seed insert for static asset.
|
|
82
95
|
end;
|
|
@@ -58,34 +58,35 @@ BEGIN
|
|
|
58
58
|
"type": "linear",
|
|
59
59
|
"direction": "135deg",
|
|
60
60
|
"stops": [
|
|
61
|
-
{ "color": "#
|
|
62
|
-
{ "color": "#
|
|
63
|
-
{ "color": "#
|
|
61
|
+
{ "color": "#020817", "position": 0 },
|
|
62
|
+
{ "color": "#0f172a", "position": 50 },
|
|
63
|
+
{ "color": "#1e293b", "position": 100 }
|
|
64
64
|
]
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
"responsive_columns": { "mobile": 1, "tablet": 1, "desktop": 2 },
|
|
68
68
|
"column_gap": "xl",
|
|
69
|
+
"vertical_alignment": "center",
|
|
69
70
|
"padding": { "top": "xl", "bottom": "xl" },
|
|
70
71
|
"column_blocks": [
|
|
71
72
|
[
|
|
72
73
|
{
|
|
73
74
|
"block_type": "text",
|
|
74
75
|
"content": {
|
|
75
|
-
"html_content": "<h1 class='text-
|
|
76
|
+
"html_content": "<h1 class='text-5xl md:text-6xl font-extrabold tracking-tight text-white text-center leading-tight'>Build <span class='relative inline-block mx-1 group'><span class='absolute inset-0 bg-gradient-to-r from-blue-600 to-cyan-400 translate-y-1 md:translate-y-2 transform -skew-x-12 rounded-sm shadow-lg group-hover:skew-x-0 transition-transform duration-300 ease-out'></span><span class='relative text-white italic px-1'>Blazing-Fast</span></span><br class='md:hidden' /> Websites.</h1>"
|
|
76
77
|
}
|
|
77
78
|
},
|
|
78
79
|
{
|
|
79
80
|
"block_type": "text",
|
|
80
81
|
"content": {
|
|
81
|
-
"html_content": "<p class='text-xl text-
|
|
82
|
+
"html_content": "<p class='text-xl text-slate-300 text-center max-w-3xl mx-auto mt-4 leading-relaxed'>NextBlock is the open-source, developer-first Next.js CMS that merges 100% Lighthouse scores with a powerful visual block editor.</p>"
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
{
|
|
85
86
|
"block_type": "button",
|
|
86
87
|
"content": {
|
|
87
88
|
"text": "Get Started",
|
|
88
|
-
"url": "/
|
|
89
|
+
"url": "/article/how-nextblock-works",
|
|
89
90
|
"variant": "default",
|
|
90
91
|
"size": "lg"
|
|
91
92
|
}
|
|
@@ -102,7 +103,7 @@ BEGIN
|
|
|
102
103
|
{
|
|
103
104
|
"block_type": "text",
|
|
104
105
|
"content": {
|
|
105
|
-
"html_content": "<div class='flex flex-wrap justify-center gap-6 text-sm uppercase tracking-wide text-
|
|
106
|
+
"html_content": "<div class='flex flex-wrap justify-center gap-6 text-sm uppercase tracking-wide text-slate-400 mt-8'><a href='https://github.com/Webman-Dev' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>GitHub</a><a href='https://x.com/NextBlockCMS' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>X</a><a href='https://www.linkedin.com/in/nextblock/' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>LinkedIn</a><a href='https://dev.to/nextblockcms' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>Dev.to</a><a href='https://www.npmjs.com/~nextblockcms' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>npm</a></div>"
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
],
|
|
@@ -110,7 +111,7 @@ BEGIN
|
|
|
110
111
|
{
|
|
111
112
|
"block_type": "text",
|
|
112
113
|
"content": {
|
|
113
|
-
"html_content": "<div class='p-
|
|
114
|
+
"html_content": "<div class='p-10 border border-white/10 rounded-3xl bg-white/5 backdrop-blur-xl shadow-2xl relative overflow-hidden group'><div class='absolute inset-0 bg-gradient-to-br from-blue-500/10 to-purple-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500'></div><div class='relative z-10'><p class='text-xs text-white uppercase tracking-widest font-semibold mb-2'>Why teams switch</p><p class='text-3xl font-bold text-white mb-2'>100% Lighthouse</p><p class='text-base text-slate-300 mb-6'>Edge-rendered marketing sites, launches, and docs with uncompromising performance.</p><ul class='space-y-3 text-sm text-slate-200'><li><span class='text-blue-400 mr-2'>✓</span> Next.js 16 with ISR and edge caching</li><li><span class='text-blue-400 mr-2'>✓</span> Supabase auth, data, and storage</li><li><span class='text-blue-400 mr-2'>✓</span> Notion-style block editor powered by Tiptap</li></ul><div class='mt-6 rounded-2xl overflow-hidden border border-white/10 shadow-lg'><img src='/images/NBcover.webp' alt='Nextblock cover showcasing dashboards and blocks' class='w-full h-auto object-cover transform group-hover:scale-105 transition-transform duration-700' /></div></div></div>"
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
]
|
|
@@ -141,13 +142,13 @@ BEGIN
|
|
|
141
142
|
{
|
|
142
143
|
"block_type": "text",
|
|
143
144
|
"content": {
|
|
144
|
-
"html_content": "<p class='text-lg text-
|
|
145
|
+
"html_content": "<p class='text-lg text-slate-600 dark:text-slate-400 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
|
}
|
|
146
147
|
},
|
|
147
148
|
{
|
|
148
149
|
"block_type": "text",
|
|
149
150
|
"content": {
|
|
150
|
-
"html_content": "<div class='grid gap-
|
|
151
|
+
"html_content": "<div class='grid gap-8 md:grid-cols-3 mt-12'><div class='p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 backdrop-blur-sm hover:bg-slate-100 dark:hover:bg-white/10 transition-colors duration-300'><div class='w-12 h-12 rounded-xl flex items-center justify-center mb-6'><svg class='w-6 h-6' fill='none' stroke='currentColor' viewBox='0 0 24 24'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13 10V3L4 14h7v7l9-11h-7z'></path></svg></div><h3 class='text-xl font-bold text-slate-900 dark:text-white mb-3'>Built for Speed.</h3><p class='text-sm text-slate-600 dark:text-slate-400 leading-relaxed'>Architected for 100% Lighthouse scores with global delivery and near-instant FCP.</p><ul class='mt-6 space-y-3 text-sm text-slate-600 dark:text-slate-400'><li><strong class='text-slate-800 dark:text-slate-200'>Edge Caching & ISR:</strong> Serve pages worldwide.</li><li><strong class='text-slate-800 dark:text-slate-200'>Critical CSS:</strong> Inline styles to eliminate blocking.</li><li><strong class='text-slate-800 dark:text-slate-200'>Image Opt:</strong> AVIF & blurred placeholders.</li></ul></div><div class='p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 backdrop-blur-sm hover:bg-slate-100 dark:hover:bg-white/10 transition-colors duration-300'><div class='w-12 h-12 rounded-xl flex items-center justify-center mb-6'><svg class='w-6 h-6' fill='none' stroke='currentColor' viewBox='0 0 24 24'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z'></path></svg></div><h3 class='text-xl font-bold text-slate-900 dark:text-white mb-3'>Editor-First Experience.</h3><p class='text-sm text-slate-600 dark:text-slate-400 leading-relaxed'>A low-code, Notion-style block editor empowers teams to ship pages without engineering help.</p><ul class='mt-6 space-y-3 text-sm text-slate-600 dark:text-slate-400'><li><strong class='text-slate-800 dark:text-slate-200'>Notion-Style:</strong> Slash commands & drag-and-drop.</li><li><strong class='text-slate-800 dark:text-slate-200'>Bilingual:</strong> Manage locales from one interface.</li><li><strong class='text-slate-800 dark:text-slate-200'>History:</strong> Restore any version with a click.</li></ul></div><div class='p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-gradient-to-br from-blue-50 to-purple-50 dark:from-blue-600/20 dark:to-purple-600/20 backdrop-blur-sm hover:from-blue-100 hover:to-purple-100 dark:hover:from-blue-600/30 dark:hover:to-purple-600/30 transition-colors duration-300'><div class='w-12 h-12 bg-white/50 dark:bg-white/10 rounded-xl flex items-center justify-center mb-6'><svg class='w-6 h-6 text-slate-900 dark:text-white' fill='none' stroke='currentColor' viewBox='0 0 24 24'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10'></path></svg></div><h3 class='text-xl font-bold text-slate-900 dark:text-white mb-3'>Infinitely Extensible.</h3><p class='text-sm text-slate-700 dark:text-slate-200 leading-relaxed'>Open-source control with a clean Nx monorepo and a typed SDK for limitless customization.</p><ul class='mt-6 space-y-3 text-sm text-slate-700 dark:text-slate-200'><li><strong class='text-slate-900 dark:text-white'>Open Source:</strong> Own the code & data forever.</li><li><strong class='text-slate-900 dark:text-white'>Nx Monorepo:</strong> Scale confidently.</li><li><strong class='text-slate-900 dark:text-white'>Developer SDK:</strong> Scaffold blocks in minutes.</li></ul></div></div>"
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
154
|
]
|
|
@@ -165,10 +166,10 @@ BEGIN
|
|
|
165
166
|
"type": "gradient",
|
|
166
167
|
"gradient": {
|
|
167
168
|
"type": "linear",
|
|
168
|
-
"direction": "
|
|
169
|
+
"direction": "180deg",
|
|
169
170
|
"stops": [
|
|
170
|
-
{ "color": "
|
|
171
|
-
{ "color": "
|
|
171
|
+
{ "color": "#0f172a", "position": 0 },
|
|
172
|
+
{ "color": "#020817", "position": 100 }
|
|
172
173
|
]
|
|
173
174
|
}
|
|
174
175
|
},
|
|
@@ -178,31 +179,27 @@ BEGIN
|
|
|
178
179
|
"column_blocks": [
|
|
179
180
|
[
|
|
180
181
|
{
|
|
181
|
-
"block_type": "
|
|
182
|
+
"block_type": "text",
|
|
182
183
|
"content": {
|
|
183
|
-
"
|
|
184
|
-
"text_content": "Built with the Best.",
|
|
185
|
-
"textAlign": "center"
|
|
184
|
+
"html_content": "<h2 class='text-3xl md:text-4xl font-bold text-white text-center mb-6'>Built with the Best.</h2>"
|
|
186
185
|
}
|
|
187
186
|
},
|
|
188
187
|
{
|
|
189
188
|
"block_type": "text",
|
|
190
189
|
"content": {
|
|
191
|
-
"html_content": "<p class='text-
|
|
190
|
+
"html_content": "<p class='text-slate-400 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-10 text-sm font-semibold text-center text-white'><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>Next.js</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>React</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>Supabase</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>Tailwind</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>shadcn/ui</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>Tiptap</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>Vercel</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>Nx</div></div>"
|
|
192
191
|
}
|
|
193
192
|
},
|
|
194
193
|
{
|
|
195
|
-
"block_type": "
|
|
194
|
+
"block_type": "text",
|
|
196
195
|
"content": {
|
|
197
|
-
"
|
|
198
|
-
"text_content": "Powerful for Developers. Intuitive for Editors.",
|
|
199
|
-
"textAlign": "center"
|
|
196
|
+
"html_content": "<h2 class='text-3xl md:text-4xl font-bold text-white text-center mb-6 mt-16'>Powerful for Developers. Intuitive for Editors.</h2>"
|
|
200
197
|
}
|
|
201
198
|
},
|
|
202
199
|
{
|
|
203
200
|
"block_type": "text",
|
|
204
201
|
"content": {
|
|
205
|
-
"html_content": "<div class='grid md:grid-cols-2 gap-
|
|
202
|
+
"html_content": "<div class='grid md:grid-cols-2 gap-8 mt-10 text-white'><div class='p-8 rounded-3xl border border-white/10 bg-white/5 backdrop-blur-sm'><h3 class='text-xl font-bold mb-6 text-blue-400'>For Content Creators</h3><ul class='space-y-4 text-sm text-slate-300'><li><strong class='text-white block mb-1'>Intuitive Block Editor</strong>Drag-and-drop layouts with a Notion-like interface.</li><li><strong class='text-white block mb-1'>Rich Content Blocks</strong>Deploy heroes, galleries, testimonials, and more in one click.</li><li><strong class='text-white block mb-1'>Effortless Media Management</strong>Organize assets with folders, tags, and bulk actions.</li><li><strong class='text-white block mb-1'>Worry-Free Revisions</strong>Automatic version history with instant restore.</li></ul></div><div class='p-8 rounded-3xl border border-white/10 bg-gradient-to-br from-white/5 to-white/[0.02] backdrop-blur-sm'><h3 class='text-xl font-bold mb-6 text-purple-400'>For Developers</h3><ul class='space-y-4 text-sm text-slate-300'><li><strong class='text-white block mb-1'>Next.js 16 Core</strong>Server Components, ISR, and Edge Functions ready out of the box.</li><li><strong class='text-white block mb-1'>Supabase Integration</strong>Postgres, auth, storage, and real-time APIs without glue code.</li><li><strong class='text-white block mb-1'>Monorepo Ready</strong>Nx-powered dev experience for scalable architectures.</li><li><strong class='text-white block mb-1'>Extensible Block SDK</strong>Ship fully typed custom blocks and widgets.</li></ul></div></div>"
|
|
206
203
|
}
|
|
207
204
|
}
|
|
208
205
|
]
|
|
@@ -233,13 +230,13 @@ BEGIN
|
|
|
233
230
|
{
|
|
234
231
|
"block_type": "text",
|
|
235
232
|
"content": {
|
|
236
|
-
"html_content": "<p class='text-
|
|
233
|
+
"html_content": "<p class='text-slate-600 dark:text-slate-400 text-center max-w-3xl mx-auto'>NextBlock is building a sustainable open-core roadmap so the platform grows with your business.</p>"
|
|
237
234
|
}
|
|
238
235
|
},
|
|
239
236
|
{
|
|
240
237
|
"block_type": "text",
|
|
241
238
|
"content": {
|
|
242
|
-
"html_content": "<div class='grid md:grid-cols-2 gap-6 mt-10'><div class='p-
|
|
239
|
+
"html_content": "<div class='grid md:grid-cols-2 gap-6 mt-10'><div class='p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-blue-500/30 transition-colors'><p class='text-xs uppercase tracking-wide text-blue-600 dark:text-blue-400 mb-2 font-bold'>Coming Soon</p><h3 class='text-xl font-bold text-slate-900 dark:text-white mb-3'>NextBlock Commerce</h3><p class='text-sm text-slate-600 dark:text-slate-400'>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-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-purple-500/30 transition-colors'><p class='text-xs uppercase tracking-wide text-purple-600 dark:text-purple-400 mb-2 font-bold'>Build the Future</p><h3 class='text-xl font-bold text-slate-900 dark:text-white mb-3'>Plugin & Block Marketplace</h3><p class='text-sm text-slate-600 dark:text-slate-400'>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
240
|
}
|
|
244
241
|
},
|
|
245
242
|
{
|
|
@@ -253,13 +250,13 @@ BEGIN
|
|
|
253
250
|
{
|
|
254
251
|
"block_type": "text",
|
|
255
252
|
"content": {
|
|
256
|
-
"html_content": "<p class='text-
|
|
253
|
+
"html_content": "<p class='text-slate-600 dark:text-slate-400 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
254
|
}
|
|
258
255
|
},
|
|
259
256
|
{
|
|
260
257
|
"block_type": "text",
|
|
261
258
|
"content": {
|
|
262
|
-
"html_content": "<div class='grid gap-4 md:grid-cols-3 mt-
|
|
259
|
+
"html_content": "<div class='grid gap-4 md:grid-cols-3 mt-10 text-sm'><a class='p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:bg-slate-100 dark:hover:bg-white/10 transition-all hover:scale-[1.02]' href='https://github.com/Webman-Dev' target='_blank' rel='noopener noreferrer'><strong class='block text-base text-slate-900 dark:text-white mb-1'>GitHub</strong><span class='text-slate-600 dark:text-slate-400'>Star the repo & contribute</span></a><a class='p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:bg-slate-100 dark:hover:bg-white/10 transition-all hover:scale-[1.02]' href='https://x.com/NextBlockCMS' target='_blank' rel='noopener noreferrer'><strong class='block text-base text-slate-900 dark:text-white mb-1'>X (Twitter)</strong><span class='text-slate-600 dark:text-slate-400'>Follow updates & announcements</span></a><a class='p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:bg-slate-100 dark:hover:bg-white/10 transition-all hover:scale-[1.02]' href='https://dev.to/nextblockcms' target='_blank' rel='noopener noreferrer'><strong class='block text-base text-slate-900 dark:text-white mb-1'>Dev.to</strong><span class='text-slate-600 dark:text-slate-400'>Read technical deep dives</span></a></div>"
|
|
263
260
|
}
|
|
264
261
|
}
|
|
265
262
|
]
|
|
@@ -277,10 +274,10 @@ BEGIN
|
|
|
277
274
|
"type": "gradient",
|
|
278
275
|
"gradient": {
|
|
279
276
|
"type": "linear",
|
|
280
|
-
"direction": "
|
|
277
|
+
"direction": "180deg",
|
|
281
278
|
"stops": [
|
|
282
|
-
{ "color": "
|
|
283
|
-
{ "color": "
|
|
279
|
+
{ "color": "#020817", "position": 0 },
|
|
280
|
+
{ "color": "#0f172a", "position": 100 }
|
|
284
281
|
]
|
|
285
282
|
}
|
|
286
283
|
},
|
|
@@ -292,13 +289,13 @@ BEGIN
|
|
|
292
289
|
{
|
|
293
290
|
"block_type": "text",
|
|
294
291
|
"content": {
|
|
295
|
-
"html_content": "<h2 class='text-3xl md:text-4xl font-
|
|
292
|
+
"html_content": "<h2 class='text-3xl md:text-4xl font-bold text-center text-white mb-4'>Have Questions?</h2>"
|
|
296
293
|
}
|
|
297
294
|
},
|
|
298
295
|
{
|
|
299
296
|
"block_type": "text",
|
|
300
297
|
"content": {
|
|
301
|
-
"html_content": "<p class='text-center text-
|
|
298
|
+
"html_content": "<p class='text-center text-lg text-slate-300 max-w-2xl mx-auto mb-8'>NextBlock partners with early adopters to co-build features, sponsor modules, and shape the product direction.</p>"
|
|
302
299
|
}
|
|
303
300
|
},
|
|
304
301
|
{
|
|
@@ -328,10 +325,10 @@ BEGIN
|
|
|
328
325
|
"type": "gradient",
|
|
329
326
|
"gradient": {
|
|
330
327
|
"type": "linear",
|
|
331
|
-
"direction": "
|
|
328
|
+
"direction": "135deg",
|
|
332
329
|
"stops": [
|
|
333
|
-
{ "color": "#
|
|
334
|
-
{ "color": "#
|
|
330
|
+
{ "color": "#020817", "position": 0 },
|
|
331
|
+
{ "color": "#1e293b", "position": 100 }
|
|
335
332
|
]
|
|
336
333
|
}
|
|
337
334
|
},
|
|
@@ -343,19 +340,19 @@ BEGIN
|
|
|
343
340
|
{
|
|
344
341
|
"block_type": "text",
|
|
345
342
|
"content": {
|
|
346
|
-
"html_content": "<p class='text-sm uppercase tracking-[0.3em] text-
|
|
343
|
+
"html_content": "<p class='text-sm uppercase tracking-[0.3em] text-blue-400 font-bold text-center md:text-left mb-4'>The Nextblock Journal</p>"
|
|
347
344
|
}
|
|
348
345
|
},
|
|
349
346
|
{
|
|
350
347
|
"block_type": "text",
|
|
351
348
|
"content": {
|
|
352
|
-
"html_content": "<h2 class='text-
|
|
349
|
+
"html_content": "<h2 class='text-4xl md:text-5xl font-bold text-white text-center md:text-left mb-6'>Deep dives into performance, DX, and visual editing.</h2>"
|
|
353
350
|
}
|
|
354
351
|
},
|
|
355
352
|
{
|
|
356
353
|
"block_type": "text",
|
|
357
354
|
"content": {
|
|
358
|
-
"html_content": "<p class='text-
|
|
355
|
+
"html_content": "<p class='text-slate-300 text-lg max-w-xl mx-auto md:mx-0 text-center md:text-left leading-relaxed'>Explore architectural walkthroughs, Supabase recipes, and block editor experiments written by the Nextblock core team.</p>"
|
|
359
356
|
}
|
|
360
357
|
},
|
|
361
358
|
{
|
|
@@ -381,7 +378,7 @@ BEGIN
|
|
|
381
378
|
{
|
|
382
379
|
"block_type": "text",
|
|
383
380
|
"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-
|
|
381
|
+
"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-4 backdrop-blur-sm'><img src='/images/developer.webp' alt='Developer working with the Nextblock stack' class='w-full object-cover rounded-2xl shadow-lg' style='max-width: 400px;' /></div>"
|
|
385
382
|
}
|
|
386
383
|
}
|
|
387
384
|
]
|
|
@@ -474,9 +471,9 @@ BEGIN
|
|
|
474
471
|
"type": "linear",
|
|
475
472
|
"direction": "135deg",
|
|
476
473
|
"stops": [
|
|
477
|
-
{ "color": "#
|
|
478
|
-
{ "color": "#
|
|
479
|
-
{ "color": "#
|
|
474
|
+
{ "color": "#020817", "position": 0 },
|
|
475
|
+
{ "color": "#0f172a", "position": 50 },
|
|
476
|
+
{ "color": "#1e293b", "position": 100 }
|
|
480
477
|
]
|
|
481
478
|
}
|
|
482
479
|
},
|
|
@@ -485,14 +482,14 @@ BEGIN
|
|
|
485
482
|
"padding": { "top": "xl", "bottom": "xl" },
|
|
486
483
|
"column_blocks": [
|
|
487
484
|
[
|
|
488
|
-
{ "block_type": "text", "content": { "html_content": "<h1 class='text-
|
|
489
|
-
{ "block_type": "text", "content": { "html_content": "<p class='text-xl text-
|
|
490
|
-
{ "block_type": "button", "content": { "text": "Commencer", "url": "/
|
|
485
|
+
{ "block_type": "text", "content": { "html_content": "<h1 class='text-5xl md:text-6xl font-bold tracking-tight text-white text-center drop-shadow-lg'>Créez des sites <span class='text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-cyan-400'>Ultra-Rapides</span>.</h1>" } },
|
|
486
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-xl text-slate-300 text-center max-w-3xl mx-auto mt-4 leading-relaxed'>NextBlock est le CMS Next.js open-source alliant scores Lighthouse parfaits et éditeur visuel puissant.</p>" } },
|
|
487
|
+
{ "block_type": "button", "content": { "text": "Commencer", "url": "/article/comment-nextblock-fonctionne", "variant": "default", "size": "lg" } },
|
|
491
488
|
{ "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-
|
|
489
|
+
{ "block_type": "text", "content": { "html_content": "<div class='flex flex-wrap justify-center gap-6 text-sm uppercase tracking-wide text-slate-400 mt-8'><a href='https://github.com/Webman-Dev' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>GitHub</a><a href='https://x.com/NextBlockCMS' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>X</a><a href='https://www.linkedin.com/in/nextblock/' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>LinkedIn</a><a href='https://dev.to/nextblockcms' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>Dev.to</a><a href='https://www.npmjs.com/~nextblockcms' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>npm</a></div>" } }
|
|
493
490
|
],
|
|
494
491
|
[
|
|
495
|
-
{ "block_type": "text", "content": { "html_content": "<div class='p-
|
|
492
|
+
{ "block_type": "text", "content": { "html_content": "<div class='p-10 border border-white/10 rounded-3xl bg-white/5 backdrop-blur-xl shadow-2xl relative overflow-hidden group'><div class='absolute inset-0 bg-gradient-to-br from-blue-500/10 to-purple-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500'></div><div class='relative z-10'><p class='text-xs text-white uppercase tracking-widest font-semibold mb-2'>Pourquoi migrer</p><p class='text-3xl font-bold text-white mb-2'>100% Lighthouse</p><p class='text-base text-slate-300 mb-6'>Sites marketing et docs rendus à l'edge avec des performances irréprochables.</p><ul class='space-y-3 text-sm text-slate-200'><li><span class='text-blue-400 mr-2'>✓</span> Next.js 16 avec ISR et cache edge</li><li><span class='text-blue-400 mr-2'>✓</span> Supabase pour l'auth, les données et le stockage</li><li><span class='text-blue-400 mr-2'>✓</span> Éditeur de blocs type Notion sur Tiptap</li></ul><div class='mt-6 rounded-2xl overflow-hidden border border-white/10 shadow-lg'><img src='/images/NBcover.webp' alt='Couverture Nextblock avec tableaux de bord et blocs' class='w-full h-auto object-cover transform group-hover:scale-105 transition-transform duration-700' /></div></div></div>" } }
|
|
496
493
|
]
|
|
497
494
|
]
|
|
498
495
|
}$$::jsonb,
|
|
@@ -511,8 +508,8 @@ BEGIN
|
|
|
511
508
|
"column_blocks": [
|
|
512
509
|
[
|
|
513
510
|
{ "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-
|
|
515
|
-
{ "block_type": "text", "content": { "html_content": "<div class='grid gap-
|
|
511
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-lg text-slate-600 dark:text-slate-400 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>" } },
|
|
512
|
+
{ "block_type": "text", "content": { "html_content": "<div class='grid gap-8 md:grid-cols-3 mt-12'><div class='p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 backdrop-blur-sm hover:bg-slate-100 dark:hover:bg-white/10 transition-colors duration-300'><div class='w-12 h-12 rounded-xl flex items-center justify-center mb-6'><svg class='w-6 h-6 text-blue-600 dark:text-blue-400' fill='none' stroke='currentColor' viewBox='0 0 24 24'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13 10V3L4 14h7v7l9-11h-7z'></path></svg></div><h3 class='text-xl font-bold text-slate-900 dark:text-white mb-3'>Vitesse Extrême.</h3><p class='text-sm text-slate-600 dark:text-slate-400 leading-relaxed'>Pensé pour des scores Lighthouse parfaits avec une diffusion mondiale.</p><ul class='mt-6 space-y-3 text-sm text-slate-600 dark:text-slate-400'><li><strong class='text-slate-800 dark:text-slate-200'>Edge Caching:</strong> Servez vos pages partout.</li><li><strong class='text-slate-800 dark:text-slate-200'>Critical CSS:</strong> Styles en ligne pour éviter les blocages.</li><li><strong class='text-slate-800 dark:text-slate-200'>Images Opt:</strong> AVIF et placeholders floutés.</li></ul></div><div class='p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 backdrop-blur-sm hover:bg-slate-100 dark:hover:bg-white/10 transition-colors duration-300'><div class='w-12 h-12 rounded-xl flex items-center justify-center mb-6'><svg class='w-6 h-6 text-purple-600 dark:text-purple-400' fill='none' stroke='currentColor' viewBox='0 0 24 24'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z'></path></svg></div><h3 class='text-xl font-bold text-slate-900 dark:text-white mb-3'>Expérience Éditeur.</h3><p class='text-sm text-slate-600 dark:text-slate-400 leading-relaxed'>Un éditeur façon Notion pour publier sans dépendre des développeurs.</p><ul class='mt-6 space-y-3 text-sm text-slate-600 dark:text-slate-400'><li><strong class='text-slate-800 dark:text-slate-200'>Visuel:</strong> Héros, galeries, témoignages.</li><li><strong class='text-slate-800 dark:text-slate-200'>Média:</strong> Dossiers, tags et actions groupées.</li><li><strong class='text-slate-800 dark:text-slate-200'>Historique:</strong> Restauration complète.</li></ul></div><div class='p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-gradient-to-br from-blue-50 to-purple-50 dark:from-blue-600/20 dark:to-purple-600/20 backdrop-blur-sm hover:from-blue-100 hover:to-purple-100 dark:hover:from-blue-600/30 dark:hover:to-purple-600/30 transition-colors duration-300'><div class='w-12 h-12 rounded-xl flex items-center justify-center mb-6'><svg class='w-6 h-6 text-slate-900 dark:text-white' fill='none' stroke='currentColor' viewBox='0 0 24 24'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10'></path></svg></div><h3 class='text-xl font-bold text-slate-900 dark:text-white mb-3'>Extensible à l'Infini.</h3><p class='text-sm text-slate-700 dark:text-slate-200 leading-relaxed'>Un socle Next.js + Supabase modulaire, extensible et auto-hébergeable.</p><ul class='mt-6 space-y-3 text-sm text-slate-700 dark:text-slate-200'><li><strong class='text-slate-900 dark:text-white'>SDK de blocs:</strong> Composants typés.</li><li><strong class='text-slate-900 dark:text-white'>CLI:</strong> Générez modules en minutes.</li><li><strong class='text-slate-900 dark:text-white'>Monorepo Nx:</strong> Dépendances maintenables.</li></ul></div></div>" } }
|
|
516
513
|
]
|
|
517
514
|
]
|
|
518
515
|
}$$::jsonb,
|
|
@@ -528,10 +525,10 @@ BEGIN
|
|
|
528
525
|
"type": "gradient",
|
|
529
526
|
"gradient": {
|
|
530
527
|
"type": "linear",
|
|
531
|
-
"direction": "
|
|
528
|
+
"direction": "180deg",
|
|
532
529
|
"stops": [
|
|
533
|
-
{ "color": "
|
|
534
|
-
{ "color": "
|
|
530
|
+
{ "color": "#0f172a", "position": 0 },
|
|
531
|
+
{ "color": "#020817", "position": 100 }
|
|
535
532
|
]
|
|
536
533
|
}
|
|
537
534
|
},
|
|
@@ -540,10 +537,10 @@ BEGIN
|
|
|
540
537
|
"padding": { "top": "xl", "bottom": "xl" },
|
|
541
538
|
"column_blocks": [
|
|
542
539
|
[
|
|
543
|
-
{ "block_type": "
|
|
544
|
-
{ "block_type": "text", "content": { "html_content": "<p class='text-
|
|
545
|
-
{ "block_type": "
|
|
546
|
-
{ "block_type": "text", "content": { "html_content": "<div class='grid md:grid-cols-2 gap-
|
|
540
|
+
{ "block_type": "text", "content": { "html_content": "<h2 class='text-3xl md:text-4xl font-bold text-white text-center mb-6'>Conçu avec les meilleurs outils.</h2>" } },
|
|
541
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-slate-400 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-10 text-sm font-semibold text-center text-white'><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>Next.js</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>React</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>Supabase</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>Tailwind</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>shadcn/ui</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>Tiptap</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>Vercel</div><div class='p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors'>Nx</div></div>" } },
|
|
542
|
+
{ "block_type": "text", "content": { "html_content": "<h2 class='text-3xl md:text-4xl font-bold text-white text-center mb-6 mt-16'>Puissant pour les développeurs. Intuitif pour les éditeurs.</h2>" } },
|
|
543
|
+
{ "block_type": "text", "content": { "html_content": "<div class='grid md:grid-cols-2 gap-8 mt-10 text-white'><div class='p-8 rounded-3xl border border-white/10 bg-white/5 backdrop-blur-sm'><h3 class='text-xl font-bold mb-6 text-blue-400'>Pour les créateurs</h3><ul class='space-y-4 text-sm text-slate-300'><li><strong class='text-white block mb-1'>Éditeur de blocs</strong>Glisser-déposer façon Notion.</li><li><strong class='text-white block mb-1'>Blocs riches</strong>Héros, galeries, témoignages.</li><li><strong class='text-white block mb-1'>Médiathèque</strong>Dossiers, tags et actions groupées.</li><li><strong class='text-white block mb-1'>Versions sécurisées</strong>Historique et restauration instantanée.</li></ul></div><div class='p-8 rounded-3xl border border-white/10 bg-gradient-to-br from-white/5 to-white/[0.02] backdrop-blur-sm'><h3 class='text-xl font-bold mb-6 text-purple-400'>Pour les développeurs</h3><ul class='space-y-4 text-sm text-slate-300'><li><strong class='text-white block mb-1'>Next.js 16</strong>Server Components, ISR et Edge prêts à l'emploi.</li><li><strong class='text-white block mb-1'>Supabase</strong>Postgres, auth, stockage, temps réel.</li><li><strong class='text-white block mb-1'>Monorepo Nx</strong>Dépendances lisibles et centrales.</li><li><strong class='text-white block mb-1'>SDK de blocs</strong>Widgets typés et extensibles.</li></ul></div></div>" } }
|
|
547
544
|
]
|
|
548
545
|
]
|
|
549
546
|
}$$::jsonb,
|
|
@@ -562,11 +559,11 @@ BEGIN
|
|
|
562
559
|
"column_blocks": [
|
|
563
560
|
[
|
|
564
561
|
{ "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-
|
|
566
|
-
{ "block_type": "text", "content": { "html_content": "<div class='grid md:grid-cols-2 gap-6 mt-10'><div class='p-
|
|
562
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-slate-600 dark:text-slate-400 text-center max-w-3xl mx-auto'>NextBlock construit une feuille de route open-core durable qui évolue avec votre activité.</p>" } },
|
|
563
|
+
{ "block_type": "text", "content": { "html_content": "<div class='grid md:grid-cols-2 gap-6 mt-10'><div class='p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-blue-500/30 transition-colors'><p class='text-xs uppercase tracking-wide text-blue-600 dark:text-blue-400 mb-2 font-bold'>Bientôt</p><h3 class='text-xl font-bold text-slate-900 dark:text-white mb-3'>NextBlock Commerce</h3><p class='text-sm text-slate-600 dark:text-slate-400'>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-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-purple-500/30 transition-colors'><p class='text-xs uppercase tracking-wide text-purple-600 dark:text-purple-400 mb-2 font-bold'>Construisez le futur</p><h3 class='text-xl font-bold text-slate-900 dark:text-white mb-3'>Marketplace de plugins & blocs</h3><p class='text-sm text-slate-600 dark:text-slate-400'>Une marketplace communautaire pour publier et monétiser blocs, thèmes et plugins — pour un écosystème extensible.</p></div></div>" } },
|
|
567
564
|
{ "block_type": "heading", "content": { "level": 2, "text_content": "Rejoignez la communauté.", "textAlign": "center" } },
|
|
568
|
-
{ "block_type": "text", "content": { "html_content": "<p class='text-
|
|
569
|
-
{ "block_type": "text", "content": { "html_content": "<div class='grid gap-4 md:grid-cols-3 mt-
|
|
565
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-slate-600 dark:text-slate-400 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>" } },
|
|
566
|
+
{ "block_type": "text", "content": { "html_content": "<div class='grid gap-4 md:grid-cols-3 mt-10 text-sm'><a class='p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:bg-slate-100 dark:hover:bg-white/10 transition-all hover:scale-[1.02]' href='https://github.com/Webman-Dev' target='_blank' rel='noopener noreferrer'><strong class='block text-base text-slate-900 dark:text-white mb-1'>GitHub</strong><span class='text-slate-600 dark:text-slate-400'>Ajoutez une étoile & contribuez</span></a><a class='p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:bg-slate-100 dark:hover:bg-white/10 transition-all hover:scale-[1.02]' href='https://x.com/NextBlockCMS' target='_blank' rel='noopener noreferrer'><strong class='block text-base text-slate-900 dark:text-white mb-1'>X (Twitter)</strong><span class='text-slate-600 dark:text-slate-400'>Suivez les annonces</span></a><a class='p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:bg-slate-100 dark:hover:bg-white/10 transition-all hover:scale-[1.02]' href='https://dev.to/nextblockcms' target='_blank' rel='noopener noreferrer'><strong class='block text-base text-slate-900 dark:text-white mb-1'>Dev.to</strong><span class='text-slate-600 dark:text-slate-400'>Lisez nos articles techniques</span></a></div>" } }
|
|
570
567
|
]
|
|
571
568
|
]
|
|
572
569
|
}$$::jsonb,
|
|
@@ -582,10 +579,10 @@ BEGIN
|
|
|
582
579
|
"type": "gradient",
|
|
583
580
|
"gradient": {
|
|
584
581
|
"type": "linear",
|
|
585
|
-
"direction": "
|
|
582
|
+
"direction": "180deg",
|
|
586
583
|
"stops": [
|
|
587
|
-
{ "color": "
|
|
588
|
-
{ "color": "
|
|
584
|
+
{ "color": "#020817", "position": 0 },
|
|
585
|
+
{ "color": "#0f172a", "position": 100 }
|
|
589
586
|
]
|
|
590
587
|
}
|
|
591
588
|
},
|
|
@@ -594,8 +591,8 @@ BEGIN
|
|
|
594
591
|
"padding": { "top": "xl", "bottom": "xl" },
|
|
595
592
|
"column_blocks": [
|
|
596
593
|
[
|
|
597
|
-
{ "block_type": "
|
|
598
|
-
{ "block_type": "text", "content": { "html_content": "<p class='text-center text-base text-
|
|
594
|
+
{ "block_type": "heading", "content": { "level": 2, "text_content": "Des questions ?", "textAlign": "center" } },
|
|
595
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-center text-base text-slate-300 max-w-2xl mx-auto'>NextBlock co-construit avec des partenaires : fonctionnalités, modules sponsorisés et direction produit.</p>" } },
|
|
599
596
|
{ "block_type": "button", "content": { "text": "Nous contacter", "url": "mailto:hello@nextblockcms.com", "variant": "default", "size": "lg" } }
|
|
600
597
|
]
|
|
601
598
|
]
|
|
@@ -615,10 +612,10 @@ BEGIN
|
|
|
615
612
|
"type": "gradient",
|
|
616
613
|
"gradient": {
|
|
617
614
|
"type": "linear",
|
|
618
|
-
"direction": "
|
|
615
|
+
"direction": "135deg",
|
|
619
616
|
"stops": [
|
|
620
|
-
{ "color": "#
|
|
621
|
-
{ "color": "#
|
|
617
|
+
{ "color": "#020817", "position": 0 },
|
|
618
|
+
{ "color": "#1e293b", "position": 100 }
|
|
622
619
|
]
|
|
623
620
|
}
|
|
624
621
|
},
|
|
@@ -627,14 +624,14 @@ BEGIN
|
|
|
627
624
|
"padding": { "top": "xl", "bottom": "xl" },
|
|
628
625
|
"column_blocks": [
|
|
629
626
|
[
|
|
630
|
-
{ "block_type": "text", "content": { "html_content": "<p class='text-sm uppercase tracking-[0.3em] text-
|
|
631
|
-
{ "block_type": "text", "content": { "html_content": "<h2 class='text-
|
|
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-
|
|
627
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-sm uppercase tracking-[0.3em] text-blue-400 font-bold text-center md:text-left mb-4'>Le journal Nextblock</p>" } },
|
|
628
|
+
{ "block_type": "text", "content": { "html_content": "<h2 class='text-4xl md:text-5xl font-bold text-white text-center md:text-left mb-6'>Plongées dans la performance, l''expérience dev et l''édition visuelle.</h2>" } },
|
|
629
|
+
{ "block_type": "text", "content": { "html_content": "<p class='text-lg max-w-xl mx-auto md:mx-0 text-center md:text-left text-slate-300 leading-relaxed'>Walkthroughs d''architecture, recettes Supabase et expérimentations éditeur écrits par l''équipe Nextblock.</p>" } },
|
|
633
630
|
{ "block_type": "button", "content": { "text": "Explorer les articles", "url": "/articles#latest", "variant": "default", "size": "lg" } },
|
|
634
631
|
{ "block_type": "button", "content": { "text": "S''abonner aux mises à jour", "url": "https://github.com/Webman-Dev/nextblock-monorepo/discussions", "variant": "outline", "size": "lg" } }
|
|
635
632
|
],
|
|
636
633
|
[
|
|
637
|
-
{ "block_type": "text", "content": { "html_content": "<div class='rounded-3xl overflow-hidden border border-white/10 bg-white/5 shadow-2xl p-
|
|
634
|
+
{ "block_type": "text", "content": { "html_content": "<div class='rounded-3xl overflow-hidden border border-white/10 bg-white/5 shadow-2xl p-4 backdrop-blur-sm'><img src='/images/developer.webp' alt='Développeur travaillant avec la stack Nextblock' class='w-full object-cover rounded-2xl shadow-lg' style='max-width: 400px;' /></div>" } }
|
|
638
635
|
]
|
|
639
636
|
]
|
|
640
637
|
}$$::jsonb,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
-- supabase/migrations/20251126100000_seed_site_logo.sql
|
|
2
|
+
|
|
3
|
+
DO $$
|
|
4
|
+
DECLARE
|
|
5
|
+
v_logo_media_id UUID := gen_random_uuid();
|
|
6
|
+
v_admin_id UUID;
|
|
7
|
+
BEGIN
|
|
8
|
+
-- Get an admin user ID to set as uploader (optional, fallback to NULL)
|
|
9
|
+
SELECT id INTO v_admin_id FROM public.profiles WHERE role = 'ADMIN' LIMIT 1;
|
|
10
|
+
|
|
11
|
+
-- Insert the logo into the media table
|
|
12
|
+
INSERT INTO public.media (id, uploader_id, file_name, object_key, file_type, size_bytes, description)
|
|
13
|
+
VALUES (
|
|
14
|
+
v_logo_media_id,
|
|
15
|
+
v_admin_id,
|
|
16
|
+
'nextblock-logo-small.webp',
|
|
17
|
+
'/images/nextblock-logo-small.webp',
|
|
18
|
+
'image/webp',
|
|
19
|
+
10000, -- Dummy size
|
|
20
|
+
'NextBlock Site Logo'
|
|
21
|
+
)
|
|
22
|
+
ON CONFLICT (object_key) DO UPDATE
|
|
23
|
+
SET
|
|
24
|
+
file_name = excluded.file_name,
|
|
25
|
+
file_type = excluded.file_type,
|
|
26
|
+
description = excluded.description
|
|
27
|
+
RETURNING id INTO v_logo_media_id;
|
|
28
|
+
|
|
29
|
+
-- Insert the logo into the logos table
|
|
30
|
+
INSERT INTO public.logos (name, media_id)
|
|
31
|
+
VALUES ('NextBlock Logo', v_logo_media_id);
|
|
32
|
+
|
|
33
|
+
END $$;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
-- Fix blocks update policy
|
|
2
|
+
-- Explicitly allow authenticated users with ADMIN or WRITER roles to update blocks
|
|
3
|
+
-- Cleans up potential conflicting policies and ensures permissions are granted
|
|
4
|
+
|
|
5
|
+
BEGIN;
|
|
6
|
+
|
|
7
|
+
-- 1. Grant permissions to the role (in case they were missing)
|
|
8
|
+
GRANT ALL ON TABLE public.blocks TO authenticated;
|
|
9
|
+
GRANT USAGE, SELECT ON SEQUENCE public.blocks_id_seq TO authenticated;
|
|
10
|
+
|
|
11
|
+
-- 2. Drop ALL known previous/conflicting update policies
|
|
12
|
+
DROP POLICY IF EXISTS "Allow authenticated users to update blocks" ON public.blocks;
|
|
13
|
+
DROP POLICY IF EXISTS "Allow admins and writers to update blocks" ON public.blocks;
|
|
14
|
+
DROP POLICY IF EXISTS "blocks_admin_writer_can_update" ON public.blocks;
|
|
15
|
+
DROP POLICY IF EXISTS "admins_and_writers_can_manage_blocks" ON public.blocks;
|
|
16
|
+
|
|
17
|
+
-- 3. Create new policy using the trusted security definer function
|
|
18
|
+
-- We use get_my_role() which is SECURITY DEFINER to bypass RLS on profiles table
|
|
19
|
+
CREATE POLICY "Allow admins and writers to update blocks"
|
|
20
|
+
ON public.blocks
|
|
21
|
+
FOR UPDATE
|
|
22
|
+
TO authenticated
|
|
23
|
+
USING (
|
|
24
|
+
get_my_role() IN ('ADMIN', 'WRITER')
|
|
25
|
+
)
|
|
26
|
+
WITH CHECK (
|
|
27
|
+
get_my_role() IN ('ADMIN', 'WRITER')
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
-- 4. Also fix INSERT/DELETE just in case, using the same robust method
|
|
31
|
+
DROP POLICY IF EXISTS "blocks_admin_writer_can_insert" ON public.blocks;
|
|
32
|
+
CREATE POLICY "Allow admins and writers to insert blocks"
|
|
33
|
+
ON public.blocks
|
|
34
|
+
FOR INSERT
|
|
35
|
+
TO authenticated
|
|
36
|
+
WITH CHECK (
|
|
37
|
+
get_my_role() IN ('ADMIN', 'WRITER')
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
DROP POLICY IF EXISTS "blocks_admin_writer_can_delete" ON public.blocks;
|
|
41
|
+
CREATE POLICY "Allow admins and writers to delete blocks"
|
|
42
|
+
ON public.blocks
|
|
43
|
+
FOR DELETE
|
|
44
|
+
TO authenticated
|
|
45
|
+
USING (
|
|
46
|
+
get_my_role() IN ('ADMIN', 'WRITER')
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
COMMIT;
|