Skip to content

Commit

Permalink
Merge pull request #5312 from glewe/bs5-components
Browse files Browse the repository at this point in the history
Bs5 Components
  • Loading branch information
danny007in authored Sep 14, 2023
2 parents 18d4b43 + 6bf0643 commit 4a95b7f
Show file tree
Hide file tree
Showing 8 changed files with 1,519 additions and 21 deletions.
13 changes: 8 additions & 5 deletions src/html/components/_scripts.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,32 @@ const adminlteJsUrl = path + "/js/adminlte.js";
integrity="sha256-NRZchBuHZWSXldqrtAOeCZpucH/1n1ToJ3C8mSK95NU="
crossorigin="anonymous"
></script>
<!--end::Third Party Plugin(OverlayScrollbars)--><!--begin::Required Plugin(popperjs for Bootstrap 5)-->
<!--end::Third Party Plugin(OverlayScrollbars)-->
<!--begin::Required Plugin(popperjs for Bootstrap 5)-->
<script
src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.7/dist/umd/popper.min.js"
integrity="sha384-zYPOMqeu1DAVkHiLqWBUTcbYfZ8osu1Nd6Z89ify25QV9guujx43ITvfi12/QExE"
crossorigin="anonymous"
></script>
<!--end::Required Plugin(popperjs for Bootstrap 5)--><!--begin::Required Plugin(Bootstrap 5)-->
<!--end::Required Plugin(popperjs for Bootstrap 5)-->
<!--begin::Required Plugin(Bootstrap 5)-->
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.min.js"
integrity="sha384-Y4oOpwW3duJdCWv5ly8SCFYWqFDsfob/3GkgExXKV4idmbt98QcxXYs9UoXAB7BZ"
crossorigin="anonymous"
></script>
<!--end::Required Plugin(Bootstrap 5)--><!--begin::Required Plugin(AdminLTE)-->
<!--end::Required Plugin(Bootstrap 5)-->
<!--begin::Required Plugin(AdminLTE)-->
<script src={adminlteJsUrl} is:inline></script>
<!--end::Required Plugin(AdminLTE)--><!--begin::OverlayScrollbars Configure-->
<!--end::Required Plugin(AdminLTE)-->
<!--begin::OverlayScrollbars Configure-->
<script is:inline>
const SELECTOR_SIDEBAR_WRAPPER = ".sidebar-wrapper";
const Default = {
scrollbarTheme: "os-theme-light",
scrollbarAutoHide: "leave",
scrollbarClickScroll: true,
};

document.addEventListener("DOMContentLoaded", function () {
const sidebarWrapper = document.querySelector(SELECTOR_SIDEBAR_WRAPPER);
if (
Expand Down
15 changes: 12 additions & 3 deletions src/html/components/dashboard/_sidenav.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import { convertPathToHtml } from "../../../utils/index.js";
const { path, mainPage, page } = Astro.props;
import {convertPathToHtml} from "../../../utils/index.js";
const {path, mainPage, page} = Astro.props;
const htmlPath = convertPathToHtml(path);
---

Expand Down Expand Up @@ -125,7 +125,7 @@ const htmlPath = convertPathToHtml(path);
<p>
Layout Options
<span class="nav-badge badge text-bg-secondary me-3"
>6</span
>6</span
>
<i class="nav-arrow bi bi-chevron-right"></i>
</p>
Expand Down Expand Up @@ -216,6 +216,15 @@ const htmlPath = convertPathToHtml(path);
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a
href={htmlPath + "/UI/general.html"}
class:list={["nav-link", page === "general" && "active"]}
>
<i class="nav-icon bi bi-circle"></i>
<p>General</p>
</a>
</li>
<li class="nav-item">
<a
href={htmlPath + "/UI/timeline.html"}
Expand Down
Loading

0 comments on commit 4a95b7f

Please sign in to comment.