@abreen/tada 1.16.4 → 1.16.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/README.md +6 -0
- package/assets/material-symbols/celebration_24px.svg +1 -1
- package/assets/material-symbols/close_24px.svg +1 -1
- package/assets/material-symbols/contrast_20px.svg +1 -1
- package/assets/material-symbols/contrast_rtl_off_20px.svg +1 -1
- package/assets/material-symbols/info_20px.svg +1 -1
- package/assets/material-symbols/info_40px.svg +1 -1
- package/assets/material-symbols/menu_24px.svg +1 -1
- package/assets/material-symbols/open_in_new_20px.svg +1 -1
- package/assets/material-symbols/search_20px.svg +1 -1
- package/assets/material-symbols/smart_display_24px.svg +1 -1
- package/assets/material-symbols/south_east_20px.svg +1 -1
- package/assets/material-symbols/warning_20px.svg +1 -1
- package/assets/material-symbols/warning_40px.svg +1 -1
- package/bin/tada.ts +2 -2
- package/build/material-symbols.ts +2 -2
- package/build/site-variables.ts +1 -1
- package/build/types.d.ts +2 -0
- package/build/utils/render.ts +14 -0
- package/package.json +1 -1
- package/schema/site.schema.json +9 -2
- package/src/_alerts.scss +7 -5
- package/src/_layout.scss +1 -1
- package/src/_mixins.scss +1 -1
- package/src/navigate/style.scss +17 -0
- package/src/search/index.ts +1 -0
- package/templates/_appearance-picker.html +2 -0
- package/templates/_top.html +5 -1
package/README.md
CHANGED
|
@@ -216,6 +216,11 @@ Example site configuration YAML file:
|
|
|
216
216
|
```yaml
|
|
217
217
|
title: Intro to Computer Science
|
|
218
218
|
titlePostfix: " - CS 0"
|
|
219
|
+
banner: |
|
|
220
|
+
The semester is now closed. Final grades will become available on
|
|
221
|
+
[Gradescope](https://example.org/course/12345) on December 30.
|
|
222
|
+
|
|
223
|
+
This site is an archive. This is how the site appeared on December 27, 2020.
|
|
219
224
|
symbol: CS 0
|
|
220
225
|
themeColor: hsl(351 70% 40%)
|
|
221
226
|
tintAmount: 0
|
|
@@ -257,6 +262,7 @@ vars:
|
|
|
257
262
|
|-------|-------------|
|
|
258
263
|
| `title` | Title for the whole site (also used to derive `titlePostfix`) |
|
|
259
264
|
| `titlePostfix` | *Optional*, the string to append to each page's `title` |
|
|
265
|
+
| `banner` | *Optional*, Markdown rendered in a bordered box above every page |
|
|
260
266
|
| `symbol` | Text (1-5 chars) displayed in header (also used as the favicon symbol) |
|
|
261
267
|
| `themeColor` | Theme color for the site (e.g., `"tomato"`, `"#c04040"`, `"hsl(195 70% 40%)"`) |
|
|
262
268
|
| `tintHue` | *Optional*, hue (0-360) for background and foreground tinting (default `20`) |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="m96.85-94.15 184.77-517.54 332.77 332.77L96.85-94.15ZM206.69-204l288-102-186-184-102 286Zm358.93-245.69-37.08-35.08 226.77-226.77q31.15-31.15 74.54-31.15 43.38 0 74.53 31.15l20.77 22.77-35.53 35.08-20.77-20.77q-17.62-17.62-39.23-17.62-21.62 0-39.24 17.62L565.62-449.69ZM413.31-602l-37.08-37.08 26-24q17.69-17.69 17.69-41.46T402.23-746l-26.46-26.46 37.08-35.08 24.46 24.46q32 32 32 78.54 0 46.54-32 78.54l-24 24Zm76.15 76.15-37.08-35.07 144.77-144.77q17.62-17.62 17.62-39.23 0-21.62-17.62-39.23l-62.77-60.77L571.46-882l60.77 62.77q31.92 31.92 31.92 75.31 0 43.38-31.92 75.3L489.46-525.85Zm152.31 152.31-37.08-35.08 53.7-53.69q32.76-32.77 79.3-32.77T817-462.31l53.69 53.69-37.07 35.08-51.7-51.69q-18.46-18.46-43.23-18.46-24.77 0-43.23 18.46l-53.69 51.69ZM206.69-204Z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M252-203.69 205.69-252l227-228-227-230L252-758.31l229 230 227-230L754.31-710l-227 230 227 228L708-203.69l-227-230-229 230Z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M334.22-133.34q-68.23-29.34-119.86-80.92-51.63-51.58-80.99-119.76Q104-402.19 104-480.37q0-78.17 29.34-145.91 29.34-67.73 80.92-119.36 51.58-51.63 119.76-80.99Q402.19-856 480.37-856q78.17 0 145.91 29.34 67.73 29.34 119.36 80.92 51.63 51.58 80.99 119.26Q856-558.81 856-480.63q0 78.17-29.34 146.41-29.34 68.23-80.92 119.86-51.58 51.63-119.26 80.99Q558.81-104 480.63-104q-78.17 0-146.41-29.34ZM490-160.69q127.62-8.08 217.81-98.35T798-480q0-130.69-89.42-220.19-89.43-89.5-218.58-99.12v638.62Z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="m798.38-95.77-88.3-88.31q-50.46 37.39-108.68 58.73Q543.17-104 480-104q-77.34 0-145.88-29.37-68.54-29.37-119.96-80.79-51.42-51.42-80.79-119.96Q104-402.66 104-480q0-63.17 21.35-121.4 21.34-58.22 58.73-108.68l-68.62-68.61L156-819.23l682.92 682.92-40.54 40.54ZM480-162q51.77 0 99.62-17.15 47.84-17.16 89.46-46.93L480-415.15V-162Zm317-116.69-41.77-40.77Q776-358.23 787-398.48q11-40.25 11-81.52 0-133-92.5-225.5T480-798v202.31L278.69-797q44.8-28.66 96.09-43.83Q426.07-856 480-856q78.59 0 146.84 28.85Q695.1-798.3 746.7-746.7q51.6 51.6 80.45 119.86Q856-558.59 856-480q0 53.93-15.17 105.22T797-278.69Z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M452-292h58v-236h-58v236Zm49.35-309.61q9.27-8.7 9.27-21.54 0-12.85-8.7-21.93-8.69-9.07-21.53-9.07-12.85 0-21.93 8.69t-9.08 21.54q0 12.84 8.89 21.92 8.88 9.08 21.34 9.08 12.47 0 21.74-8.69ZM480.41-104q-77.59 0-146.17-29.36-68.57-29.36-120.02-80.76-51.45-51.4-80.83-119.88Q104-402.47 104-480.32q0-78.11 29.42-146.42 29.42-68.3 80.92-119.91 51.5-51.62 119.87-80.48Q402.59-856 480.32-856q78.1 0 146.4 28.84 68.29 28.84 119.92 80.42 51.63 51.58 80.49 120.07Q856-558.19 856-480.33q0 77.87-28.84 146.11-28.84 68.23-80.41 119.78-51.57 51.55-120.03 81Q558.25-104 480.41-104Zm-.41-58q132.51 0 225.26-92.74Q798-347.49 798-480t-92.74-225.26Q612.51-798 480-798t-225.26 92.74Q162-612.51 162-480t92.74 225.26Q347.49-162 480-162Zm0-318Z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 -960 960 960" width="40"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 -960 960 960" width="40"><path d="M456.05-289.33h51.18V-520h-51.18v230.67Zm44.42-304.49q8.71-8.18 8.71-20.67 0-13.3-8.37-21.4-8.37-8.11-20.62-8.11-13.52 0-21.45 7.93-7.92 7.93-7.92 20.89 0 12.91 8.58 21.23 8.57 8.31 20.47 8.31 11.9 0 20.6-8.18ZM480.01-98.67q-79.35 0-148.51-30.19-69.17-30.19-120.78-81.76-51.61-51.57-81.83-120.81-30.22-69.24-30.22-148.77 0-79.03 30.25-148.6t82.04-121.42q51.8-51.85 120.76-81.48 68.97-29.63 148.18-29.63 79.07 0 148.84 29.6 69.77 29.6 121.48 81.42 51.71 51.82 81.41 121.55 29.7 69.73 29.7 148.84 0 79.62-29.6 148.33-29.6 68.72-81.41 120.42-51.8 51.7-121.52 82.1-69.71 30.4-148.79 30.4Zm.32-51.18q137.11 0 233.46-96.43 96.36-96.44 96.36-234.05 0-137.11-96.23-233.46-96.23-96.36-233.92-96.36-137.28 0-233.72 96.23-96.43 96.23-96.43 233.92 0 137.28 96.43 233.72 96.44 96.43 234.05 96.43ZM480-480Z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M128-251.23v-66h704v66H128ZM128-448v-66h704v66H128Zm0-196.77v-66h704v66H128Z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M234.62-152q-35.05 0-58.83-23.79Q152-199.57 152-234.62v-490.76q0-35.05 23.79-58.83Q199.57-808 234.62-808h233.61v58H234.62q-9.24 0-16.93 7.69-7.69 7.69-7.69 16.93v490.76q0 9.24 7.69 16.93 7.69 7.69 16.93 7.69h490.76q9.24 0 16.93-7.69 7.69-7.69 7.69-16.93v-233.61h58v233.61q0 35.05-23.79 58.83Q760.43-152 725.38-152H234.62Zm150.92-192.23-41.31-41.31L708.69-750H595v-58h213v213h-58v-113.69L385.54-344.23Z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M769.38-151.85 529.92-391.31q-30 22.54-70.29 34.54-40.29 12-77.06 12-96.95 0-165.11-68.15-68.15-68.16-68.15-165.08 0-96.92 68.15-165.08 68.16-68.15 165.08-68.15 96.92 0 165.08 68.15 68.15 68.16 68.15 165.11 0 39.08-11.77 76.87-11.77 37.79-33.77 67.48l240.46 240.47-41.31 41.3ZM382.54-402.77q74.61 0 124.92-50.31 50.31-50.3 50.31-124.92t-50.31-124.92q-50.31-50.31-124.92-50.31-74.62 0-124.92 50.31-50.31 50.3-50.31 124.92t50.31 124.92q50.3 50.31 124.92 50.31Z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M386-310.92 649.08-480 386-649.08v338.16ZM184.62-176q-38.35 0-64.48-26.14Q94-228.27 94-266.62v-426.76q0-38.35 26.14-64.48Q146.27-784 184.62-784h590.76q38.35 0 64.48 26.14Q866-731.73 866-693.38v426.76q0 38.35-26.14 64.48Q813.73-176 775.38-176H184.62Zm0-66h590.76q9.24 0 16.93-7.69 7.69-7.69 7.69-16.93v-426.76q0-9.24-7.69-16.93-7.69-7.69-16.93-7.69H184.62q-9.24 0-16.93 7.69-7.69 7.69-7.69 16.93v426.76q0 9.24 7.69 16.93 7.69 7.69 16.93 7.69ZM160-242v-476 476Z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M386-224v-58h250.69L200-718.69 241.31-760 678-323.31V-574h58v350H386Z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M65.23-142 480-830l414.77 688H65.23ZM169-200h622L480-718 169-200Zm335.35-62.44q10.27-10.06 10.27-23.35 0-13.29-10.06-23.56t-23.35-10.27q-13.29 0-23.56 10.06t-10.27 23.35q0 13.29 10.06 23.56t23.35 10.27q13.29 0 23.56-10.06ZM452-364.62h58v-196h-58v196ZM480-459Z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 -960 960 960" width="40"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 -960 960 960" width="40"><path d="M74.56-132 480-830.67 885.44-132H74.56Zm89.08-51.18h632.72L480-728.31 163.64-183.18Zm339.4-62.64q8.96-9.08 8.96-20.91t-9.21-21.13q-9.21-9.29-21.24-9.29-12.04 0-21 9.42t-8.96 21.25q0 11.84 9.21 20.79t21.24 8.95q12.04 0 21-9.08Zm-46.83-92.23h51.17v-210.46h-51.17v210.46ZM480-456.08Z"/></svg>
|
package/bin/tada.ts
CHANGED
|
@@ -340,7 +340,7 @@ async function initCommand(args: string[]): Promise<void> {
|
|
|
340
340
|
base: 'http://localhost:8080',
|
|
341
341
|
basePath: '/',
|
|
342
342
|
internalDomains: ['localhost'],
|
|
343
|
-
features: { search: true, favicon: false, footer: true },
|
|
343
|
+
features: { search: true, favicon: false, footer: true, pickers: true },
|
|
344
344
|
extensionToShikiLanguage: bare ? {} : { java: 'java', py: 'python' },
|
|
345
345
|
shikiLanguages: bare ? [] : ['java', 'python', 'html'],
|
|
346
346
|
});
|
|
@@ -355,7 +355,7 @@ async function initCommand(args: string[]): Promise<void> {
|
|
|
355
355
|
base: prodBase,
|
|
356
356
|
basePath: prodBasePath,
|
|
357
357
|
internalDomains: [prodDomain],
|
|
358
|
-
features: { search: true, favicon: true, footer: true },
|
|
358
|
+
features: { search: true, favicon: true, footer: true, pickers: true },
|
|
359
359
|
extensionToShikiLanguage: bare ? {} : { java: 'java', py: 'python' },
|
|
360
360
|
shikiLanguages: bare ? [] : ['java', 'python', 'html'],
|
|
361
361
|
});
|
|
@@ -5,8 +5,8 @@ import { getPackageDir } from './utils/paths';
|
|
|
5
5
|
export const MATERIAL_SYMBOL_CONFIG = Object.freeze({
|
|
6
6
|
family: 'Material Symbols Outlined',
|
|
7
7
|
fill: 0,
|
|
8
|
-
weight:
|
|
9
|
-
grade:
|
|
8
|
+
weight: 200,
|
|
9
|
+
grade: 200,
|
|
10
10
|
opticalSizes: Object.freeze([20, 24, 40] as const),
|
|
11
11
|
viewBox: '0 -960 960 960',
|
|
12
12
|
source: 'https://fonts.google.com/icons',
|
package/build/site-variables.ts
CHANGED
|
@@ -14,7 +14,7 @@ const DEFAULT: Partial<SiteVariables> = {
|
|
|
14
14
|
basePath: '/',
|
|
15
15
|
defaultFont: 'sans',
|
|
16
16
|
defaultContrast: 'standard',
|
|
17
|
-
features: { search: true, favicon: true, footer: true },
|
|
17
|
+
features: { search: true, favicon: true, footer: true, pickers: true },
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const isValid = compileJsonSchema(siteSchema);
|
package/build/types.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export interface SiteVariables {
|
|
|
37
37
|
basePath: string;
|
|
38
38
|
title: string;
|
|
39
39
|
titlePostfix: string;
|
|
40
|
+
banner?: string;
|
|
40
41
|
symbol?: string;
|
|
41
42
|
faviconSymbol?: string;
|
|
42
43
|
themeColor: string;
|
|
@@ -62,6 +63,7 @@ export type FeatureConfig = {
|
|
|
62
63
|
search: boolean;
|
|
63
64
|
favicon: boolean;
|
|
64
65
|
footer: boolean;
|
|
66
|
+
pickers: boolean;
|
|
65
67
|
};
|
|
66
68
|
|
|
67
69
|
/** A rendered content asset ready to write to dist/ */
|
package/build/utils/render.ts
CHANGED
|
@@ -90,6 +90,7 @@ interface TemplateParametersInput {
|
|
|
90
90
|
content: string | null;
|
|
91
91
|
subPath: string;
|
|
92
92
|
isWatchMode: boolean;
|
|
93
|
+
bannerHtml?: string;
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
function resolveAuthor(
|
|
@@ -141,6 +142,7 @@ function createTemplateParameters({
|
|
|
141
142
|
content,
|
|
142
143
|
subPath,
|
|
143
144
|
isWatchMode,
|
|
145
|
+
bannerHtml,
|
|
144
146
|
}: TemplateParametersInput): Record<string, unknown> {
|
|
145
147
|
const applyBasePath = createApplyBasePath(siteVariables);
|
|
146
148
|
return {
|
|
@@ -149,12 +151,21 @@ function createTemplateParameters({
|
|
|
149
151
|
site: siteVariables,
|
|
150
152
|
page: pageVariables,
|
|
151
153
|
content,
|
|
154
|
+
bannerHtml,
|
|
152
155
|
isWatchMode,
|
|
153
156
|
speculationRulesHrefMatches: `${applyBasePath('/')}*`,
|
|
154
157
|
tadaVersion,
|
|
155
158
|
};
|
|
156
159
|
}
|
|
157
160
|
|
|
161
|
+
function renderSiteBanner(siteVariables: SiteVariables): string {
|
|
162
|
+
if (!siteVariables.banner) {
|
|
163
|
+
return '';
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return createMarkdown(siteVariables).render(siteVariables.banner);
|
|
167
|
+
}
|
|
168
|
+
|
|
158
169
|
export function injectAssetTags(
|
|
159
170
|
html: string,
|
|
160
171
|
assetFiles: string[],
|
|
@@ -290,6 +301,7 @@ export function renderPlainTextPageAsset({
|
|
|
290
301
|
content,
|
|
291
302
|
subPath,
|
|
292
303
|
isWatchMode: watchMode,
|
|
304
|
+
bannerHtml: renderSiteBanner(siteVariables),
|
|
293
305
|
});
|
|
294
306
|
|
|
295
307
|
const templateHtml = render(
|
|
@@ -371,6 +383,7 @@ export function renderCodePageAsset({
|
|
|
371
383
|
content,
|
|
372
384
|
subPath,
|
|
373
385
|
isWatchMode: isWatchMode(assetFiles),
|
|
386
|
+
bannerHtml: renderSiteBanner(siteVariables),
|
|
374
387
|
});
|
|
375
388
|
|
|
376
389
|
const templateHtml = render('code.html', templateParameters) as string;
|
|
@@ -714,6 +727,7 @@ export function renderLiterateJavaPageAsset({
|
|
|
714
727
|
content: contentHtml,
|
|
715
728
|
subPath,
|
|
716
729
|
isWatchMode: isWatchMode(assetFiles),
|
|
730
|
+
bannerHtml: renderSiteBanner(siteVariables),
|
|
717
731
|
});
|
|
718
732
|
|
|
719
733
|
const templateHtml = render('literate.html', templateParameters) as string;
|
package/package.json
CHANGED
package/schema/site.schema.json
CHANGED
|
@@ -4,11 +4,17 @@
|
|
|
4
4
|
"properties": {
|
|
5
5
|
"features": {
|
|
6
6
|
"type": "object",
|
|
7
|
-
"default": {
|
|
7
|
+
"default": {
|
|
8
|
+
"search": true,
|
|
9
|
+
"favicon": true,
|
|
10
|
+
"footer": true,
|
|
11
|
+
"pickers": true
|
|
12
|
+
},
|
|
8
13
|
"properties": {
|
|
9
14
|
"search": { "type": "boolean", "default": true },
|
|
10
15
|
"favicon": { "type": "boolean", "default": true },
|
|
11
|
-
"footer": { "type": "boolean", "default": true }
|
|
16
|
+
"footer": { "type": "boolean", "default": true },
|
|
17
|
+
"pickers": { "type": "boolean", "default": true }
|
|
12
18
|
},
|
|
13
19
|
"additionalProperties": false
|
|
14
20
|
},
|
|
@@ -24,6 +30,7 @@
|
|
|
24
30
|
"items": { "type": "string", "pattern": "^[-.:a-zA-Z0-9]+$" }
|
|
25
31
|
},
|
|
26
32
|
"title": { "type": "string" },
|
|
33
|
+
"banner": { "type": "string" },
|
|
27
34
|
"symbol": { "type": "string", "pattern": "^[A-Z0-9\\- ]{1,5}$" },
|
|
28
35
|
"titlePostfix": { "type": "string" },
|
|
29
36
|
"themeColor": { "type": "string" },
|
package/src/_alerts.scss
CHANGED
|
@@ -35,11 +35,6 @@
|
|
|
35
35
|
background: inherit;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
time[datetime].is-modified {
|
|
39
|
-
// Reset the underline color
|
|
40
|
-
text-decoration: underline dotted;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
38
|
a {
|
|
44
39
|
@include link-underline;
|
|
45
40
|
|
|
@@ -107,3 +102,10 @@ i.warning {
|
|
|
107
102
|
.alert > p:last-child {
|
|
108
103
|
margin-bottom: 0;
|
|
109
104
|
}
|
|
105
|
+
|
|
106
|
+
.site-banner {
|
|
107
|
+
color: var(--fg2-color);
|
|
108
|
+
background: none;
|
|
109
|
+
border: 1px solid var(--fg2-color);
|
|
110
|
+
border-radius: var(--border-radius);
|
|
111
|
+
}
|
package/src/_layout.scss
CHANGED
package/src/_mixins.scss
CHANGED
package/src/navigate/style.scss
CHANGED
|
@@ -42,6 +42,23 @@ $duration: 150ms;
|
|
|
42
42
|
animation-duration: $duration;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
// The site-wide banner does not change between pages. Keep it out of the root
|
|
46
|
+
// slide and pin its named transition layer in place without a crossfade.
|
|
47
|
+
.site-banner {
|
|
48
|
+
view-transition-name: site-banner;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
::view-transition-group(site-banner),
|
|
52
|
+
::view-transition-old(site-banner),
|
|
53
|
+
::view-transition-new(site-banner) {
|
|
54
|
+
animation: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
::view-transition-old(site-banner),
|
|
58
|
+
::view-transition-new(site-banner) {
|
|
59
|
+
mix-blend-mode: normal;
|
|
60
|
+
}
|
|
61
|
+
|
|
45
62
|
// Forward navigation: old content slides left, new content slides in from right
|
|
46
63
|
.nav-forward::view-transition-old(root) {
|
|
47
64
|
animation: slide-out-left $duration ease-in;
|
package/src/search/index.ts
CHANGED
|
@@ -598,6 +598,7 @@ export default (window: Window) => {
|
|
|
598
598
|
window.addEventListener('pointermove', handleWindowPointerMove);
|
|
599
599
|
window.addEventListener('keydown', handleWindowKeyDown);
|
|
600
600
|
window.addEventListener(PAGE_UPDATE_REFRESH_EVENT, handlePageUpdateRefresh);
|
|
601
|
+
input.disabled = false;
|
|
601
602
|
|
|
602
603
|
return () => {
|
|
603
604
|
window.removeEventListener(
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<% if (site.features.pickers) { %>
|
|
1
2
|
<div class="appearance-pickers" data-pagefind-ignore>
|
|
2
3
|
<div class="preference-picker font-picker" role="group" aria-label="Font style">
|
|
3
4
|
<button type="button" class="preference-picker-option font-picker-option-sans" data-font-preference-value="sans" aria-label="Use sans-serif fonts" aria-pressed="<%= site.defaultFont === 'sans' %>" disabled>
|
|
@@ -16,3 +17,4 @@
|
|
|
16
17
|
</button>
|
|
17
18
|
</div>
|
|
18
19
|
</div>
|
|
20
|
+
<% } %>
|
package/templates/_top.html
CHANGED
|
@@ -117,7 +117,6 @@
|
|
|
117
117
|
aria-expanded="false"
|
|
118
118
|
aria-controls="quick-search-results"
|
|
119
119
|
disabled />
|
|
120
|
-
<script>document.currentScript.previousElementSibling.disabled=false;</script>
|
|
121
120
|
</div>
|
|
122
121
|
<% } %>
|
|
123
122
|
</div>
|
|
@@ -137,3 +136,8 @@
|
|
|
137
136
|
</details>
|
|
138
137
|
</header>
|
|
139
138
|
<div class="container">
|
|
139
|
+
<% if (site.banner) { %>
|
|
140
|
+
<aside class="site-banner alert" data-pagefind-ignore>
|
|
141
|
+
<div class="content"><%= bannerHtml %></div>
|
|
142
|
+
</aside>
|
|
143
|
+
<% } %>
|