Free Codepen: Bootstrap Simple Admin Template
// ensure first load sets dashboard as active properly (highlight) setActive('nav-dashboard');
function setActive(activeId) navLinks.forEach(link => link.classList.remove('active'); if (link.id === activeId) link.classList.add('active'); ); // Change story context based on section (just a playful narrative effect) if (activeId === 'nav-dashboard') if (mainTitle) mainTitle.innerHTML = '✨ Admin Dashboard — A Simple Bootstrap Story'; if (subtitleEl) subtitleEl.innerHTML = 'Welcome back, Olivia. Here\'s your latest performance & narrative.'; else if (activeId === 'nav-analytics') if (mainTitle) mainTitle.innerHTML = '📊 Analytics Story — Deep Data Insights'; if (subtitleEl) subtitleEl.innerHTML = 'Exploring growth metrics and conversion chapters.'; // scroll to chart for better experience document.querySelector('.story-card canvas')?.scrollIntoView( behavior: 'smooth', block: 'center' ); else if (activeId === 'nav-orders') if (mainTitle) mainTitle.innerHTML = '📦 Orders Chronicle — Transaction Stories'; if (subtitleEl) subtitleEl.innerHTML = 'Manage your latest orders and fulfillment narrative.'; document.querySelector('.table-responsive')?.scrollIntoView( behavior: 'smooth', block: 'start' ); else if (activeId === 'nav-customers') if (mainTitle) mainTitle.innerHTML = '👥 Customer Journey — People Behind the Story'; if (subtitleEl) subtitleEl.innerHTML = 'Discover your community: 1,429 new faces this month.'; // display small alert-like story const tempMsg = document.createElement('div'); tempMsg.className = 'alert alert-light story-card mt-2 d-flex align-items-center'; tempMsg.innerHTML = '<i class="bi bi-emoji-smile fs-4 me-2"></i> Customer story: Engagement rate +12% this week!'; const container = document.querySelector('.row.g-4.mb-5').parentNode; const existingAlert = document.querySelector('.temp-story-alert'); if(existingAlert) existingAlert.remove(); tempMsg.classList.add('temp-story-alert'); container.insertBefore(tempMsg, document.querySelector('.row.g-4.mb-5').nextSibling); setTimeout(() => if(tempMsg) tempMsg.style.opacity = '0'; setTimeout(() => tempMsg?.remove(), 800); , 3000); else if (activeId === 'nav-settings') if (mainTitle) mainTitle.innerHTML = '⚙️ Settings & Preferences — Tailor Your Story'; if (subtitleEl) subtitleEl.innerHTML = 'Customize your admin experience and theme narrative.'; bootstrap simple admin template free codepen
<!-- MAIN CONTENT: THE STORY UNFOLDS --> <div class="col-md-9 col-lg-10 px-md-4 py-4"> <!-- header area with a welcoming story context --> <div class="d-flex flex-wrap justify-content-between align-items-center mb-4"> <div> <h2 class="fw-semibold mb-1"><span class="greeting-highlight">✨ Admin Dashboard</span> — A Simple Bootstrap Story</h2> <p class="text-secondary-emphasis">Welcome back, Olivia. Here's your latest performance & narrative.</p> </div> <div class="mt-2 mt-sm-0"> <div class="input-group rounded-pill shadow-sm" style="max-width: 260px;"> <span class="input-group-text bg-white border-end-0 rounded-start-pill"><i class="bi bi-search"></i></span> <input type="text" class="form-control border-start-0 rounded-end-pill" placeholder="Search story..."> </div> </div> </div> // ensure first load sets dashboard as active
navLinks.forEach(link => link.addEventListener('click', (e) => e.preventDefault(); const id = link.getAttribute('id'); if (id) setActive(id); ); ); function setActive(activeId) navLinks.forEach(link =>
