style(ui): add color-coded accents and tags to shortcut cards
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 2m44s
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 2m44s
Introduce per-card accent colors to enhance the visual hierarchy of the documentation shortcut cards. This includes adding left borders, colored eyebrows, and matching hover glows using CSS variables. Additionally, this commit: - Adds color-coded tags (GET, POST, JSON, etc.) for API links. - Implements retro-themed styling for both the shortcut cards and tags to maintain consistency with the classic 16-color VGA palette. - Applies the new accent classes to the API page template.
This commit is contained in:
@@ -801,26 +801,81 @@
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
/* Section intros sit on the black desktop: gold kicker, white title, light
|
||||
subtitle, and readable inline code (not the default black-on-black). */
|
||||
:root[data-theme="retro"] .panel-head .kicker {
|
||||
color: #ffd966;
|
||||
display: block;
|
||||
/* Section intro becomes a real Win98 window: silver body, the <h2> a navy
|
||||
title bar with a fake close button, and the subtitle as black body text.
|
||||
This fixes the default black-on-black inline code in headings/intros. */
|
||||
:root[data-theme="retro"] .panel-head {
|
||||
max-width: none;
|
||||
margin-bottom: 1.5rem;
|
||||
padding: 1rem;
|
||||
background: linear-gradient(to bottom, #ffffff, 4%, #c0c0c0 8%);
|
||||
background-color: #c0c0c0;
|
||||
border: 1px solid #000000;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
:root[data-theme="retro"] .panel-head h2,
|
||||
/* The kicker is redundant once the title sits in a title bar; hide it so the
|
||||
bar can hug the top edge (the markup puts the kicker before the h2). */
|
||||
:root[data-theme="retro"] .panel-head .kicker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root[data-theme="retro"] .panel-head h2 {
|
||||
position: relative;
|
||||
margin: -1rem -1rem 1rem;
|
||||
padding: 0.35rem 1.8rem 0.35rem 0.5rem;
|
||||
background: linear-gradient(to right, #000078, 80%, #0f80cd);
|
||||
color: #ffffff;
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Inline code in the title (e.g. "The warpbox CLI") reads white on the bar
|
||||
instead of the default black. */
|
||||
:root[data-theme="retro"] .panel-head h2 code {
|
||||
color: #ffffff;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
:root[data-theme="retro"] .panel-head h2::after {
|
||||
content: "\2715";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0.4rem;
|
||||
transform: translateY(-50%);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 1.15rem;
|
||||
height: 1rem;
|
||||
background: #c0c0c0;
|
||||
color: #000000;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 700;
|
||||
box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #ffffff, inset -2px -2px 0 #808080, inset 2px 2px 0 #dfdfdf;
|
||||
}
|
||||
|
||||
:root[data-theme="retro"] .panel-head .lead {
|
||||
color: #1a1a1a;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Inline code in the subtitle: sunken white field, black text. */
|
||||
:root[data-theme="retro"] .panel-head .lead code {
|
||||
color: #000000;
|
||||
background: #ffffff;
|
||||
border: 1px solid #808080;
|
||||
padding: 0 0.2rem;
|
||||
}
|
||||
|
||||
/* The lone "Quick links" label on the home desktop stays light. */
|
||||
:root[data-theme="retro"] .section-label {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
:root[data-theme="retro"] .panel-head .lead {
|
||||
color: #cfd8ff;
|
||||
}
|
||||
|
||||
:root[data-theme="retro"] .panel-head .lead code {
|
||||
color: #ffffff;
|
||||
background: #000078;
|
||||
padding: 0 0.2rem;
|
||||
/* ShareX step lists are light-muted by default; black on the silver window. */
|
||||
:root[data-theme="retro"] .docs-steps {
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
/* Each card heading becomes a Win98 title bar with a fake close button.
|
||||
@@ -903,6 +958,7 @@
|
||||
:root[data-theme="retro"] .shortcut-card:hover {
|
||||
transform: none;
|
||||
background-color: #d4d0c8;
|
||||
box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #ffffff, inset -2px -2px 0 #808080, inset 2px 2px 0 #dfdfdf;
|
||||
}
|
||||
|
||||
:root[data-theme="retro"] .shortcut-eyebrow {
|
||||
@@ -927,6 +983,14 @@
|
||||
border: 1px solid #000000;
|
||||
}
|
||||
|
||||
/* Colour-coded badges in the classic 16-colour VGA palette, with black
|
||||
borders so they read like little Win98 toolbar icons. */
|
||||
:root[data-theme="retro"] .link-pill .tag-get { background: #0000aa; color: #ffffff; }
|
||||
:root[data-theme="retro"] .link-pill .tag-post { background: #008000; color: #ffffff; }
|
||||
:root[data-theme="retro"] .link-pill .tag-json { background: #aa00aa; color: #ffffff; }
|
||||
:root[data-theme="retro"] .link-pill .tag-key { background: #aa5500; color: #ffffff; }
|
||||
:root[data-theme="retro"] .link-pill .tag-help { background: #00aaaa; color: #000000; }
|
||||
|
||||
/* CLI download cards = silver windows. */
|
||||
:root[data-theme="retro"] .download-card {
|
||||
background: linear-gradient(to bottom, #ffffff, 4%, #c0c0c0 8%);
|
||||
|
||||
Reference in New Issue
Block a user