This repository has been archived on 2024-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
Nexus-Polestar/astro/components/Sidebar.astro

41 lines
2.5 KiB
Text
Raw Normal View History

2023-01-23 00:07:07 -05:00
---
2023-02-13 13:56:29 -05:00
import { APP } from '../config'
2023-07-11 04:42:51 -05:00
import { SIDEBAR, SIDEBARHEADER, SIDEBARTOP, SIDEBARBOTTOM } from '../sidebar'
2023-01-23 00:07:07 -05:00
---
2023-07-11 04:42:51 -05:00
{SIDEBAR.map(item => (<div id={item.hide ? "true" : "false"} class="sidebar">
2023-02-24 03:57:50 -05:00
<div class="drag-area"></div>
2023-02-01 14:10:09 -05:00
<div class="sidebar-header">
2023-07-11 00:16:55 -05:00
<div class="sidebar-header-left">
<img src="./logo.png">
{APP.map(item => (<p>{item.name}</p>))}
</div>
<div class="sidebar-header-right">
2023-07-11 04:42:51 -05:00
{SIDEBAR.map(item => (<button id="sidebar-toggle" onclick={item.hide ? "ToggleSidebarRe()" : "ToggleSidebar()"}><svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zm224 0V416H448V96H224zM88 96c-13.3 0-24 10.7-24 24s10.7 24 24 24h48c13.3 0 24-10.7 24-24s-10.7-24-24-24H88zM64 216c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24s-10.7-24-24-24H88c-13.3 0-24 10.7-24 24zm24 72c-13.3 0-24 10.7-24 24s10.7 24 24 24h48c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z"/></svg></button>))}
2023-07-11 00:16:55 -05:00
</div>
2023-02-01 14:10:09 -05:00
</div>
2023-01-23 00:07:07 -05:00
<div class="sidebar-top">
2023-02-01 14:10:09 -05:00
{SIDEBARTOP.map(item => (
2023-07-11 04:42:51 -05:00
<li onclick="ws();" data-tab={item.text} class={item.default ? "active" : null}>
2023-02-01 14:10:09 -05:00
<i class={item.icon}></i>
<p>{item.text}</p>
2023-02-17 18:03:03 -05:00
{item.navigation ?
<div class="loading-indicator"><i class="fa-solid fa-circle-notch fa-spin"></i></div>
2023-02-01 14:10:09 -05:00
<div id="Tab" class="webview-navigation">
2023-07-11 04:42:51 -05:00
<button onclick='document.querySelector(".active webview").goBack();'><i class="fa-solid fa-arrow-left-long"></i></button>
<button onclick='document.querySelector(".active webview").goForward();'><i class="fa-solid fa-arrow-right-long"></i></button>
<button onclick='document.querySelector(".active webview").reload();'><i class="fa-solid fa-arrow-rotate-right"></i></button>
2023-02-09 17:28:07 -05:00
</div> : null}
2023-02-01 14:10:09 -05:00
</li>
))}
2023-01-23 00:07:07 -05:00
</div>
<div class="sidebar-bottom">
2023-02-11 15:56:29 -05:00
<!-- Notifications are inserted in automatically when you push notifications with Pushy. See the Pushy section in the main process. -->
2023-02-01 14:10:09 -05:00
{SIDEBARBOTTOM.map(item => (
<li data-tab={item.page}>
2023-02-10 17:33:41 -05:00
<i class={item.icon}></i>
2023-02-01 14:10:09 -05:00
<p>{item.text}</p>
</li>
))}
2023-01-23 00:07:07 -05:00
</div>
2023-07-11 04:42:51 -05:00
</div>))}