diff options
Diffstat (limited to 'web/dist')
| -rw-r--r-- | web/dist/v3/assets/index-CRt-Evnh.js | 175 | ||||
| -rw-r--r-- | web/dist/v3/assets/index-CSmzFfW5.js | 161 | ||||
| -rw-r--r-- | web/dist/v3/index.html | 2 | ||||
| -rw-r--r-- | web/dist/v3/themes/codex.css | 451 | ||||
| -rw-r--r-- | web/dist/v3/themes/refined.css | 265 | ||||
| -rw-r--r-- | web/dist/v3/themes/sakura.css | 466 | ||||
| -rw-r--r-- | web/dist/v3/themes/terminal.css | 446 |
7 files changed, 1804 insertions, 162 deletions
diff --git a/web/dist/v3/assets/index-CRt-Evnh.js b/web/dist/v3/assets/index-CRt-Evnh.js new file mode 100644 index 0000000..3349411 --- /dev/null +++ b/web/dist/v3/assets/index-CRt-Evnh.js @@ -0,0 +1,175 @@ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const d of o.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function i(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=i(s);fetch(s.href,o)}})();function C(t){const i=`; ${document.cookie}`.split(`; ${t}=`);if(i.length===2)return i.pop()?.split(";").shift()}async function f(t,e){const i=e?.method?.toUpperCase()||"GET",a=["POST","PUT","DELETE"].includes(i),s=new Headers(e?.headers||{});if(a){const o=C("csrf_token");o&&s.set("X-CSRF-Token",o)}return fetch(t,{...e,headers:s,credentials:"include"})}function B(){const t=document.cookie.split("; ").find(e=>e.startsWith("neko_sidebar="));return t?t.split("=")[1]==="1":null}function H(t){document.cookie=`neko_sidebar=${t?"1":"0"}; path=/; max-age=31536000; SameSite=Lax`}function P(){const t=B();return t!==null?t:window.innerWidth>1024}class M extends EventTarget{feeds=[];tags=[];items=[];activeFeedId=null;activeTagName=null;filter="unread";searchQuery="";loading=!1;hasMore=!0;theme=localStorage.getItem("neko-theme")||"light";fontTheme=localStorage.getItem("neko-font-theme")||"default";headingFontTheme=localStorage.getItem("neko-heading-font-theme")||"default";styleTheme=localStorage.getItem("neko-style-theme")||"default";sidebarVisible=P();setFeeds(e){this.feeds=e,this.emit("feeds-updated")}setTags(e){this.tags=e,this.emit("tags-updated")}setItems(e,i=!1){i?this.items=[...this.items,...e]:this.items=e,this.emit("items-updated")}setActiveFeed(e){this.activeFeedId=e,this.activeTagName=null,this.emit("active-feed-updated")}setActiveTag(e){this.activeTagName=e,this.activeFeedId=null,this.emit("active-tag-updated")}setFilter(e){this.filter!==e&&(this.filter=e,this.emit("filter-updated"))}setSearchQuery(e){this.searchQuery!==e&&(this.searchQuery=e,this.emit("search-updated"))}setLoading(e){this.loading=e,this.emit("loading-state-changed")}setHasMore(e){this.hasMore=e}setTheme(e){this.theme=e,localStorage.setItem("neko-theme",e),this.emit("theme-updated")}setFontTheme(e){this.fontTheme=e,localStorage.setItem("neko-font-theme",e),this.emit("theme-updated")}setHeadingFontTheme(e){this.headingFontTheme=e,localStorage.setItem("neko-heading-font-theme",e),this.emit("theme-updated")}setStyleTheme(e){this.styleTheme=e,localStorage.setItem("neko-style-theme",e),this.emit("style-theme-updated")}setSidebarVisible(e){this.sidebarVisible=e,H(e),this.emit("sidebar-toggle")}toggleSidebar(){this.setSidebarVisible(!this.sidebarVisible)}emit(e,i){this.dispatchEvent(new CustomEvent(e,{detail:i}))}on(e,i){this.addEventListener(e,i)}}const n=new M;class O extends EventTarget{constructor(){super(),window.addEventListener("popstate",()=>this.handleRouteChange())}handleRouteChange(){this.dispatchEvent(new CustomEvent("route-changed",{detail:this.getCurrentRoute()}))}getCurrentRoute(){const e=new URL(window.location.href),a=e.pathname.replace(/^\/v3\//,"").split("/").filter(Boolean);let s="/";const o={};return a[0]==="feed"&&a[1]?(s="/feed",o.feedId=a[1]):a[0]==="tag"&&a[1]?(s="/tag",o.tagName=decodeURIComponent(a[1])):a[0]==="settings"&&(s="/settings"),{path:s,params:o,query:e.searchParams}}navigate(e,i){let a=`/v3${e}`;if(i){const s=new URLSearchParams(i);a+=`?${s.toString()}`}window.history.pushState({},"",a),this.handleRouteChange()}updateQuery(e){const i=new URL(window.location.href);for(const[a,s]of Object.entries(e))s?i.searchParams.set(a,s):i.searchParams.delete(a);window.history.pushState({},"",i.toString()),this.handleRouteChange()}}const r=new O;function D(t,e=!1){const i=new Date(t.publish_date).toLocaleDateString();return` + <li class="feed-item ${t.read?"read":"unread"} ${e?"selected":""}" data-id="${t._id}"> + <div class="item-header"> + <a href="${t.url}" target="_blank" rel="noopener noreferrer" class="item-title" data-action="open"> + ${t.title||"(No Title)"} + </a> + <button class="star-btn ${t.starred?"is-starred":"is-unstarred"}" title="${t.starred?"Unstar":"Star"}" data-action="toggle-star"> + ★ + </button> + </div> + <div class="dateline"> + <a href="${t.url}" target="_blank" rel="noopener noreferrer"> + ${i} + ${t.feed_title?` - ${t.feed_title}`:""} + </a> + <div class="item-actions" style="display: inline-block; float: right;"> + ${t.full_content?"":` + <button class="scrape-btn" title="Load Full Content" data-action="scrape"> + text + </button> + `} + </div> + </div> + ${t.full_content||t.description?` + <div class="item-description"> + ${t.full_content||t.description} + </div> + `:""} + </li> + `}const q=["default","refined","terminal","codex","sakura"];function L(t){const e=document.getElementById("style-theme-link");if(e&&e.remove(),t==="default")return;const i=document.createElement("link");i.id="style-theme-link",i.rel="stylesheet",i.href=`/v3/themes/${t}.css`,document.head.appendChild(i)}let c=null,g=null;function N(){g=document.querySelector("#app"),g&&(g.className=`theme-${n.theme} font-${n.fontTheme} heading-font-${n.headingFontTheme}`,g.innerHTML=` + <div class="layout ${n.sidebarVisible?"sidebar-visible":"sidebar-hidden"}"> + <button class="sidebar-toggle" id="sidebar-toggle-btn" title="Toggle Sidebar">🐱</button> + <div class="sidebar-backdrop" id="sidebar-backdrop"></div> + <aside class="sidebar" id="sidebar"> + <div class="sidebar-scroll"> + <section class="sidebar-section"> + <ul id="filter-list"> + <li class="filter-item" data-filter="unread"><a href="/v3/?filter=unread" data-nav="filter" data-value="unread">Unread</a></li> + <li class="filter-item" data-filter="all"><a href="/v3/?filter=all" data-nav="filter" data-value="all">All</a></li> + <li class="filter-item" data-filter="starred"><a href="/v3/?filter=starred" data-nav="filter" data-value="starred">Starred</a></li> + </ul> + </section> + <div class="sidebar-search"> + <input type="search" id="search-input" placeholder="Search..." value="${n.searchQuery}"> + </div> + <section class="sidebar-section"> + <ul> + <li><a href="/v3/settings" data-nav="settings" class="new-feed-link">+ new</a></li> + </ul> + </section> + <section class="sidebar-section collapsible collapsed" id="section-feeds"> + <h3>Feeds <span class="caret">▶</span></h3> + <ul id="feed-list"></ul> + </section> + <!-- FIXME: Tags feature soft-deprecated + <section class="sidebar-section collapsible collapsed" id="section-tags"> + <h3>Tags <span class="caret">▶</span></h3> + <ul id="tag-list"></ul> + </section> + --> + </div> + <div class="sidebar-footer"> + <a href="/v3/settings" data-nav="settings">Settings</a> + <a href="#" id="logout-button">Logout</a> + </div> + </aside> + <main class="main-content" id="main-content"> + <div id="content-area"></div> + </main> + </div> + `,x())}function x(){document.getElementById("search-input")?.addEventListener("input",s=>{const o=s.target.value;r.updateQuery({q:o})}),document.getElementById("logo-link")?.addEventListener("click",()=>r.navigate("/")),document.getElementById("logout-button")?.addEventListener("click",s=>{s.preventDefault(),W()}),document.getElementById("sidebar-toggle-btn")?.addEventListener("click",()=>{n.toggleSidebar()}),document.getElementById("sidebar-backdrop")?.addEventListener("click",()=>{n.setSidebarVisible(!1)}),document.querySelectorAll(".sidebar-section.collapsible h3").forEach(s=>{s.addEventListener("click",()=>{s.parentElement?.classList.toggle("collapsed")})}),document.getElementById("sidebar")?.addEventListener("click",s=>{const o=s.target,d=o.closest("a");if(!d){o.classList.contains("logo")&&(s.preventDefault(),r.navigate("/",{}));return}const h=d.getAttribute("data-nav"),m=Object.fromEntries(r.getCurrentRoute().query.entries());if(h==="filter"){s.preventDefault();const u=d.getAttribute("data-value");r.getCurrentRoute().path==="/settings"?r.navigate("/",{...m,filter:u}):r.updateQuery({filter:u})}else if(h==="tag"){s.preventDefault();const u=d.getAttribute("data-value");r.navigate(`/tag/${encodeURIComponent(u)}`,m)}else if(h==="feed"){s.preventDefault();const u=d.getAttribute("data-value"),l=r.getCurrentRoute();n.activeFeedId===parseInt(u)&&l.path!=="/settings"?r.navigate("/",m):r.navigate(`/feed/${u}`,m)}else h==="settings"&&(s.preventDefault(),r.getCurrentRoute().path==="/settings"?r.navigate("/",m):r.navigate("/settings",m));window.innerWidth<=768&&n.setSidebarVisible(!1)}),document.getElementById("content-area")?.addEventListener("click",s=>{const o=s.target,d=o.closest('[data-action="toggle-star"]');if(d){const l=d.closest("[data-id]");if(l){const v=parseInt(l.getAttribute("data-id"));V(v)}return}const h=o.closest('[data-action="scrape"]');if(h){const l=h.closest("[data-id]");if(l){const v=parseInt(l.getAttribute("data-id"));X(v)}return}const m=o.closest('[data-action="open"]'),u=o.closest(".feed-item");if(u&&!m){const l=parseInt(u.getAttribute("data-id"));c=l,document.querySelectorAll(".feed-item").forEach(y=>{const A=parseInt(y.getAttribute("data-id")||"0");y.classList.toggle("selected",A===c)});const v=n.items.find(y=>y._id===l);v&&!v.read&&p(l,{read:!0})}})}function $(){const{feeds:t,activeFeedId:e}=n,i=document.getElementById("feed-list");i&&(i.innerHTML=t.map(a=>` + <li class="${a._id===e?"active":""}"> + <a href="/v3/feed/${a._id}" data-nav="feed" data-value="${a._id}"> + ${a.title||a.url} + </a> + </li> + `).join(""))}function F(){}function _(){const{filter:t}=n,e=document.getElementById("filter-list");e&&e.querySelectorAll("li").forEach(i=>{i.classList.toggle("active",i.getAttribute("data-filter")===t)})}function S(){const{items:t,loading:e}=n,i=document.getElementById("content-area");if(!i||r.getCurrentRoute().path==="/settings")return;if(e&&t.length===0){i.innerHTML='<p class="loading">Loading items...</p>';return}if(t.length===0){i.innerHTML='<p class="empty">No items found.</p>';return}i.innerHTML=` + <ul class="item-list"> + ${t.map(s=>D(s,s._id===c)).join("")} + </ul> + ${n.hasMore?'<div id="load-more-sentinel" class="loading-more">Loading more...</div>':""} + `;const a=document.getElementById("main-content");if(a){let s=null;a.onscroll=()=>{!n.loading&&n.hasMore&&a.scrollHeight>a.clientHeight&&a.scrollHeight-a.scrollTop-a.clientHeight<200&&I(),s===null&&(s=window.setTimeout(()=>{R(a),s=null},250))}}}function R(t){const e=t.getBoundingClientRect();n.items.forEach(i=>{if(i.read)return;const a=document.querySelector(`.feed-item[data-id="${i._id}"]`);a&&a.getBoundingClientRect().bottom<e.top&&p(i._id,{read:!0})})}typeof window<"u"&&setInterval(()=>{const t=document.getElementById("main-content");if(n.loading||!n.hasMore)return;if(t&&(R(t),t.scrollHeight>t.clientHeight&&t.scrollHeight-t.scrollTop-t.clientHeight<200)){I();return}const e=document.documentElement.scrollHeight||document.body.scrollHeight,i=window.innerHeight,a=window.scrollY||document.documentElement.scrollTop;e>i&&e-i-a<200&&I()},1e3);function b(){const t=document.getElementById("content-area");if(!t)return;t.innerHTML=` + <div class="settings-view"> + <h2>Settings</h2> + + <div class="settings-grid"> + <section class="settings-section"> + <h3>Data</h3> + <div class="data-group"> + <div class="button-group"> + <a href="/api/export/opml" class="button" target="_blank">EXPORT OPML</a> + <a href="/api/export/text" class="button" target="_blank">EXPORT TEXT</a> + <a href="/api/export/json" class="button" target="_blank">EXPORT JSON</a> + </div> + </div> + <div class="data-group" style="margin-top: 1rem;"> + <div class="button-group"> + <button class="import-btn" data-format="opml">IMPORT OPML</button> + <button class="import-btn" data-format="text">IMPORT TEXT</button> + <button class="import-btn" data-format="json">IMPORT JSON</button> + </div> + <input type="file" id="import-file" style="display: none;"> + </div> + </section> + + <section class="settings-section"> + <h3>Theme</h3> + <div class="settings-group"> + <div class="theme-options" id="theme-options"> + <button class="${n.theme==="light"?"active":""}" data-theme="light">Light</button> + <button class="${n.theme==="dark"?"active":""}" data-theme="dark">Dark</button> + </div> + </div> + </section> + + <section class="settings-section"> + <h3>Style</h3> + <div class="settings-group"> + <div class="theme-options" id="style-theme-options"> + ${q.map(a=>`<button class="${n.styleTheme===a?"active":""}" data-style-theme="${a}">${a.charAt(0).toUpperCase()+a.slice(1)}</button>`).join(` + `)} + </div> + </div> + </section> + + <section class="settings-section"> + <h3>Fonts</h3> + <div class="settings-group"> + <label>System & headings</label> + <select id="heading-font-selector" style="margin-bottom: 1rem;"> + <option value="default" ${n.headingFontTheme==="default"?"selected":""}>System (Helvetica Neue)</option> + <option value="serif" ${n.headingFontTheme==="serif"?"selected":""}>Serif (Georgia)</option> + <option value="sans" ${n.headingFontTheme==="sans"?"selected":""}>Sans-Serif (Inter/System)</option> + <option value="mono" ${n.headingFontTheme==="mono"?"selected":""}>Monospace</option> + </select> + + <label>article body</label> + <select id="font-selector"> + <option value="default" ${n.fontTheme==="default"?"selected":""}>Default (Palatino)</option> + <option value="serif" ${n.fontTheme==="serif"?"selected":""}>Serif (Georgia)</option> + <option value="sans" ${n.fontTheme==="sans"?"selected":""}>Sans-Serif (Helvetica)</option> + <option value="mono" ${n.fontTheme==="mono"?"selected":""}>Monospace</option> + </select> + </div> + </section> + </div> + + <section class="settings-section manage-feeds-section"> + <h3>Manage Feeds</h3> + + <div class="add-feed-form" style="margin-bottom: 2rem;"> + <input type="url" id="new-feed-url" placeholder="https://example.com/rss.xml"> + <button id="add-feed-btn">ADD FEED</button> + </div> + + <ul class="manage-feed-list"> + ${n.feeds.map(a=>` + <li class="manage-feed-item"> + <div class="feed-info"> + <div class="feed-title">${a.title||a.url}</div> + <div class="feed-url">${a.url}</div> + </div> + <div class="feed-actions"> + <!-- FIXME: Tags feature is broken/unused in V3. Soft deprecated for now. + <input type="text" class="feed-tag-input" data-id="${a._id}" value="${a.category||""}" placeholder="Tag"> + <button class="update-feed-tag-btn" data-id="${a._id}">SAVE</button> + --> + <button class="delete-feed-btn" data-id="${a._id}">DELETE</button> + </div> + </li> + `).join("")} + </ul> + </section> + </div> + `,document.getElementById("theme-options")?.addEventListener("click",a=>{const s=a.target.closest("button");s&&(n.setTheme(s.getAttribute("data-theme")),b())}),document.getElementById("style-theme-options")?.addEventListener("click",a=>{const s=a.target.closest("button");s&&n.setStyleTheme(s.getAttribute("data-style-theme"))}),document.getElementById("heading-font-selector")?.addEventListener("change",a=>{n.setHeadingFontTheme(a.target.value)}),document.getElementById("font-selector")?.addEventListener("change",a=>{n.setFontTheme(a.target.value)}),document.getElementById("add-feed-btn")?.addEventListener("click",async()=>{const a=document.getElementById("new-feed-url"),s=a.value.trim();s&&(await j(s)?(a.value="",alert("Feed added successfully!"),E()):alert("Failed to add feed."))});let e="opml";const i=document.getElementById("import-file");document.querySelectorAll(".import-btn").forEach(a=>{a.addEventListener("click",s=>{e=s.currentTarget.getAttribute("data-format")||"opml",i.click()})}),i?.addEventListener("change",async a=>{const s=a.target.files?.[0];s&&(await Q(s,e)?(alert(`Import (${e}) started! check logs.`),E()):alert("Failed to import.")),i.value=""}),document.querySelectorAll(".delete-feed-btn").forEach(a=>{a.addEventListener("click",async s=>{const o=parseInt(s.target.getAttribute("data-id"));confirm("Delete this feed?")&&(await U(o),await E(),b())})})}async function j(t){try{return(await f("/api/feed",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t})})).ok}catch(e){return console.error("Failed to add feed",e),!1}}async function Q(t,e){try{const i=new FormData;i.append("file",t),i.append("format",e);const a=document.cookie.split("; ").find(o=>o.startsWith("csrf_token="))?.split("=")[1];return(await fetch("/api/import",{method:"POST",headers:{"X-CSRF-Token":a||""},body:i})).ok}catch(i){return console.error("Failed to import",i),!1}}async function U(t){try{return(await f(`/api/feed/${t}`,{method:"DELETE"})).ok}catch(e){return console.error("Failed to delete feed",e),!1}}async function V(t){const e=n.items.find(i=>i._id===t);e&&p(t,{starred:!e.starred})}async function X(t){if(n.items.find(i=>i._id===t))try{const i=await f(`/api/item/${t}/content`);if(i.ok){const a=await i.json();a.full_content&&p(t,{full_content:a.full_content})}}catch(i){console.error("Failed to fetch full content",i)}}async function p(t,e){try{if((await f(`/api/item/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok){const a=n.items.find(s=>s._id===t);if(a){Object.assign(a,e);const s=document.querySelector(`.feed-item[data-id="${t}"]`);if(s){if(e.read!==void 0&&s.classList.toggle("read",e.read),e.starred!==void 0){const o=s.querySelector(".star-btn");o&&(o.classList.toggle("is-starred",e.starred),o.classList.toggle("is-unstarred",!e.starred),o.setAttribute("title",e.starred?"Unstar":"Star"))}e.full_content&&S()}}}}catch(i){console.error("Failed to update item",i)}}async function E(){const t=await f("/api/feed/");if(t.ok){const e=await t.json();n.setFeeds(e)}}async function J(){const t=await f("/api/tag");if(t.ok){const e=await t.json();n.setTags(e)}}async function T(t,e,i=!1){n.setLoading(!0);try{const a=new URLSearchParams;t&&a.append("feed_id",t),e&&a.append("tag",e),n.searchQuery&&a.append("q",n.searchQuery),(n.filter==="starred"||n.filter==="all")&&a.append("read_filter","all"),n.filter==="starred"&&a.append("starred","true"),i&&n.items.length>0&&a.append("max_id",String(n.items[n.items.length-1]._id));const s=await f(`/api/stream?${a.toString()}`);if(s.ok){const o=await s.json();n.setHasMore(o.length>0),n.setItems(o,i)}}finally{n.setLoading(!1)}}async function I(){const t=r.getCurrentRoute();T(t.params.feedId,t.params.tagName,!0)}async function W(){await f("/api/logout",{method:"POST"}),window.location.href="/login/"}function w(){const t=r.getCurrentRoute(),e=t.query.get("filter");n.setFilter(e||"unread");const i=t.query.get("q");if(i!==null&&n.setSearchQuery(i),t.path==="/settings"){b();return}if(t.path==="/feed"&&t.params.feedId){const a=parseInt(t.params.feedId);n.setActiveFeed(a),T(t.params.feedId),document.getElementById("section-feeds")?.classList.remove("collapsed")}else t.path==="/tag"&&t.params.tagName?(n.setActiveTag(t.params.tagName),T(void 0,t.params.tagName),document.getElementById("section-tags")?.classList.remove("collapsed")):(n.setActiveFeed(null),n.setActiveTag(null),T())}window.addEventListener("keydown",t=>{if(!["INPUT","TEXTAREA"].includes(t.target.tagName))switch(t.key){case"j":k(1);break;case"k":k(-1);break;case"r":if(c){const e=n.items.find(i=>i._id===c);e&&p(e._id,{read:!e.read})}break;case"s":if(c){const e=n.items.find(i=>i._id===c);e&&p(e._id,{starred:!e.starred})}break;case"/":t.preventDefault(),document.getElementById("search-input")?.focus();break}});function k(t){if(n.items.length===0)return;const e=n.items.findIndex(a=>a._id===c);let i;if(e===-1?i=t>0?0:n.items.length-1:i=e+t,i>=0&&i<n.items.length){c=n.items[i]._id,document.querySelectorAll(".feed-item").forEach(s=>{const o=parseInt(s.getAttribute("data-id")||"0");s.classList.toggle("selected",o===c)});const a=document.querySelector(`.feed-item[data-id="${c}"]`);a&&a.scrollIntoView({block:"start",behavior:"smooth"}),n.items[i].read||p(c,{read:!0})}}n.on("feeds-updated",$);n.on("tags-updated",F);n.on("active-feed-updated",$);n.on("active-tag-updated",F);n.on("filter-updated",_);n.on("search-updated",()=>{const t=document.getElementById("search-input");t&&t.value!==n.searchQuery&&(t.value=n.searchQuery),w()});n.on("theme-updated",()=>{g||(g=document.querySelector("#app")),g&&(g.className=`theme-${n.theme} font-${n.fontTheme} heading-font-${n.headingFontTheme}`),r.getCurrentRoute().path==="/settings"&&b()});n.on("sidebar-toggle",()=>{const t=document.querySelector(".layout");t&&(n.sidebarVisible?(t.classList.remove("sidebar-hidden"),t.classList.add("sidebar-visible")):(t.classList.remove("sidebar-visible"),t.classList.add("sidebar-hidden")))});n.on("style-theme-updated",()=>{L(n.styleTheme),r.getCurrentRoute().path==="/settings"&&b()});n.on("items-updated",S);n.on("loading-state-changed",S);r.addEventListener("route-changed",w);window.app={navigate:t=>r.navigate(t)};async function G(){const t=await f("/api/auth");if(!t||t.status===401){window.location.href="/login/";return}N(),L(n.styleTheme),_();try{await Promise.all([E(),J()])}catch(e){console.error("Initial fetch failed",e)}w()}typeof window<"u"&&!window.__VITEST__&&G(); diff --git a/web/dist/v3/assets/index-CSmzFfW5.js b/web/dist/v3/assets/index-CSmzFfW5.js deleted file mode 100644 index a335a13..0000000 --- a/web/dist/v3/assets/index-CSmzFfW5.js +++ /dev/null @@ -1,161 +0,0 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const d of o.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function i(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=i(s);fetch(s.href,o)}})();function A(t){const i=`; ${document.cookie}`.split(`; ${t}=`);if(i.length===2)return i.pop()?.split(";").shift()}async function f(t,e){const i=e?.method?.toUpperCase()||"GET",a=["POST","PUT","DELETE"].includes(i),s=new Headers(e?.headers||{});if(a){const o=A("csrf_token");o&&s.set("X-CSRF-Token",o)}return fetch(t,{...e,headers:s,credentials:"include"})}function C(){const t=document.cookie.split("; ").find(e=>e.startsWith("neko_sidebar="));return t?t.split("=")[1]==="1":null}function B(t){document.cookie=`neko_sidebar=${t?"1":"0"}; path=/; max-age=31536000; SameSite=Lax`}function P(){const t=C();return t!==null?t:window.innerWidth>1024}class H extends EventTarget{feeds=[];tags=[];items=[];activeFeedId=null;activeTagName=null;filter="unread";searchQuery="";loading=!1;hasMore=!0;theme=localStorage.getItem("neko-theme")||"light";fontTheme=localStorage.getItem("neko-font-theme")||"default";headingFontTheme=localStorage.getItem("neko-heading-font-theme")||"default";sidebarVisible=P();setFeeds(e){this.feeds=e,this.emit("feeds-updated")}setTags(e){this.tags=e,this.emit("tags-updated")}setItems(e,i=!1){i?this.items=[...this.items,...e]:this.items=e,this.emit("items-updated")}setActiveFeed(e){this.activeFeedId=e,this.activeTagName=null,this.emit("active-feed-updated")}setActiveTag(e){this.activeTagName=e,this.activeFeedId=null,this.emit("active-tag-updated")}setFilter(e){this.filter!==e&&(this.filter=e,this.emit("filter-updated"))}setSearchQuery(e){this.searchQuery!==e&&(this.searchQuery=e,this.emit("search-updated"))}setLoading(e){this.loading=e,this.emit("loading-state-changed")}setHasMore(e){this.hasMore=e}setTheme(e){this.theme=e,localStorage.setItem("neko-theme",e),this.emit("theme-updated")}setFontTheme(e){this.fontTheme=e,localStorage.setItem("neko-font-theme",e),this.emit("theme-updated")}setHeadingFontTheme(e){this.headingFontTheme=e,localStorage.setItem("neko-heading-font-theme",e),this.emit("theme-updated")}setSidebarVisible(e){this.sidebarVisible=e,B(e),this.emit("sidebar-toggle")}toggleSidebar(){this.setSidebarVisible(!this.sidebarVisible)}emit(e,i){this.dispatchEvent(new CustomEvent(e,{detail:i}))}on(e,i){this.addEventListener(e,i)}}const n=new H;class M extends EventTarget{constructor(){super(),window.addEventListener("popstate",()=>this.handleRouteChange())}handleRouteChange(){this.dispatchEvent(new CustomEvent("route-changed",{detail:this.getCurrentRoute()}))}getCurrentRoute(){const e=new URL(window.location.href),a=e.pathname.replace(/^\/v3\//,"").split("/").filter(Boolean);let s="/";const o={};return a[0]==="feed"&&a[1]?(s="/feed",o.feedId=a[1]):a[0]==="tag"&&a[1]?(s="/tag",o.tagName=decodeURIComponent(a[1])):a[0]==="settings"&&(s="/settings"),{path:s,params:o,query:e.searchParams}}navigate(e,i){let a=`/v3${e}`;if(i){const s=new URLSearchParams(i);a+=`?${s.toString()}`}window.history.pushState({},"",a),this.handleRouteChange()}updateQuery(e){const i=new URL(window.location.href);for(const[a,s]of Object.entries(e))s?i.searchParams.set(a,s):i.searchParams.delete(a);window.history.pushState({},"",i.toString()),this.handleRouteChange()}}const r=new M;function O(t,e=!1){const i=new Date(t.publish_date).toLocaleDateString();return` - <li class="feed-item ${t.read?"read":"unread"} ${e?"selected":""}" data-id="${t._id}"> - <div class="item-header"> - <a href="${t.url}" target="_blank" rel="noopener noreferrer" class="item-title" data-action="open"> - ${t.title||"(No Title)"} - </a> - <button class="star-btn ${t.starred?"is-starred":"is-unstarred"}" title="${t.starred?"Unstar":"Star"}" data-action="toggle-star"> - ★ - </button> - </div> - <div class="dateline"> - <a href="${t.url}" target="_blank" rel="noopener noreferrer"> - ${i} - ${t.feed_title?` - ${t.feed_title}`:""} - </a> - <div class="item-actions" style="display: inline-block; float: right;"> - ${t.full_content?"":` - <button class="scrape-btn" title="Load Full Content" data-action="scrape"> - text - </button> - `} - </div> - </div> - ${t.full_content||t.description?` - <div class="item-description"> - ${t.full_content||t.description} - </div> - `:""} - </li> - `}let c=null,m=null;function D(){m=document.querySelector("#app"),m&&(m.className=`theme-${n.theme} font-${n.fontTheme} heading-font-${n.headingFontTheme}`,m.innerHTML=` - <div class="layout ${n.sidebarVisible?"sidebar-visible":"sidebar-hidden"}"> - <button class="sidebar-toggle" id="sidebar-toggle-btn" title="Toggle Sidebar">🐱</button> - <div class="sidebar-backdrop" id="sidebar-backdrop"></div> - <aside class="sidebar" id="sidebar"> - <div class="sidebar-scroll"> - <section class="sidebar-section"> - <ul id="filter-list"> - <li class="filter-item" data-filter="unread"><a href="/v3/?filter=unread" data-nav="filter" data-value="unread">Unread</a></li> - <li class="filter-item" data-filter="all"><a href="/v3/?filter=all" data-nav="filter" data-value="all">All</a></li> - <li class="filter-item" data-filter="starred"><a href="/v3/?filter=starred" data-nav="filter" data-value="starred">Starred</a></li> - </ul> - </section> - <div class="sidebar-search"> - <input type="search" id="search-input" placeholder="Search..." value="${n.searchQuery}"> - </div> - <section class="sidebar-section"> - <ul> - <li><a href="/v3/settings" data-nav="settings" class="new-feed-link">+ new</a></li> - </ul> - </section> - <section class="sidebar-section collapsible collapsed" id="section-feeds"> - <h3>Feeds <span class="caret">▶</span></h3> - <ul id="feed-list"></ul> - </section> - <!-- FIXME: Tags feature soft-deprecated - <section class="sidebar-section collapsible collapsed" id="section-tags"> - <h3>Tags <span class="caret">▶</span></h3> - <ul id="tag-list"></ul> - </section> - --> - </div> - <div class="sidebar-footer"> - <a href="/v3/settings" data-nav="settings">Settings</a> - <a href="#" id="logout-button">Logout</a> - </div> - </aside> - <main class="main-content" id="main-content"> - <div id="content-area"></div> - </main> - </div> - `,q())}function q(){document.getElementById("search-input")?.addEventListener("input",s=>{const o=s.target.value;r.updateQuery({q:o})}),document.getElementById("logo-link")?.addEventListener("click",()=>r.navigate("/")),document.getElementById("logout-button")?.addEventListener("click",s=>{s.preventDefault(),X()}),document.getElementById("sidebar-toggle-btn")?.addEventListener("click",()=>{n.toggleSidebar()}),document.getElementById("sidebar-backdrop")?.addEventListener("click",()=>{n.setSidebarVisible(!1)}),document.querySelectorAll(".sidebar-section.collapsible h3").forEach(s=>{s.addEventListener("click",()=>{s.parentElement?.classList.toggle("collapsed")})}),document.getElementById("sidebar")?.addEventListener("click",s=>{const o=s.target,d=o.closest("a");if(!d){o.classList.contains("logo")&&(s.preventDefault(),r.navigate("/",{}));return}const h=d.getAttribute("data-nav"),g=Object.fromEntries(r.getCurrentRoute().query.entries());if(h==="filter"){s.preventDefault();const u=d.getAttribute("data-value");r.getCurrentRoute().path==="/settings"?r.navigate("/",{...g,filter:u}):r.updateQuery({filter:u})}else if(h==="tag"){s.preventDefault();const u=d.getAttribute("data-value");r.navigate(`/tag/${encodeURIComponent(u)}`,g)}else if(h==="feed"){s.preventDefault();const u=d.getAttribute("data-value"),l=r.getCurrentRoute();n.activeFeedId===parseInt(u)&&l.path!=="/settings"?r.navigate("/",g):r.navigate(`/feed/${u}`,g)}else h==="settings"&&(s.preventDefault(),r.getCurrentRoute().path==="/settings"?r.navigate("/",g):r.navigate("/settings",g));window.innerWidth<=768&&n.setSidebarVisible(!1)}),document.getElementById("content-area")?.addEventListener("click",s=>{const o=s.target,d=o.closest('[data-action="toggle-star"]');if(d){const l=d.closest("[data-id]");if(l){const v=parseInt(l.getAttribute("data-id"));j(v)}return}const h=o.closest('[data-action="scrape"]');if(h){const l=h.closest("[data-id]");if(l){const v=parseInt(l.getAttribute("data-id"));V(v)}return}const g=o.closest('[data-action="open"]'),u=o.closest(".feed-item");if(u&&!g){const l=parseInt(u.getAttribute("data-id"));c=l,document.querySelectorAll(".feed-item").forEach(b=>{const R=parseInt(b.getAttribute("data-id")||"0");b.classList.toggle("selected",R===c)});const v=n.items.find(b=>b._id===l);v&&!v.read&&p(l,{read:!0})}})}function k(){const{feeds:t,activeFeedId:e}=n,i=document.getElementById("feed-list");i&&(i.innerHTML=t.map(a=>` - <li class="${a._id===e?"active":""}"> - <a href="/v3/feed/${a._id}" data-nav="feed" data-value="${a._id}"> - ${a.title||a.url} - </a> - </li> - `).join(""))}function $(){}function F(){const{filter:t}=n,e=document.getElementById("filter-list");e&&e.querySelectorAll("li").forEach(i=>{i.classList.toggle("active",i.getAttribute("data-filter")===t)})}function w(){const{items:t,loading:e}=n,i=document.getElementById("content-area");if(!i||r.getCurrentRoute().path==="/settings")return;if(e&&t.length===0){i.innerHTML='<p class="loading">Loading items...</p>';return}if(t.length===0){i.innerHTML='<p class="empty">No items found.</p>';return}i.innerHTML=` - <ul class="item-list"> - ${t.map(s=>O(s,s._id===c)).join("")} - </ul> - ${n.hasMore?'<div id="load-more-sentinel" class="loading-more">Loading more...</div>':""} - `;const a=document.getElementById("main-content");if(a){let s=null;a.onscroll=()=>{!n.loading&&n.hasMore&&a.scrollHeight>a.clientHeight&&a.scrollHeight-a.scrollTop-a.clientHeight<200&&T(),s===null&&(s=window.setTimeout(()=>{_(a),s=null},250))}}}function _(t){const e=t.getBoundingClientRect();n.items.forEach(i=>{if(i.read)return;const a=document.querySelector(`.feed-item[data-id="${i._id}"]`);a&&a.getBoundingClientRect().bottom<e.top&&p(i._id,{read:!0})})}typeof window<"u"&&setInterval(()=>{const t=document.getElementById("main-content");if(n.loading||!n.hasMore)return;if(t&&(_(t),t.scrollHeight>t.clientHeight&&t.scrollHeight-t.scrollTop-t.clientHeight<200)){T();return}const e=document.documentElement.scrollHeight||document.body.scrollHeight,i=window.innerHeight,a=window.scrollY||document.documentElement.scrollTop;e>i&&e-i-a<200&&T()},1e3);function I(){const t=document.getElementById("content-area");if(!t)return;t.innerHTML=` - <div class="settings-view"> - <h2>Settings</h2> - - <div class="settings-grid"> - <section class="settings-section"> - <h3>Data</h3> - <div class="data-group"> - <div class="button-group"> - <a href="/api/export/opml" class="button" target="_blank">EXPORT OPML</a> - <a href="/api/export/text" class="button" target="_blank">EXPORT TEXT</a> - <a href="/api/export/json" class="button" target="_blank">EXPORT JSON</a> - </div> - </div> - <div class="data-group" style="margin-top: 1rem;"> - <div class="button-group"> - <button class="import-btn" data-format="opml">IMPORT OPML</button> - <button class="import-btn" data-format="text">IMPORT TEXT</button> - <button class="import-btn" data-format="json">IMPORT JSON</button> - </div> - <input type="file" id="import-file" style="display: none;"> - </div> - </section> - - <section class="settings-section"> - <h3>Theme</h3> - <div class="settings-group"> - <div class="theme-options" id="theme-options"> - <button class="${n.theme==="light"?"active":""}" data-theme="light">Light</button> - <button class="${n.theme==="dark"?"active":""}" data-theme="dark">Dark</button> - </div> - </div> - <div class="settings-group" style="margin-top: 1rem;"> - <label>System & headings</label> - <select id="heading-font-selector" style="margin-bottom: 1rem;"> - <option value="default" ${n.headingFontTheme==="default"?"selected":""}>System (Helvetica Neue)</option> - <option value="serif" ${n.headingFontTheme==="serif"?"selected":""}>Serif (Georgia)</option> - <option value="sans" ${n.headingFontTheme==="sans"?"selected":""}>Sans-Serif (Inter/System)</option> - <option value="mono" ${n.headingFontTheme==="mono"?"selected":""}>Monospace</option> - </select> - - <label>article body</label> - <select id="font-selector"> - <option value="default" ${n.fontTheme==="default"?"selected":""}>Default (Palatino)</option> - <option value="serif" ${n.fontTheme==="serif"?"selected":""}>Serif (Georgia)</option> - <option value="sans" ${n.fontTheme==="sans"?"selected":""}>Sans-Serif (Helvetica)</option> - <option value="mono" ${n.fontTheme==="mono"?"selected":""}>Monospace</option> - </select> - </div> - </section> - </div> - - <section class="settings-section manage-feeds-section"> - <h3>Manage Feeds</h3> - - <div class="add-feed-form" style="margin-bottom: 2rem;"> - <input type="url" id="new-feed-url" placeholder="https://example.com/rss.xml"> - <button id="add-feed-btn">ADD FEED</button> - </div> - - <ul class="manage-feed-list"> - ${n.feeds.map(a=>` - <li class="manage-feed-item"> - <div class="feed-info"> - <div class="feed-title">${a.title||a.url}</div> - <div class="feed-url">${a.url}</div> - </div> - <div class="feed-actions"> - <!-- FIXME: Tags feature is broken/unused in V3. Soft deprecated for now. - <input type="text" class="feed-tag-input" data-id="${a._id}" value="${a.category||""}" placeholder="Tag"> - <button class="update-feed-tag-btn" data-id="${a._id}">SAVE</button> - --> - <button class="delete-feed-btn" data-id="${a._id}">DELETE</button> - </div> - </li> - `).join("")} - </ul> - </section> - </div> - `,document.getElementById("theme-options")?.addEventListener("click",a=>{const s=a.target.closest("button");s&&(n.setTheme(s.getAttribute("data-theme")),I())}),document.getElementById("heading-font-selector")?.addEventListener("change",a=>{n.setHeadingFontTheme(a.target.value)}),document.getElementById("font-selector")?.addEventListener("change",a=>{n.setFontTheme(a.target.value)}),document.getElementById("add-feed-btn")?.addEventListener("click",async()=>{const a=document.getElementById("new-feed-url"),s=a.value.trim();s&&(await N(s)?(a.value="",alert("Feed added successfully!"),y()):alert("Failed to add feed."))});let e="opml";const i=document.getElementById("import-file");document.querySelectorAll(".import-btn").forEach(a=>{a.addEventListener("click",s=>{e=s.currentTarget.getAttribute("data-format")||"opml",i.click()})}),i?.addEventListener("change",async a=>{const s=a.target.files?.[0];s&&(await x(s,e)?(alert(`Import (${e}) started! check logs.`),y()):alert("Failed to import.")),i.value=""}),document.querySelectorAll(".delete-feed-btn").forEach(a=>{a.addEventListener("click",async s=>{const o=parseInt(s.target.getAttribute("data-id"));confirm("Delete this feed?")&&(await Q(o),await y(),I())})})}async function N(t){try{return(await f("/api/feed",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t})})).ok}catch(e){return console.error("Failed to add feed",e),!1}}async function x(t,e){try{const i=new FormData;i.append("file",t),i.append("format",e);const a=document.cookie.split("; ").find(o=>o.startsWith("csrf_token="))?.split("=")[1];return(await fetch("/api/import",{method:"POST",headers:{"X-CSRF-Token":a||""},body:i})).ok}catch(i){return console.error("Failed to import",i),!1}}async function Q(t){try{return(await f(`/api/feed/${t}`,{method:"DELETE"})).ok}catch(e){return console.error("Failed to delete feed",e),!1}}async function j(t){const e=n.items.find(i=>i._id===t);e&&p(t,{starred:!e.starred})}async function V(t){if(n.items.find(i=>i._id===t))try{const i=await f(`/api/item/${t}/content`);if(i.ok){const a=await i.json();a.full_content&&p(t,{full_content:a.full_content})}}catch(i){console.error("Failed to fetch full content",i)}}async function p(t,e){try{if((await f(`/api/item/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok){const a=n.items.find(s=>s._id===t);if(a){Object.assign(a,e);const s=document.querySelector(`.feed-item[data-id="${t}"]`);if(s){if(e.read!==void 0&&s.classList.toggle("read",e.read),e.starred!==void 0){const o=s.querySelector(".star-btn");o&&(o.classList.toggle("is-starred",e.starred),o.classList.toggle("is-unstarred",!e.starred),o.setAttribute("title",e.starred?"Unstar":"Star"))}e.full_content&&w()}}}}catch(i){console.error("Failed to update item",i)}}async function y(){const t=await f("/api/feed/");if(t.ok){const e=await t.json();n.setFeeds(e)}}async function U(){const t=await f("/api/tag");if(t.ok){const e=await t.json();n.setTags(e)}}async function E(t,e,i=!1){n.setLoading(!0);try{const a=new URLSearchParams;t&&a.append("feed_id",t),e&&a.append("tag",e),n.searchQuery&&a.append("q",n.searchQuery),(n.filter==="starred"||n.filter==="all")&&a.append("read_filter","all"),n.filter==="starred"&&a.append("starred","true"),i&&n.items.length>0&&a.append("max_id",String(n.items[n.items.length-1]._id));const s=await f(`/api/stream?${a.toString()}`);if(s.ok){const o=await s.json();n.setHasMore(o.length>0),n.setItems(o,i)}}finally{n.setLoading(!1)}}async function T(){const t=r.getCurrentRoute();E(t.params.feedId,t.params.tagName,!0)}async function X(){await f("/api/logout",{method:"POST"}),window.location.href="/login/"}function S(){const t=r.getCurrentRoute(),e=t.query.get("filter");n.setFilter(e||"unread");const i=t.query.get("q");if(i!==null&&n.setSearchQuery(i),t.path==="/settings"){I();return}if(t.path==="/feed"&&t.params.feedId){const a=parseInt(t.params.feedId);n.setActiveFeed(a),E(t.params.feedId),document.getElementById("section-feeds")?.classList.remove("collapsed")}else t.path==="/tag"&&t.params.tagName?(n.setActiveTag(t.params.tagName),E(void 0,t.params.tagName),document.getElementById("section-tags")?.classList.remove("collapsed")):(n.setActiveFeed(null),n.setActiveTag(null),E())}window.addEventListener("keydown",t=>{if(!["INPUT","TEXTAREA"].includes(t.target.tagName))switch(t.key){case"j":L(1);break;case"k":L(-1);break;case"r":if(c){const e=n.items.find(i=>i._id===c);e&&p(e._id,{read:!e.read})}break;case"s":if(c){const e=n.items.find(i=>i._id===c);e&&p(e._id,{starred:!e.starred})}break;case"/":t.preventDefault(),document.getElementById("search-input")?.focus();break}});function L(t){if(n.items.length===0)return;const e=n.items.findIndex(a=>a._id===c);let i;if(e===-1?i=t>0?0:n.items.length-1:i=e+t,i>=0&&i<n.items.length){c=n.items[i]._id,document.querySelectorAll(".feed-item").forEach(s=>{const o=parseInt(s.getAttribute("data-id")||"0");s.classList.toggle("selected",o===c)});const a=document.querySelector(`.feed-item[data-id="${c}"]`);a&&a.scrollIntoView({block:"start",behavior:"smooth"}),n.items[i].read||p(c,{read:!0})}}n.on("feeds-updated",k);n.on("tags-updated",$);n.on("active-feed-updated",k);n.on("active-tag-updated",$);n.on("filter-updated",F);n.on("search-updated",()=>{const t=document.getElementById("search-input");t&&t.value!==n.searchQuery&&(t.value=n.searchQuery),S()});n.on("theme-updated",()=>{m||(m=document.querySelector("#app")),m&&(m.className=`theme-${n.theme} font-${n.fontTheme} heading-font-${n.headingFontTheme}`),r.getCurrentRoute().path==="/settings"&&I()});n.on("sidebar-toggle",()=>{const t=document.querySelector(".layout");t&&(n.sidebarVisible?(t.classList.remove("sidebar-hidden"),t.classList.add("sidebar-visible")):(t.classList.remove("sidebar-visible"),t.classList.add("sidebar-hidden")))});n.on("items-updated",w);n.on("loading-state-changed",w);r.addEventListener("route-changed",S);window.app={navigate:t=>r.navigate(t)};async function J(){const t=await f("/api/auth");if(!t||t.status===401){window.location.href="/login/";return}D(),F();try{await Promise.all([y(),U()])}catch(e){console.error("Initial fetch failed",e)}S()}typeof window<"u"&&!window.__VITEST__&&J(); diff --git a/web/dist/v3/index.html b/web/dist/v3/index.html index e50ba5f..3c5190c 100644 --- a/web/dist/v3/index.html +++ b/web/dist/v3/index.html @@ -5,7 +5,7 @@ <link rel="icon" type="image/svg+xml" href="/vite.svg" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>neko</title> - <script type="module" crossorigin src="/v3/assets/index-CSmzFfW5.js"></script> + <script type="module" crossorigin src="/v3/assets/index-CRt-Evnh.js"></script> <link rel="stylesheet" crossorigin href="/v3/assets/index-DMQzdxIi.css"> </head> <body> diff --git a/web/dist/v3/themes/codex.css b/web/dist/v3/themes/codex.css new file mode 100644 index 0000000..ece9e2d --- /dev/null +++ b/web/dist/v3/themes/codex.css @@ -0,0 +1,451 @@ +/* + * Codex Theme + * The book as interface. Tufte, Bringhurst, and the long tradition + * of typographic craft applied to the screen. + * Warm, readable, unhurried. Content is sovereign. + */ + +/* ---- Color System ---- */ +:root { + --bg-color: #faf8f4; + --text-color: #2c2c2c; + --sidebar-bg: #f0ece4; + --link-color: #8b4513; + --border-color: #d4cfc6; + --accent-color: #8b4513; + + --codex-paper: #faf8f4; + --codex-ink: #2c2c2c; + --codex-sienna: #8b4513; + --codex-muted: #8a8478; + --codex-rule: #d4cfc6; + + color-scheme: light; +} + +/* Dark mode adaptation -- parchment by candlelight */ +.theme-dark { + --bg-color: #1c1a17; + --text-color: #d4cfc6; + --sidebar-bg: #23211d; + --link-color: #c9956b; + --border-color: #3a3630; + --accent-color: #c9956b; + + --codex-paper: #1c1a17; + --codex-ink: #d4cfc6; + --codex-sienna: #c9956b; + --codex-muted: #8a8478; + --codex-rule: #3a3630; +} + +/* ---- Typography ---- */ + +body { + font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', 'Crimson Text', Georgia, serif; + font-size: 19px; + line-height: 1.7; + letter-spacing: 0.005em; + background-color: var(--bg-color); + color: var(--text-color); + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + font-feature-settings: 'liga' 1, 'kern' 1, 'onum' 1; +} + +/* ---- Sidebar: Table of Contents ---- */ + +.sidebar { + background: var(--sidebar-bg); + backdrop-filter: none; + -webkit-backdrop-filter: none; + border-right: 1px solid var(--codex-rule); + font-family: 'Iowan Old Style', Palatino, Georgia, serif; +} + +.theme-dark .sidebar { + background: var(--sidebar-bg); + border-right-color: var(--codex-rule); +} + +.sidebar-section h3 { + font-family: 'Iowan Old Style', Palatino, Georgia, serif; + font-size: 0.7rem; + font-weight: 400; + font-variant: small-caps; + text-transform: lowercase; + letter-spacing: 0.15em; + color: var(--codex-muted); + opacity: 1; +} + +.theme-dark .sidebar-section h3 { + color: var(--codex-muted); +} + +.sidebar-section li a { + font-family: 'Iowan Old Style', Palatino, Georgia, serif; + color: var(--text-color); + font-size: 0.85rem; + border-radius: 3px; + font-weight: 400; +} + +.theme-dark .sidebar-section li a { + color: var(--text-color); +} + +.sidebar-section li a:hover { + background: rgba(139, 69, 19, 0.06); + color: var(--codex-sienna); + transform: none; +} + +.theme-dark .sidebar-section li a:hover { + background: rgba(201, 149, 107, 0.08); + color: var(--codex-sienna); +} + +.sidebar-section li.active a { + background: rgba(139, 69, 19, 0.08); + color: var(--codex-sienna); + box-shadow: none; + border: none; + border-radius: 3px; + font-weight: 600; +} + +.theme-dark .sidebar-section li.active a { + background: rgba(201, 149, 107, 0.1); + color: var(--codex-sienna); +} + +.sidebar-footer { + border-top-color: var(--codex-rule); +} + +.sidebar-footer a { + font-family: 'Iowan Old Style', Palatino, Georgia, serif; + color: var(--text-color); + opacity: 0.5; + font-size: 0.85rem; +} + +.theme-dark .sidebar-footer a { + color: var(--text-color); +} + +/* Search */ +.sidebar-search input { + background: rgba(0, 0, 0, 0.03); + border: 1px solid var(--codex-rule); + border-radius: 3px; + color: var(--text-color); + font-family: inherit; +} + +.theme-dark .sidebar-search input { + background: rgba(255, 255, 255, 0.05); + color: var(--text-color); + border-color: var(--codex-rule); +} + +.sidebar-search input:focus { + border-color: var(--codex-sienna); + box-shadow: none; +} + +/* ---- Toggle ---- */ +.theme-dark .sidebar-toggle { + background: none; +} + +/* ---- Main Content ---- */ + +.main-content { + background-color: var(--bg-color); + padding: 2.5rem 2rem; +} + +.main-content > * { + max-width: 33em; +} + +/* ---- Feed Items: The Reading Experience ---- */ + +.feed-item { + padding: 0; + margin-top: 2.5rem; + border-radius: 0; + padding-bottom: 2.5rem; + border-bottom: none; +} + +/* Decorative separator between items -- a subtle fleuron */ +.feed-item + .feed-item::before { + content: '\2766'; + display: block; + text-align: center; + font-size: 1rem; + color: var(--codex-rule); + margin-bottom: 2.5rem; + margin-top: -2.5rem; +} + +.feed-item.selected { + background: none; + box-shadow: inset 3px 0 0 var(--codex-sienna); + padding-left: 1rem; + border-radius: 0; +} + +.theme-dark .feed-item.selected { + background: none; +} + +.item-title { + font-family: 'Iowan Old Style', Palatino, Georgia, serif; + font-size: 1.65rem; + line-height: 1.3; + font-weight: 400; + color: var(--codex-sienna); + letter-spacing: -0.005em; +} + +.item-title:hover { + color: var(--codex-ink); + text-decoration: none; +} + +.dateline { + font-family: 'Iowan Old Style', Palatino, Georgia, serif; + font-variant: small-caps; + text-transform: lowercase; + font-size: 0.78em; + letter-spacing: 0.06em; + color: var(--codex-muted); + margin-bottom: 1.2rem; +} + +.dateline a { + color: var(--codex-muted); +} + +.item-description { + font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif; + font-size: 1rem; + line-height: 1.75; + color: var(--text-color); + hyphens: auto; + -webkit-hyphens: auto; +} + +.item-description a { + color: var(--codex-sienna); + text-decoration: none; + border-bottom: 1px solid rgba(139, 69, 19, 0.3); +} + +.item-description a:hover { + border-bottom-color: var(--codex-sienna); +} + +.item-description blockquote { + border-left: 3px solid var(--codex-rule); + margin-left: 0; + padding-left: 1.5em; + font-style: italic; + color: var(--codex-muted); +} + +.item-description pre { + background: rgba(0, 0, 0, 0.03); + border: 1px solid var(--codex-rule); + border-radius: 2px; + font-family: 'Courier New', Courier, monospace; + font-size: 0.88em; +} + +.item-description img { + border-radius: 2px; +} + +/* Star */ +.star-btn.is-starred { + color: var(--codex-sienna); +} + +.star-btn.is-unstarred { + color: var(--codex-muted); + opacity: 0.25; +} + +/* Scrape */ +.scrape-btn { + font-family: inherit; + font-variant: small-caps; + text-transform: lowercase; + letter-spacing: 0.06em; + color: var(--codex-sienna); + border-color: var(--codex-rule); + background: transparent; + border-radius: 2px; + font-weight: 400; +} + +/* ---- Buttons ---- */ + +button, +.button { + font-family: 'Iowan Old Style', Palatino, Georgia, serif; + font-variant: small-caps; + text-transform: lowercase; + letter-spacing: 0.06em; + border-radius: 3px; + border-color: var(--codex-rule); + background: transparent; + color: var(--text-color); + font-size: 0.85rem; + font-weight: 400; +} + +button:hover, +.button:hover { + border-color: var(--codex-sienna); + color: var(--codex-sienna); + background: rgba(139, 69, 19, 0.04); +} + +.theme-dark button, +.theme-dark .button { + background: transparent; + color: var(--text-color); + border-color: var(--codex-rule); +} + +.theme-dark button:hover, +.theme-dark .button:hover { + border-color: var(--codex-sienna); + color: var(--codex-sienna); + background: rgba(201, 149, 107, 0.08); +} + +button.active, +.theme-dark button.active { + background: var(--codex-sienna); + color: var(--codex-paper); + border-color: var(--codex-sienna); +} + +/* ---- Settings ---- */ + +.settings-view { + font-family: 'Iowan Old Style', Palatino, Georgia, serif; +} + +.settings-view h2 { + font-weight: 400; + font-size: 1.8rem; + letter-spacing: -0.01em; +} + +.settings-section h3 { + font-family: inherit; + font-weight: 400; + font-variant: small-caps; + text-transform: lowercase; + letter-spacing: 0.08em; + font-size: 1.15rem; + padding-bottom: 0.5rem; + border-bottom: 1px solid var(--codex-rule); +} + +.settings-group label, +.data-group label { + font-family: inherit; + font-variant: small-caps; + text-transform: lowercase; + letter-spacing: 0.1em; + font-size: 0.85rem; + font-weight: 400; + opacity: 0.65; +} + +.theme-dark .settings-view, +.theme-dark .settings-view h2, +.theme-dark .settings-view h3, +.theme-dark .settings-group label, +.theme-dark .data-group label { + color: var(--text-color) !important; +} + +/* Inputs */ +input[type="text"], +input[type="url"], +input[type="search"], +select { + font-family: inherit; + background: transparent; + border: 1px solid var(--codex-rule); + border-radius: 3px; + color: var(--text-color); +} + +input:focus, +select:focus { + border-color: var(--codex-sienna); + box-shadow: none; +} + +/* Feed list */ +.manage-feed-list { + border-top-color: var(--codex-rule); +} + +.manage-feed-item { + border-bottom-color: var(--codex-rule); +} + +.feed-title { + font-family: inherit; + font-weight: 600; +} + +.feed-url { + font-family: inherit; +} + +.delete-feed-btn { + color: #a0522d !important; + border-color: rgba(160, 82, 45, 0.3) !important; +} + +.delete-feed-btn:hover { + background: rgba(160, 82, 45, 0.06) !important; + border-color: #a0522d !important; +} + +/* ---- Scrollbars ---- */ + +::-webkit-scrollbar { + width: 6px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + background: var(--codex-rule); + border-radius: 3px; +} + +/* ---- Backdrop ---- */ +.sidebar-backdrop { + background: rgba(250, 248, 244, 0.6); + backdrop-filter: blur(3px); +} + +.theme-dark .sidebar-backdrop { + background: rgba(28, 26, 23, 0.6); +} diff --git a/web/dist/v3/themes/refined.css b/web/dist/v3/themes/refined.css new file mode 100644 index 0000000..9143552 --- /dev/null +++ b/web/dist/v3/themes/refined.css @@ -0,0 +1,265 @@ +/* + * Refined Theme + * A careful refinement of the default aesthetic. + * Fixes spacing inconsistencies, improves typographic rhythm, + * and adds subtle polish while preserving the original character. + */ + +/* ---- Typographic Scale & Rhythm ---- */ +/* Base unit: 0.5rem. All spacing aligns to this grid. */ + +:root { + --spacing-xs: 0.25rem; + --spacing-sm: 0.5rem; + --spacing-md: 1rem; + --spacing-lg: 1.5rem; + --spacing-xl: 2rem; + --spacing-2xl: 3rem; +} + +/* Slightly refined base typography */ +body { + font-size: 18px; + line-height: 1.6; + letter-spacing: 0.005em; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; +} + +/* ---- Sidebar Refinements ---- */ + +.sidebar { + padding: var(--spacing-lg); + padding-top: 5rem; +} + +.sidebar-section h3 { + font-size: 0.65rem; + letter-spacing: 0.14em; + margin-top: var(--spacing-xl); + margin-bottom: var(--spacing-sm); +} + +.sidebar-section li a { + padding: 0.35rem 0.75rem; + margin: 2px 0; + font-size: 0.82rem; + letter-spacing: 0.01em; + border-radius: 6px; +} + +.sidebar-section li.active a { + border-radius: 6px; +} + +.sidebar-footer { + padding-top: var(--spacing-lg); +} + +.sidebar-footer a { + font-size: 0.82rem; + padding: 0.4rem 0.75rem; + letter-spacing: 0.01em; +} + +/* ---- Main Content Refinements ---- */ + +.main-content { + padding: var(--spacing-xl) var(--spacing-xl); +} + +@media (max-width: 1024px) { + .main-content { + padding: var(--spacing-md); + padding-top: 4rem; + } +} + +/* ---- Feed Item Refinements ---- */ + +.feed-item { + padding: var(--spacing-md) var(--spacing-sm); + margin-top: var(--spacing-xl); +} + +.item-title { + font-size: 1.7rem; + line-height: 1.25; + letter-spacing: -0.015em; +} + +.item-header { + margin-bottom: var(--spacing-sm); +} + +.dateline { + font-size: 0.72em; + letter-spacing: 0.02em; + margin-bottom: var(--spacing-md); +} + +.item-description { + line-height: 1.6; + margin-top: var(--spacing-md); +} + +.item-description p { + margin-top: 0; + margin-bottom: var(--spacing-md); +} + +.item-description p:last-child { + margin-bottom: 0; +} + +/* ---- Settings Page Refinements ---- */ +/* This is where the biggest improvements are needed */ + +.settings-view { + padding-top: var(--spacing-xl); +} + +.settings-view h2 { + font-size: 1.8rem; + font-weight: 700; + margin-bottom: var(--spacing-2xl); + letter-spacing: -0.025em; +} + +.settings-grid { + gap: var(--spacing-2xl); + margin-bottom: var(--spacing-2xl); +} + +.settings-section { + margin: 0; + padding: 0; +} + +.settings-section h3 { + font-size: 1.1rem; + font-weight: 700; + margin-bottom: var(--spacing-lg); + padding-bottom: var(--spacing-sm); + border-bottom: 1px solid var(--border-color); +} + +.settings-group, +.data-group { + margin-bottom: var(--spacing-lg); +} + +.settings-group label, +.data-group label { + font-size: 0.75rem; + letter-spacing: 0.1em; + margin-bottom: var(--spacing-sm); +} + +.theme-options { + gap: var(--spacing-sm); +} + +/* Consistent button sizing */ +button, +.button { + height: 2.2rem; + padding: 0 var(--spacing-md); + font-size: 0.75rem; + letter-spacing: 0.06em; + border-radius: 5px; +} + +/* Add feed form alignment */ +.add-feed-form { + gap: var(--spacing-sm); + margin-bottom: var(--spacing-xl); +} + +.add-feed-form input { + height: 2.2rem; +} + +/* Manage feeds list consistency */ +.manage-feeds-section { + margin-top: var(--spacing-2xl); +} + +.manage-feed-item { + padding: var(--spacing-md) 0; + gap: var(--spacing-md); +} + +.feed-title { + font-size: 0.95rem; + margin-bottom: var(--spacing-xs); +} + +.feed-url { + font-size: 0.8rem; +} + +/* Select inputs consistent with buttons */ +select { + height: 2.2rem; + font-size: 0.85rem; +} + +/* ---- Subtle Polish ---- */ + +/* Slightly softer selection highlight */ +.feed-item.selected { + border-radius: 6px; +} + +/* Smoother scrollbar (webkit) */ +.sidebar-scroll::-webkit-scrollbar, +.main-content::-webkit-scrollbar { + width: 6px; +} + +.sidebar-scroll::-webkit-scrollbar-thumb, +.main-content::-webkit-scrollbar-thumb { + background: rgba(128, 128, 128, 0.3); + border-radius: 3px; +} + +.sidebar-scroll::-webkit-scrollbar-thumb:hover, +.main-content::-webkit-scrollbar-thumb:hover { + background: rgba(128, 128, 128, 0.5); +} + +/* Refined focus states */ +input:focus, +select:focus { + box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15); +} + +/* Cleaner star button */ +.star-btn { + font-size: 1.1rem; + padding: 0 0 0 0.75rem; + transition: opacity 0.15s, color 0.15s; +} + +.star-btn.is-unstarred { + opacity: 0.2; +} + +.star-btn.is-unstarred:hover { + opacity: 0.5; +} + +/* Import/export button groups: consistent spacing */ +.data-group .button-group { + gap: var(--spacing-sm); +} + +/* Better scrape button */ +.scrape-btn { + font-size: 0.7rem; + padding: 2px 8px; + border-radius: 4px; + letter-spacing: 0.04em; +} diff --git a/web/dist/v3/themes/sakura.css b/web/dist/v3/themes/sakura.css new file mode 100644 index 0000000..f0fc990 --- /dev/null +++ b/web/dist/v3/themes/sakura.css @@ -0,0 +1,466 @@ +/* + * Sakura Theme -- Claude's Choice + * Named for the app: neko is Japanese for cat. + * A theme inspired by the quiet beauty of Japanese graphic design. + * Ma (negative space), wabi-sabi (beauty in imperfection), + * and the restrained palette of ukiyo-e woodblock prints. + * Warm grays, muted pinks, deliberate whitespace, and a sense of calm. + */ + +/* ---- Color System ---- */ +:root { + --bg-color: #fafaf8; + --text-color: #373737; + --sidebar-bg: #f2f0ec; + --link-color: #c45b78; + --border-color: #e0ddd6; + --accent-color: #c45b78; + + --sakura-blossom: #c45b78; + --sakura-petal: #f0c4cf; + --sakura-stone: #8c8a85; + --sakura-ink: #373737; + --sakura-paper: #fafaf8; + --sakura-cloud: #f2f0ec; + --sakura-shadow: #e0ddd6; + --sakura-indigo: #4a5568; + + color-scheme: light; +} + +/* Dark: Evening in Kyoto */ +.theme-dark { + --bg-color: #1a1a1e; + --text-color: #d5d3ce; + --sidebar-bg: #222226; + --link-color: #e8879e; + --border-color: #3a3a3e; + --accent-color: #e8879e; + + --sakura-blossom: #e8879e; + --sakura-petal: #5c3a45; + --sakura-stone: #8c8a85; + --sakura-ink: #d5d3ce; + --sakura-paper: #1a1a1e; + --sakura-cloud: #222226; + --sakura-shadow: #3a3a3e; + --sakura-indigo: #a0aec0; +} + +/* ---- Typography ---- */ + +body { + font-family: 'Hiragino Mincho ProN', 'Noto Serif', 'Iowan Old Style', Palatino, Georgia, serif; + font-size: 18px; + line-height: 1.8; + letter-spacing: 0.01em; + background-color: var(--bg-color); + color: var(--text-color); + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; +} + +/* ---- Sidebar ---- */ + +.sidebar { + background: var(--sakura-cloud); + backdrop-filter: none; + -webkit-backdrop-filter: none; + border-right: 1px solid var(--sakura-shadow); + padding: 1.5rem; + padding-top: 5rem; +} + +.theme-dark .sidebar { + background: var(--sakura-cloud); + border-right-color: var(--sakura-shadow); +} + +.sidebar-section h3 { + font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Helvetica Neue', Helvetica, sans-serif; + font-size: 0.6rem; + font-weight: 500; + text-transform: uppercase; + letter-spacing: 0.2em; + color: var(--sakura-stone); + opacity: 1; +} + +.theme-dark .sidebar-section h3 { + color: var(--sakura-stone); +} + +.sidebar-section li a { + font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Helvetica Neue', Helvetica, sans-serif; + color: var(--text-color); + font-size: 0.82rem; + border-radius: 4px; + font-weight: 400; + letter-spacing: 0.01em; +} + +.theme-dark .sidebar-section li a { + color: var(--text-color); +} + +.sidebar-section li a:hover { + background: rgba(196, 91, 120, 0.06); + color: var(--sakura-blossom); + transform: none; +} + +.theme-dark .sidebar-section li a:hover { + background: rgba(232, 135, 158, 0.08); + color: var(--sakura-blossom); +} + +.sidebar-section li.active a { + background: rgba(196, 91, 120, 0.08); + color: var(--sakura-blossom); + box-shadow: none; + border: none; + border-left: 2px solid var(--sakura-blossom); + border-radius: 0 4px 4px 0; + padding-left: calc(0.8rem - 2px); + font-weight: 600; +} + +.theme-dark .sidebar-section li.active a { + background: rgba(232, 135, 158, 0.1); + color: var(--sakura-blossom); +} + +.sidebar-footer { + border-top: 1px solid var(--sakura-shadow); +} + +.sidebar-footer a { + font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Helvetica Neue', Helvetica, sans-serif; + color: var(--text-color); + opacity: 0.45; + font-size: 0.82rem; +} + +.theme-dark .sidebar-footer a { + color: var(--text-color); +} + +.sidebar-footer a:hover { + opacity: 1; + color: var(--sakura-blossom); + background: rgba(196, 91, 120, 0.04); +} + +/* Search */ +.sidebar-search input { + background: rgba(0, 0, 0, 0.03); + border: 1px solid var(--sakura-shadow); + border-radius: 4px; + color: var(--text-color); + font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif; +} + +.theme-dark .sidebar-search input { + background: rgba(255, 255, 255, 0.04); + color: var(--text-color); + border-color: var(--sakura-shadow); +} + +.sidebar-search input:focus { + border-color: var(--sakura-blossom); + box-shadow: 0 0 0 2px rgba(196, 91, 120, 0.1); +} + +/* ---- Toggle ---- */ +.theme-dark .sidebar-toggle { + background: none; +} + +/* ---- Main Content ---- */ + +.main-content { + background-color: var(--bg-color); + padding: 2.5rem 2rem; +} + +.main-content > * { + max-width: 34em; +} + +/* ---- Feed Items ---- */ + +.feed-item { + padding: 0.5rem 0; + margin-top: 2.5rem; + border-radius: 0; + border-bottom: none; +} + +/* Subtle separator -- a single thin rule, Japanese-style restraint */ +.feed-item + .feed-item { + border-top: 1px solid var(--sakura-shadow); + padding-top: 2.5rem; +} + +.feed-item.selected { + background: rgba(196, 91, 120, 0.03); + box-shadow: inset 3px 0 0 var(--sakura-blossom); + padding-left: 1rem; + border-radius: 0; +} + +.theme-dark .feed-item.selected { + background: rgba(232, 135, 158, 0.04); +} + +.item-title { + font-family: 'Hiragino Mincho ProN', 'Noto Serif', Palatino, Georgia, serif; + font-size: 1.55rem; + line-height: 1.4; + font-weight: 600; + color: var(--sakura-ink); + letter-spacing: 0; +} + +.theme-dark .item-title { + color: var(--text-color); +} + +.item-title:hover { + color: var(--sakura-blossom); + text-decoration: none; +} + +.dateline { + font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Helvetica Neue', sans-serif; + font-size: 0.72em; + letter-spacing: 0.03em; + color: var(--sakura-stone); + margin-bottom: 1rem; +} + +.dateline a { + color: var(--sakura-stone); +} + +.dateline a:hover { + color: var(--sakura-blossom); +} + +.item-description { + font-family: 'Hiragino Mincho ProN', 'Noto Serif', 'Iowan Old Style', Palatino, Georgia, serif; + font-size: 1rem; + line-height: 1.85; + color: var(--text-color); +} + +.item-description a { + color: var(--sakura-blossom); + text-decoration: none; + border-bottom: 1px solid rgba(196, 91, 120, 0.25); +} + +.item-description a:hover { + border-bottom-color: var(--sakura-blossom); +} + +.item-description blockquote { + border-left: 2px solid var(--sakura-petal); + margin-left: 0; + padding-left: 1.25em; + color: var(--sakura-stone); +} + +.item-description pre { + background: rgba(0, 0, 0, 0.02); + border: 1px solid var(--sakura-shadow); + border-radius: 3px; + font-family: 'Courier New', Courier, monospace; + font-size: 0.88em; +} + +.item-description img { + border-radius: 3px; +} + +/* Star -- blossom colored when starred */ +.star-btn.is-starred { + color: var(--sakura-blossom); +} + +.star-btn.is-unstarred { + color: var(--sakura-stone); + opacity: 0.2; +} + +/* Scrape */ +.scrape-btn { + font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif; + color: var(--sakura-blossom); + border-color: var(--sakura-shadow); + background: transparent; + border-radius: 3px; + font-size: 0.72rem; + letter-spacing: 0.04em; +} + +/* ---- Buttons ---- */ + +button, +.button { + font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Helvetica Neue', sans-serif; + border-radius: 4px; + border-color: var(--sakura-shadow); + background: transparent; + color: var(--text-color); + font-size: 0.78rem; + font-weight: 500; + letter-spacing: 0.04em; + text-transform: uppercase; +} + +button:hover, +.button:hover { + border-color: var(--sakura-blossom); + color: var(--sakura-blossom); + background: rgba(196, 91, 120, 0.04); +} + +.theme-dark button, +.theme-dark .button { + background: transparent; + color: var(--text-color); + border-color: var(--sakura-shadow); +} + +.theme-dark button:hover, +.theme-dark .button:hover { + border-color: var(--sakura-blossom); + color: var(--sakura-blossom); + background: rgba(232, 135, 158, 0.06); +} + +button.active, +.theme-dark button.active { + background: var(--sakura-blossom); + color: #ffffff; + border-color: var(--sakura-blossom); +} + +/* ---- Settings ---- */ + +.settings-view { + font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Helvetica Neue', sans-serif; +} + +.settings-view h2 { + font-family: 'Hiragino Mincho ProN', 'Noto Serif', Palatino, Georgia, serif; + font-weight: 400; + font-size: 1.8rem; + letter-spacing: 0.02em; +} + +.settings-section h3 { + font-family: inherit; + font-weight: 500; + font-size: 1rem; + letter-spacing: 0.04em; + padding-bottom: 0.5rem; + border-bottom: 1px solid var(--sakura-shadow); +} + +.settings-group label, +.data-group label { + font-family: inherit; + letter-spacing: 0.1em; + font-size: 0.72rem; + font-weight: 500; +} + +.theme-dark .settings-view, +.theme-dark .settings-view h2, +.theme-dark .settings-view h3, +.theme-dark .settings-group label, +.theme-dark .data-group label { + color: var(--text-color) !important; +} + +/* Inputs */ +input[type="text"], +input[type="url"], +input[type="search"], +select { + font-family: inherit; + background: transparent; + border: 1px solid var(--sakura-shadow); + border-radius: 4px; + color: var(--text-color); +} + +input:focus, +select:focus { + border-color: var(--sakura-blossom); + box-shadow: 0 0 0 2px rgba(196, 91, 120, 0.1); +} + +/* Feed list */ +.manage-feed-list { + border-top-color: var(--sakura-shadow); +} + +.manage-feed-item { + border-bottom-color: var(--sakura-shadow); +} + +.feed-title { + font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif; + font-weight: 600; +} + +.feed-url { + font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif; +} + +.delete-feed-btn { + color: #c45b78 !important; + border-color: rgba(196, 91, 120, 0.3) !important; +} + +.delete-feed-btn:hover { + background: rgba(196, 91, 120, 0.06) !important; + border-color: var(--sakura-blossom) !important; +} + +/* ---- Scrollbars ---- */ + +::-webkit-scrollbar { + width: 5px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + background: var(--sakura-shadow); + border-radius: 3px; +} + +::-webkit-scrollbar-thumb:hover { + background: var(--sakura-stone); +} + +/* ---- Backdrop ---- */ +.sidebar-backdrop { + background: rgba(250, 250, 248, 0.5); + backdrop-filter: blur(4px); +} + +.theme-dark .sidebar-backdrop { + background: rgba(26, 26, 30, 0.5); +} + +/* ---- Loading/Empty ---- */ +.loading, .empty { + color: var(--sakura-stone); +} diff --git a/web/dist/v3/themes/terminal.css b/web/dist/v3/themes/terminal.css new file mode 100644 index 0000000..f497dfa --- /dev/null +++ b/web/dist/v3/themes/terminal.css @@ -0,0 +1,446 @@ +/* + * Terminal Theme + * Born-digital. CRT phosphor. The hum of the machine. + * Inspired by green-screen terminals, REZ, and the beauty of text on glass. + * Content-first -- the digital medium is the accent, not the show. + */ + +/* ---- Color System ---- */ +:root { + --bg-color: #0a0e14; + --text-color: #b0bec5; + --sidebar-bg: #0d1117; + --link-color: #00e5ff; + --border-color: #1e2a35; + --accent-color: #00e5ff; + + --terminal-glow: rgba(0, 229, 255, 0.08); + --terminal-dim: rgba(0, 229, 255, 0.03); + --terminal-green: #39ff14; + --terminal-cyan: #00e5ff; + --terminal-magenta: #ff00ff; + --terminal-amber: #ffab00; + + color-scheme: dark; +} + +/* Override dark theme if also applied */ +.theme-dark { + --bg-color: #0a0e14; + --text-color: #b0bec5; + --sidebar-bg: #0d1117; + --link-color: #00e5ff; + --border-color: #1e2a35; + --accent-color: #00e5ff; +} + +/* ---- Typography ---- */ + +body { + font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', 'Courier New', monospace; + font-size: 15px; + line-height: 1.65; + letter-spacing: 0.02em; + background-color: var(--bg-color); + color: var(--text-color); + -webkit-font-smoothing: antialiased; +} + +/* Subtle scanline overlay on the whole page */ +body::after { + content: ''; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + pointer-events: none; + z-index: 9999; + background: repeating-linear-gradient( + to bottom, + transparent, + transparent 2px, + rgba(0, 0, 0, 0.03) 2px, + rgba(0, 0, 0, 0.03) 4px + ); +} + +/* ---- Sidebar ---- */ + +.sidebar { + background: var(--sidebar-bg); + backdrop-filter: none; + -webkit-backdrop-filter: none; + border-right: 1px solid var(--border-color); + font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace; +} + +.theme-dark .sidebar { + background: var(--sidebar-bg); + border-right-color: var(--border-color); +} + +.sidebar-section h3 { + font-family: inherit; + color: var(--terminal-cyan); + opacity: 0.6; + font-size: 0.65rem; + letter-spacing: 0.2em; +} + +.theme-dark .sidebar-section h3 { + color: var(--terminal-cyan); +} + +.sidebar-section li a { + font-family: inherit; + color: var(--text-color); + border-radius: 2px; + font-size: 0.8rem; +} + +.theme-dark .sidebar-section li a { + color: var(--text-color); +} + +.sidebar-section li a:hover { + background: var(--terminal-glow); + color: var(--terminal-cyan); + transform: none; +} + +.theme-dark .sidebar-section li a:hover { + background: var(--terminal-glow); + color: var(--terminal-cyan); +} + +.sidebar-section li.active a { + background: var(--terminal-glow); + color: var(--terminal-cyan); + box-shadow: inset 2px 0 0 var(--terminal-cyan); + border: none; + border-radius: 0; + font-weight: 500; +} + +.theme-dark .sidebar-section li.active a { + background: var(--terminal-glow); + color: var(--terminal-cyan); +} + +.sidebar-footer { + border-top-color: var(--border-color); +} + +.sidebar-footer a { + font-family: inherit; + color: var(--text-color); + opacity: 0.5; + font-size: 0.8rem; +} + +.theme-dark .sidebar-footer a { + color: var(--text-color); +} + +.sidebar-footer a:hover { + color: var(--terminal-cyan); + background: var(--terminal-dim); + opacity: 1; +} + +/* Search */ +.sidebar-search input { + background: rgba(0, 229, 255, 0.05); + border: 1px solid var(--border-color); + border-radius: 2px; + color: var(--text-color); + font-family: inherit; +} + +.theme-dark .sidebar-search input { + background: rgba(0, 229, 255, 0.05); + color: var(--text-color); + border-color: var(--border-color); +} + +.sidebar-search input:focus { + border-color: var(--terminal-cyan); + box-shadow: 0 0 8px rgba(0, 229, 255, 0.15); +} + +.sidebar-search input::placeholder { + color: rgba(176, 190, 197, 0.3); +} + +/* ---- Toggle ---- */ +.sidebar-toggle { + opacity: 0.6; +} + +.theme-dark .sidebar-toggle { + background: none; +} + +.sidebar-toggle:hover { + opacity: 1; +} + +/* ---- Main Content ---- */ + +.main-content { + background-color: var(--bg-color); +} + +/* ---- Feed Items ---- */ + +.feed-item { + border-radius: 0; + padding: 1.25rem 0.5rem; + margin-top: 1.5rem; + border-bottom: 1px solid var(--border-color); +} + +.feed-item.selected { + background-color: var(--terminal-dim); + box-shadow: inset 3px 0 0 var(--terminal-cyan); + border-radius: 0; +} + +.theme-dark .feed-item.selected { + background-color: var(--terminal-dim); +} + +.item-title { + font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace; + font-size: 1.4rem; + line-height: 1.35; + color: var(--terminal-cyan); + font-weight: 600; + letter-spacing: -0.01em; +} + +.item-title:hover { + color: #ffffff; + text-shadow: 0 0 12px rgba(0, 229, 255, 0.3); + text-decoration: none; +} + +.dateline { + color: rgba(176, 190, 197, 0.35); + font-family: inherit; + font-size: 0.75em; + letter-spacing: 0.04em; +} + +.dateline a { + color: rgba(176, 190, 197, 0.35); +} + +.dateline a:hover { + color: var(--terminal-cyan); +} + +.item-description { + font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace; + font-size: 0.9rem; + line-height: 1.7; + color: var(--text-color); +} + +.item-description a { + color: var(--terminal-cyan); +} + +.item-description a:hover { + text-shadow: 0 0 8px rgba(0, 229, 255, 0.2); +} + +.item-description pre { + background: rgba(0, 229, 255, 0.04); + border: 1px solid var(--border-color); + border-radius: 2px; + font-family: inherit; +} + +/* Star */ +.star-btn.is-starred { + color: var(--terminal-amber); +} + +.star-btn.is-unstarred { + color: var(--text-color); + opacity: 0.15; +} + +/* Scrape */ +.scrape-btn { + font-family: inherit; + color: var(--terminal-cyan); + border-color: var(--border-color); + background: transparent; + border-radius: 2px; +} + +.scrape-btn:hover { + border-color: var(--terminal-cyan); + box-shadow: 0 0 6px rgba(0, 229, 255, 0.15); +} + +/* ---- Buttons ---- */ + +button, +.button { + font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace; + border-radius: 2px; + border-color: var(--border-color); + background: transparent; + color: var(--text-color); + font-size: 0.72rem; + letter-spacing: 0.08em; + text-transform: uppercase; +} + +button:hover, +.button:hover { + border-color: var(--terminal-cyan); + color: var(--terminal-cyan); + background: var(--terminal-dim); +} + +.theme-dark button, +.theme-dark .button { + background: transparent; + color: var(--text-color); + border-color: var(--border-color); +} + +.theme-dark button:hover, +.theme-dark .button:hover { + border-color: var(--terminal-cyan); + color: var(--terminal-cyan); + background: var(--terminal-dim); +} + +button.active, +.theme-dark button.active { + background: var(--terminal-cyan); + color: var(--bg-color); + border-color: var(--terminal-cyan); +} + +/* ---- Settings ---- */ + +.settings-view { + font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace; +} + +.settings-view h2 { + color: var(--terminal-cyan); + font-weight: 600; + letter-spacing: 0.05em; + font-size: 1.5rem; +} + +.settings-section h3 { + color: var(--text-color); + font-family: inherit; + font-size: 1rem; + letter-spacing: 0.04em; +} + +.settings-group label, +.data-group label { + color: var(--text-color); + font-family: inherit; + letter-spacing: 0.12em; +} + +.theme-dark .settings-view, +.theme-dark .settings-view h2, +.theme-dark .settings-view h3, +.theme-dark .settings-group label, +.theme-dark .data-group label { + color: var(--text-color) !important; +} + +/* Inputs */ +input[type="text"], +input[type="url"], +input[type="search"], +select { + font-family: inherit; + background: rgba(0, 229, 255, 0.04); + border: 1px solid var(--border-color); + border-radius: 2px; + color: var(--text-color); +} + +input:focus, +select:focus { + border-color: var(--terminal-cyan); + box-shadow: 0 0 8px rgba(0, 229, 255, 0.15); +} + +/* Feed list in settings */ +.manage-feed-list { + border-top-color: var(--border-color); +} + +.manage-feed-item { + border-bottom-color: var(--border-color); +} + +.feed-title { + font-family: inherit; + color: var(--text-color); +} + +.feed-url { + font-family: inherit; + color: var(--text-color); + opacity: 0.4; +} + +/* Delete button */ +.delete-feed-btn { + color: #ff5252 !important; + border-color: rgba(255, 82, 82, 0.3) !important; +} + +.delete-feed-btn:hover { + border-color: #ff5252 !important; + box-shadow: 0 0 6px rgba(255, 82, 82, 0.2) !important; + background: rgba(255, 82, 82, 0.08) !important; +} + +/* ---- Scrollbars ---- */ + +::-webkit-scrollbar { + width: 5px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + background: rgba(0, 229, 255, 0.15); + border-radius: 0; +} + +::-webkit-scrollbar-thumb:hover { + background: rgba(0, 229, 255, 0.3); +} + +/* ---- Backdrop ---- */ +.sidebar-backdrop { + background: rgba(0, 0, 0, 0.6); + backdrop-filter: blur(2px); +} + +/* ---- Loading/Empty States ---- */ +.loading, .empty { + color: rgba(176, 190, 197, 0.4); + font-family: inherit; +} |
