浏览代码

comment properly

Daniel 1 年之前
父节点
当前提交
445879c1ea

+ 8 - 4
src/html/components/dashboard/_footer.astro

@@ -1,12 +1,16 @@
 ---
-const year = new Date().getFullYear()
+const year = new Date().getFullYear();
 ---
-<!-- Main Footer -->
+
+<!--begin::Footer-->
 <footer class="app-footer">
-  <!-- To the end -->
+  <!--begin::To the end-->
   <div class="float-end d-none d-sm-inline">
     Anything you want
   </div>
-  <!-- Default to the start -->
+  <!--end::To the end-->
+  <!--begin::Copyright-->
   <strong>Copyright &copy; 2014-{year} <a href="https://adminlte.io">AdminLTE.io</a>.</strong> All rights reserved.
+  <!--end::Copyright-->
 </footer>
+<!--end::Footer-->

+ 23 - 7
src/html/components/dashboard/_sidenav.astro

@@ -1,21 +1,29 @@
 ---
 import { convertPathToHtml } from '../../../utils/index.js';
-const { path, mainPage, page } = Astro.props
-const htmlPath = convertPathToHtml(path)
+const { path, mainPage, page } = Astro.props;
+const htmlPath = convertPathToHtml(path);
 ---
 
-<!-- Sidebar Container -->
+<!--begin::Sidebar-->
 <aside class="app-sidebar bg-body-secondary shadow" data-bs-theme="dark">
+  <!--begin::Sidebar Brand-->
   <div class="sidebar-brand">
+    <!--begin::Brand Link-->
     <a href={htmlPath + '/index.html'} class="brand-link">
+      <!--begin::Brand Image-->
       <img src={path + '/assets/img/AdminLTELogo.png'} alt="AdminLTE Logo" class="brand-image opacity-75 shadow">
+      <!--end::Brand Image-->
+      <!--begin::Brand Text-->
       <span class="brand-text fw-light">AdminLTE 4</span>
+      <!--end::Brand Text-->
     </a>
+    <!--end::Brand Link-->
   </div>
-  <!-- Sidebar -->
+  <!--end::Sidebar Brand-->
+  <!--begin::Sidebar Wrapper-->
   <div class="sidebar-wrapper">
     <nav class="mt-2">
-      <!-- Sidebar Menu -->
+      <!--begin::Sidebar Menu-->
       <ul class="nav sidebar-menu flex-column" data-lte-toggle="treeview" role="menu" data-accordion="false">
         <li class:list={['nav-item', mainPage === 'dashboard' && 'menu-open']}>
           <a href="javascript:;" class:list={['nav-link', mainPage === 'dashboard' && 'active']}>
@@ -75,7 +83,6 @@ const htmlPath = convertPathToHtml(path)
             </li>
           </ul>
         </li>
-
         <li class:list={['nav-item', mainPage === 'layout' && 'menu-open']}>
           <a href="javascript:;" class:list={['nav-link', mainPage === 'layout' && 'active']}>
             <i class="nav-icon fa-solid fa-copy"></i>
@@ -235,6 +242,12 @@ const htmlPath = convertPathToHtml(path)
                 <p>Main Header</p>
               </a>
             </li>
+            <li class="nav-item">
+              <a href={htmlPath + '/docs/components/main-sidebar.html'} class:list={['nav-link', page === 'main-sidebar' && 'active']}>
+                <i class="nav-icon fa-regular fa-circle"></i>
+                <p>Main Sidebar</p>
+              </a>
+            </li>
           </ul>
         </li>
         <li class="nav-item">
@@ -309,6 +322,7 @@ const htmlPath = convertPathToHtml(path)
             <p>Level 1</p>
           </a>
         </li>
+
         <li class="nav-header">LABELS</li>
         <li class="nav-item">
           <a href="javascript:;" class="nav-link">
@@ -329,7 +343,9 @@ const htmlPath = convertPathToHtml(path)
           </a>
         </li>
       </ul>
+      <!--end::Sidebar Menu-->
     </nav>
   </div>
-  <!-- /.sidebar -->
+  <!--end::Sidebar Wrapper-->
 </aside>
+<!--end::Sidebar-->

+ 30 - 30
src/html/components/dashboard/_topbar.astro

@@ -1,11 +1,11 @@
 ---
-const { path } = Astro.props
-const distPath = path
+const { path } = Astro.props;
+const distPath = path;
 ---
-<!-- Navbar -->
+<!--begin::Header-->
 <nav class="app-header navbar navbar-expand bg-body">
   <div class="container-fluid">
-    <!-- Start navbar links -->
+    <!--begin::Start Navbar Links-->
     <ul class="navbar-nav">
       <li class="nav-item">
         <a class="nav-link" data-lte-toggle="sidebar" href="#" role="button"><i class="fa-solid fa-bars"></i></a>
@@ -17,17 +17,19 @@ const distPath = path
         <a href="#" class="nav-link">Contact</a>
       </li>
     </ul>
-    <!-- End navbar links -->
+    <!--end::Start Navbar Links-->
 
+    <!--begin::End Navbar Links-->
     <ul class="navbar-nav ms-auto">
-      <!-- Navbar Search -->
+      <!--begin::Navbar Search-->
       <li class="nav-item">
         <a class="nav-link" data-widget="navbar-search" href="#" role="button">
           <i class="fa-solid fa-search"></i>
         </a>
       </li>
