cosmos-docusaurus-theme 1.2.5 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,29 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ---
9
9
 
10
+ ## [1.2.6] — 2026-03-10
11
+
12
+ ### Added
13
+
14
+ - **Sidebar icons** — category icon system via `className: 'sidebar-cat-*'` in `sidebars.js`.
15
+ 10 Lucide-style SVG icons (rocket, monitor, pencil, puzzle, sliders, folder, server,
16
+ database, layers, grid, code). CSS-only with dark-mode `filter:invert(1)`.
17
+ - **Sidebar sub-menu vertical line** — Rackscope-style left border on nested items.
18
+ Sub-items: slightly smaller font, muted color, left padding.
19
+ - **Sidebar version badge** — always pinned at the very bottom of the sidebar viewport
20
+ (`[class*="sidebarViewport"]` flex-column + `::after` outside scroll area).
21
+ Hardcoded backgrounds (#fff / #111827) to always cover scrolled content.
22
+ - **Ctrl+K hint redesign** — ghost style: transparent chips with hairline border,
23
+ `+` separator via `::before`, opacity 0.7 at rest, 0.9 on input focus.
24
+ Preserves plugin positioning (only kbd elements restyled).
25
+
26
+ ### Changed
27
+
28
+ - Search input: `min-width` 220px → 300px; font-family → `var(--ifm-font-family-base)` (Outfit)
29
+ - Demo `docusaurus.config.js`: `{ type:'search' }` positioned before external links;
30
+ `searchBarShortcutHint: true`
31
+ - Dockerfile: copies full project so `file:..` resolves during local dev
32
+
10
33
  ## [1.2.5] — 2026-03-10
11
34
 
12
35
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosmos-docusaurus-theme",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "A clean, dark-first Docusaurus CSS theme based on TailAdmin design system with Outfit typography",
5
5
  "keywords": [
6
6
  "docusaurus",
package/src/css/theme.css CHANGED
@@ -939,33 +939,31 @@ details > :not(summary) {
939
939
  > input.navbar__search-input.searchInput_xxx (CSS module).
940
940
  We need !important on background/color to beat the CSS module specificity. */
941
941
 
942
+ /* Search input — wider, Outfit font, consistent with Rackscope AppSearch */
942
943
  .navbar__search-input {
943
944
  height: 38px !important;
944
- min-width: 220px !important;
945
+ min-width: 300px !important;
945
946
  border-radius: 8px !important;
946
947
  border: 1px solid var(--ifm-toc-border-color) !important;
948
+ font-family: var(--ifm-font-family-base) !important;
947
949
  font-size: 0.875rem !important;
948
- transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s !important;
949
- }
950
-
951
- /* Light (Slate): bg-gray-100 */
952
- .navbar__search-input {
953
950
  background-color: #f3f4f6 !important;
954
951
  color: #1a1714 !important;
952
+ transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s !important;
955
953
  }
956
954
 
957
955
  .navbar__search-input::placeholder {
958
956
  color: #8a8479 !important;
957
+ font-family: var(--ifm-font-family-base) !important;
959
958
  }
960
959
 
961
- /* Dark (Void): bg-gray-800 */
962
960
  [data-theme='dark'] .navbar__search-input {
963
961
  background-color: #1f2937 !important;
964
962
  color: #e5e5e5 !important;
965
963
  }
966
964
 
967
965
  [data-theme='dark'] .navbar__search-input::placeholder {
968
- color: #71717a !important;
966
+ color: #6b7280 !important;
969
967
  }
970
968
 
971
969
  .navbar__search-input:focus {
@@ -980,34 +978,50 @@ details > :not(summary) {
980
978
  box-shadow: 0 0 0 3px rgb(117, 146, 255, 0.12) !important;
981
979
  }
982
980
 
983
- /* ── Ctrl+K keyboard shortcut compact pill style ───────────────────────── */
984
- /* Replaces the default split kbd elements with a unified minimal appearance */
985
- [class*="searchHintContainer"] {
986
- gap: 2px !important;
987
- }
981
+ /* Ctrl+K hintghost style: transparent, blends into the input surface.
982
+ Uses currentColor border so it adapts to both Void and Slate automatically. */
988
983
 
989
- [class*="searchHint"] {
984
+ /* Inner hint wrapper: flex row for the two keys */
985
+ [class*="searchHint"]:not([class*="Container"]) {
990
986
  display: inline-flex !important;
991
987
  align-items: center !important;
992
- gap: 1px !important;
988
+ gap: 0 !important;
989
+ }
990
+
991
+ /* Each key: ghost chip, no fill, hairline border */
992
+ [class*="searchHintContainer"] kbd {
993
993
  background: transparent !important;
994
994
  border: 1px solid var(--ifm-toc-border-color) !important;
995
- border-radius: 5px !important;
995
+ border-radius: 4px !important;
996
+ color: var(--ifm-font-color-secondary) !important;
997
+ font-family: var(--ifm-font-family-monospace) !important;
998
+ font-size: 0.6rem !important;
999
+ font-weight: 400 !important;
1000
+ letter-spacing: 0.02em !important;
996
1001
  padding: 1px 5px !important;
1002
+ line-height: 1.6 !important;
997
1003
  box-shadow: none !important;
1004
+ opacity: 0.7 !important;
998
1005
  }
999
1006
 
1000
- /* Individual kbd keys inside the hint */
1001
- [class*="searchHint"] kbd {
1002
- background: transparent !important;
1003
- border: none !important;
1004
- border-radius: 0 !important;
1005
- color: var(--ifm-font-color-secondary) !important;
1006
- font-size: 0.68rem !important;
1007
+ /* "+" separator between the two kbd elements */
1008
+ [class*="searchHintContainer"] kbd + kbd {
1009
+ margin-left: 2px !important;
1010
+ }
1011
+
1012
+ [class*="searchHintContainer"] kbd + kbd::before {
1013
+ content: '+';
1007
1014
  font-family: var(--ifm-font-family-monospace) !important;
1008
- padding: 0 !important;
1009
- box-shadow: none !important;
1010
- line-height: 1.4 !important;
1015
+ font-size: 0.6rem !important;
1016
+ color: var(--ifm-font-color-secondary) !important;
1017
+ opacity: 0.5 !important;
1018
+ margin-right: 2px !important;
1019
+ }
1020
+
1021
+ /* Whole hint brightens on input focus — discovery moment */
1022
+ .navbar__search-input:focus ~ [class*="searchHintContainer"],
1023
+ .navbar__search-input:focus + [class*="searchHintContainer"] {
1024
+ opacity: 0.9 !important;
1011
1025
  }
1012
1026
 
1013
1027
  /* ── Right-side navbar order: Search | GitHub/npm | Theme ────────────────── */
@@ -1097,6 +1111,176 @@ details > :not(summary) {
1097
1111
  background: #475467;
1098
1112
  }
1099
1113
 
1114
+ /* =============================================================================
1115
+ SIDEBAR — RACKSCOPE STYLE
1116
+ Vertical line for nested items + icon system via className + version footer.
1117
+ ============================================================================= */
1118
+
1119
+ /* ── Nested items — vertical left border ─────────────────────────────────── */
1120
+ /* Like Rackscope: [Category Title] */
1121
+ /* │ sub item */
1122
+ /* │ sub item */
1123
+
1124
+ .theme-doc-sidebar-menu .menu__list .menu__list {
1125
+ margin-left: 8px;
1126
+ padding-left: 12px;
1127
+ border-left: 1.5px solid var(--ifm-toc-border-color);
1128
+ }
1129
+
1130
+ [data-theme='dark'] .theme-doc-sidebar-menu .menu__list .menu__list {
1131
+ border-left-color: #374151; /* Void gray-700 — slightly more visible */
1132
+ }
1133
+
1134
+ /* Sub-items: slightly smaller + muted when inactive */
1135
+ .menu__list .menu__list > .menu__list-item > .menu__link {
1136
+ font-size: 0.8375rem;
1137
+ padding-left: 12px;
1138
+ }
1139
+
1140
+ .menu__list .menu__list > .menu__list-item > .menu__link:not(.menu__link--active) {
1141
+ color: var(--ifm-font-color-secondary);
1142
+ }
1143
+
1144
+ [data-theme='dark'] .menu__list .menu__list > .menu__list-item > .menu__link:not(.menu__link--active) {
1145
+ color: #71717a;
1146
+ }
1147
+
1148
+ /* ── Category icons — via className in sidebars.js ───────────────────────── */
1149
+ /* Usage: { type: 'category', label: '...', className: 'sidebar-cat-rocket'} */
1150
+ /* Icon = black SVG via ::before — inverted in dark mode with filter:invert */
1151
+
1152
+ [class*="sidebar-cat-"] > .menu__list-item-collapsible > .menu__link {
1153
+ display: flex;
1154
+ align-items: center;
1155
+ }
1156
+
1157
+ [class*="sidebar-cat-"] > .menu__list-item-collapsible > .menu__link::before {
1158
+ content: '';
1159
+ display: inline-block;
1160
+ flex-shrink: 0;
1161
+ width: 15px;
1162
+ height: 15px;
1163
+ margin-right: 8px;
1164
+ background-size: 15px 15px;
1165
+ background-repeat: no-repeat;
1166
+ background-position: center;
1167
+ opacity: 0.6;
1168
+ transition: opacity 0.12s;
1169
+ }
1170
+
1171
+ /* Dark mode — invert the black SVG to white */
1172
+ [data-theme='dark'] [class*="sidebar-cat-"] > .menu__list-item-collapsible > .menu__link::before {
1173
+ filter: invert(1);
1174
+ }
1175
+
1176
+ /* Hover + active state — full opacity */
1177
+ [class*="sidebar-cat-"] > .menu__list-item-collapsible > .menu__link--active::before,
1178
+ [class*="sidebar-cat-"] > .menu__list-item-collapsible:hover > .menu__link::before {
1179
+ opacity: 1;
1180
+ }
1181
+
1182
+ /* ── Icon definitions (Lucide-style SVG, black stroke, 24×24) ───────────── */
1183
+
1184
+ /* Rocket — Getting Started, Deployment */
1185
+ .sidebar-cat-rocket > .menu__list-item-collapsible > .menu__link::before {
1186
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z'/%3E%3Cpath d='M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0'/%3E%3Cpath d='M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E");
1187
+ }
1188
+
1189
+ /* Monitor — Views */
1190
+ .sidebar-cat-monitor > .menu__list-item-collapsible > .menu__link::before {
1191
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cline x1='8' y1='21' x2='16' y2='21'/%3E%3Cline x1='12' y1='17' x2='12' y2='21'/%3E%3C/svg%3E");
1192
+ }
1193
+
1194
+ /* Pencil — Editors */
1195
+ .sidebar-cat-pencil > .menu__list-item-collapsible > .menu__link::before {
1196
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5z'/%3E%3C/svg%3E");
1197
+ }
1198
+
1199
+ /* Puzzle — Plugins & Features */
1200
+ .sidebar-cat-puzzle > .menu__list-item-collapsible > .menu__link::before {
1201
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12h4a2 2 0 0 1 2 2v1a2 2 0 0 0 4 0v-1a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M14 2v4a2 2 0 0 1-2 2h-1a2 2 0 0 0 0 4h1a2 2 0 0 1 2 2v4'/%3E%3C/svg%3E");
1202
+ }
1203
+
1204
+ /* SlidersHorizontal — Interface, Core, Settings */
1205
+ .sidebar-cat-sliders > .menu__list-item-collapsible > .menu__link::before {
1206
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='21' y1='4' x2='14' y2='4'/%3E%3Cline x1='10' y1='4' x2='3' y2='4'/%3E%3Ccircle cx='12' cy='4' r='2'/%3E%3Cline x1='21' y1='12' x2='12' y2='12'/%3E%3Cline x1='8' y1='12' x2='3' y2='12'/%3E%3Ccircle cx='10' cy='12' r='2'/%3E%3Cline x1='21' y1='20' x2='16' y2='20'/%3E%3Cline x1='12' y1='20' x2='3' y2='20'/%3E%3Ccircle cx='14' cy='20' r='2'/%3E%3C/svg%3E");
1207
+ }
1208
+
1209
+ /* FolderOpen — Configuration */
1210
+ .sidebar-cat-folder > .menu__list-item-collapsible > .menu__link::before {
1211
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
1212
+ }
1213
+
1214
+ /* Server — Infrastructure */
1215
+ .sidebar-cat-server > .menu__list-item-collapsible > .menu__link::before {
1216
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='2' width='20' height='8' rx='2' ry='2'/%3E%3Crect x='2' y='14' width='20' height='8' rx='2' ry='2'/%3E%3Cline x1='6' y1='6' x2='6.01' y2='6'/%3E%3Cline x1='6' y1='18' x2='6.01' y2='18'/%3E%3C/svg%3E");
1217
+ }
1218
+
1219
+ /* Database — Data & Plugins */
1220
+ .sidebar-cat-database > .menu__list-item-collapsible > .menu__link::before {
1221
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='9' ry='3'/%3E%3Cpath d='M21 12c0 1.66-4 3-9 3s-9-1.34-9-3'/%3E%3Cpath d='M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5'/%3E%3C/svg%3E");
1222
+ }
1223
+
1224
+ /* Layers — Component Reference */
1225
+ .sidebar-cat-layers > .menu__list-item-collapsible > .menu__link::before {
1226
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z'/%3E%3Cpath d='M22 17.65l-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65'/%3E%3Cpath d='M22 12.65l-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65'/%3E%3C/svg%3E");
1227
+ }
1228
+
1229
+ /* Grid2x2 — Showcase */
1230
+ .sidebar-cat-grid > .menu__list-item-collapsible > .menu__link::before {
1231
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E");
1232
+ }
1233
+
1234
+ /* Code2 — API, Development, Architecture features */
1235
+ .sidebar-cat-code > .menu__list-item-collapsible > .menu__link::before {
1236
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E");
1237
+ }
1238
+
1239
+ /* ── Sidebar version badge — always at the very bottom ───────────────────── */
1240
+ /* Architecture: .theme-doc-sidebar is the sticky viewport with fixed height.
1241
+ Converting it to flex-column + making the scrollable nav flex:1 means the
1242
+ ::after pseudo-element is a flex-child OUTSIDE the scroll area — always
1243
+ pinned to the bottom regardless of content height or scroll position. */
1244
+ :root {
1245
+ --cosmos-version: "cosmos v1.2.6";
1246
+ }
1247
+
1248
+ /* Sidebar viewport — flex column so version badge is always pinned at the bottom.
1249
+ Targets the CSS-module class via attribute substring match (Docusaurus 3). */
1250
+ [class*="sidebarViewport"] {
1251
+ display: flex !important;
1252
+ flex-direction: column !important;
1253
+ }
1254
+
1255
+ /* The scrollable menu fills the available space */
1256
+ [class*="sidebarViewport"] > .menu {
1257
+ flex: 1 !important;
1258
+ min-height: 0 !important;
1259
+ }
1260
+
1261
+ /* Version badge — flex child OUTSIDE the scroll area, always at the very bottom */
1262
+ [class*="sidebarViewport"]::after {
1263
+ content: var(--cosmos-version);
1264
+ flex-shrink: 0;
1265
+ display: block;
1266
+ padding: 8px 0 12px;
1267
+ text-align: center;
1268
+ font-family: var(--ifm-font-family-monospace);
1269
+ font-size: 0.58rem;
1270
+ font-weight: 500;
1271
+ letter-spacing: 0.12em;
1272
+ text-transform: uppercase;
1273
+ color: #9ca3af;
1274
+ background: #fff;
1275
+ border-top: 1px solid #e5e7eb;
1276
+ }
1277
+
1278
+ [data-theme='dark'] [class*="sidebarViewport"]::after {
1279
+ color: #374151;
1280
+ background: #111827;
1281
+ border-top-color: #1f2937;
1282
+ }
1283
+
1100
1284
  /* =============================================================================
1101
1285
  OPTIONAL UTILITY CLASSES
1102
1286
  The following classes are not required for the theme to work.