9 lines
3.6 KiB
HTML
9 lines
3.6 KiB
HTML
{% extends 'base.html' %}{% from 'macros.html' import idea_card,signal_card,empty with context %}
|
|
{% block content %}
|
|
<section class="hero"><div class="hero-copy"><span class="eyebrow"><span class="live-dot"></span>{{ t('kz_focus') }}</span><h1>{{ t('welcome') }}</h1><p>{{ t('subtitle') }}</p><div class="hero-actions">{% if user.role in ['admin','analyst'] %}<form method="post" action="{{ url_for('web.refresh') }}"><input type="hidden" name="csrf" value="{{ csrf }}"><button class="button primary">↻ {{ t('update') }}</button></form>{% endif %}<a class="button secondary" href="{{ url_for('web.ideas') }}">{{ t('ideas') }} ↗</a></div></div><div class="hero-art" aria-hidden="true"><div class="globe"><div class="globe-lat"></div><div class="globe-long"></div><div class="globe-equator"></div><span class="globe-point p1"></span><span class="globe-point p2"></span><span class="globe-point p3"></span></div><span class="float-label fl1">✧ AI</span><span class="float-label fl2">↗ {{ t('country_focus') }}</span><span class="float-label fl3">◎ FinTech</span></div></section>
|
|
{% if running %}<p class="notice" role="status">◌ {{ t('running') }}</p>{% endif %}
|
|
<div class="stats-grid">{% for label,value,icon in [('new_trends',new_trends,'◎'),('opportunities',ideas_count,'◇'),('collected_signals',total,'⌁'),('directions',directions,'▦')] %}<article class="stat-card"><div class="stat-title">{{ t(label) }}<span class="stat-icon c{{ loop.index }}">{{ icon }}</span></div><strong class="stat-value">{{ value }}</strong><div class="stat-detail">{% if label=='collected_signals' %}<span class="{{ 'positive' if recent>=prior else 'muted' }}">{{ '+' if recent>=prior }}{{ recent-prior }}</span> · {{ t('new_signals') }}: {{ recent }}<br>{{ t('signals') }}: {{ analyzed }}{% else %}<span class="muted">{{ t('hypothesis') if label=='opportunities' else t('materials') }}</span>{% endif %}</div></article>{% endfor %}</div>
|
|
<div class="dashboard-columns"><section class="panel top-ideas"><div class="section-heading"><div><h2><span class="accent-icon">✧</span> {{ t('weekly') }}</h2><p>{{ t('weekly_hint') }}</p></div><a href="{{ url_for('web.ideas') }}">{{ t('view_all') }} ↗</a></div><div class="ideas-list">{% for item in top %}{{ idea_card(item,loop.index) }}{% else %}{{ empty(true) }}{% endfor %}</div></section><div class="right-column"><section class="panel"><div class="section-heading"><h2>{{ t('trend_map') }}</h2><a href="{{ url_for('web.analytics') }}" aria-label="{{ t('analytics') }}">↗</a></div><div class="trend-cloud">{% for item in grouped %}<a class="trend-bubble size{{ loop.index % 3 }}" href="{{ url_for('web.trend',category=item.category) }}"><strong>{{ item.category }}</strong><span>{{ item.n }} {{ t('materials')|lower }}</span></a>{% else %}{{ empty() }}{% endfor %}</div></section><section class="recommend-card"><span class="recommend-symbol">✧</span><span class="eyebrow">{{ t('recommendation') }}</span>{% if top %}<h2>{{ t('recommend_prefix') }} {{ category_label(top[0].category) }}</h2><p>{{ json_load(top[0].data).recommendation }}</p><span class="badge demo">{{ t('demo') if top[0].mock else t('hypothesis') }}</span><a href="{{ url_for('web.idea',item_id=top[0].id) }}">{{ t('open_idea') }} →</a>{% else %}<h2>{{ t('empty_ideas') }}</h2><p>{{ t('recommend_hint') }}</p>{% endif %}</section></div></div>
|
|
<section class="panel news-panel"><div class="section-heading"><div><h2>{{ t('world_news') }}</h2><p>{{ t('sources_hint') }}</p></div><a href="{{ url_for('web.trends') }}">{{ t('view_all') }} ↗</a></div><div class="news-grid">{% for item in news %}{{ signal_card(item) }}{% else %}{{ empty() }}{% endfor %}</div></section>
|
|
{% endblock %}
|