upgrade the ui backend thing is same just topo bar not full page also add more use light bluw light green color just header not full page full of animation backend same import React, { useContext, useState } from 'react';
Browse filesimport { Link, useNavigate } from 'react-router-dom';
import { UserContext } from '../context/User';
import {
Button,
Container,
Icon,
Menu,
Segment,
} from 'semantic-ui-react';
import {
API,
getLogo,
getSystemName,
isAdmin,
isMobile,
showSuccess,
} from '../helpers';
import '../index.css';
// Header Buttons
let headerButtons = [
{
name: 'Channel',
to: '/channel',
icon: 'sitemap',
admin: true,
},
{
name: 'Token',
to: '/token',
icon: 'key',
},
{
name: 'Redemption',
to: '/redemption',
icon: 'dollar sign',
admin: true,
},
{
name: 'Topup',
to: '/topup',
icon: 'cart',
},
{
name: 'Users',
to: '/user',
icon: 'user',
admin: true,
},
{
name: 'Dashboard',
to: '/dashboard',
icon: 'chart bar',
},
{
name: 'Logs',
to: '/log',
icon: 'book',
},
{
name: 'Settings',
to: '/setting',
icon: 'setting',
},
{
name: 'Docs',
external: 'https://doc.llmx.in',
icon: 'file alternate outline',
},
];
if (localStorage.getItem('chat_link')) {
headerButtons.splice(1, 0, {
name: 'Chat',
to: '/chat',
icon: 'comments',
});
}
const Header = () => {
const [userState, userDispatch] = useContext(UserContext);
const navigate = useNavigate();
const [showSidebar, setShowSidebar] = useState(false);
const systemName = getSystemName();
const logo = getLogo();
async function logout() {
setShowSidebar(false);
await API.get('/api/user/logout');
showSuccess('Logout successful!');
userDispatch({ type: 'logout' });
localStorage.removeItem('user');
navigate('/login');
}
const toggleSidebar = () => setShowSidebar(!showSidebar);
const goHome = () => (window.location.href = 'https://llmx.in');
const renderButtons = (isMobile) =>
headerButtons.map((button) => {
if (button.admin && !isAdmin()) return null;
if (button.external) {
return (
<Menu.Item
key={button.name}
onClick={() => window.open(button.external, '_blank')}
style={{
fontSize: '15px',
fontWeight: '400',
color: '#555',
cursor: 'pointer',
}}
>
<Icon name={button.icon} style={{ marginRight: '4px' }} />
{button.name}
</Menu.Item>
);
}
if (isMobile) {
return (
<Menu.Item
key={button.name}
onClick={() => {
navigate(button.to);
setShowSidebar(false);
}}
style={{ fontSize: '15px' }}
>
<Icon name={button.icon} style={{ marginRight: '4px' }} />
{button.name}
</Menu.Item>
);
}
return (
<Menu.Item
key={button.name}
as={Link}
to={button.to}
style={{
fontSize: '15px',
fontWeight: '400',
color: '#555',
}}
>
<Icon name={button.icon} style={{ marginRight: '4px' }} />
{button.name}
</Menu.Item>
);
});
if (isMobile()) {
return (
<>
<Menu
borderless
size='large'
style={
showSidebar
? {
borderBottom: 'none',
marginBottom: '0',
borderTop: 'none',
height: '51px',
}
: { borderTop: 'none', height: '52px' }
}
>
<Container
style={{
width: '100%',
maxWidth: isMobile() ? '100%' : '1200px',
padding: isMobile() ? '0 10px' : '0 20px',
}}
>
<Menu.Item onClick={goHome} style={{ cursor: 'pointer' }}>
<img src={logo} alt='logo' style={{ marginRight: '0.75em' }} />
<div style={{ fontSize: '20px' }}>
<b>{systemName}</b>
</div>
</Menu.Item>
<Menu.Menu position='right'>
<Menu.Item onClick={toggleSidebar}>
<Icon name={showSidebar ? 'close' : 'sidebar'} />
</Menu.Item>
</Menu.Menu>
</Container>
</Menu>
{showSidebar ? (
<Segment style={{ marginTop: 0, borderTop: '0' }}>
<Menu secondary vertical style={{ width: '100%', margin: 0 }}>
{renderButtons(true)}
<Menu.Item>
{userState.user ? (
<Button onClick={logout} style={{ color: '#666666' }}>
Logout
</Button>
) : (
<>
<Button
onClick={() => {
setShowSidebar(false);
navigate('/login');
}}
>
Login
</Button>
<Button
onClick={() => {
setShowSidebar(false);
navigate('/register');
}}
>
Register
</Button>
</>
)}
</Menu.Item>
</Menu>
</Segment>
) : null}
</>
);
}
return (
<>
<Menu
borderless
style={{
borderTop: 'none',
boxShadow: 'rgba(0, 0, 0, 0.04) 0px 2px 12px 0px',
border: 'none',
}}
>
<Container
style={{
width: '100%',
maxWidth: isMobile() ? '100%' : '1200px',
padding: isMobile() ? '0 10px' : '0 20px',
}}
>
<Menu.Item onClick={goHome} style={{ cursor: 'pointer' }}>
<img src={logo} alt='logo' style={{ marginRight: '0.75em' }} />
<div
style={{
fontSize: '18px',
fontWeight: '500',
color: '#333',
}}
>
{systemName}
</div>
</Menu.Item>
{renderButtons(false)}
<Menu.Menu position='right'>
{userState.user ? (
<Menu.Item
name='Logout'
onClick={logout}
style={{
fontSize: '15px',
fontWeight: '400',
color: '#666',
cursor: 'pointer',
}}
/>
) : (
<Menu.Item
name='Login'
as={Link}
to='/login'
className='btn btn-link'
style={{
fontSize: '15px',
fontWeight: '400',
color: '#666',
}}
/>
)}
</Menu.Menu>
</Container>
</Menu>
</>
);
};
export default Header;
- README.md +8 -5
- components/footer.js +91 -0
- components/navbar.js +243 -0
- index.html +39 -19
- script.js +23 -0
- style.css +18 -20
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: LightStream Dashboard 🌊
|
| 3 |
+
colorFrom: yellow
|
| 4 |
+
colorTo: yellow
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://deepsite.hf.co).
|
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomFooter extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
footer {
|
| 7 |
+
background: linear-gradient(90deg, rgba(255,255,255,0.9) 0%, rgba(236, 253, 245, 0.9) 100%);
|
| 8 |
+
backdrop-filter: blur(10px);
|
| 9 |
+
padding: 2rem 1rem;
|
| 10 |
+
text-align: center;
|
| 11 |
+
margin-top: 3rem;
|
| 12 |
+
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
.footer-content {
|
| 16 |
+
max-width: 1200px;
|
| 17 |
+
margin: 0 auto;
|
| 18 |
+
display: flex;
|
| 19 |
+
flex-direction: column;
|
| 20 |
+
gap: 1.5rem;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.footer-links {
|
| 24 |
+
display: flex;
|
| 25 |
+
justify-content: center;
|
| 26 |
+
gap: 1.5rem;
|
| 27 |
+
flex-wrap: wrap;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
.footer-link {
|
| 31 |
+
color: #475569;
|
| 32 |
+
text-decoration: none;
|
| 33 |
+
font-weight: 500;
|
| 34 |
+
display: flex;
|
| 35 |
+
align-items: center;
|
| 36 |
+
gap: 0.5rem;
|
| 37 |
+
transition: color 0.2s ease;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.footer-link:hover {
|
| 41 |
+
color: #0ea5e9;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.copyright {
|
| 45 |
+
color: #64748b;
|
| 46 |
+
font-size: 0.875rem;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.social-links {
|
| 50 |
+
display: flex;
|
| 51 |
+
justify-content: center;
|
| 52 |
+
gap: 1rem;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.social-link {
|
| 56 |
+
color: #64748b;
|
| 57 |
+
transition: all 0.2s ease;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
.social-link:hover {
|
| 61 |
+
color: #0ea5e9;
|
| 62 |
+
transform: translateY(-2px);
|
| 63 |
+
}
|
| 64 |
+
</style>
|
| 65 |
+
|
| 66 |
+
<footer>
|
| 67 |
+
<div class="footer-content">
|
| 68 |
+
<div class="footer-links">
|
| 69 |
+
<a href="/about" class="footer-link"><i data-feather="info"></i> About</a>
|
| 70 |
+
<a href="/terms" class="footer-link"><i data-feather="file-text"></i> Terms</a>
|
| 71 |
+
<a href="/privacy" class="footer-link"><i data-feather="shield"></i> Privacy</a>
|
| 72 |
+
<a href="/contact" class="footer-link"><i data-feather="mail"></i> Contact</a>
|
| 73 |
+
</div>
|
| 74 |
+
|
| 75 |
+
<div class="social-links">
|
| 76 |
+
<a href="#" class="social-link"><i data-feather="twitter"></i></a>
|
| 77 |
+
<a href="#" class="social-link"><i data-feather="github"></i></a>
|
| 78 |
+
<a href="#" class="social-link"><i data-feather="linkedin"></i></a>
|
| 79 |
+
<a href="#" class="social-link"><i data-feather="discord"></i></a>
|
| 80 |
+
</div>
|
| 81 |
+
|
| 82 |
+
<p class="copyright">© ${new Date().getFullYear()} LightStream Dashboard. All rights reserved.</p>
|
| 83 |
+
</div>
|
| 84 |
+
|
| 85 |
+
<script>feather.replace();</script>
|
| 86 |
+
</footer>
|
| 87 |
+
`;
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
customElements.define('custom-footer', CustomFooter);
|
|
@@ -0,0 +1,243 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
:host {
|
| 7 |
+
display: block;
|
| 8 |
+
position: relative;
|
| 9 |
+
height: 80px;
|
| 10 |
+
width: 100%;
|
| 11 |
+
overflow: hidden;
|
| 12 |
+
z-index: 10;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
nav {
|
| 16 |
+
background: rgba(255, 255, 255, 0.9);
|
| 17 |
+
backdrop-filter: blur(10px);
|
| 18 |
+
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
|
| 19 |
+
padding: 0 2rem;
|
| 20 |
+
height: 80px;
|
| 21 |
+
display: flex;
|
| 22 |
+
justify-content: space-between;
|
| 23 |
+
align-items: center;
|
| 24 |
+
position: relative;
|
| 25 |
+
z-index: 2;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
.logo-container {
|
| 29 |
+
display: flex;
|
| 30 |
+
align-items: center;
|
| 31 |
+
gap: 0.75rem;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.logo {
|
| 35 |
+
color: #0ea5e9;
|
| 36 |
+
font-weight: 700;
|
| 37 |
+
font-size: 1.5rem;
|
| 38 |
+
letter-spacing: -0.5px;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.logo-img {
|
| 42 |
+
height: 2.5rem;
|
| 43 |
+
width: auto;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.nav-links {
|
| 47 |
+
display: flex;
|
| 48 |
+
gap: 1.25rem;
|
| 49 |
+
list-style: none;
|
| 50 |
+
margin: 0;
|
| 51 |
+
padding: 0;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
.nav-link {
|
| 55 |
+
color: #334155;
|
| 56 |
+
text-decoration: none;
|
| 57 |
+
font-weight: 500;
|
| 58 |
+
font-size: 0.95rem;
|
| 59 |
+
display: flex;
|
| 60 |
+
align-items: center;
|
| 61 |
+
gap: 0.5rem;
|
| 62 |
+
padding: 0.5rem 0;
|
| 63 |
+
position: relative;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
.nav-link:hover {
|
| 67 |
+
color: #0ea5e9;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.nav-link::after {
|
| 71 |
+
content: '';
|
| 72 |
+
position: absolute;
|
| 73 |
+
bottom: 0;
|
| 74 |
+
left: 0;
|
| 75 |
+
width: 0;
|
| 76 |
+
height: 2px;
|
| 77 |
+
background: linear-gradient(90deg, #7dd3fc 0%, #4ade80 100%);
|
| 78 |
+
transition: width 0.3s ease;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.nav-link:hover::after {
|
| 82 |
+
width: 100%;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.nav-actions {
|
| 86 |
+
display: flex;
|
| 87 |
+
gap: 1rem;
|
| 88 |
+
align-items: center;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.login-btn {
|
| 92 |
+
background: linear-gradient(90deg, #7dd3fc 0%, #4ade80 100%);
|
| 93 |
+
color: white;
|
| 94 |
+
border: none;
|
| 95 |
+
padding: 0.5rem 1.25rem;
|
| 96 |
+
border-radius: 9999px;
|
| 97 |
+
font-weight: 600;
|
| 98 |
+
cursor: pointer;
|
| 99 |
+
transition: all 0.2s ease;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
.login-btn:hover {
|
| 103 |
+
transform: translateY(-2px);
|
| 104 |
+
box-shadow: 0 4px 15px rgba(125, 211, 252, 0.3);
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.logout-btn {
|
| 108 |
+
color: #64748b;
|
| 109 |
+
font-weight: 500;
|
| 110 |
+
cursor: pointer;
|
| 111 |
+
transition: color 0.2s ease;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
.logout-btn:hover {
|
| 115 |
+
color: #ef4444;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
.mobile-menu-btn {
|
| 119 |
+
display: none;
|
| 120 |
+
background: none;
|
| 121 |
+
border: none;
|
| 122 |
+
cursor: pointer;
|
| 123 |
+
color: #334155;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
.mobile-menu {
|
| 127 |
+
display: none;
|
| 128 |
+
position: absolute;
|
| 129 |
+
top: 80px;
|
| 130 |
+
left: 0;
|
| 131 |
+
right: 0;
|
| 132 |
+
background: white;
|
| 133 |
+
padding: 1rem;
|
| 134 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
| 135 |
+
border-radius: 0 0 1rem 1rem;
|
| 136 |
+
z-index: 1;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
.mobile-menu.open {
|
| 140 |
+
display: block;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.mobile-nav-links {
|
| 144 |
+
list-style: none;
|
| 145 |
+
margin: 0;
|
| 146 |
+
padding: 0;
|
| 147 |
+
display: flex;
|
| 148 |
+
flex-direction: column;
|
| 149 |
+
gap: 0.5rem;
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
.mobile-nav-link {
|
| 153 |
+
color: #334155;
|
| 154 |
+
text-decoration: none;
|
| 155 |
+
font-weight: 500;
|
| 156 |
+
padding: 0.75rem 1rem;
|
| 157 |
+
border-radius: 0.5rem;
|
| 158 |
+
display: flex;
|
| 159 |
+
align-items: center;
|
| 160 |
+
gap: 0.75rem;
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
.mobile-nav-link:hover {
|
| 164 |
+
background: #f1f5f9;
|
| 165 |
+
color: #0ea5e9;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
@media (max-width: 1024px) {
|
| 169 |
+
.desktop-nav {
|
| 170 |
+
display: none;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
.mobile-menu-btn {
|
| 174 |
+
display: block;
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
</style>
|
| 178 |
+
|
| 179 |
+
<nav>
|
| 180 |
+
<div class="logo-container">
|
| 181 |
+
<img src="http://static.photos/blue/200x200/42" alt="Logo" class="logo-img">
|
| 182 |
+
<span class="logo">LightStream</span>
|
| 183 |
+
</div>
|
| 184 |
+
|
| 185 |
+
<div class="desktop-nav">
|
| 186 |
+
<ul class="nav-links">
|
| 187 |
+
<li><a href="/channel" class="nav-link"><i data-feather="sitemap"></i> Channel</a></li>
|
| 188 |
+
<li><a href="/token" class="nav-link"><i data-feather="key"></i> Token</a></li>
|
| 189 |
+
<li><a href="/redemption" class="nav-link"><i data-feather="dollar-sign"></i> Redemption</a></li>
|
| 190 |
+
<li><a href="/topup" class="nav-link"><i data-feather="shopping-cart"></i> Topup</a></li>
|
| 191 |
+
<li><a href="/user" class="nav-link"><i data-feather="users"></i> Users</a></li>
|
| 192 |
+
<li><a href="/dashboard" class="nav-link"><i data-feather="bar-chart-2"></i> Dashboard</a></li>
|
| 193 |
+
<li><a href="/log" class="nav-link"><i data-feather="book"></i> Logs</a></li>
|
| 194 |
+
<li><a href="/setting" class="nav-link"><i data-feather="settings"></i> Settings</a></li>
|
| 195 |
+
<li><a href="https://doc.llmx.in" target="_blank" class="nav-link"><i data-feather="file-text"></i> Docs</a></li>
|
| 196 |
+
</ul>
|
| 197 |
+
</div>
|
| 198 |
+
|
| 199 |
+
<div class="nav-actions">
|
| 200 |
+
<button class="login-btn">Login</button>
|
| 201 |
+
<button class="logout-btn">Logout</button>
|
| 202 |
+
|
| 203 |
+
<button id="menu-button" class="mobile-menu-btn">
|
| 204 |
+
<i data-feather="menu"></i>
|
| 205 |
+
</button>
|
| 206 |
+
</div>
|
| 207 |
+
</nav>
|
| 208 |
+
|
| 209 |
+
<div id="mobile-menu" class="mobile-menu hidden">
|
| 210 |
+
<ul class="mobile-nav-links">
|
| 211 |
+
<li><a href="/channel" class="mobile-nav-link"><i data-feather="sitemap"></i> Channel</a></li>
|
| 212 |
+
<li><a href="/token" class="mobile-nav-link"><i data-feather="key"></i> Token</a></li>
|
| 213 |
+
<li><a href="/redemption" class="mobile-nav-link"><i data-feather="dollar-sign"></i> Redemption</a></li>
|
| 214 |
+
<li><a href="/topup" class="mobile-nav-link"><i data-feather="shopping-cart"></i> Topup</a></li>
|
| 215 |
+
<li><a href="/user" class="mobile-nav-link"><i data-feather="users"></i> Users</a></li>
|
| 216 |
+
<li><a href="/dashboard" class="mobile-nav-link"><i data-feather="bar-chart-2"></i> Dashboard</a></li>
|
| 217 |
+
<li><a href="/log" class="mobile-nav-link"><i data-feather="book"></i> Logs</a></li>
|
| 218 |
+
<li><a href="/setting" class="mobile-nav-link"><i data-feather="settings"></i> Settings</a></li>
|
| 219 |
+
<li><a href="https://doc.llmx.in" target="_blank" class="mobile-nav-link"><i data-feather="file-text"></i> Docs</a></li>
|
| 220 |
+
</ul>
|
| 221 |
+
</div>
|
| 222 |
+
|
| 223 |
+
<script>
|
| 224 |
+
feather.replace();
|
| 225 |
+
|
| 226 |
+
this.shadowRoot.getElementById('menu-button').addEventListener('click', () => {
|
| 227 |
+
const menu = this.shadowRoot.getElementById('mobile-menu');
|
| 228 |
+
menu.classList.toggle('hidden');
|
| 229 |
+
|
| 230 |
+
const icon = this.shadowRoot.querySelector('#menu-button i');
|
| 231 |
+
if (menu.classList.contains('hidden')) {
|
| 232 |
+
icon.setAttribute('data-feather', 'menu');
|
| 233 |
+
} else {
|
| 234 |
+
icon.setAttribute('data-feather', 'x');
|
| 235 |
+
}
|
| 236 |
+
feather.replace();
|
| 237 |
+
});
|
| 238 |
+
</script>
|
| 239 |
+
`;
|
| 240 |
+
}
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
customElements.define('custom-navbar', CustomNavbar);
|
|
@@ -1,19 +1,39 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>LightStream Dashboard</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>
|
| 12 |
+
</head>
|
| 13 |
+
<body class="bg-gradient-to-br from-blue-50 to-green-50 min-h-screen">
|
| 14 |
+
<custom-navbar></custom-navbar>
|
| 15 |
+
|
| 16 |
+
<main class="container mx-auto px-4 py-8">
|
| 17 |
+
<!-- Content will be loaded here by React -->
|
| 18 |
+
<div id="root" class="bg-white rounded-xl shadow-md p-6"></div>
|
| 19 |
+
</main>
|
| 20 |
+
|
| 21 |
+
<custom-footer></custom-footer>
|
| 22 |
+
|
| 23 |
+
<script src="components/navbar.js"></script>
|
| 24 |
+
<script src="components/footer.js"></script>
|
| 25 |
+
<script src="script.js"></script>
|
| 26 |
+
<script>
|
| 27 |
+
feather.replace();
|
| 28 |
+
VANTA.WAVES({
|
| 29 |
+
el: "custom-navbar",
|
| 30 |
+
color: 0x7dd3fc,
|
| 31 |
+
waveHeight: 20,
|
| 32 |
+
shininess: 50,
|
| 33 |
+
waveSpeed: 1.5,
|
| 34 |
+
zoom: 0.8
|
| 35 |
+
});
|
| 36 |
+
</script>
|
| 37 |
+
<script src="https://deepsite.hf.co/deepsite-badge.js"></script>
|
| 38 |
+
</body>
|
| 39 |
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Shared JavaScript across all pages
|
| 2 |
+
console.log('LightStream Dashboard loaded');
|
| 3 |
+
|
| 4 |
+
// Mobile detection helper
|
| 5 |
+
function isMobile() {
|
| 6 |
+
return window.innerWidth <= 768;
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
// Toggle mobile menu
|
| 10 |
+
function toggleMobileMenu() {
|
| 11 |
+
const menu = document.getElementById('mobile-menu');
|
| 12 |
+
menu.classList.toggle('hidden');
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
// Close mobile menu when clicking outside
|
| 16 |
+
document.addEventListener('click', (e) => {
|
| 17 |
+
const mobileMenu = document.getElementById('mobile-menu');
|
| 18 |
+
const menuButton = document.getElementById('menu-button');
|
| 19 |
+
|
| 20 |
+
if (mobileMenu && !mobileMenu.contains(e.target) && !menuButton.contains(e.target)) {
|
| 21 |
+
mobileMenu.classList.add('hidden');
|
| 22 |
+
}
|
| 23 |
+
});
|
|
@@ -1,28 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
max-width: 620px;
|
| 20 |
-
margin: 0 auto;
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Shared styles across all pages */
|
| 2 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 3 |
+
|
| 4 |
body {
|
| 5 |
+
font-family: 'Inter', sans-serif;
|
|
|
|
| 6 |
}
|
| 7 |
|
| 8 |
+
/* Smooth transitions */
|
| 9 |
+
a, button {
|
| 10 |
+
transition: all 0.2s ease-in-out;
|
| 11 |
}
|
| 12 |
|
| 13 |
+
/* Custom scrollbar */
|
| 14 |
+
::-webkit-scrollbar {
|
| 15 |
+
width: 8px;
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
+
::-webkit-scrollbar-track {
|
| 18 |
+
background: #f1f1f1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
+
::-webkit-scrollbar-thumb {
|
| 21 |
+
background: #7dd3fc;
|
| 22 |
+
border-radius: 4px;
|
| 23 |
}
|
| 24 |
+
::-webkit-scrollbar-thumb:hover {
|
| 25 |
+
background: #0ea5e9;
|
| 26 |
+
}
|