From 5d201db3e48520acdb5de623cd7d82f2d211827e Mon Sep 17 00:00:00 2001 From: sokun1102 Date: Wed, 22 Apr 2026 23:01:19 +0700 Subject: [PATCH] fix: center EditorJS image block in editor; rename Programmes button to Edit --- views/admin/dashboard.ejs | 2 +- views/layouts/main.ejs | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/views/admin/dashboard.ejs b/views/admin/dashboard.ejs index a198887..f32a370 100644 --- a/views/admin/dashboard.ejs +++ b/views/admin/dashboard.ejs @@ -174,7 +174,7 @@ - Manage + Edit diff --git a/views/layouts/main.ejs b/views/layouts/main.ejs index 3313781..5dccd62 100644 --- a/views/layouts/main.ejs +++ b/views/layouts/main.ejs @@ -672,6 +672,34 @@ padding: 0 1rem; } } + + /* ── EditorJS image block: center when smaller than container ── */ + .image-tool__image { + display: flex; + justify-content: center; + align-items: center; + } + + .image-tool__image-picture { + display: block; + max-width: 100%; + height: auto; + margin: 0 auto; + border-radius: 6px; + } + + /* Ensure the cdx-block wrapper doesn't left-align */ + .cdx-block.image-tool { + text-align: center; + } + + /* caption stays centred too */ + .image-tool__caption { + text-align: center; + font-size: 0.875rem; + color: #6c757d; + margin-top: 0.5rem; + } <%- style %>