Sidebar layout: - Replace AdwNavigationSplitView with GtkPaned for a resizable sidebar with a persistent width stored in GSettings. - Apply navigation-sidebar CSS class to the content Stack only (not the ToolbarView) so both header bars share the same colour and height. - Override Adwaita's automatic paned-first-child header tint and gap via application-level CSS. - Remove the gap between the sidebar header and the first list item. - Add toggle-sidebar button and F9 shortcut; sidebar visibility and width are persisted across restarts. Loading indicator: - Replace the large AdwSpinner status page + header Stack with a small Gtk.Spinner (16×16) in the header Stack so the header height never changes during loading. Article row: - Add hexpand to title and excerpt labels so text reflows when the sidebar is resized. Content: - Inline CSS into the HTML template at load time (/*INJECT_CSS*/ placeholder) so WebKit does not need a custom URI scheme handler. - Fix max-width centering and padding for article body and header. - Fix embedded video/iframe auto-opening in browser by checking NavigationType::LinkClicked instead of is_user_gesture(). Content filters: - Add Preferences dialog with a TextView for content-rewrite rules stored in GSettings (content-filters key). - Rule format: "domain find replace [find replace …]" one per line. - Rules are applied to article HTML before display and reloaded on every refresh. Shortcuts: - Add Ctrl+W to close, Ctrl+Q to quit, F1 for keyboard shortcuts overlay, j/k and arrow-key navigation via a capture-phase controller so keys work regardless of which widget has focus. Misc: - Set window title to "FeedTheMonkey" (fixes Hyprland title bar). - Update About dialog website URL.
131 lines
2.2 KiB
CSS
131 lines
2.2 KiB
CSS
/* CSS custom properties are set from Rust via AdwStyleManager.
|
|
The :root defaults below act as a light-mode fallback only. */
|
|
|
|
:root {
|
|
--bg: #ffffff;
|
|
--fg: #1a1a1a;
|
|
--fg-dim: rgba(0,0,0,0.55);
|
|
--border: rgba(0,0,0,0.12);
|
|
--header-bg: #f6f5f4;
|
|
--link: #1c71d8;
|
|
--code-bg: rgba(0,0,0,0.06);
|
|
--blockquote-border: rgba(0,0,0,0.2);
|
|
--font: sans-serif;
|
|
--font-size: 15px;
|
|
}
|
|
|
|
:root[data-dark="1"] {
|
|
--bg: #1e1e1e;
|
|
--fg: rgba(255,255,255,0.87);
|
|
--fg-dim: rgba(255,255,255,0.5);
|
|
--border: rgba(255,255,255,0.12);
|
|
--header-bg: #242424;
|
|
--link: #78aeed;
|
|
--code-bg: rgba(255,255,255,0.06);
|
|
--blockquote-border: rgba(255,255,255,0.2);
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background: var(--bg);
|
|
color: var(--fg);
|
|
font-family: var(--font);
|
|
font-size: var(--font-size);
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
a {
|
|
color: var(--link);
|
|
text-decoration: none;
|
|
}
|
|
|
|
article a {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
header {
|
|
padding: 1.5em 2em 1em;
|
|
background: var(--header-bg);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
header > .inner,
|
|
article {
|
|
max-width: 720px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
header > .inner {
|
|
padding: 0 2em;
|
|
}
|
|
|
|
header h1 {
|
|
font-size: 1.3em;
|
|
margin: 0.2em 0 0.4em;
|
|
padding: 0;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
header h1 a {
|
|
color: var(--fg);
|
|
}
|
|
|
|
header p {
|
|
color: var(--fg-dim);
|
|
margin: 0;
|
|
padding: 0;
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
article {
|
|
line-height: 1.6;
|
|
padding: 1.5em 2em 2em;
|
|
}
|
|
|
|
img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
div > a:only-child img,
|
|
figure > a:only-child img,
|
|
p > a:only-child img,
|
|
figure > img:only-child,
|
|
div > img:only-child,
|
|
p > img:only-child {
|
|
display: block;
|
|
margin: 1em auto;
|
|
float: none !important;
|
|
}
|
|
|
|
pre {
|
|
overflow: auto;
|
|
background: var(--code-bg);
|
|
padding: 1em;
|
|
border-radius: 6px;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
code {
|
|
background: var(--code-bg);
|
|
padding: 0.15em 0.35em;
|
|
border-radius: 3px;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
pre code {
|
|
background: none;
|
|
padding: 0;
|
|
}
|
|
|
|
blockquote {
|
|
border-left: 3px solid var(--blockquote-border);
|
|
margin-left: 0;
|
|
padding-left: 1em;
|
|
color: var(--fg-dim);
|
|
font-style: italic;
|
|
}
|