@docpensieve/theme 0.3.0-beta.1 → 0.3.0
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/package.json +2 -2
- package/styles/prose.css +73 -0
- package/styles/structure.css +174 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docpensieve/theme",
|
|
3
|
-
"version": "0.3.0
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "DocPensieve theme system: composable providers (Tailwind, custom)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"types"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@docpensieve/shared": "0.3.0
|
|
23
|
+
"@docpensieve/shared": "0.3.0",
|
|
24
24
|
"tailwindcss": "^4.3.3"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
package/styles/prose.css
CHANGED
|
@@ -160,3 +160,76 @@
|
|
|
160
160
|
border-color: var(--dp-text-soft);
|
|
161
161
|
color: var(--dp-text);
|
|
162
162
|
}
|
|
163
|
+
|
|
164
|
+
/* The links of the header, and the menu that holds them on a narrow screen. */
|
|
165
|
+
.dp-header-links a {
|
|
166
|
+
color: var(--dp-text-soft);
|
|
167
|
+
font-weight: 500;
|
|
168
|
+
text-decoration: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.dp-header-links a:hover {
|
|
172
|
+
color: var(--dp-text);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.dp-menu > summary {
|
|
176
|
+
border: 1px solid var(--dp-border);
|
|
177
|
+
border-radius: var(--dp-radius);
|
|
178
|
+
color: var(--dp-text-soft);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.dp-menu > summary:hover,
|
|
182
|
+
.dp-menu[open] > summary {
|
|
183
|
+
border-color: var(--dp-text-soft);
|
|
184
|
+
color: var(--dp-text);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.dp-menu-panel {
|
|
188
|
+
border: 1px solid var(--dp-border);
|
|
189
|
+
border-radius: var(--dp-radius);
|
|
190
|
+
background: var(--dp-bg);
|
|
191
|
+
box-shadow: 0 8px 24px var(--dp-shadow);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* The byline of a page: quieter than the text it introduces. */
|
|
195
|
+
.dp-byline {
|
|
196
|
+
border-block-end: 1px solid var(--dp-border);
|
|
197
|
+
font-size: 0.9rem;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.dp-byline-name {
|
|
201
|
+
font-weight: 600;
|
|
202
|
+
color: var(--dp-text);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.dp-byline-name a {
|
|
206
|
+
color: inherit;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.dp-byline-bio,
|
|
210
|
+
.dp-byline-dates {
|
|
211
|
+
color: var(--dp-text-soft);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.dp-byline-bio {
|
|
215
|
+
font-size: 0.85rem;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.dp-byline-avatar {
|
|
219
|
+
border: 1px solid var(--dp-border);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* The tags at the bottom of a page: quiet labels, set apart from the text. */
|
|
223
|
+
.dp-tags {
|
|
224
|
+
padding-block-start: 1.25rem;
|
|
225
|
+
border-block-start: 1px solid var(--dp-border);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.dp-tag {
|
|
229
|
+
padding: 0.15rem 0.7rem;
|
|
230
|
+
border: 1px solid var(--dp-border);
|
|
231
|
+
border-radius: 999px;
|
|
232
|
+
background: var(--dp-accent-soft);
|
|
233
|
+
color: var(--dp-text-soft);
|
|
234
|
+
font-size: 0.8rem;
|
|
235
|
+
}
|
package/styles/structure.css
CHANGED
|
@@ -160,6 +160,99 @@ body {
|
|
|
160
160
|
list-style: none;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
/*
|
|
164
|
+
* What the header offers beyond the brand — versions, links, search — is
|
|
165
|
+
* written twice, and shown once: in a row on a wide screen, behind a menu
|
|
166
|
+
* button on a narrow one. Its look is in prose.css.
|
|
167
|
+
*/
|
|
168
|
+
.dp-header-nav {
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
gap: 0.85rem;
|
|
172
|
+
margin-inline-start: auto;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.dp-header-links {
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
gap: 0.85rem;
|
|
179
|
+
margin: 0;
|
|
180
|
+
padding: 0;
|
|
181
|
+
list-style: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.dp-header-nav .dp-search {
|
|
185
|
+
margin-inline-start: 0;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.dp-menu {
|
|
189
|
+
display: none;
|
|
190
|
+
position: relative;
|
|
191
|
+
margin-inline-start: auto;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.dp-menu > summary {
|
|
195
|
+
display: inline-flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
justify-content: center;
|
|
198
|
+
inline-size: 2rem;
|
|
199
|
+
block-size: 2rem;
|
|
200
|
+
cursor: pointer;
|
|
201
|
+
list-style: none;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.dp-menu > summary::-webkit-details-marker {
|
|
205
|
+
display: none;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.dp-menu > summary svg {
|
|
209
|
+
inline-size: 1.2rem;
|
|
210
|
+
block-size: 1.2rem;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.dp-menu-panel {
|
|
214
|
+
position: absolute;
|
|
215
|
+
top: calc(100% + 0.5rem);
|
|
216
|
+
right: 0;
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: column;
|
|
219
|
+
align-items: stretch;
|
|
220
|
+
gap: 0.9rem;
|
|
221
|
+
min-inline-size: 15rem;
|
|
222
|
+
padding: 1rem;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.dp-menu-panel .dp-header-links {
|
|
226
|
+
flex-direction: column;
|
|
227
|
+
align-items: flex-start;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* In the panel, the version list unfolds in place rather than over it. */
|
|
231
|
+
.dp-menu-panel .dp-versions-list {
|
|
232
|
+
position: static;
|
|
233
|
+
margin-block-start: 0.4rem;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.dp-menu-panel .dp-search input {
|
|
237
|
+
max-inline-size: none;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* Beside a menu, the light / dark switch no longer pushes itself right. */
|
|
241
|
+
.dp-header-nav ~ .dp-scheme-toggle,
|
|
242
|
+
.dp-menu ~ .dp-scheme-toggle {
|
|
243
|
+
margin-inline-start: 0;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
@media (max-width: 48rem) {
|
|
247
|
+
.dp-header-nav {
|
|
248
|
+
display: none;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.dp-menu {
|
|
252
|
+
display: block;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
163
256
|
/*
|
|
164
257
|
* A documentation page takes the whole available width, 25 pixels short of
|
|
165
258
|
* each edge. Three columns share the space — menu, content, table of
|
|
@@ -320,3 +413,84 @@ body {
|
|
|
320
413
|
scroll-behavior: auto;
|
|
321
414
|
}
|
|
322
415
|
}
|
|
416
|
+
|
|
417
|
+
/*
|
|
418
|
+
* The byline: who wrote the page, and when. Layout only — its colours and its
|
|
419
|
+
* type live in prose.css, shared by every theme.
|
|
420
|
+
*/
|
|
421
|
+
.dp-byline {
|
|
422
|
+
display: flex;
|
|
423
|
+
flex-direction: column;
|
|
424
|
+
gap: 0.75rem;
|
|
425
|
+
margin-block-end: 2rem;
|
|
426
|
+
padding-block-end: 1rem;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.dp-byline-authors {
|
|
430
|
+
display: flex;
|
|
431
|
+
flex-wrap: wrap;
|
|
432
|
+
gap: 1rem 1.5rem;
|
|
433
|
+
margin: 0;
|
|
434
|
+
padding: 0;
|
|
435
|
+
list-style: none;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.dp-byline-author {
|
|
439
|
+
display: grid;
|
|
440
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
441
|
+
grid-template-areas:
|
|
442
|
+
'avatar name'
|
|
443
|
+
'avatar bio';
|
|
444
|
+
gap: 0 0.65rem;
|
|
445
|
+
align-items: center;
|
|
446
|
+
max-inline-size: 32rem;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/* Without an avatar, the empty column would push the name to the right. */
|
|
450
|
+
.dp-byline-author:not(:has(.dp-byline-avatar)) {
|
|
451
|
+
grid-template-columns: minmax(0, 1fr);
|
|
452
|
+
grid-template-areas:
|
|
453
|
+
'name'
|
|
454
|
+
'bio';
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.dp-byline-avatar {
|
|
458
|
+
grid-area: avatar;
|
|
459
|
+
inline-size: 2.5rem;
|
|
460
|
+
block-size: 2.5rem;
|
|
461
|
+
border-radius: 999px;
|
|
462
|
+
object-fit: cover;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.dp-byline-name {
|
|
466
|
+
grid-area: name;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.dp-byline-bio {
|
|
470
|
+
grid-area: bio;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.dp-byline-dates {
|
|
474
|
+
display: flex;
|
|
475
|
+
flex-wrap: wrap;
|
|
476
|
+
gap: 0.25rem 1rem;
|
|
477
|
+
margin: 0;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/*
|
|
481
|
+
* The tags of a page, below the article. Layout only — their look is in
|
|
482
|
+
* prose.css.
|
|
483
|
+
*/
|
|
484
|
+
.dp-tags {
|
|
485
|
+
display: flex;
|
|
486
|
+
flex-wrap: wrap;
|
|
487
|
+
gap: 0.5rem;
|
|
488
|
+
margin: 2.5rem 0 0;
|
|
489
|
+
padding: 0;
|
|
490
|
+
list-style: none;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.dp-tag {
|
|
494
|
+
display: inline-flex;
|
|
495
|
+
align-items: center;
|
|
496
|
+
}
|