cosmos-docusaurus-theme 2.0.2 → 2.0.3
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 +25 -1
- package/README.md +34 -33
- package/package.json +12 -3
- package/src/css/theme.css +1061 -259
- package/src/index.js +57 -9
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,30 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [2.0.3] — 2026-03-11
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Makefile** — developer targets: `lint`, `lint-css`, `lint-js`, `lint-md`,
|
|
15
|
+
`lint-format`, `format`, `lint-fix`, `security`, `audit`, `install`,
|
|
16
|
+
`demo-build`, `demo-start`, `demo-serve`, `demo-clear`, `docker-build`,
|
|
17
|
+
`docker-up`, `docker-down`, `clean`
|
|
18
|
+
- **ESLint** (`eslint@9`, `@eslint/js`) — flat config (`eslint.config.mjs`),
|
|
19
|
+
lints `src/**/*.js`; rules: `no-unused-vars` (allow `_` prefix), `no-console off`
|
|
20
|
+
- **Prettier** (`prettier@3`) — formats CSS, JS, JSON, MD; `.prettierrc` + `.prettierignore`
|
|
21
|
+
- **markdownlint-cli** (`@0.48`) — lints `*.md` and `docs/**/*.md`; `.markdownlint.json`
|
|
22
|
+
with `MD024: siblings_only` (CHANGELOG-friendly), `MD013/MD033/MD041` disabled
|
|
23
|
+
- `npm` scripts: `lint:js`, `lint:md`, `lint:format`, `format`, `lint:fix`;
|
|
24
|
+
`lint` now runs all four linters in sequence
|
|
25
|
+
- **CI** — `lint` job extended with JS (ESLint), Markdown, and Prettier steps
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- `README.md`: `MD001` heading jump `###` → `##` for Live Demo link; `MD060` table
|
|
30
|
+
pipe spacing on two tables; Development section updated to reference `make` commands
|
|
31
|
+
- `CHANGELOG.md`: `MD004` unordered list style — `+` continuation replaced with `and`
|
|
32
|
+
- `src/css/theme.css`: reformatted by Prettier (alignment, spacing — no logic change)
|
|
33
|
+
|
|
10
34
|
## [2.0.2] — 2026-03-11
|
|
11
35
|
|
|
12
36
|
### Added
|
|
@@ -85,7 +109,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
85
109
|
- **Search position**: add `{ type: 'search' }` in demo config before external links
|
|
86
110
|
(CSS `order` alone insufficient when easyops inserts search last in DOM)
|
|
87
111
|
- **Search CSS selectors**: `[class*="navbarSearchContainer"]` with `order: -1 !important`
|
|
88
|
-
|
|
112
|
+
and `[class*="navbarSearch"]` — previous `.navbar__search` didn't match actual class
|
|
89
113
|
- **Search input styling**: `!important` on bg/color to beat CSS module specificity
|
|
90
114
|
- **CTRL+K**: redesigned as compact transparent pill with clean kbd elements
|
|
91
115
|
- **colorModeToggle**: `order: 1 !important` on wrapper div (not button)
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
[](https://docusaurus.io)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## [Live Demo](https://sckyzo.github.io/cosmos-docusaurus-theme/) · [Releases](https://github.com/SckyzO/cosmos-docusaurus-theme/releases) · [npm](https://www.npmjs.com/package/cosmos-docusaurus-theme)
|
|
14
14
|
|
|
15
15
|
</div>
|
|
16
16
|
|
|
@@ -86,24 +86,24 @@ docker run -p 3000:3000 ghcr.io/sckyzo/cosmos-docusaurus-theme:latest
|
|
|
86
86
|
|
|
87
87
|
## What's covered
|
|
88
88
|
|
|
89
|
-
| Element
|
|
90
|
-
|
|
91
|
-
| Navbar + ghost buttons
|
|
92
|
-
| Sidebar + section labels
|
|
93
|
-
| Code blocks (all languages)
|
|
94
|
-
| Admonitions — AlertBanner style, rounded-2xl |
|
|
95
|
-
| Tables
|
|
96
|
-
| Tabs + synced tabs
|
|
97
|
-
| Details/summary — SectionCard style
|
|
98
|
-
| Cards — rounded-2xl + dark shadow
|
|
99
|
-
| Tags + Badges
|
|
100
|
-
| Breadcrumbs
|
|
101
|
-
| TOC — H2/H3 hierarchy + active pill
|
|
102
|
-
| Pagination
|
|
103
|
-
| Announcement bar
|
|
104
|
-
| Back-to-top + Progress bar
|
|
105
|
-
| Algolia DocSearch
|
|
106
|
-
| Smooth dark/light transition
|
|
89
|
+
| Element | Styled |
|
|
90
|
+
| -------------------------------------------- | :----: |
|
|
91
|
+
| Navbar + ghost buttons | ✅ |
|
|
92
|
+
| Sidebar + section labels | ✅ |
|
|
93
|
+
| Code blocks (all languages) | ✅ |
|
|
94
|
+
| Admonitions — AlertBanner style, rounded-2xl | ✅ |
|
|
95
|
+
| Tables | ✅ |
|
|
96
|
+
| Tabs + synced tabs | ✅ |
|
|
97
|
+
| Details/summary — SectionCard style | ✅ |
|
|
98
|
+
| Cards — rounded-2xl + dark shadow | ✅ |
|
|
99
|
+
| Tags + Badges | ✅ |
|
|
100
|
+
| Breadcrumbs | ✅ |
|
|
101
|
+
| TOC — H2/H3 hierarchy + active pill | ✅ |
|
|
102
|
+
| Pagination | ✅ |
|
|
103
|
+
| Announcement bar | ✅ |
|
|
104
|
+
| Back-to-top + Progress bar | ✅ |
|
|
105
|
+
| Algolia DocSearch | ✅ |
|
|
106
|
+
| Smooth dark/light transition | ✅ |
|
|
107
107
|
|
|
108
108
|
---
|
|
109
109
|
|
|
@@ -114,13 +114,13 @@ Override any CSS variable in your own `custom.css`:
|
|
|
114
114
|
```css title="src/css/custom.css"
|
|
115
115
|
/* Brand color */
|
|
116
116
|
:root {
|
|
117
|
-
--ifm-color-primary:
|
|
118
|
-
--ifm-color-primary-dark:
|
|
119
|
-
--ifm-color-primary-darker:
|
|
117
|
+
--ifm-color-primary: #e11d48;
|
|
118
|
+
--ifm-color-primary-dark: #be123c;
|
|
119
|
+
--ifm-color-primary-darker: #9f1239;
|
|
120
120
|
--ifm-color-primary-darkest: #881337;
|
|
121
|
-
--ifm-color-primary-light:
|
|
121
|
+
--ifm-color-primary-light: #fb7185;
|
|
122
122
|
--ifm-color-primary-lighter: #fda4af;
|
|
123
|
-
--ifm-color-primary-lightest
|
|
123
|
+
--ifm-color-primary-lightest: #ffe4e6;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/* Font */
|
|
@@ -136,22 +136,23 @@ for all available tokens (dark + light with visual swatches).
|
|
|
136
136
|
|
|
137
137
|
## Utility classes
|
|
138
138
|
|
|
139
|
-
| Class
|
|
140
|
-
|
|
139
|
+
| Class | Usage |
|
|
140
|
+
| ----------------------------------- | ---------------------------------------------- |
|
|
141
141
|
| `.method-get/post/put/delete/patch` | HTTP method labels (monospace, semantic color) |
|
|
142
|
-
| `.status-ok/warn/crit/unknown`
|
|
143
|
-
| `.state-ok/warn/crit/unknown`
|
|
142
|
+
| `.status-ok/warn/crit/unknown` | Health state labels |
|
|
143
|
+
| `.state-ok/warn/crit/unknown` | Aliases for the above |
|
|
144
144
|
|
|
145
145
|
---
|
|
146
146
|
|
|
147
147
|
## Development
|
|
148
148
|
|
|
149
149
|
```bash
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
#
|
|
154
|
-
|
|
150
|
+
make install # install devDependencies
|
|
151
|
+
make lint # CSS + JS + Markdown + format check
|
|
152
|
+
make security # npm audit + no-runtime-deps check
|
|
153
|
+
make demo-build # build demo static site
|
|
154
|
+
make demo-start # dev server at http://localhost:3000
|
|
155
|
+
make docker-up # demo in Docker at http://localhost:3000
|
|
155
156
|
```
|
|
156
157
|
|
|
157
158
|
---
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cosmos-docusaurus-theme",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "A clean, dark-first Docusaurus
|
|
3
|
+
"version": "2.0.3",
|
|
4
|
+
"description": "A clean, dark-first Docusaurus theme aligned with the Rackscope Void/Slate design system — CSS-only, IBM Plex Mono + Outfit typography, brand indigo",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docusaurus",
|
|
7
7
|
"docusaurus-theme",
|
|
@@ -35,10 +35,19 @@
|
|
|
35
35
|
],
|
|
36
36
|
"scripts": {
|
|
37
37
|
"lint:css": "stylelint \"src/css/**/*.css\"",
|
|
38
|
-
"lint": "
|
|
38
|
+
"lint:js": "eslint src/",
|
|
39
|
+
"lint:md": "markdownlint \"*.md\" \"docs/**/*.md\"",
|
|
40
|
+
"lint:format": "prettier --check \"src/**/*.{js,css}\" \"*.{json,md}\"",
|
|
41
|
+
"lint": "npm run lint:css && npm run lint:js && npm run lint:md && npm run lint:format",
|
|
42
|
+
"format": "prettier --write \"src/**/*.{js,css}\" \"*.{json,md}\"",
|
|
43
|
+
"lint:fix": "stylelint --fix \"src/css/**/*.css\" && eslint --fix src/ && prettier --write \"src/**/*.{js,css}\" \"*.{json,md}\"",
|
|
39
44
|
"audit:check": "npm audit --audit-level=moderate"
|
|
40
45
|
},
|
|
41
46
|
"devDependencies": {
|
|
47
|
+
"@eslint/js": "^9.39.4",
|
|
48
|
+
"eslint": "^9.39.4",
|
|
49
|
+
"markdownlint-cli": "^0.48.0",
|
|
50
|
+
"prettier": "^3.8.1",
|
|
42
51
|
"stylelint": "^17.4.0",
|
|
43
52
|
"stylelint-config-standard": "^40.0.0"
|
|
44
53
|
},
|