markupress 0.1.0 → 0.4.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/README.md +227 -97
- package/dist/content.d.ts +33 -8
- package/dist/content.d.ts.map +1 -1
- package/dist/content.js +174 -255
- package/dist/content.js.map +1 -1
- package/dist/controllers/shell.d.ts +2 -3
- package/dist/controllers/shell.d.ts.map +1 -1
- package/dist/controllers/shell.js +4 -12
- package/dist/controllers/shell.js.map +1 -1
- package/dist/git.d.ts +8 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +27 -0
- package/dist/git.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/markdown.d.ts +3 -1
- package/dist/markdown.d.ts.map +1 -1
- package/dist/markdown.js +10 -13
- package/dist/markdown.js.map +1 -1
- package/dist/navigation.d.ts +23 -31
- package/dist/navigation.d.ts.map +1 -1
- package/dist/navigation.js +48 -59
- package/dist/navigation.js.map +1 -1
- package/dist/site.d.ts +16 -26
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +91 -45
- package/dist/site.js.map +1 -1
- package/dist/versions.d.ts +4 -1
- package/dist/versions.d.ts.map +1 -1
- package/dist/versions.js +21 -41
- package/dist/versions.js.map +1 -1
- package/package.json +8 -7
- package/styles/prose.css +31 -0
- package/theme/chrome.html +38 -0
- package/theme/home.html +28 -0
- package/theme/shell.html +22 -33
- package/theme/theme.css +19 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markupress",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Versioned Markdown documentation built on HTMLKit and native declarative components.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,8 +45,10 @@
|
|
|
45
45
|
"vitest": "5.0.4",
|
|
46
46
|
"playwright": "1.64.0",
|
|
47
47
|
"@axe-core/playwright": "4.13.0",
|
|
48
|
-
"@nextwebwg/html-next": "1.0.0-alpha.
|
|
49
|
-
"@threadlabs/looma": "0.
|
|
48
|
+
"@nextwebwg/html-next": "1.0.0-alpha.57",
|
|
49
|
+
"@threadlabs/looma": "0.29.12",
|
|
50
|
+
"@types/markdown-it": "14.2.0",
|
|
51
|
+
"jsdom": "30.1.2"
|
|
50
52
|
},
|
|
51
53
|
"publishConfig": { "access": "public" },
|
|
52
54
|
"repository": {
|
|
@@ -58,8 +60,7 @@
|
|
|
58
60
|
"url": "https://github.com/threadlabs-studio/markupress/issues"
|
|
59
61
|
},
|
|
60
62
|
"dependencies": {
|
|
61
|
-
"@nextwebwg/htmlkit": "1.0.0-alpha.
|
|
62
|
-
"marked": "18.1.1",
|
|
63
|
+
"@nextwebwg/htmlkit": "1.0.0-alpha.57",
|
|
63
64
|
"parse5": "8.0.1",
|
|
64
65
|
"yaml": "2.9.1",
|
|
65
66
|
"postcss": "8.5.30",
|
|
@@ -67,8 +68,8 @@
|
|
|
67
68
|
"shiki": "4.5.0"
|
|
68
69
|
},
|
|
69
70
|
"peerDependencies": {
|
|
70
|
-
"@nextwebwg/html-next": "1.0.0-alpha.
|
|
71
|
-
"@threadlabs/looma": "
|
|
71
|
+
"@nextwebwg/html-next": "1.0.0-alpha.57",
|
|
72
|
+
"@threadlabs/looma": "0.29.12"
|
|
72
73
|
},
|
|
73
74
|
"bin": {
|
|
74
75
|
"markupress": "./dist/cli.js"
|
package/styles/prose.css
CHANGED
|
@@ -12,3 +12,34 @@ img, svg { max-width: 100%; }
|
|
|
12
12
|
table { border-collapse: collapse; display: block; max-width: 100%; overflow: auto; }
|
|
13
13
|
th, td { border: 1px solid var(--ui-border, #8885); padding: .4rem .75rem; }
|
|
14
14
|
:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
|
|
15
|
+
/* Looma Markdown's inline elements and blocks, drawn with the tokens LoomaEditor uses for them. */
|
|
16
|
+
[data-looma-chip] {
|
|
17
|
+
--_chip-surface: var(--ui-surface-subtle); --_chip-text: var(--ui-text-secondary);
|
|
18
|
+
padding: .08em .45em; border: var(--ui-border-width, 1px) solid color-mix(in srgb, var(--_chip-surface) 75%, var(--_chip-text) 25%);
|
|
19
|
+
border-radius: var(--ui-radius-round, 999px); background: var(--_chip-surface); color: var(--_chip-text);
|
|
20
|
+
font-size: var(--ui-font-size-sm, .85em); font-weight: var(--ui-font-medium, 500); box-decoration-break: clone;
|
|
21
|
+
}
|
|
22
|
+
[data-looma-chip][data-color="blue"] { --_chip-surface: var(--ui-info-soft); --_chip-text: var(--ui-info-subtle-text); }
|
|
23
|
+
[data-looma-chip][data-color="green"] { --_chip-surface: var(--ui-success-soft); --_chip-text: var(--ui-success-subtle-text); }
|
|
24
|
+
[data-looma-chip][data-color="yellow"] { --_chip-surface: var(--ui-warning-soft); --_chip-text: var(--ui-warning-subtle-text); }
|
|
25
|
+
[data-looma-chip][data-color="red"] { --_chip-surface: var(--ui-danger-soft); --_chip-text: var(--ui-danger-subtle-text); }
|
|
26
|
+
[data-looma-chip][data-color="purple"] { --_chip-surface: var(--ui-accent-soft); --_chip-text: var(--ui-accent-subtle-text); }
|
|
27
|
+
.looma-mention { padding: .08em .28em; border-radius: var(--ui-radius-sm, 4px); background: var(--ui-accent-soft); color: var(--ui-accent-active, var(--ui-accent)); font-weight: var(--ui-font-medium, 500); white-space: nowrap; }
|
|
28
|
+
ul[data-type="taskList"] { padding-left: .25rem; list-style: none; }
|
|
29
|
+
ul[data-type="taskList"] input { margin: 0 .5rem 0 0; accent-color: var(--ui-accent-solid, var(--ui-accent)); }
|
|
30
|
+
nav[data-looma-toc] { margin: 1rem 0; }
|
|
31
|
+
nav[data-looma-toc] :is(ol, ul, div)[role="list"] { margin: .25rem 0; padding-left: 1.25rem; }
|
|
32
|
+
nav[data-looma-toc] > [role="list"] { padding-left: 0; }
|
|
33
|
+
nav[data-looma-toc][data-format="numbered"] > ol, nav[data-looma-toc][data-format="bulleted"] > ul { padding-left: 1.25rem; }
|
|
34
|
+
figure:not(.code) { margin: 1.5rem 0; }
|
|
35
|
+
figure:not(.code) > figcaption { margin-top: .5rem; font-size: .9rem; color: var(--ui-text-muted, inherit); }
|
|
36
|
+
img[data-placement="center"] { display: block; margin-inline: auto; }
|
|
37
|
+
img[data-placement="wrap-left"] { float: left; margin: 0 1rem 1rem 0; }
|
|
38
|
+
img[data-placement="wrap-right"] { float: right; margin: 0 0 1rem 1rem; }
|
|
39
|
+
/* A home page's hero: its title, tagline and actions, beside its image on wide screens. */
|
|
40
|
+
.hero { display: grid; gap: 2rem; align-items: center; padding-block: 2rem 3rem; }
|
|
41
|
+
@media (min-width: 769px) { .hero:has(.hero-image) { grid-template-columns: 3fr 2fr; } }
|
|
42
|
+
.hero h1 { margin: 0 0 1rem; font-size: clamp(2.2rem, 6vw, 3.5rem); }
|
|
43
|
+
.hero p { margin: 0 0 1rem; font-size: 1.25rem; color: var(--ui-text-secondary, inherit); }
|
|
44
|
+
.hero .actions { margin-top: 1.5rem; }
|
|
45
|
+
.hero-image img { display: block; margin-inline: auto; max-block-size: min(18rem, 40vh); }
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<link rel="component" href="@threadlabs/looma/components/ui-button/ui-button.html">
|
|
2
|
+
<link rel="component" href="@threadlabs/looma/components/ui-badge/ui-badge.html">
|
|
3
|
+
<template component="markupress-header">
|
|
4
|
+
<defs>
|
|
5
|
+
<prop name="title" type="string" required>Site title</prop>
|
|
6
|
+
<prop name="home" type="string" required>Home URL</prop>
|
|
7
|
+
<prop name="logo" type="object({ light: string, dark: string })" nullable>Logo images for the light and dark themes</prop>
|
|
8
|
+
<prop name="badge" type="string" default="">Badge beside the title</prop>
|
|
9
|
+
<prop name="nav" type="list(object({ label: string, href: string, current: string, icon: string }))" required>Top navigation: the sections, then the configured links, each with an icon URL or ""</prop>
|
|
10
|
+
<prop name="dark" type="boolean" default="false">Whether the dark theme is on, which the layout's controller sets</prop></defs>
|
|
11
|
+
<header><slot name="menu"></slot>
|
|
12
|
+
<a class="brand" from:href="$home"><template $if="$logo"><img class="logo logo-light" from:src="$logo.light" alt=""><img class="logo logo-dark" from:src="$logo.dark" alt=""></template>{$title}</a>
|
|
13
|
+
<ui-badge $if="$badge" tone="accent">{$badge}</ui-badge>
|
|
14
|
+
<nav class="top" $if="$nav.length" aria-label="Main"><ul><li $each="item of $nav">
|
|
15
|
+
<a from:href="$item.href" from:aria-current="$item.current"><template $match><img $when="$item.icon" from:src="$item.icon" from:alt="$item.label"><template $else>{$item.label}</template></template></a>
|
|
16
|
+
</li></ul></nav>
|
|
17
|
+
<div class="actions"><ui-button variant="ghost" tone="neutral" data-action="theme" from:aria-pressed="$dark">Dark theme</ui-button></div></header>
|
|
18
|
+
<style>
|
|
19
|
+
:host { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; border-bottom: 1px solid var(--ui-border, #8885); padding: .75rem max(1rem, calc((100vw - 90rem) / 2)); background: var(--ui-surface); }
|
|
20
|
+
.brand { display: flex; align-items: center; gap: .5rem; color: inherit; font-size: 1.15rem; font-weight: 700; text-decoration: none; } .logo { block-size: 2rem; inline-size: auto; }
|
|
21
|
+
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-inline-start: auto; }
|
|
22
|
+
ul { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; margin: 0; padding: 0; list-style: none; }
|
|
23
|
+
a { color: inherit; text-decoration: none; } a:hover, a[aria-current="page"], a[aria-current="true"] { color: var(--ui-accent); } a[aria-current="page"] { font-weight: 700; }
|
|
24
|
+
.top img { display: block; block-size: 1.25rem; inline-size: auto; }
|
|
25
|
+
:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
|
|
26
|
+
@media (max-width: 768px) { :host { position: static; } }
|
|
27
|
+
@media (max-width: 640px) { :host { padding-inline: 1rem; } }
|
|
28
|
+
</style></template>
|
|
29
|
+
<template component="markupress-footer">
|
|
30
|
+
<defs><prop name="footer" type="object({ columns: list(object({ title: string, items: list(object({ label: string, href: string, current: string })) })), copyright: string })" required>Footer link columns and copyright</prop></defs>
|
|
31
|
+
<footer><div class="footer-columns" $if="$footer.columns.length"><div $each="column of $footer.columns"><strong>{$column.title}</strong><ul><li $each="link of $column.items"><a from:href="$link.href" from:aria-current="$link.current">{$link.label}</a></li></ul></div></div>
|
|
32
|
+
<p $if="$footer.copyright">{$footer.copyright}</p></footer>
|
|
33
|
+
<style>
|
|
34
|
+
:host { display: block; border-top: 1px solid var(--ui-border, #8885); padding: 2rem max(1.5rem, calc((100vw - 90rem) / 2)); color: var(--ui-text-muted, inherit); font-size: .9rem; }
|
|
35
|
+
.footer-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1.5rem; } ul { margin: .5rem 0 0; padding: 0; list-style: none; } li { margin: .25rem 0; } strong { color: var(--ui-text); }
|
|
36
|
+
p { margin: 1.5rem 0 0; }
|
|
37
|
+
a { color: var(--ui-accent); text-underline-offset: .2em; } a[aria-current="page"] { font-weight: 700; } :focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
|
|
38
|
+
</style></template>
|
package/theme/home.html
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<link rel="component" href="./chrome.html">
|
|
2
|
+
<!-- The home layout (front matter layout: home): the shell's top navigation and footer around a full-width page, which
|
|
3
|
+
Markupress reads as a hero and feature cards. A site's app/layouts/home.html replaces it. -->
|
|
4
|
+
<template component="markupress-home" controller="../dist/controllers/shell.js">
|
|
5
|
+
<defs>
|
|
6
|
+
<title>{$title}</title>
|
|
7
|
+
<!-- A null favicon leaves the link out. -->
|
|
8
|
+
<link rel="icon" from:href="$favicon">
|
|
9
|
+
<prop name="title" type="string" required>Site title</prop>
|
|
10
|
+
<prop name="home" type="string" required>Home URL</prop>
|
|
11
|
+
<prop name="logo" type="object({ light: string, dark: string })" nullable>Logo images for the light and dark themes</prop>
|
|
12
|
+
<prop name="favicon" type="string" nullable>Site icon URL</prop>
|
|
13
|
+
<prop name="badge" type="string" default="">Badge beside the title</prop>
|
|
14
|
+
<prop name="nav" type="list(object({ label: string, href: string, current: string, icon: string }))" required>Top navigation: the sections, then the configured links</prop>
|
|
15
|
+
<prop name="footer" type="object({ columns: list(object({ title: string, items: list(object({ label: string, href: string, current: string })) })), copyright: string })" required>Footer link columns and copyright</prop>
|
|
16
|
+
<state name="dark" type="boolean" value="false"></state></defs>
|
|
17
|
+
<div class="site"><a class="skip" href="#documentation-content">Skip to content</a>
|
|
18
|
+
<markupress-header from:title="$title" from:home="$home" from:logo="$logo" from:badge="$badge" from:nav="$nav" from:dark="$dark"></markupress-header>
|
|
19
|
+
<main id="documentation-content" tabindex="-1"><slot name="page"></slot></main>
|
|
20
|
+
<markupress-footer $if="$footer.columns.length or $footer.copyright" from:footer="$footer"></markupress-footer></div>
|
|
21
|
+
<style>
|
|
22
|
+
:host { display: block; background: var(--ui-surface); color: var(--ui-text); font: 1rem/1.7 system-ui, sans-serif; min-height: 100vh; }
|
|
23
|
+
.site { display: flex; flex-direction: column; min-height: 100vh; }
|
|
24
|
+
main { flex: 1; inline-size: 100%; max-inline-size: 75rem; margin-inline: auto; padding: 2rem 1.5rem 4rem; }
|
|
25
|
+
.skip { position: absolute; top: .5rem; left: 1rem; transform: translateY(-200%); padding: .5rem 1rem; background: var(--ui-surface); color: var(--ui-accent); z-index: 3; } .skip:focus { transform: none; }
|
|
26
|
+
:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
|
|
27
|
+
@media (max-width: 768px) { main { padding: 1rem 1rem 3rem; } }
|
|
28
|
+
</style></template>
|
package/theme/shell.html
CHANGED
|
@@ -1,66 +1,55 @@
|
|
|
1
1
|
<link rel="component" href="@threadlabs/looma/components/ui-button/ui-button.html">
|
|
2
|
-
<link rel="component" href="
|
|
2
|
+
<link rel="component" href="./chrome.html">
|
|
3
3
|
<link rel="component" href="./outline.html">
|
|
4
4
|
<template component="markupress-shell" controller="../dist/controllers/shell.js">
|
|
5
|
-
<
|
|
5
|
+
<defs>
|
|
6
|
+
<title>{$title}</title>
|
|
7
|
+
<!-- A null favicon leaves the link out. -->
|
|
8
|
+
<link rel="icon" from:href="$favicon">
|
|
6
9
|
<prop name="title" type="string" required>Site title</prop>
|
|
7
10
|
<prop name="home" type="string" required>Home URL</prop>
|
|
8
11
|
<prop name="logo" type="object({ light: string, dark: string })" nullable>Logo images for the light and dark themes</prop>
|
|
9
12
|
<prop name="favicon" type="string" nullable>Site icon URL</prop>
|
|
10
13
|
<prop name="badge" type="string" default="">Badge beside the title</prop>
|
|
11
|
-
<prop name="nav" type="list(object({ label: string, href: string, current: string,
|
|
12
|
-
<prop name="social" type="list(object({ label: string, href: string, icon: string }))" required>Social links</prop>
|
|
14
|
+
<prop name="nav" type="list(object({ label: string, href: string, current: string, icon: string }))" required>Top navigation: the sections, then the configured links, each with an icon URL or ""</prop>
|
|
13
15
|
<prop name="sidebar" type="list(object({ label: string, current: string, depth: number, href?: string, open?: boolean, children?: list(object({ label: string, ... })), ... }))" required>The section's sidebar: pages and links, and folders and groups with children, as <hk-nav> renders them</prop>
|
|
16
|
+
<prop name="contents" type="list(object({ label: string, href: string, description: string }))" required>A generated index's pages and folders</prop>
|
|
14
17
|
<prop name="outline" type="list(object({ id: string, href: string, label: string, depth: number }))" required>The page's headings</prop>
|
|
15
18
|
<prop name="footer" type="object({ columns: list(object({ title: string, items: list(object({ label: string, href: string, current: string })) })), copyright: string })" required>Footer link columns and copyright</prop>
|
|
16
19
|
<prop name="versions" type="list(object({ href: string, label: string, current: string, note: string }))" required>Documentation versions</prop>
|
|
17
20
|
<prop name="crumbs" type="list(object({ href: string, label: string, current: string, depth: number, pageName: string, ... }))" required>Trail from the version home to this page</prop>
|
|
18
21
|
<prop name="previous" type="object({ href: string, label: string, current: string, depth: number, pageName: string, ... })" nullable>The page before this one</prop>
|
|
19
22
|
<prop name="next" type="object({ href: string, label: string, current: string, depth: number, pageName: string, ... })" nullable>The page after this one</prop>
|
|
23
|
+
<prop name="page" type="object({ editLink?: string, lastUpdated?: string, ... })" required>The page's front matter, with its edit link and the date its file last changed in git</prop>
|
|
20
24
|
<state name="dark" type="boolean" value="false"></state></defs>
|
|
21
25
|
<div class="site"><a class="skip" href="#documentation-content">Skip to content</a>
|
|
22
|
-
<header>
|
|
23
|
-
<span class="menu"><ui-button variant="ghost" tone="neutral" popovertarget="documentation-navigation">Navigation</ui-button></span>
|
|
24
|
-
<
|
|
25
|
-
<ui-badge $if="$badge" tone="accent">{$badge}</ui-badge>
|
|
26
|
-
<nav class="top" $if="$nav.length" aria-label="Main"><ul><li $each="item of $nav">
|
|
27
|
-
<template $match><a $when="$item.href" from:href="$item.href" from:aria-current="$item.current">{$item.label}</a>
|
|
28
|
-
<details $else name="markupress-nav"><summary from:data-current="$item.current">{$item.label}</summary><ul><li $each="link of $item.items"><a from:href="$link.href" from:aria-current="$link.current">{$link.label}</a></li></ul></details></template>
|
|
29
|
-
</li></ul></nav>
|
|
30
|
-
<div class="actions"><ul class="social" $if="$social.length"><li $each="link of $social"><a from:href="$link.href"><template $match><img $when="$link.icon" from:src="$link.icon" from:alt="$link.label"><template $else>{$link.label}</template></template></a></li></ul>
|
|
31
|
-
<ui-button variant="ghost" tone="neutral" data-action="theme" from:aria-pressed="$dark">Dark theme</ui-button></div></header>
|
|
32
|
-
<div class="columns"><aside id="documentation-navigation" popover>
|
|
26
|
+
<markupress-header from:title="$title" from:home="$home" from:logo="$logo" from:badge="$badge" from:nav="$nav" from:dark="$dark">
|
|
27
|
+
<span class="menu" slot="menu"><ui-button variant="ghost" tone="neutral" popovertarget="documentation-navigation">Navigation</ui-button></span></markupress-header>
|
|
28
|
+
<div class="columns"><aside id="documentation-navigation" popover aria-label="Documentation">
|
|
33
29
|
<hk-nav from:items="$sidebar" label="Documentation"></hk-nav>
|
|
34
|
-
<nav class="versions" aria-label="Documentation versions"><strong>Versions</strong><ul><li $each="version of $versions"><a from:href="$version.href" from:aria-current="$version.current">{$version.label}</a><small $if="$version.note">{$version.note}</small></li></ul></nav>
|
|
35
|
-
</aside><main id="documentation-content" tabindex="-1"><hk-breadcrumbs from:items="$crumbs"></hk-breadcrumbs><slot name="page"></slot
|
|
36
|
-
<
|
|
37
|
-
<
|
|
38
|
-
<
|
|
30
|
+
<nav class="versions" $if="$versions.length > 1" aria-label="Documentation versions"><strong>Versions</strong><ul><li $each="version of $versions"><a from:href="$version.href" from:aria-current="$version.current">{$version.label}</a><small $if="$version.note">{$version.note}</small></li></ul></nav>
|
|
31
|
+
</aside><main id="documentation-content" tabindex="-1"><hk-breadcrumbs from:items="$crumbs"></hk-breadcrumbs><slot name="page"></slot>
|
|
32
|
+
<ul class="contents" $if="$contents.length"><li $each="entry of $contents"><a from:href="$entry.href">{$entry.label}</a><p $if="$entry.description">{$entry.description}</p></li></ul>
|
|
33
|
+
<div class="page-meta" $if="$page.editLink or $page.lastUpdated"><a $if="$page.editLink" from:href="$page.editLink">Edit this page</a><p $if="$page.lastUpdated">Last updated <time from:datetime="$page.lastUpdated">{$page.lastUpdated}</time></p></div><hk-pager from:previous="$previous" from:next="$next"></hk-pager></main>
|
|
34
|
+
<aside class="outline" $if="$outline.length" aria-label="On this page"><markupress-outline from:items="$outline"></markupress-outline></aside></div>
|
|
35
|
+
<markupress-footer $if="$footer.columns.length or $footer.copyright" from:footer="$footer"></markupress-footer></div>
|
|
39
36
|
<style>
|
|
40
37
|
:host { display: block; background: var(--ui-surface); color: var(--ui-text); font: 1rem/1.7 system-ui, sans-serif; min-height: 100vh; }
|
|
41
38
|
.site { display: flex; flex-direction: column; min-height: 100vh; }
|
|
42
|
-
header { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; border-bottom: 1px solid var(--ui-border, #8885); padding: .75rem max(1rem, calc((100vw - 90rem) / 2)); background: var(--ui-surface); }
|
|
43
|
-
.brand { display: flex; align-items: center; gap: .5rem; color: inherit; font-size: 1.15rem; font-weight: 700; text-decoration: none; } .logo { block-size: 2rem; inline-size: auto; }
|
|
44
|
-
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-inline-start: auto; }
|
|
45
|
-
header ul { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; padding: 0; list-style: none; }
|
|
46
|
-
header a { color: inherit; text-decoration: none; } header a:hover, header a[aria-current="page"], header a[aria-current="true"], summary[data-current="true"] { color: var(--ui-accent); }
|
|
47
|
-
.social img { display: block; block-size: 1.25rem; inline-size: auto; }
|
|
48
|
-
.top details { position: relative; } .top summary { cursor: pointer; }
|
|
49
|
-
.top details ul { position: absolute; inset-block-start: calc(100% + .5rem); inset-inline-start: 0; display: grid; gap: .25rem; min-inline-size: 12rem; padding: .5rem 1rem; border: 1px solid var(--ui-border, #8885); border-radius: var(--ui-radius-md, .5rem); background: var(--ui-surface); }
|
|
50
39
|
.columns { display: flex; gap: 3rem; flex: 1; inline-size: 100%; max-inline-size: 90rem; margin: auto; padding: 2rem 1.5rem; }
|
|
51
40
|
#documentation-navigation { flex: 0 0 15rem; } main { min-width: 0; flex: 1; max-width: 65ch; } .outline { flex: 0 0 13rem; }
|
|
52
41
|
/* Wide screens show the sidebar in the page; narrow ones open it as a native popover, which needs no script. */
|
|
53
42
|
@media (min-width: 769px) { #documentation-navigation { display: block; position: static; inset: auto; margin: 0; padding: 0; border: 0; background: none; color: inherit; overflow: visible; }
|
|
54
43
|
#documentation-navigation, .outline { position: sticky; top: 5rem; align-self: flex-start; max-block-size: calc(100vh - 6rem); overflow: auto; } .menu { display: none; } }
|
|
55
44
|
@media (max-width: 1199px) { .outline { display: none; } }
|
|
56
|
-
@media (max-width: 768px) {
|
|
45
|
+
@media (max-width: 768px) { .columns { display: block; padding: 1rem; }
|
|
57
46
|
#documentation-navigation { inset: 0 auto 0 0; block-size: 100%; max-block-size: none; inline-size: min(20rem, 85vw); margin: 0; padding: 1rem; border: 0; border-inline-end: 1px solid var(--ui-border, #8885); background: var(--ui-surface); color: var(--ui-text); }
|
|
58
47
|
#documentation-navigation::backdrop { background: rgb(0 0 0 / .4); } }
|
|
59
48
|
.versions ul { margin: 0; padding: 0; list-style: none; } .versions li { margin: .4rem 0; } .versions { margin-top: 2rem; }
|
|
60
49
|
a { color: var(--ui-accent); text-underline-offset: .2em; } a[aria-current="page"] { font-weight: 700; } small { display: block; color: var(--ui-text-muted, inherit); line-height: 1.4; } :focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
|
|
61
50
|
.skip { position: absolute; top: .5rem; left: 1rem; transform: translateY(-200%); padding: .5rem 1rem; background: var(--ui-surface); z-index: 3; } .skip:focus { transform: none; }
|
|
62
|
-
|
|
63
|
-
.
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
.contents { display: grid; gap: .75rem; margin: 1.5rem 0; padding: 0; list-style: none; }
|
|
52
|
+
.contents li { padding: .75rem 1rem; border: 1px solid var(--ui-border, #8885); border-radius: var(--ui-radius-md, .5rem); }
|
|
53
|
+
.contents a { font-weight: 600; } .contents p { margin: .25rem 0 0; color: var(--ui-text-muted, inherit); }
|
|
54
|
+
.page-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-top: 3rem; color: var(--ui-text-muted, inherit); font-size: .875rem; } .page-meta p { margin: 0; }
|
|
66
55
|
</style></template>
|
package/theme/theme.css
CHANGED
|
@@ -47,6 +47,22 @@
|
|
|
47
47
|
.markupress-prose pre.line-numbers code { counter-reset: line; }
|
|
48
48
|
.markupress-prose pre.line-numbers .line::before { counter-increment: line; content: counter(line); display: inline-block; inline-size: 2ch; margin-inline-end: 1.5ch; text-align: end; color: var(--ui-text-muted, #888); user-select: none; }
|
|
49
49
|
/* The logo for the theme in use: the head script sets data-theme before first paint, and without it the light logo shows. */
|
|
50
|
-
[data-component~="markupress-
|
|
51
|
-
:root[data-theme="dark"] [data-component~="markupress-
|
|
52
|
-
:root[data-theme="dark"] [data-component~="markupress-
|
|
50
|
+
[data-component~="markupress-header"] .logo-dark { display: none; }
|
|
51
|
+
:root[data-theme="dark"] [data-component~="markupress-header"] .logo-dark { display: inline; }
|
|
52
|
+
:root[data-theme="dark"] [data-component~="markupress-header"] .logo-light { display: none; }
|
|
53
|
+
/* A home page's feature cards. Their Markdown is projected into Looma's card, where the page's scoped prose styles
|
|
54
|
+
never reach, so these rules set its type; the card spaces its children. */
|
|
55
|
+
.markupress-prose .features { margin-block: 1rem; }
|
|
56
|
+
.markupress-prose .features :is(h2, p, ul, ol, pre, figure) { margin: 0; }
|
|
57
|
+
.markupress-prose .features h2 { font-size: 1.15rem; line-height: 1.3; }
|
|
58
|
+
.markupress-prose .features h2 a { color: inherit; text-decoration: none; }
|
|
59
|
+
.markupress-prose .features p { color: var(--ui-text-secondary, inherit); }
|
|
60
|
+
.markupress-prose .features a { color: var(--ui-accent); text-underline-offset: .2em; }
|
|
61
|
+
/* HTMLKit sets data-hk-navigating on <html> while a page renders in place: a bar along the top shows it, after a
|
|
62
|
+
moment, so a quick navigation never flashes. */
|
|
63
|
+
html[data-hk-navigating] body::before {
|
|
64
|
+
content: ""; position: fixed; inset: 0 0 auto; z-index: 10; block-size: 3px; background: var(--ui-accent);
|
|
65
|
+
transform-origin: left; animation: markupress-navigating 2s .2s ease-out both;
|
|
66
|
+
}
|
|
67
|
+
@keyframes markupress-navigating { from { transform: scaleX(0); } to { transform: scaleX(.9); } }
|
|
68
|
+
@media (prefers-reduced-motion: reduce) { html[data-hk-navigating] body::before { animation: none; opacity: .6; } }
|