botserver/templates/base.html

89 lines
3.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}General Bots{% endblock %}</title>
<meta name="description" content="{% block description %}General Bots - AI-powered workspace{% endblock %}">
<meta name="theme-color" content="#3b82f6">
<!-- HTMX -->
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
<script src="https://unpkg.com/htmx.org/dist/ext/ws.js"></script>
<script src="https://unpkg.com/htmx.org/dist/ext/json-enc.js"></script>
<!-- Styles -->
<link rel="stylesheet" href="/css/app.css">
{% block styles %}{% endblock %}
</head>
<body hx-ext="ws" ws-connect="/ws">
<!-- Header -->
<header class="float-header">
<div class="header-left">
<a href="/" class="logo-wrapper" hx-get="/" hx-target="#main-content" hx-push-url="true">
<div class="logo-icon"></div>
<span class="logo-text">BotServer</span>
</a>
</div>
<div class="header-right">
<!-- Theme Toggle -->
<button class="icon-button"
hx-post="/api/theme/toggle"
hx-swap="none"
title="Toggle theme">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
</svg>
</button>
<!-- Apps Menu -->
<button class="icon-button apps-button"
hx-get="/api/apps/menu"
hx-target="#apps-dropdown"
hx-trigger="click"
title="Applications">
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
<circle cx="5" cy="5" r="2"></circle>
<circle cx="12" cy="5" r="2"></circle>
<circle cx="19" cy="5" r="2"></circle>
<circle cx="5" cy="12" r="2"></circle>
<circle cx="12" cy="12" r="2"></circle>
<circle cx="19" cy="12" r="2"></circle>
<circle cx="5" cy="19" r="2"></circle>
<circle cx="12" cy="19" r="2"></circle>
<circle cx="19" cy="19" r="2"></circle>
</svg>
</button>
<div id="apps-dropdown" class="apps-dropdown"></div>
<!-- User Avatar -->
<button class="user-avatar"
hx-get="/api/user/menu"
hx-target="#user-menu"
hx-trigger="click"
title="User Account">
<span>{{ user_initial|default("U") }}</span>
</button>
<div id="user-menu" class="user-menu"></div>
</div>
</header></span>
<!-- Main Content -->
<main id="main-content" class="container">
{% block content %}{% endblock %}
</main>
<!-- Notifications Container -->
<div id="notifications" class="notifications-container"></div>
<!-- HTMX Config -->
<!-- Minimal HTMX Application with Authentication -->
<script src="/static/js/htmx-app.js"></script>
<script src="/static/js/theme-manager.js"></script>
{% block scripts %}{% endblock %}
</body>
</html>