feat(web): base layout and login on tailwind
This commit is contained in:
File diff suppressed because one or more lines are too long
+17
-26
@@ -6,34 +6,25 @@
|
|||||||
<title>VESTI — {% block title %}Управление{% endblock %}</title>
|
<title>VESTI — {% block title %}Управление{% endblock %}</title>
|
||||||
<link href="/static/css/style.css" rel="stylesheet">
|
<link href="/static/css/style.css" rel="stylesheet">
|
||||||
<link href="/static/bootstrap.min.css" rel="stylesheet">
|
<link href="/static/bootstrap.min.css" rel="stylesheet">
|
||||||
<style>
|
|
||||||
body { padding-top: 4.5rem; background: #f5f6fa; }
|
|
||||||
.card { box-shadow: 0 1px 4px rgba(0,0,0,.08); }
|
|
||||||
.post-text { white-space: pre-wrap; font-size: .9rem; }
|
|
||||||
/* список кандидатов: выбранный пост — светло-голубая заливка карточки */
|
|
||||||
.list-group-item.active-row { background-color: #dcecfc; }
|
|
||||||
.list-group-item.active-row:hover { background-color: #d0e4f8; }
|
|
||||||
[x-cloak] { display: none !important; }
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body data-page="{% block page %}x{% endblock %}">
|
<body class="bg-neutral-100 text-neutral-900" data-page="{% block page %}x{% endblock %}">
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
<header class="sticky top-0 z-40 bg-neutral-900 text-neutral-100 shadow-sm">
|
||||||
<div class="container-fluid">
|
<div class="flex flex-wrap items-center gap-x-4 gap-y-1 px-4 py-2">
|
||||||
<a class="navbar-brand" href="/candidates">📰 VESTI</a>
|
<a class="font-semibold no-underline text-white whitespace-nowrap" href="/candidates">📰 VESTI</a>
|
||||||
<div class="navbar-nav">
|
<nav class="flex flex-wrap items-center gap-x-3 gap-y-1 text-sm">
|
||||||
<a class="nav-link" href="/candidates">Кандидаты</a>
|
<a class="no-underline text-neutral-300 hover:text-white" href="/candidates">Кандидаты</a>
|
||||||
<a class="nav-link" href="/selected">⭐ Отобранные</a>
|
<a class="no-underline text-neutral-300 hover:text-white" href="/selected">⭐ Отобранные</a>
|
||||||
<a class="nav-link" href="/published">Опубликовано</a>
|
<a class="no-underline text-neutral-300 hover:text-white" href="/published">Опубликовано</a>
|
||||||
<a class="nav-link" href="/metrics">Метрики</a>
|
<a class="no-underline text-neutral-300 hover:text-white" href="/metrics">Метрики</a>
|
||||||
<a class="nav-link" href="/crawlers">Краулеры</a>
|
<a class="no-underline text-neutral-300 hover:text-white" href="/crawlers">Краулеры</a>
|
||||||
<a class="nav-link" href="/sources">Источники</a>
|
<a class="no-underline text-neutral-300 hover:text-white" href="/sources">Источники</a>
|
||||||
<a class="nav-link text-danger" href="/logout">Выйти</a>
|
<a class="no-underline text-red-400 hover:text-red-300" href="/logout">Выйти</a>
|
||||||
</div>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</header>
|
||||||
<div class="container-fluid mt-2 px-3">
|
<main class="px-4 py-3">
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
</div>
|
</main>
|
||||||
{% block scripts %}{% endblock %}
|
{% block scripts %}{% endblock %}
|
||||||
<script>
|
<script>
|
||||||
// Табы «Оригинал/Перевод» — клиентское состояние (Alpine). Стартовая вкладка: перевод, если есть кнопка «Перевод».
|
// Табы «Оригинал/Перевод» — клиентское состояние (Alpine). Стартовая вкладка: перевод, если есть кнопка «Перевод».
|
||||||
@@ -67,4 +58,4 @@ function bulkSel() {
|
|||||||
<script src="/static/htmx.min.js"></script>
|
<script src="/static/htmx.min.js"></script>
|
||||||
<script src="/static/alpine.min.js" defer></script>
|
<script src="/static/alpine.min.js" defer></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
+13
-12
@@ -4,23 +4,24 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>VESTI — Вход</title>
|
<title>VESTI — Вход</title>
|
||||||
|
<link href="/static/css/style.css" rel="stylesheet">
|
||||||
<link href="/static/bootstrap.min.css" rel="stylesheet">
|
<link href="/static/bootstrap.min.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-light d-flex align-items-center" style="min-height:100vh">
|
<body class="bg-neutral-100 flex items-center justify-center min-h-screen">
|
||||||
<div class="container" style="max-width:380px">
|
<div class="w-full max-w-sm px-4">
|
||||||
<div class="card shadow-sm">
|
<div class="card card-outline shadow-sm">
|
||||||
<div class="card-body p-4">
|
<div class="card-content">
|
||||||
<h4 class="card-title mb-3">📰 VESTI — вход</h4>
|
<h4 class="card-title text-lg mb-4">📰 VESTI — вход</h4>
|
||||||
{% if request.query_params.get('error') %}<div class="alert alert-danger py-2">Неверный пароль</div>{% endif %}
|
{% if request.query_params.get('error') %}<div class="alert alert-error mb-4">Неверный пароль</div>{% endif %}
|
||||||
<form method="post" action="/login">
|
<form method="post" action="/login" class="flex flex-col gap-4">
|
||||||
<div class="mb-3">
|
<div class="flex flex-col gap-2">
|
||||||
<label class="form-label">Пароль</label>
|
<label class="text-sm font-medium" for="password">Пароль</label>
|
||||||
<input type="password" name="password" class="form-control" autofocus required>
|
<input id="password" type="password" name="password" class="input" autofocus required>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-primary w-100">Войти</button>
|
<button class="btn btn-primary w-full">Войти</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user