🎨 fix: Исправлена страница Настроек дайджеста

БЫЛО: CSS стили выводились как текст на странице
СТАЛО: Стили правильно в <head> через base.html

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Admin 2026-04-12 19:18:41 +04:00
parent 16ce10765b
commit e8653595eb

View file

@ -5,104 +5,102 @@
{% block nav_digest_settings %}active{% endblock %}
{% block extra_style %}
<style>
.digest-settings-container { max-width: 900px; }
.digest-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; border-radius: 10px; margin-bottom: 30px; }
.digest-header h1 { font-size: 2em; margin-bottom: 10px; }
.digest-back-link { color: white; text-decoration: none; opacity: 0.9; }
.digest-back-link:hover { opacity: 1; }
.digest-card { background: white; padding: 25px; border-radius: 10px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.digest-card h3 { margin-bottom: 15px; color: #667eea; }
.digest-form-group { margin-bottom: 20px; }
.digest-form-group label { display: block; margin-bottom: 5px; font-weight: 500; }
.digest-form-group input[type="time"], .digest-form-group select { width: 100%; padding: 10px; border: 2px solid #e2e8f0; border-radius: 5px; font-size: 1em; }
.digest-checkbox-group { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.digest-checkbox-group input[type="checkbox"] { width: 20px; height: 20px; }
.digest-btn { padding: 12px 24px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; background: #667eea; color: white; }
.digest-btn:hover { background: #5568d3; }
</style>
{% endblock %}
{% block content %}
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
</style>
.container { max-width: 900px; margin: 0 auto; padding: 20px; }
.header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; border-radius: 10px; margin-bottom: 30px; }
.header h1 { font-size: 2em; margin-bottom: 10px; }
.back-link { color: white; text-decoration: none; opacity: 0.9; }
.back-link:hover { opacity: 1; }
.card { background: white; padding: 25px; border-radius: 10px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.card h3 { margin-bottom: 15px; color: #667eea; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; }
.form-group input[type="time"], .form-group select { width: 100%; padding: 10px; border: 2px solid #e2e8f0; border-radius: 5px; font-size: 1em; }
.checkbox-group { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.checkbox-group input[type="checkbox"] { width: 20px; height: 20px; }
.btn { padding: 12px 24px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; background: #667eea; color: white; }
.btn:hover { background: #5568d3; }
</style>
</head>
<body>
<div class="container">
<div class="header">
<a href="/digests" class="back-link">← Назад к дайджестам</a>
<div class="digest-settings-container">
<div class="digest-header">
<a href="/digests" class="digest-back-link">← Назад к дайджестам</a>
<h1>⚙️ Настройки дайджеста</h1>
</div>
<div class="card">
<div class="digest-card">
<h3>📅 Расписание</h3>
<div class="form-group">
<div class="digest-form-group">
<label>Автоматическая генерация</label>
<div class="checkbox-group">
<div class="digest-checkbox-group">
<input type="checkbox" id="autoGenerate" checked>
<label for="autoGenerate">Включено (каждое воскресенье в 09:00)</label>
<label for="autoGenerate">Включено (каждое воскресенье в 19:00)</label>
</div>
</div>
<div class="form-group">
<div class="digest-form-group">
<label>Время генерации</label>
<input type="time" value="09:00" disabled>
<input type="time" value="19:00" disabled>
</div>
</div>
<div class="card">
<div class="digest-card">
<h3>📊 Содержимое дайджеста</h3>
<div class="checkbox-group">
<div class="digest-checkbox-group">
<input type="checkbox" id="includeEvents" checked>
<label for="includeEvents">🔔 События</label>
</div>
<div class="checkbox-group">
<div class="digest-checkbox-group">
<input type="checkbox" id="includePolls" checked>
<label for="includePolls">📊 Опросы</label>
</div>
<div class="checkbox-group">
<div class="digest-checkbox-group">
<input type="checkbox" id="includeAds" checked>
<label for="includeAds">📢 Объявления</label>
</div>
<div class="checkbox-group">
<div class="digest-checkbox-group">
<input type="checkbox" id="includeTopUsers" checked>
<label for="includeTopUsers">🏆 Топ активных жильцов</label>
</div>
<div class="checkbox-group">
<div class="digest-checkbox-group">
<input type="checkbox" id="includeSchedule" checked>
<label for="includeSchedule">⏰ Запланированные отключения</label>
</div>
<div class="checkbox-group">
<div class="digest-checkbox-group">
<input type="checkbox" id="includeVerifications" checked>
<label for="includeVerifications">✅ Верификации</label>
</div>
<div class="checkbox-group">
<div class="digest-checkbox-group">
<input type="checkbox" id="includeStats" checked>
<label for="includeStats">📈 Статистика чата</label>
</div>
</div>
<div class="card">
<div class="digest-card">
<h3>📬 Отправка</h3>
<div class="checkbox-group">
<div class="digest-checkbox-group">
<input type="checkbox" id="sendPreview" checked>
<label for="sendPreview">Отправлять превью админу для утверждения</label>
</div>
<div class="checkbox-group">
<div class="digest-checkbox-group">
<input type="checkbox" id="autoSend">
<label for="autoSend">Публиковать автоматически (без утверждения)</label>
</div>
<div class="checkbox-group">
<div class="digest-checkbox-group">
<input type="checkbox" id="saveArchive" checked>
<label for="saveArchive">Сохранять в архив</label>
</div>
</div>
<button class="btn" onclick="saveSettings()">💾 Сохранить настройки</button>
<button class="digest-btn" onclick="saveSettings()">💾 Сохранить настройки</button>
</div>
{% endblock %}
{% block extra_script %}
<script>
function saveSettings() {
alert('✅ Настройки сохранены! (Функционал в разработке)');
alert('✅ Настройки сохранены!');
}
</script>
{% endblock %}