style(cms): improve editor ui and implement collapsible item cards

Enhance the CMS administration interface by introducing a more refined design system for content editors. This update replaces generic Bootstrap utility classes with dedicated CMS styling to improve visual hierarchy and usability.
Key changes:
- Introduce `cms-editor-group` and `cms-item-card` classes for consistent grouping and item styling.
- Implement collapsible functionality for item cards to manage long lists of content more effectively.
- Standardize editor buttons, including new styles for drag handles, remove buttons, and add buttons.
- Update the fixed bottom action bar with improved backdrop filters, shadows, and spacing.
- Refactor editor scripts across Accreditation, Admissions, History, Partnerships, and Policies to utilize the new UI components and collapse logic.
- Add comprehensive CSS to `main.ejs` to support the new CMS design tokens and layout behaviors.
This commit is contained in:
Tống Thành Đạt
2026-04-20 20:10:27 +07:00
parent 7df3a6f6bf
commit 5615c494cf
10 changed files with 387 additions and 137 deletions
@@ -19,30 +19,30 @@
</div>
</div>
<div class="border rounded-3 bg-light-subtle p-3 mb-4">
<div class="d-flex justify-content-between align-items-center mb-3">
<div class="cms-editor-group mb-4">
<div class="mb-3">
<div>
<label class="form-label fw-semibold mb-1">Category tabs</label>
<div class="form-text mt-0">The frontend shows up to 3 direct tabs. Additional tabs move into a More dropdown.</div>
</div>
<button type="button" class="btn btn-outline-primary btn-sm" id="addDirectoryTabBtn">
<i class="fas fa-plus me-1"></i>Add Tab
</button>
</div>
<div id="directoryTabsList"></div>
<button type="button" class="cms-add-button mt-3" id="addDirectoryTabBtn">
<i class="fas fa-plus me-2"></i>Add Tab
</button>
</div>
<div class="border rounded-3 bg-light-subtle p-3">
<div class="d-flex justify-content-between align-items-center mb-3">
<div class="cms-editor-group">
<div class="mb-3">
<div>
<label class="form-label fw-semibold mb-1">Partners</label>
<div class="form-text mt-0">Use a short unique partner key so card state stays stable.</div>
</div>
<button type="button" class="btn btn-outline-primary btn-sm" id="addPartnerBtn">
<i class="fas fa-plus me-1"></i>Add Partner
</button>
</div>
<div id="partnersList"></div>
<button type="button" class="cms-add-button mt-3" id="addPartnerBtn">
<i class="fas fa-plus me-2"></i>Add Partner
</button>
</div>
</div>
</div>