mirror of
https://github.com/amdhj22/rbr.obsidian.git
synced 2026-07-22 04:40:27 +00:00
Refine inline markup colors and add hero-shot demo
theme.css: - Italic switches from paddock green to livery_blue_bright (#4D7EFF) — RBR carbody royal blue, AAA contrast, sparingly distinct from the trio. - Blockquote foreground uses kerb_red_pure (#cc1e4a) so the quote text shares the red wash family with its border + background tint. - .cm-quote (live preview / source mode token) now follows --blockquote-color so reading view and editor render the same color. - .HyperMD-quote-* line classes and direct .markdown-rendered blockquote selectors enforce the color when external rules try to override. - Strikethrough (~~text~~) now fades to subtext-0; covers .markdown- rendered del/s and .cm-strikethrough since Obsidian has no dedicated variable for it. examples/hero-shot.md: - New dense demo note that exercises every RBR visual element in one viewport: trio headings (h1-h6), bold/italic/highlight/strikethrough, yellow tag pills, four diagnostic callouts, syntax-highlighted Rust code, right-aligned table, mixed checkbox state, blockquote, internal + external + unresolved links. Use as the README hero shot source.
This commit is contained in:
parent
b942396734
commit
2fcb4f25f5
2 changed files with 107 additions and 3 deletions
77
examples/hero-shot.md
Normal file
77
examples/hero-shot.md
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
---
|
||||
created: 2026-05-07 11:50
|
||||
tags: [theme, hero, demo, rbr]
|
||||
---
|
||||
|
||||
# RBR — Three-accent navy theme
|
||||
|
||||
> Kerb red marks the **active**. RB yellow flags **attention**. Chequer white points to **functions**. Everything else steps back.
|
||||
|
||||
## Trio at a glance #theme #obsidian #f1
|
||||
|
||||
The trio drives every choice — **bold takes white**, *italic carries livery blue*, and ==yellow highlights== call you back. ~~Strikethrough~~ fades into subtext.
|
||||
|
||||
### Diagnostics callouts
|
||||
|
||||
> [!warning] Warning
|
||||
> RB Yellow flags what needs attention before the next lap.
|
||||
|
||||
> [!tip] Tip
|
||||
> Paddock green carries success — added files, passing tests.
|
||||
|
||||
> [!error] Error
|
||||
> Kerb **bright** owns errors and deletions. Kerb **red** is reserved for "this one."
|
||||
|
||||
> [!info] Info
|
||||
> Oracle blue handles info, links, and the k8s context indicator.
|
||||
|
||||
### Code — syntax trio
|
||||
|
||||
```rust
|
||||
use std::collections::HashMap;
|
||||
|
||||
/// Sector delta against the pole lap.
|
||||
/// Returns total time gained or lost across all sectors.
|
||||
pub fn lap_delta(reference: &Lap, current: &Lap) -> f64 {
|
||||
let mut total = 0.0_f64;
|
||||
for (sector, time) in current.sectors.iter().enumerate() {
|
||||
total += time - reference.sectors[sector];
|
||||
}
|
||||
total
|
||||
}
|
||||
|
||||
const PIT_LIMITER: f32 = 80.0;
|
||||
const DRS_ZONES: usize = 3;
|
||||
```
|
||||
|
||||
Inline call: `lap_delta(&pole, ¤t)` — `lap_delta` lights up **chequer white** as the third accent at every call site.
|
||||
|
||||
### Standings
|
||||
|
||||
| # | Driver | Team | Best lap | Δ leader |
|
||||
|---:|---|---|---:|---:|
|
||||
| 1 | Verstappen | Red Bull | 1:18.234 | — |
|
||||
| 2 | Pérez | Red Bull | 1:18.501 | +0.267 |
|
||||
| 3 | Leclerc | Ferrari | 1:18.647 | +0.413 |
|
||||
|
||||
### Lap notes
|
||||
|
||||
1. Set up the corner
|
||||
2. Trail-brake to the apex
|
||||
3. Power down on exit
|
||||
|
||||
- [x] Brake earlier into Turn 7
|
||||
- [ ] Carry more apex speed
|
||||
- [ ] Trail throttle on exit
|
||||
|
||||
> "If you no longer go for a gap that exists, you are no longer a racing driver." — Ayrton Senna
|
||||
|
||||
#### h4 — paddock green
|
||||
|
||||
##### h5 — oracle blue
|
||||
|
||||
###### h6 — sky blue
|
||||
|
||||
---
|
||||
|
||||
[Style Settings plugin](https://github.com/mgmeyers/obsidian-style-settings) · [[Architecture]] · [[NotAFile]]
|
||||
33
theme.css
33
theme.css
|
|
@ -564,16 +564,26 @@ body.rbr-headings-trio .cm-header-6 {
|
|||
|
||||
--bold-color: var(--rbr-chequer-white);
|
||||
--bold-weight: 700;
|
||||
--italic-color: var(--rbr-paddock-green);
|
||||
--italic-color: var(--rbr-livery-blue-bright);
|
||||
|
||||
--blockquote-border-color: var(--rbr-accent);
|
||||
--blockquote-background-color: rgba(var(--rbr-accent-rgb), 0.06);
|
||||
--blockquote-color: var(--rbr-text);
|
||||
--blockquote-color: var(--rbr-kerb-red-pure);
|
||||
|
||||
--hr-color: var(--rbr-overlay-0);
|
||||
--hr-thickness: 2px;
|
||||
}
|
||||
|
||||
/* Strikethrough — fade into subtext.
|
||||
Obsidian has no dedicated variable for ~~text~~, so use direct selectors. */
|
||||
.markdown-rendered del,
|
||||
.markdown-rendered s,
|
||||
.markdown-preview-view del,
|
||||
.markdown-preview-view s,
|
||||
.cm-s-obsidian .cm-strikethrough {
|
||||
color: var(--rbr-subtext-0);
|
||||
}
|
||||
|
||||
/* ========================================================================
|
||||
Code — inline + block. Syntax tokens stay locked to RBR doctrine
|
||||
regardless of the active accent (keeps code legible).
|
||||
|
|
@ -621,7 +631,24 @@ body.rbr-headings-trio .cm-header-6 {
|
|||
.cm-s-obsidian span.cm-error { color: var(--rbr-kerb-red-bright); }
|
||||
.cm-s-obsidian span.cm-header { color: var(--rbr-accent); }
|
||||
.cm-s-obsidian span.cm-hr { color: var(--rbr-overlay-0); }
|
||||
.cm-s-obsidian span.cm-quote { color: var(--rbr-paddock-green); }
|
||||
.cm-s-obsidian span.cm-quote { color: var(--blockquote-color); }
|
||||
|
||||
/* Live-preview / source-mode quote line — Obsidian wraps each quoted line
|
||||
in .HyperMD-quote, which doesn't go through --blockquote-color by default.
|
||||
Force it so Reading view and Live preview match. */
|
||||
.cm-s-obsidian .HyperMD-quote,
|
||||
.cm-s-obsidian .HyperMD-quote-1,
|
||||
.cm-s-obsidian .HyperMD-quote-2,
|
||||
.cm-s-obsidian .HyperMD-quote-3 {
|
||||
color: var(--blockquote-color) !important;
|
||||
}
|
||||
|
||||
/* Reading view enforcement — some plugins/snippets paint blockquote color
|
||||
directly on the <blockquote> rather than letting --blockquote-color cascade */
|
||||
.markdown-rendered blockquote,
|
||||
.markdown-preview-view blockquote {
|
||||
color: var(--blockquote-color) !important;
|
||||
}
|
||||
|
||||
/* ========================================================================
|
||||
Tables
|
||||
|
|
|
|||
Loading…
Reference in a new issue