{ Html::from_html_unchecked(AttrValue::from(markdown_html)) } diff --git a/styles.css b/styles.css index ed15721..a4f7a40 100644 --- a/styles.css +++ b/styles.css @@ -234,125 +234,262 @@ html { } /* --- Mode Switcher (KI / RSS) --- */ -.mode-switch { +@import url("assets/home.css"); +@import url("assets/news.css"); +@import url("assets/greet.css"); + +/* --- Global & Layout --- */ +body { + background-color: #0f0f13; + color: #e2e2e7; + font-family: + "Inter", + -apple-system, + sans-serif; + margin: 0; + line-height: 1.5; + display: flex; + justify-content: center; +} + +html { + scroll-behavior: smooth; +} + +.feed-container { + width: 100%; + max-width: 600px; + padding: 40px 20px 150px 20px; +} + +/* --- Header & Navigation --- */ +.feed-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 30px; +} + +.header-main { + display: flex; + flex-direction: column; + gap: 8px; +} + +.header-main h1 { + margin: 0; + font-size: 1.8rem; +} + +.mode-toggle { display: flex; background: rgba(255, 255, 255, 0.05); - border-radius: 20px; - padding: 4px; - border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 12px; + padding: 3px; + width: fit-content; + border: 1px solid rgba(255, 255, 255, 0.08); } -.switch-btn { +.toggle-btn { border: none; - border-radius: 16px; - padding: 6px 16px; - cursor: pointer; - transition: all 0.2s ease; background: transparent; - color: #a0a0b0; - font-weight: 700; - font-size: 0.8rem; -} - -.switch-btn.active-ai { - background: #4a90e2; - color: white; - box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3); -} - -.switch-btn.active-rss { - background: #facc15; - color: #0f0f13; - box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3); -} - -/* --- Config Panel (API Key Eingabe) --- */ -.config-panel { - background: rgba(74, 144, 226, 0.05); - border: 1px solid rgba(74, 144, 226, 0.3); - border-radius: 16px; - padding: 20px; - margin-bottom: 25px; - animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); -} - -.config-panel h3 { - margin-top: 0; - color: #4a90e2; - font-size: 1rem; -} - -.config-input { - width: 100%; - padding: 12px; - background: rgba(0, 0, 0, 0.2); - border: 1px solid rgba(255, 255, 255, 0.1); - color: white; - border-radius: 10px; - margin-bottom: 15px; - box-sizing: border-box; - font-family: inherit; -} - -.config-input:focus { - outline: none; - border-color: #4a90e2; - background: rgba(0, 0, 0, 0.3); -} - -.save-btn { - background: #4a90e2; - color: white; - border: none; - padding: 12px; - border-radius: 10px; + color: #8e8e93; + padding: 4px 12px; + border-radius: 9px; cursor: pointer; - width: 100%; - font-weight: 600; - transition: opacity 0.2s; + font-size: 0.75rem; + font-weight: 700; + transition: all 0.2s ease; } -.save-btn:hover { - opacity: 0.9; +.toggle-btn.active { + background: #4a90e2; + color: white; } -/* --- Status & Header Buttons --- */ -.reload-btn { +.header-actions { + display: flex; + gap: 10px; +} + +.action-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); - border-radius: 10px; - padding: 8px 12px; + border-radius: 12px; + padding: 10px; cursor: pointer; font-size: 1.1rem; transition: all 0.2s; } -.reload-btn:hover { +.action-btn:hover { background: rgba(255, 255, 255, 0.1); + transform: translateY(-2px); } +/* --- Config Panel & RSS Management --- */ +.config-panel { + background: rgba(30, 30, 46, 0.6); + backdrop-filter: blur(20px); + border: 1px solid rgba(74, 144, 226, 0.3); + border-radius: 20px; + padding: 25px; + margin-bottom: 30px; + box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4); + animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); +} + +.config-section { + margin-bottom: 20px; +} + +.config-section label { + display: block; + font-size: 0.7rem; + font-weight: 800; + color: #4a90e2; + margin-bottom: 8px; + letter-spacing: 0.05rem; +} + +.config-input { + width: 100%; + padding: 12px 16px; + background: rgba(0, 0, 0, 0.3); + border: 1px solid rgba(255, 255, 255, 0.1); + color: white; + border-radius: 12px; + box-sizing: border-box; + font-family: inherit; +} + +.rss-input-row { + display: flex; + gap: 8px; + margin-bottom: 12px; +} + +.add-btn { + background: #4a90e2; + color: white; + border: none; + border-radius: 12px; + width: 45px; + cursor: pointer; + font-weight: bold; + font-size: 1.2rem; +} + +/* Scrollbereich für viele RSS Feeds */ +.rss-list-scroll { + max-height: 150px; + overflow-y: auto; + background: rgba(0, 0, 0, 0.2); + border-radius: 12px; + padding: 8px; + border: 1px solid rgba(255, 255, 255, 0.05); +} + +.rss-url-entry { + display: flex; + justify-content: space-between; + align-items: center; + padding: 8px 12px; + background: rgba(255, 255, 255, 0.03); + border-radius: 8px; + margin-bottom: 4px; + font-size: 0.8rem; +} + +.url-text { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + margin-right: 10px; + color: #a0a0b0; +} + +.delete-btn { + background: transparent; + border: none; + color: #ef4444; + cursor: pointer; + padding: 4px; + font-weight: bold; +} + +.save-master-btn { + background: linear-gradient(135deg, #4a90e2, #357abd); + color: white; + border: none; + padding: 14px; + border-radius: 12px; + cursor: pointer; + width: 100%; + font-weight: 700; + margin-top: 10px; + box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3); +} + +/* --- Post Cards & Markdown --- */ +.post-card { + background: rgba(255, 255, 255, 0.03); + border: 1px solid rgba(255, 255, 255, 0.08); + border-radius: 18px; + padding: 22px; + margin-bottom: 18px; + transition: transform 0.2s ease; +} + +.post-card:hover { + background: rgba(255, 255, 255, 0.05); +} + +.post-header { + display: flex; + justify-content: space-between; + font-size: 0.75rem; + margin-bottom: 12px; +} + +.post-author { + color: #4a90e2; + font-weight: 800; +} + +.post-date { + color: #636366; +} + +.markdown-body h3 { + margin: 0 0 10px 0; + color: #ffffff; + font-size: 1.15rem; +} + +/* --- Status Messages --- */ +.loading-spinner, .status-msg { text-align: center; - color: #a0a0b0; - margin-top: 60px; + padding: 40px; + color: #8e8e93; font-style: italic; - animation: pulse 2s infinite; } -.error-card { - border: 1px solid rgba(239, 68, 68, 0.4); - background: rgba(239, 68, 68, 0.05); +.error-box { + background: rgba(239, 68, 68, 0.1); + border: 1px solid rgba(239, 68, 68, 0.3); + color: #ef4444; padding: 15px; border-radius: 12px; - color: #ef4444; - font-weight: 500; + text-align: center; } /* --- Animations --- */ @keyframes slideIn { from { opacity: 0; - transform: translateY(-15px); + transform: translateY(-10px); } to { opacity: 1; @@ -360,14 +497,11 @@ html { } } -@keyframes pulse { - 0% { - opacity: 0.6; - } - 50% { - opacity: 1; - } - 100% { - opacity: 0.6; - } +/* Scrollbar Styling für die RSS Liste */ +.rss-list-scroll::-webkit-scrollbar { + width: 6px; +} +.rss-list-scroll::-webkit-scrollbar-thumb { + background: rgba(255, 255, 255, 0.1); + border-radius: 10px; }