From f685ff88ee54aa36740852a9393f1024ab8090f2 Mon Sep 17 00:00:00 2001 From: duyphan1410 Date: Wed, 22 Apr 2026 16:40:30 +0700 Subject: [PATCH] Fix: migrate footer, delete more file view --- scripts/migrate-footer.js | 2 +- views/admin/dashboard.ejs | 51 +- views/admin/pricing/index.ejs | 742 ------------------- views/admin/service/details.ejs | 755 -------------------- views/admin/service/edit.ejs | 440 ------------ views/admin/service/index.ejs | 1185 ------------------------------- views/admin/travel/index.ejs | 353 --------- views/index.ejs | 2 +- views/layouts/main.ejs | 15 - 9 files changed, 4 insertions(+), 3541 deletions(-) delete mode 100644 views/admin/pricing/index.ejs delete mode 100644 views/admin/service/details.ejs delete mode 100644 views/admin/service/edit.ejs delete mode 100644 views/admin/service/index.ejs delete mode 100644 views/admin/travel/index.ejs diff --git a/scripts/migrate-footer.js b/scripts/migrate-footer.js index 4f376de..cdc8fc8 100644 --- a/scripts/migrate-footer.js +++ b/scripts/migrate-footer.js @@ -29,7 +29,7 @@ async function migrateFooterData() { // Đọc file JSON const footerData = JSON.parse( await fs.readFile( - path.join(__dirname, '../data/new/footer.json'), + path.join(__dirname, '../data/footer.json'), 'utf8' ) ); diff --git a/views/admin/dashboard.ejs b/views/admin/dashboard.ejs index b28ccc8..a198887 100644 --- a/views/admin/dashboard.ejs +++ b/views/admin/dashboard.ejs @@ -212,13 +212,13 @@ Menu Header API - /api/header + /api/header-menu GET API to get menu header data - + View @@ -385,30 +385,6 @@ - - - - @@ -431,29 +407,6 @@ - - - - -
-
- -
- Programme Detail API -
- - /api/programmes/:id - - GET - - Single programme by slug ID - - - View - - - diff --git a/views/admin/pricing/index.ejs b/views/admin/pricing/index.ejs deleted file mode 100644 index f21b487..0000000 --- a/views/admin/pricing/index.ejs +++ /dev/null @@ -1,742 +0,0 @@ -
-
-
-

- <%= title %> -

-

Edit content displayed on Pricing page

-
-
- - View Pricing Page - -
-
- -
-
-
- - - - - - - -
- - -
-
- -
-
-
-
Hero Section
-
-
- -
- - -
- Recommended size: 1920x1080px -
-
-
- <% if (data.hero?.backgroundImage) { %> - <% let heroImgSrc=data.hero.backgroundImage; if (heroImgSrc && - !heroImgSrc.startsWith('http://') && - !heroImgSrc.startsWith('https://')) { - heroImgSrc=heroImgSrc.startsWith('/') ? heroImgSrc : '/' + - heroImgSrc; } %> - Background image preview - - <% } else { %> -
- Image preview -
- <% } %> -
-
-
-
-
- - -
-
-
-
-
- - -
-
-
-
Pricing Section Header
-
-
- - -
-
- - -
-
- - -
-
-
-
-
- - -
- -
-
-
-
Monthly Plans
- -
-
- <% if (data.plans?.monthly && data.plans.monthly.length> 0) { %> - <% data.plans.monthly.forEach((plan, index)=> { %> -
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
- <% }); %> - <% } %> -
-
-
- - -
-
-
-
Yearly Plans
- -
-
- <% if (data.plans?.yearly && data.plans.yearly.length> 0) { %> - <% data.plans.yearly.forEach((plan, index)=> { %> -
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
- <% }); %> - <% } %> -
-
-
-
- - -
-
-
-
Testimonials Section Header
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
- - -
-
-
-
-
- -
-
-
-
Testimonial Items
- -
-
- <% if (data.testimonials?.items && data.testimonials.items.length> 0) { %> - <% data.testimonials.items.forEach((item, index)=> { %> -
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
- <% }); %> - <% } %> -
-
-
-
-
-
-
- - -
- - -
-
-
-
-
- - - - \ No newline at end of file diff --git a/views/admin/service/details.ejs b/views/admin/service/details.ejs deleted file mode 100644 index a346c6e..0000000 --- a/views/admin/service/details.ejs +++ /dev/null @@ -1,755 +0,0 @@ -
-
-
-

Service Details: <%= service.name %>

-

Edit detailed content for <%= service.name %> service

-
-
- - Back to Services - -
-
- -
-
-
- - - - - - -
- - -
-
- -
-
-
-
-
- -
- - -
- Recommended size: 800x600px -
-
-
- <% if (service.details?.mainImage) { %> - Main image preview - <% } %> -
-
-
-
-
- - -
-
-
-
- - -
-
- - -
-
-
-
-
Overview Section
-
-
-
-
- - -
-
- - -
-
- - -
-
-
-
-
-
-
-
-
- - -
-
-
- -
-
- - -
-
- -
- - -
-
-
- - -
-
-
- <% if (service.details?.keyFeaturesImage) { %> - Key Features image preview - <% } %> -
-
-
- - -
-
-
-
Features
- -
-
- <% if (service.details?.features && service.details.features.length > 0) { %> - <% service.details.features.forEach((feature, index) => { %> -
-
-
-
Feature <%= index + 1 %>
- -
-
-
- - -
-
-
-
- - -
-
-
-
- <% }) %> - <% } %> -
-
-
-
-
-
- - -
-
-
- -
-
- - -
-
- -
- - -
-
-
- - -
-
-
- <% if (service.details?.faqImage) { %> - FAQ image preview - <% } %> -
-
-
- - -
-
-
-
FAQ Items
- -
-
- <% if (service.details?.faq && service.details.faq.length > 0) { %> - <% service.details.faq.forEach((faq, index) => { %> -
-
-
-
FAQ <%= index + 1 %>
- -
-
-
- - -
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- <% }) %> - <% } %> -
-
-
-
-
-
-
-
-
- - -
- - -
-
-
-
-
- - - - diff --git a/views/admin/service/edit.ejs b/views/admin/service/edit.ejs deleted file mode 100644 index 6c9e490..0000000 --- a/views/admin/service/edit.ejs +++ /dev/null @@ -1,440 +0,0 @@ -
-
-
-

Edit Service: <%= service.name %>

-

Update service information and settings

-
-
- - Back to Services - -
-
- -
-
-
-
-
-
- Service Information -
-
- -
-
-
- - -
-
- -
-
- -
- - -
- URL-friendly version of the service name. -
-
- - -
-
- -
-
- -
- - -
-
-
-
- <% if (service.image) { %> - Preview - <% } %> -
-
-
- -
-
- - -
-
-
-
- - -
- - Cancel - - -
-
-
-
-
- - - - - \ No newline at end of file diff --git a/views/admin/service/index.ejs b/views/admin/service/index.ejs deleted file mode 100644 index 412b5ff..0000000 --- a/views/admin/service/index.ejs +++ /dev/null @@ -1,1185 +0,0 @@ -
-
-
-

<%= title %>

-

Manage services and their detailed content

-
-
- - View Services Page - -
-
- -
-
-
- - - - -
- - -
-
- -
-
-
- -
-
-
-
-
-
-
- -
-
-
-
Total Services
-

- <%= (data.services && data.services.items) ? data.services.items.length : 0 %> -

-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
Left Layout
-

- <%= (data.services && data.services.items) ? data.services.items.filter(s => s && s.layout === 'left').length : 0 %> -

-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
Right Layout
-

- <%= (data.services && data.services.items) ? data.services.items.filter(s => s && s.layout === 'right').length : 0 %> -

-
-
-
-
-
-
- - -
- - - - - - - - - - - - - <% if (data.services && data.services.items) { %> - <% data.services.items.forEach((service, index) => { %> - <% if (service) { %> - - - - - - - - - <% } %> - <% }) %> - <% } %> - -
#ImageNameSlugLayoutActions
<%= index + 1 %> - <% if (service.image) { %> - <%= service.name %> - <% } else { %> -
- -
- <% } %> -
- <%= service.name %> - <% if (service.description) { %> -
<%= service.description.substring(0, 50) %>... - <% } %> -
- <%= service.slug %> - - - <%= service.layout %> - - -
- - - - - - - -
-
-
- - <% if (!data.services || !data.services.items || data.services.items.length === 0) { %> -
- -
No services found
-

Click "Add Service" tab to create your first service.

-
- <% } %> -
-
-
- - -
-
-
-
Services Section Title
-
-
- - -
-
- - -
-
-
-
-
- - -
-
-
-
Add New Service
-
-
- - -
-
-
-
- -
- - -
- URL-friendly version of the service name. Generated automatically from the service name. -
-
- - -
-
-
-
- -
- - -
-
-
-
-
-
-
-
- - -
-
-
- -
-
-
-
-
-
-
- - -
- - -
-
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/views/admin/travel/index.ejs b/views/admin/travel/index.ejs deleted file mode 100644 index 47fd75d..0000000 --- a/views/admin/travel/index.ejs +++ /dev/null @@ -1,353 +0,0 @@ -
-
-
-

- Travel Information Editor -

-
-
- - -
-
- -
- - - - - -
-
-
-
-
Hero Section
-
-
-
-
-
- -
- - -
- Recommended size: 1920x1080px -
-
-
-
- <% if (data.hero?.backgroundImage) { %> - Background image preview - <% } else { %> -
- No image selected -
- <% } %> -
-
-
-
-
- - -
-
-
-
- -
-
-
Page Information
-
-
-
- - -
-
-
- - -
-
-
-
- -
-
-
Content Editor
-

Write content using the blog editor

-
-
-
-
-
-
- -
-
-
-
SEO Settings
-
-
-
- - -
-
- - -
-
-
- -
-
-
Page Settings
-
-
-
-
- > - -
-
-
-
- -
-
-
Content Tips
-
-
-
-
Tips for Terms & Conditions:
-
    -
  • Use Header 2 for main sections
  • -
  • Use Header 3 for subsections
  • -
  • Use Lists for terms items
  • -
  • Use Conclusion tool for important notes
  • -
  • Use Quote for legal references
  • -
-
-
Keyboard Shortcuts:
-
    -
  • Ctrl+Shift+H: Convert list item to header
  • -
  • Tab in list: Indent item
  • -
  • Backspace at start: Exit list
  • -
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/views/index.ejs b/views/index.ejs index 497bbcf..159963b 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -105,7 +105,7 @@
-

Start Using CMS.HAILearning Today

+

Start Using CMS.LAMS Today

Experience simple and effective API management system

diff --git a/views/layouts/main.ejs b/views/layouts/main.ejs index 3cfbee1..9679c9c 100644 --- a/views/layouts/main.ejs +++ b/views/layouts/main.ejs @@ -724,16 +724,9 @@ About - - - -