ii-assistent/hunter/templates/base.html

29 lines
4.1 KiB
HTML

<!doctype html>
<html lang="{{ lang }}">
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>{{ t(page) }} · {{ brand }}</title><link rel="stylesheet" href="{{ url_for('static',filename='app.css') }}">{% if public_sentry_dsn %}<script src="{{ url_for('static',filename='vendor/sentry-10.25.0.min.js') }}" defer></script>{% endif %}<script src="{{ url_for('static',filename='app.js') }}" defer></script></head>
<body data-sentry-dsn="{{ public_sentry_dsn }}" data-sentry-release="{{ sentry_release }}" data-sentry-environment="{{ sentry_environment }}">
<a class="skip" href="#main">{{ t('workspace') }}</a>
{% if user %}
<aside class="sidebar" id="sidebar">
<a class="brand" href="{{ url_for('web.dashboard') }}"><span class="brand-mark">↗</span><span>AI Trend<span class="brand-light">Hunter</span><small>{{ t('app_tag') }}</small></span></a>
<div class="workspace-label"><span class="workspace-dot"></span>{{ t('workspace') }}<span class="tiny">KZ</span></div>
<p class="nav-heading">{{ t('intelligence') }}</p>
<nav aria-label="{{ t('workspace') }}">
{% for key,endpoint,icon in [('home','dashboard','◫'),('trends','trends','◎'),('ideas','ideas','◇'),('competitors','competitors','⌁'),('analytics','analytics','▥'),('assistant','assistant','✧'),('sources','sources','▤')] %}
<a class="nav-item {{ 'active' if page==key }}" href="{{ url_for('web.'+endpoint) }}"><span class="nav-icon">{{ icon }}</span>{{ t(key) }}{% if key=='assistant' %}<span class="nav-tag">AI</span>{% endif %}</a>
{% endfor %}
<div class="nav-divider"></div>
{% for key,endpoint,icon in [('favorites','saved','☆'),('reports','reports','▧'),('history','history','◷')] %}<a class="nav-item {{ 'active' if page==key }}" href="{{ url_for('web.'+endpoint) }}"><span class="nav-icon">{{ icon }}</span>{{ t(key) }}</a>{% endfor %}
{% if user.role=='admin' %}<a class="nav-item {{ 'active' if page=='settings' }}" href="{{ url_for('web.settings') }}"><span class="nav-icon">⚙</span>{{ t('settings') }}</a>{% endif %}
</nav>
<div class="sidebar-bottom"><div class="focus-card"><span class="eyebrow">{{ t('country_focus') }}</span><p>{{ t('kz_focus') }}</p><div class="mini-orbit"><span></span></div></div><div class="account"><span class="avatar">{{ user.email[0]|upper }}</span><span><strong>{{ user.email }}</strong><small>{{ t(user.role) }}</small></span><form action="{{ url_for('web.logout') }}" method="post"><input type="hidden" name="csrf" value="{{ csrf }}"><button class="icon-button" title="{{ t('logout') }}" aria-label="{{ t('logout') }}">↪</button></form></div></div>
</aside>
<div class="app-shell"><header class="topbar"><button class="menu-button icon-button" aria-controls="sidebar" aria-expanded="false" aria-label="{{ t('workspace') }}">☰</button><span class="breadcrumb">{{ t('workspace') }} <span>/</span> <strong>{{ t(page) }}</strong></span><div class="top-actions"><form action="{{ url_for('web.trends') }}" class="global-search"><span>⌕</span><input name="q" aria-label="{{ t('search') }}" placeholder="{{ t('search_hint') }}"><button class="icon-button" aria-label="{{ t('apply') }}">↵</button></form>{% include 'language.html' %}<a class="avatar small" href="{{ url_for('web.saved') }}" aria-label="{{ t('favorites') }}">{{ user.email[0]|upper }}</a></div></header>
{% else %}<div class="auth-shell"><header class="auth-header"><a class="brand" href="{{ url_for('web.login') }}"><span class="brand-mark">↗</span>AI Trend Hunter</a>{% include 'language.html' %}</header>{% endif %}
<main id="main" class="{{ 'main' if user else 'auth-main' }}">
{% for category,message in get_flashed_messages(with_categories=true) %}<div role="status" class="notice {{ 'notice-error' if category=='error' }}">{{ message }}</div>{% endfor %}
{% if user and not ai_ready %}<div class="demo-strip"><span class="badge demo">{{ t('demo') }}</span><span>{{ t('demo_notice') }}</span>{% if user.role=='admin' %}<a href="{{ url_for('web.settings') }}">{{ t('connection') }} ↗</a>{% endif %}</div>{% endif %}
{% block content %}{% endblock %}
</main><footer>{{ brand }} <span>·</span> {{ t('kz_focus') }}</footer></div>
</body></html>