+      <!--end::Navbar Search-->
 
-      <!-- Messages Dropdown Menu -->
+      <!--begin::Messages Dropdown Menu-->
       <li class="nav-item dropdown">
         <a class="nav-link" data-bs-toggle="dropdown" href="#">
           <i class="fa-regular fa-comments"></i>
@@ -35,7 +37,7 @@ const distPath = path
         </a>
         <div class="dropdown-menu dropdown-menu-lg dropdown-menu-end">
           <a href="#" class="dropdown-item">
-            <!-- Message Start -->
+            <!--begin::Message-->
             <div class="d-flex">
               <div class="flex-shrink-0">
                 <img src={distPath + '/assets/img/user1-128x128.jpg'} alt="User Avatar" class="img-size-50 rounded-circle me-3">
@@ -49,11 +51,11 @@ const distPath = path
                 <p class="fs-7 text-secondary"><i class="fa-regular fa-clock me-1"></i> 4 Hours Ago</p>
               </div>
             </div>
-            <!-- Message End -->
+            <!--end::Message-->
           </a>
           <div class="dropdown-divider"></div>
           <a href="#" class="dropdown-item">
-            <!-- Message Start -->
+            <!--begin::Message-->
             <div class="d-flex">
               <div class="flex-shrink-0">
                 <img src={distPath + '/assets/img/user8-128x128.jpg'} alt="User Avatar" class="img-size-50 rounded-circle me-3">
@@ -67,11 +69,11 @@ const distPath = path
                 <p class="fs-7 text-secondary"><i class="fa-regular fa-clock me-1"></i> 4 Hours Ago</p>
               </div>
             </div>
-            <!-- Message End -->
+            <!--end::Message-->
           </a>
           <div class="dropdown-divider"></div>
           <a href="#" class="dropdown-item">
-            <!-- Message Start -->
+            <!--begin::Message-->
             <div class="d-flex">
               <div class="flex-shrink-0">
                 <img src={distPath + '/assets/img/user3-128x128.jpg'}alt="User Avatar" class="img-size-50 rounded-circle me-3">
@@ -85,13 +87,15 @@ const distPath = path
                 <p class="fs-7 text-secondary"><i class="fa-regular fa-clock me-1"></i> 4 Hours Ago</p>
               </div>
             </div>
-            <!-- Message End -->
+            <!--end::Message-->
           </a>
           <div class="dropdown-divider"></div>
           <a href="#" class="dropdown-item dropdown-footer">See All Messages</a>
         </div>
       </li>
-      <!-- Notifications Dropdown Menu -->
+      <!--end::Messages Dropdown Menu-->
+
+      <!--begin::Notifications Dropdown Menu-->
       <li class="nav-item dropdown">
         <a class="nav-link" data-bs-toggle="dropdown" href="#">
           <i class="fa-regular fa-bell"></i>
@@ -118,13 +122,16 @@ const distPath = path
           <a href="#" class="dropdown-item dropdown-footer">See All Notifications</a>
         </div>
       </li>
+      <!--end::Notifications Dropdown Menu-->
+
+      <!--begin::User Menu Dropdown-->
       <li class="nav-item dropdown user-menu">
         <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
           <img src={distPath + '/assets/img/user2-160x160.jpg'} class="user-image rounded-circle shadow" alt="User Image">
           <span class="d-none d-md-inline">Alexander Pierce</span>
         </a>
         <ul class="dropdown-menu dropdown-menu-lg dropdown-menu-end">
-          <!-- User image -->
+          <!--begin::User Image-->
           <li class="user-header text-bg-primary">
             <img src={distPath + '/assets/img/user2-160x160.jpg'} class="rounded-circle shadow" alt="User Image">
 
@@ -133,7 +140,8 @@ const distPath = path
               <small>Member since Nov. 2023</small>
             </p>
           </li>
-          <!-- Menu Body -->
+          <!--end::User Image-->
+          <!--begin::Menu Body-->
           <li class="user-body">
             <div class="row">
               <div class="col-4 text-center">
@@ -146,27 +154,19 @@ const distPath = path
                 <a href="#">Friends</a>
               </div>
             </div>
-            <!-- /.row -->
           </li>
-          <!-- Menu Footer-->
+          <!--end::Menu Body-->
+          <!--begin::Menu Footer-->
           <li class="user-footer">
             <a href="#" class="btn btn-default btn-flat">Profile</a>
             <a href="#" class="btn btn-default btn-flat float-end">Sign out</a>
           </li>
+          <!--end::Menu Footer-->
         </ul>
       </li>
-      <!-- TODO tackel in v4.1 -->
-      <!-- <li class="nav-item">
-        <a class="nav-link" data-widget="fullscreen" href="#" role="button">
-          <i class="fa-solid fa-expand-arrows-alt"></i>
-        </a>
-      </li>
-      <li class="nav-item">
-        <a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#" role="button">
-          <i class="fa-solid fa-th-large"></i>
-        </a>
-      </li> -->
+      <!--end::User Menu Dropdown-->
     </ul>
+    <!--end::End Navbar Links-->
   </div>
 </nav>
-<!-- /.navbar -->
+<!--end::Header-->