From d1194ee87c91987b4b5569cf13ec82463363643d Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 11 Nov 2025 15:54:46 +0000 Subject: [PATCH] =?UTF-8?q?UI:=20CSS=20complet=20pour=20RSS,=20OpenRouter?= =?UTF-8?q?=20et=20administration=20am=C3=A9lior=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Layout: - Grid 3 colonnes: notes + todo-box + rss-box - RSS box sticky avec scroll indépendant - Styles articles RSS avec preview, source, date - Bouton résumé IA dans header RSS box - Responsive: stack vertical sur <1200px ## Modal Admin: - Système d'onglets moderne (Users/RSS/OpenRouter) - Tabs avec underline animation sur actif - Tab content avec scroll indépendant (60vh max) - Styles harmonisés avec thème noir/blanc ## Flux RSS: - Liste feeds avec toggle on/off (switch animé) - Card per feed: title, URL, actions - Input URL avec validation visuelle - Bouton fetch articles avec style secondaire - Hover effects et transitions ## OpenRouter Settings: - Form groups avec labels et hints - Input API key (type password) - Select modèle avec taille 8 pour recherche - Textarea prompt avec resize vertical - Checkbox activation résumés - Link vers openrouter.ai ## Modal changement mot de passe: - Small modal (450px max) - Form clean avec 2 inputs password - Labels et placeholders clairs - Actions alignées à droite - Validation visuelle ## Design tokens: - Cohérence totale avec variables.css - Shadows, radius, spacing uniformes - Transitions fluides partout - States hover/focus/active - Accessible et moderne --- public/css/components.css | 297 ++++++++++++++++++++++++++++++++++++++ public/css/layout.css | 124 +++++++++++++++- 2 files changed, 419 insertions(+), 2 deletions(-) diff --git a/public/css/components.css b/public/css/components.css index 6ecdf8c..9931e4d 100644 --- a/public/css/components.css +++ b/public/css/components.css @@ -987,11 +987,50 @@ /* Admin Modal */ .admin-modal { min-width: 700px; + max-width: 900px; +} + +.admin-tabs { + display: flex; + gap: 0; + border-bottom: 2px solid var(--color-border); + padding: 0 var(--spacing-xl); +} + +.admin-tab { + padding: var(--spacing-md) var(--spacing-lg); + border: none; + background: transparent; + color: var(--color-text-secondary); + font-size: var(--font-size-sm); + font-weight: var(--font-weight-semibold); + cursor: pointer; + transition: all var(--transition-fast); + border-bottom: 2px solid transparent; + margin-bottom: -2px; +} + +.admin-tab:hover { + color: var(--color-text-primary); + background: var(--color-hover); +} + +.admin-tab.active { + color: var(--color-accent); + border-bottom-color: var(--color-accent); +} + +.admin-tab-content { + max-height: 60vh; + overflow-y: auto; } .admin-actions { padding: var(--spacing-lg) var(--spacing-xl); border-bottom: 1px solid var(--color-border); + display: flex; + gap: var(--spacing-md); + align-items: center; } .action-btn { @@ -1011,6 +1050,31 @@ box-shadow: var(--shadow-md); } +.action-btn.btn-secondary { + background: var(--color-background); + color: var(--color-text-primary); + border: 1px solid var(--color-border); +} + +.action-btn.btn-secondary:hover { + background: var(--color-hover); +} + +.rss-url-input { + flex: 1; + padding: var(--spacing-sm) var(--spacing-md); + border: 1px solid var(--color-border); + border-radius: var(--radius-md); + font-size: var(--font-size-sm); + transition: all var(--transition-fast); +} + +.rss-url-input:focus { + outline: none; + border-color: var(--color-accent); + box-shadow: var(--shadow-sm); +} + .users-table-container { padding: var(--spacing-xl); overflow-x: auto; @@ -1134,3 +1198,236 @@ background: #c0392b; box-shadow: var(--shadow-md); } + +/* RSS Feeds List */ +.rss-feeds-list { + padding: var(--spacing-xl); +} + +.rss-feed-item { + padding: var(--spacing-md); + background: var(--color-background); + border-radius: var(--radius-md); + border: 1px solid var(--color-border); + margin-bottom: var(--spacing-md); + display: flex; + align-items: center; + justify-content: space-between; + gap: var(--spacing-md); + transition: all var(--transition-fast); +} + +.rss-feed-item:hover { + background: var(--color-hover); + border-color: var(--color-accent); +} + +.rss-feed-info { + flex: 1; + min-width: 0; +} + +.rss-feed-title { + font-size: var(--font-size-sm); + font-weight: var(--font-weight-semibold); + color: var(--color-text-primary); + margin-bottom: var(--spacing-xs); +} + +.rss-feed-url { + font-size: var(--font-size-xs); + color: var(--color-text-secondary); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.rss-feed-actions { + display: flex; + gap: var(--spacing-xs); + align-items: center; +} + +.rss-feed-toggle { + position: relative; + width: 44px; + height: 24px; +} + +.rss-feed-toggle input { + opacity: 0; + width: 0; + height: 0; +} + +.rss-toggle-slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: var(--color-border); + transition: 0.3s; + border-radius: 24px; +} + +.rss-toggle-slider:before { + position: absolute; + content: ""; + height: 18px; + width: 18px; + left: 3px; + bottom: 3px; + background-color: white; + transition: 0.3s; + border-radius: 50%; +} + +.rss-feed-toggle input:checked + .rss-toggle-slider { + background-color: var(--color-accent); +} + +.rss-feed-toggle input:checked + .rss-toggle-slider:before { + transform: translateX(20px); +} + +.btn-delete-feed { + width: 32px; + height: 32px; + padding: 6px; + border: none; + border-radius: var(--radius-sm); + background: transparent; + color: var(--color-text-secondary); + cursor: pointer; + transition: all var(--transition-fast); +} + +.btn-delete-feed:hover { + background: var(--color-danger); + color: white; +} + +/* OpenRouter Settings */ +.openrouter-settings { + padding: var(--spacing-xl); +} + +.setting-group { + margin-bottom: var(--spacing-lg); +} + +.setting-group label { + display: block; + font-size: var(--font-size-sm); + font-weight: var(--font-weight-semibold); + color: var(--color-text-primary); + margin-bottom: var(--spacing-sm); +} + +.setting-group small { + display: block; + font-size: var(--font-size-xs); + color: var(--color-text-secondary); + margin-top: var(--spacing-xs); +} + +.setting-group small a { + color: var(--color-accent); + text-decoration: none; +} + +.setting-group small a:hover { + text-decoration: underline; +} + +.setting-input, +.setting-select { + width: 100%; + padding: var(--spacing-sm) var(--spacing-md); + border: 1px solid var(--color-border); + border-radius: var(--radius-md); + font-size: var(--font-size-sm); + color: var(--color-text-primary); + background: var(--color-background); + transition: all var(--transition-fast); +} + +.setting-input:focus, +.setting-select:focus { + outline: none; + border-color: var(--color-accent); + box-shadow: var(--shadow-sm); +} + +.setting-textarea { + width: 100%; + padding: var(--spacing-md); + border: 1px solid var(--color-border); + border-radius: var(--radius-md); + font-size: var(--font-size-sm); + color: var(--color-text-primary); + background: var(--color-background); + font-family: var(--font-family); + line-height: 1.6; + resize: vertical; + transition: all var(--transition-fast); +} + +.setting-textarea:focus { + outline: none; + border-color: var(--color-accent); + box-shadow: var(--shadow-sm); +} + +.setting-group input[type="checkbox"] { + width: 18px; + height: 18px; + margin-right: var(--spacing-sm); + cursor: pointer; +} + +/* Change Password Modal */ +.small-modal { + max-width: 450px; +} + +.modal-body { + padding: var(--spacing-xl); +} + +.form-group { + margin-bottom: var(--spacing-lg); +} + +.form-group label { + display: block; + font-size: var(--font-size-sm); + font-weight: var(--font-weight-semibold); + color: var(--color-text-primary); + margin-bottom: var(--spacing-sm); +} + +.form-input { + width: 100%; + padding: var(--spacing-sm) var(--spacing-md); + border: 1px solid var(--color-border); + border-radius: var(--radius-md); + font-size: var(--font-size-sm); + color: var(--color-text-primary); + background: var(--color-background); + transition: all var(--transition-fast); +} + +.form-input:focus { + outline: none; + border-color: var(--color-accent); + box-shadow: var(--shadow-sm); +} + +.modal-actions { + display: flex; + gap: var(--spacing-md); + justify-content: flex-end; +} diff --git a/public/css/layout.css b/public/css/layout.css index ff11c85..81fb042 100644 --- a/public/css/layout.css +++ b/public/css/layout.css @@ -229,7 +229,7 @@ body { max-width: var(--max-width); margin: 0 auto; display: grid; - grid-template-columns: 1fr var(--todo-box-width); + grid-template-columns: 1fr var(--todo-box-width) var(--todo-box-width); gap: var(--spacing-xl); align-items: start; } @@ -365,13 +365,133 @@ body { font-weight: var(--font-weight-medium); } +/* RSS Box */ +.rss-box { + position: sticky; + top: calc(var(--header-height) + var(--spacing-xl)); + background: var(--color-card); + border: 1px solid var(--color-border); + border-radius: var(--radius-lg); + padding: var(--spacing-xl); + box-shadow: var(--shadow-md); + max-height: calc(100vh - var(--header-height) - var(--spacing-2xl) * 2); + display: flex; + flex-direction: column; +} + +.rss-box-header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: var(--spacing-lg); +} + +.rss-box-title { + font-size: var(--font-size-xl); + font-weight: var(--font-weight-bold); + color: var(--color-text-primary); +} + +.btn-summarize { + width: 36px; + height: 36px; + padding: 8px; + border: 1px solid var(--color-border); + border-radius: var(--radius-md); + background: var(--color-accent); + color: white; + cursor: pointer; + transition: all var(--transition-fast); + display: flex; + align-items: center; + justify-content: center; +} + +.btn-summarize:hover { + background: var(--color-accent-hover); + box-shadow: var(--shadow-md); + transform: scale(1.05); +} + +.btn-summarize svg { + width: 100%; + height: 100%; +} + +.rss-articles-list { + flex: 1; + overflow-y: auto; + display: flex; + flex-direction: column; + gap: var(--spacing-md); +} + +.rss-empty { + text-align: center; + color: var(--color-text-secondary); + font-size: var(--font-size-sm); + padding: var(--spacing-2xl); + font-style: italic; +} + +.rss-article { + padding: var(--spacing-md); + background: var(--color-background); + border-radius: var(--radius-md); + border: 1px solid var(--color-border); + transition: all var(--transition-fast); + cursor: pointer; +} + +.rss-article:hover { + background: var(--color-hover); + border-color: var(--color-accent); + box-shadow: var(--shadow-sm); +} + +.rss-article-title { + font-size: var(--font-size-sm); + font-weight: var(--font-weight-semibold); + color: var(--color-text-primary); + margin-bottom: var(--spacing-xs); + line-height: 1.4; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} + +.rss-article-meta { + display: flex; + align-items: center; + justify-content: space-between; + font-size: var(--font-size-xs); + color: var(--color-text-secondary); + margin-bottom: var(--spacing-xs); +} + +.rss-article-source { + font-weight: var(--font-weight-medium); +} + +.rss-article-description { + font-size: var(--font-size-xs); + color: var(--color-text-secondary); + line-height: 1.5; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} + /* Responsive */ @media (max-width: 1200px) { .content-container { grid-template-columns: 1fr; } - .todo-box { + .todo-box, + .rss-box { position: static; max-height: none; }