diff --git a/README.md b/README.md index 5ee564a42..53f0791cc 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Twitter: [@webawesomer](https://twitter.com/webawesomer) ## Developers ✨ -Developers can use this documentation to learn how to build Web Awesome from source. You will need Node >= 14.17 to build and run the project locally. +Developers can use this documentation to learn how to build Web Awesome from source. You will need Node.js 14.17 or later to build and run the project locally. **You don't need to do any of this to use Web Awesome!** This page is for people who want to contribute to the project, tinker with the source, or create a custom build of Web Awesome. @@ -29,31 +29,29 @@ If that's not what you're trying to do, the [documentation website](https://weba ### What are you using to build Web Awesome? -Components are built with [LitElement](https://lit-element.polymer-project.org/), a custom elements base class that provides an intuitive API and reactive data binding. The build is a custom script with bundling powered by [esbuild](https://esbuild.github.io/). +Components are built with [Lit](https://lit.dev/), a custom elements base class that provides an intuitive API and reactive data binding. The build is a custom script with bundling powered by [esbuild](https://esbuild.github.io/). ### Understanding the Web Awesome monorepo -Web Awesome uses [NPM workspaces](https://docs.npmjs.com/cli/v11/using-npm/workspaces) for its monorepo structure and is fairly minimal in what it provides. +Web Awesome uses [npm workspaces](https://docs.npmjs.com/cli/v11/using-npm/workspaces) for its monorepo structure and is fairly minimal in what it provides. -By using a NPM workspaces and a monorepo structure, we can get consistent builds, shared configurations, and reduced duplication across repositories which reduces regressions and forces consistency across `webawesome`, `webawesome-pro`, and `webawesome-app`. +By using npm workspaces and a monorepo structure, we can get consistent builds, shared configurations, and reduced duplication across repositories which reduces regressions and forces consistency across `webawesome`, `webawesome-pro`, and `webawesome-app`. Generally, if you plan to only work with the free version of `webawesome` it is easiest to go to `packages/webawesome` and run all commands from there. -### Where do NPM dependencies go? +### Where do npm dependencies go? -Any dependencies intended to be used across all packages (IE: `prettier`, `eslint`) that are _NOT_ used at runtime should be in the root `devDependencies` of `package.json`. +Any dependencies intended to be used across all packages (i.e., `prettier`, `eslint`) that are **not** used at runtime should be in the root `devDependencies` of `package.json`. ```bash npm install -D -w prettier ``` -Any dependencies that will be used at runtime by a package should be part of the specific package's `"dependencies"` such as `lit`. This is required because if that dependency is not in the `packages/*/package.json`, it will not be installed when used via NPM. +Any dependencies that will be used at runtime by a package should be part of the specific package's `dependencies` such as `lit`. This is required because if that dependency is not in the `packages/*/package.json`, it will not be installed when used via npm. -Individual packages are also free to install devDependencies as needed as long as they are specific to that package only. +Individual packages are also free to install `devDependencies` as needed as long as they are specific to that package only. -To do install a package specific to a package, change your working directory to that package's root - -IE: `cd packages/webawesome && npm install ` +To install a package specific to a Web Awesome package, change your working directory to that package's root (i.e., `cd packages/webawesome && npm install `). ### Forking the Repo @@ -67,14 +65,14 @@ npm install ### Developing -Once you've cloned the repo, run the following command from the respective directory within `packages/*` +Once you've cloned the repo, run the following command from the respective directory within `packages/*`. ```bash cd packages/webawesome npm start ``` -This will spin up the dev server. After the initial build, a browser will open automatically. There is currently no hot module reloading (HMR), as browser's don't provide a way to reregister custom elements, but most changes to the source will reload the browser automatically. +This will spin up the dev server. After the initial build, a browser will open automatically. There is currently no hot module reloading (HMR), as browsers don't provide a way to reregister custom elements, but most changes to the source will reload the browser automatically. ### Building @@ -102,7 +100,7 @@ This will generate a source file, a stylesheet, and a docs page for you. When yo Right now the only additional packages are in private repositories. -To add additional packages from other repositories, run: `git clone packages/` to clone your repo into `packages/`. +To add additional packages from other repositories, run `git clone packages/` to clone your repo into `packages/`. Make sure to run `npm install` at the root of the monorepo after adding your package! @@ -112,4 +110,4 @@ Web Awesome is an open source project and contributions are encouraged! If you'r ## License -Web Awesome is available under the terms of the MIT license. \ No newline at end of file +Web Awesome is available under the terms of the [MIT License](LICENSE.md). diff --git a/VERSIONS.txt b/VERSIONS.txt new file mode 100644 index 000000000..11c438ca2 --- /dev/null +++ b/VERSIONS.txt @@ -0,0 +1,6 @@ +3.0.0-beta.1 +3.0.0-beta.2 +3.0.0-beta.3 +3.0.0-beta.4 +3.0.0-beta.5 +3.0.0-beta.6 diff --git a/package-lock.json b/package-lock.json index f9f933b06..115015301 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6478,6 +6478,16 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "dev": true }, + "node_modules/eleventy-plugin-git-commit-date": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/eleventy-plugin-git-commit-date/-/eleventy-plugin-git-commit-date-0.1.3.tgz", + "integrity": "sha512-dmdkGpMuRj8apWptC1QGqAsLHCguddFlfPjbjflGCqXdJ8cdhEjrzzvI/rL0XUvzCC4ETgGl9i/wDU6ujZ94gA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3" + } + }, "node_modules/emoji-regex": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", @@ -13008,12 +13018,6 @@ "node": ">=0.8.0" } }, - "node_modules/style-observer": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/style-observer/-/style-observer-0.0.7.tgz", - "integrity": "sha512-t75H3CRy+vd5q3yqyrf/De4tkz33hPQTiCcfh0NTesI5G7kJnZ227LEYTwqjKTtaFOCJvqZcYFHpJlF8bsk3bQ==", - "license": "MIT" - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -13977,10 +13981,10 @@ }, "packages/webawesome": { "name": "@awesome.me/webawesome", - "version": "3.0.0-beta.5", + "version": "3.0.0-beta.6", "license": "MIT", "dependencies": { - "@ctrl/tinycolor": "^4.1.0", + "@ctrl/tinycolor": "4.1.0", "@floating-ui/dom": "^1.6.13", "@lit/react": "^1.0.8", "@shoelace-style/animations": "^1.2.0", @@ -13988,11 +13992,11 @@ "composed-offset-position": "^0.0.6", "lit": "^3.2.1", "nanoid": "^5.1.5", - "qr-creator": "^1.0.0", - "style-observer": "^0.0.7" + "qr-creator": "^1.0.0" }, "devDependencies": { - "@wc-toolkit/jsx-types": "^1.3.0" + "@wc-toolkit/jsx-types": "^1.3.0", + "eleventy-plugin-git-commit-date": "^0.1.3" }, "engines": { "node": ">=14.17.0" @@ -14000,9 +14004,9 @@ }, "packages/webawesome-pro": { "name": "@shoelace-style/webawesome-pro", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.6", "dependencies": { - "@ctrl/tinycolor": "^4.1.0", + "@ctrl/tinycolor": "4.1.0", "@floating-ui/dom": "^1.6.13", "@lit/react": "^1.0.8", "@shoelace-style/animations": "^1.2.0", @@ -14010,8 +14014,7 @@ "composed-offset-position": "^0.0.6", "lit": "^3.2.1", "nanoid": "^5.1.5", - "qr-creator": "^1.0.0", - "style-observer": "^0.0.7" + "qr-creator": "^1.0.0" }, "devDependencies": { "@wc-toolkit/jsx-types": "^1.3.0" diff --git a/packages/webawesome/LICENSE.md b/packages/webawesome/LICENSE.md new file mode 100644 index 000000000..08cc22b5d --- /dev/null +++ b/packages/webawesome/LICENSE.md @@ -0,0 +1,7 @@ +Copyright (c) 2025 Fonticons, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/webawesome/docs/.eleventy.js b/packages/webawesome/docs/.eleventy.js index 213b86645..1e18bebe9 100644 --- a/packages/webawesome/docs/.eleventy.js +++ b/packages/webawesome/docs/.eleventy.js @@ -1,4 +1,6 @@ +import { nanoid } from 'nanoid'; import { parse as HTMLParse } from 'node-html-parser'; +import { execFileSync } from 'node:child_process'; import * as fs from 'node:fs'; import * as path from 'node:path'; import { anchorHeadingsTransformer } from './_transformers/anchor-headings.js'; @@ -19,6 +21,7 @@ import { replaceTextPlugin } from './_plugins/replace-text.js'; import { searchPlugin } from './_plugins/search.js'; const __dirname = url.fileURLToPath(new URL('.', import.meta.url)); const isDev = process.argv.includes('--develop'); +const ignoreGit = process.env.ELEVENTY_IGNORE_GIT === 'true'; const passThroughExtensions = ['js', 'css', 'png', 'svg', 'jpg', 'mp4']; async function getPackageData() { @@ -57,6 +60,15 @@ export default async function (eleventyConfig) { if (updateComponentData) { allComponents = getComponents(); } + + // Invalidate last-modified cache for changed content files during watch + if (Array.isArray(changedFiles)) { + for (const file of changedFiles) { + if (/\.(md|njk|html)$/i.test(file)) { + lastModCache.delete(file); + } + } + } }); /** @@ -76,7 +88,6 @@ export default async function (eleventyConfig) { // eleventyConfig.addGlobalData('package', packageData); eleventyConfig.addGlobalData('layout', 'page.njk'); - eleventyConfig.addGlobalData('pageType', 'docs'); // Default page type eleventyConfig.addGlobalData('server', { head: '', loginOrAvatar: '', @@ -88,12 +99,97 @@ export default async function (eleventyConfig) { eleventyConfig.addFilter('markdown', content => markdown.render(content || '')); eleventyConfig.addFilter('stripExtension', string => path.parse(string + '').name); eleventyConfig.addFilter('stripPrefix', content => content.replace(/^wa-/, '')); + eleventyConfig.addFilter('uniqueId', (_value, length = 8) => nanoid(length)); + // Returns last modified date as ISO 8601 (UTC, Z-suffixed) + // Fallback order: front matter override -> Git last commit date -> filesystem mtime -> now + // Caching: in-memory per inputPath during one build/dev session + // Override: pass a Date or string: {{ page.inputPath | gitLastModifiedISO(lastUpdated) }} + const lastModCache = new Map(); + let repoRoot = null; // lazily resolved; null => not resolved, undefined => failed + + function getLastModifiedISO(inputPath, overrideDate) { + if (overrideDate instanceof Date) { + return overrideDate.toISOString(); + } + if (typeof overrideDate === 'string' && overrideDate) { + const parsed = new Date(overrideDate); + if (!isNaN(parsed.getTime())) return parsed.toISOString(); + } + if (!inputPath) return new Date().toISOString(); + if (lastModCache.has(inputPath)) return lastModCache.get(inputPath); + + // Try Git (ISO via %cI). Use a repo-root-relative path for portability. + if (!ignoreGit) { + try { + if (repoRoot === null) { + try { + repoRoot = execFileSync('git', ['rev-parse', '--show-toplevel'], { + stdio: ['ignore', 'pipe', 'ignore'], + cwd: __dirname, + }) + .toString() + .trim(); + } catch (_) { + repoRoot = undefined; + } + } + + const gitPath = repoRoot ? path.relative(repoRoot, inputPath) : inputPath; + const args = ['log', '-1', '--format=%cI', '--follow', '--', gitPath]; + const result = execFileSync('git', args, { + stdio: ['ignore', 'pipe', 'ignore'], + cwd: repoRoot || path.dirname(inputPath), + }) + .toString() + .trim(); + if (result) { + const iso = new Date(result).toISOString(); + lastModCache.set(inputPath, iso); + return iso; + } + } catch (_) { + // continue to fs fallback + } + } + + // Fallback to filesystem mtime + try { + const stats = fs.statSync(inputPath); + const iso = new Date(stats.mtime).toISOString(); + lastModCache.set(inputPath, iso); + return iso; + } catch (_) { + const now = new Date().toISOString(); + lastModCache.set(inputPath, now); + return now; + } + } + + eleventyConfig.addFilter('gitLastModifiedISO', function (inputPath, overrideDate) { + return getLastModifiedISO(inputPath, overrideDate); + }); + + // Attach lastUpdatedISO to page data so templates can use {{ lastUpdatedISO }} directly + eleventyConfig.addGlobalData('eleventyComputed', { + lastUpdatedISO: data => getLastModifiedISO(data.page?.inputPath, data.lastUpdated), + }); // Trims whitespace and pipes from the start and end of a string. Useful for CEM types, which can be pipe-delimited. // With Prettier 3, this means a leading pipe will exist be present when the line wraps. eleventyConfig.addFilter('trimPipes', content => { return typeof content === 'string' ? content.replace(/^(\s|\|)/g, '').replace(/(\s|\|)$/g, '') : content; }); + /** + * @example + {% set foo = {foo: "bar"} %} + {% set bar = {bar: "baz"} %} + {% set merged = foo | merge(bar) %} + {{ merged | dump }} + */ + eleventyConfig.addFilter('merge', function (obj1, obj2) { + return Object.assign({}, obj1, obj2); + }); + // Custom filter to sort with a priority item first, e.g. // {{ collection | sortWithFirst('fileSlug', 'default') }} => the item with the fileSlug of 'default' will be first eleventyConfig.addFilter('sortWithFirst', function (collection, property, firstValue) { diff --git a/packages/webawesome/docs/503.md b/packages/webawesome/docs/503.md new file mode 100644 index 000000000..fa3e728d7 --- /dev/null +++ b/packages/webawesome/docs/503.md @@ -0,0 +1,312 @@ +--- +title: Web Awesome is Undergoing Maintenance +description: We're performing routine maintenance to keep things running smoothly. Check back soon! +layout: blank +permalink: 503.html +noindex: true +unlisted: true +--- + +{% block head %} + + + +{% endblock %} + + + + +
+ +
+
+ +
+ +
diff --git a/packages/webawesome/docs/_data/themer.js b/packages/webawesome/docs/_data/themer.js index 9ec4b2bcd..020feda57 100644 --- a/packages/webawesome/docs/_data/themer.js +++ b/packages/webawesome/docs/_data/themer.js @@ -74,12 +74,12 @@ export const themes = [ body: { name: 'Quicksand', css: 'Quicksand, sans-serif', - href: 'https://fonts.bunny.net/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&family=Quicksand:wght@300..700&display=swap', + href: 'https://fonts.bunny.net/css2?family=Quicksand:wght@300..700&display=swap', }, heading: { name: 'Quicksand', css: 'Quicksand, sans-serif', - href: 'https://fonts.bunny.net/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&family=Quicksand:wght@300..700&display=swap', + href: 'https://fonts.bunny.net/css2?family=Quicksand:wght@300..700&display=swap', }, code: { name: 'OS Default', @@ -89,7 +89,7 @@ export const themes = [ longform: { name: 'Crimson Pro', css: '"Crimson Pro", serif', - href: 'https://fonts.bunny.net/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&family=Quicksand:wght@300..700&display=swap', + href: 'https://fonts.bunny.net/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&display=swap', }, }, icons: { @@ -194,22 +194,22 @@ export const themes = [ body: { name: 'Inter', css: 'Inter, sans-serif', - href: 'https://fonts.bunny.net/css2?family=Aleo:ital,wght@0,100..900;1,100..900&family=Geist+Mono:wght@100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap', }, heading: { name: 'Inter', css: 'Inter, sans-serif', - href: 'https://fonts.bunny.net/css2?family=Aleo:ital,wght@0,100..900;1,100..900&family=Geist+Mono:wght@100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap', }, code: { name: 'Geist Mono', css: '"Geist Mono", monospace', - href: 'https://fonts.bunny.net/css2?family=Aleo:ital,wght@0,100..900;1,100..900&family=Geist+Mono:wght@100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=Geist+Mono:wght@100..900&display=swap', }, longform: { name: 'Aleo', css: 'Aleo, serif', - href: 'https://fonts.bunny.net/css2?family=Aleo:ital,wght@0,100..900;1,100..900&family=Geist+Mono:wght@100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=Aleo:ital,wght@0,100..900;1,100..900&display=swap', }, }, icons: { @@ -254,22 +254,22 @@ export const themes = [ body: { name: 'Space Grotesk', css: '"Space Grotesk", sans-serif', - href: 'https://fonts.bunny.net/css2?family=IBM+Plex+Sans+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Podkova:wght@400..800&family=Space+Grotesk:wght@300..700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap', + href: 'https://fonts.bunny.net/css2?family=Space+Grotesk:wght@300..700&display=swap', }, heading: { name: 'IBM Plex Sans Condensed', css: '"IBM Plex Sans Condensed", sans-serif', - href: 'https://fonts.bunny.net/css2?family=IBM+Plex+Sans+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Podkova:wght@400..800&family=Space+Grotesk:wght@300..700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap', + href: 'https://fonts.bunny.net/css2?family=IBM+Plex+Sans+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap', }, code: { name: 'Space Mono', css: '"Space Mono", monospace', - href: 'https://fonts.bunny.net/css2?family=IBM+Plex+Sans+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Podkova:wght@400..800&family=Space+Grotesk:wght@300..700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap', + href: 'https://fonts.bunny.net/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap', }, longform: { name: 'Podkova', css: 'Podkova, serif', - href: 'https://fonts.bunny.net/css2?family=IBM+Plex+Sans+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Podkova:wght@400..800&family=Space+Grotesk:wght@300..700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap', + href: 'https://fonts.bunny.net/css2?family=Podkova:wght@400..800&display=swap', }, }, icons: { @@ -314,22 +314,22 @@ export const themes = [ body: { name: 'Figtree', css: 'Figtree, sans-serif', - href: 'https://fonts.bunny.net/css2?family=Chivo+Mono:ital,wght@0,100..900;1,100..900&family=Figtree:ital,wght@0,300..900;1,300..900&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap', }, heading: { name: 'Figtree', css: 'Figtree, sans-serif', - href: 'https://fonts.bunny.net/css2?family=Chivo+Mono:ital,wght@0,100..900;1,100..900&family=Figtree:ital,wght@0,300..900;1,300..900&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap', }, code: { name: 'Chivo Mono', css: '"Chivo Mono", monospace', - href: 'https://fonts.bunny.net/css2?family=Chivo+Mono:ital,wght@0,100..900;1,100..900&family=Figtree:ital,wght@0,300..900;1,300..900&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=Chivo+Mono:ital,wght@0,100..900;1,100..900&display=swap', }, longform: { name: 'Fraunces', css: 'Fraunces, serif', - href: 'https://fonts.bunny.net/css2?family=Chivo+Mono:ital,wght@0,100..900;1,100..900&family=Figtree:ital,wght@0,300..900;1,300..900&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=Fraunces:ital,wght@0,100..900;1,100..900&display=swap', }, }, icons: { @@ -374,22 +374,22 @@ export const themes = [ body: { name: 'Wix Madefor Text', css: '"Wix Madefor Text", sans-serif', - href: 'https://fonts.bunny.net/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Roboto+Serif:ital,opsz,wght@0,8..144,100..900;1,8..144,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Wix+Madefor+Text:ital,wght@0,400..800;1,400..800&display=swap', + href: 'https://fonts.bunny.net/css2?family=Wix+Madefor+Text:ital,wght@0,400..800;1,400..800&display=swap', }, heading: { name: 'Wix Madefor Text', css: '"Wix Madefor Text", sans-serif', - href: 'https://fonts.bunny.net/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Roboto+Serif:ital,opsz,wght@0,8..144,100..900;1,8..144,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Wix+Madefor+Text:ital,wght@0,400..800;1,400..800&display=swap', + href: 'https://fonts.bunny.net/css2?family=Wix+Madefor+Text:ital,wght@0,400..800;1,400..800&display=swap', }, code: { name: 'Roboto Mono', css: '"Roboto Mono", monospace', - href: 'https://fonts.bunny.net/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Roboto+Serif:ital,opsz,wght@0,8..144,100..900;1,8..144,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Wix+Madefor+Text:ital,wght@0,400..800;1,400..800&display=swap', + href: 'https://fonts.bunny.net/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap', }, longform: { name: 'Roboto Serif', css: '"Roboto Serif", serif', - href: 'https://fonts.bunny.net/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Roboto+Serif:ital,opsz,wght@0,8..144,100..900;1,8..144,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Wix+Madefor+Text:ital,wght@0,400..800;1,400..800&display=swap', + href: 'https://fonts.bunny.net/css2?family=Roboto+Serif:ital,wght@0,100..900;1,100..900&display=swap', }, }, icons: { @@ -434,12 +434,12 @@ export const themes = [ body: { name: 'Mulish', css: 'Mulish, sans-serif', - href: 'https://fonts.bunny.net/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap', + href: 'https://fonts.bunny.net/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap', }, heading: { name: 'Lora', css: 'Lora, serif', - href: 'https://fonts.bunny.net/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap', + href: 'https://fonts.bunny.net/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap', }, code: { name: 'OS Default', @@ -449,7 +449,7 @@ export const themes = [ longform: { name: 'Lora', css: 'Lora, serif', - href: 'https://fonts.bunny.net/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap', + href: 'https://fonts.bunny.net/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap', }, }, icons: { @@ -494,22 +494,22 @@ export const themes = [ body: { name: 'Nunito', css: 'Nunito, sans-serif', - href: 'https://fonts.bunny.net/css2?family=Azeret+Mono:ital,wght@0,100..900;1,100..900&family=BioRhyme:wght@200..800&family=Fredoka:wght@300..700&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap', + href: 'https://fonts.bunny.net/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap', }, heading: { name: 'Fredoka', css: 'Fredoka, sans-serif', - href: 'https://fonts.bunny.net/css2?family=Azeret+Mono:ital,wght@0,100..900;1,100..900&family=BioRhyme:wght@200..800&family=Fredoka:wght@300..700&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap', + href: 'https://fonts.bunny.net/css2?family=Fredoka:wght@300..700&display=swap', }, code: { name: 'Azeret Mono', css: '"Azeret Mono", monospace', - href: 'https://fonts.bunny.net/css2?family=Azeret+Mono:ital,wght@0,100..900;1,100..900&family=BioRhyme:wght@200..800&family=Fredoka:wght@300..700&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap', + href: 'https://fonts.bunny.net/css2?family=Azeret+Mono:ital,wght@0,100..900;1,100..900&display=swap', }, longform: { name: 'BioRhyme', css: 'BioRhyme, serif', - href: 'https://fonts.bunny.net/css2?family=Azeret+Mono:ital,wght@0,100..900;1,100..900&family=BioRhyme:wght@200..800&family=Fredoka:wght@300..700&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap', + href: 'https://fonts.bunny.net/css2?family=BioRhyme:wght@200..800&display=swap', }, }, icons: { @@ -554,12 +554,12 @@ export const themes = [ body: { name: 'DM Sans', css: '"DM Sans", sans-serif', - href: 'https://fonts.bunny.net/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Playfair:ital,opsz,wght@0,5..1200,300..900;1,5..1200,300..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=DM+Sans:ital,wght@0,100..1000;1,100..1000&display=swap', }, heading: { name: 'Playfair Display', css: '"Playfair Display", serif', - href: 'https://fonts.bunny.net/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Playfair:ital,opsz,wght@0,5..1200,300..900;1,5..1200,300..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap', }, code: { name: 'OS Default', @@ -569,7 +569,7 @@ export const themes = [ longform: { name: 'Playfair', css: 'Playfair, serif', - href: 'https://fonts.bunny.net/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Playfair:ital,opsz,wght@0,5..1200,300..900;1,5..1200,300..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=Playfair:ital,wght@0,300..900;1,300..900&display=swap', }, }, icons: { @@ -614,12 +614,12 @@ export const themes = [ body: { name: 'Inter', css: 'Inter, sans-serif', - href: 'https://fonts.bunny.net/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap', }, heading: { name: 'Inter', css: 'Inter, sans-serif', - href: 'https://fonts.bunny.net/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap', + href: 'https://fonts.bunny.net/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap', }, code: { name: 'OS Default', diff --git a/packages/webawesome/docs/_includes/base.njk b/packages/webawesome/docs/_includes/base.njk index 667e1c479..92c788150 100644 --- a/packages/webawesome/docs/_includes/base.njk +++ b/packages/webawesome/docs/_includes/base.njk @@ -15,16 +15,9 @@ {% if hasSidebar %}{% endif %} - {% if pageType == 'marketing' %} - {# Marketing styles #} - - {% else %} - {# Docs styles (default) #} + {% block head %} - {% endif %} - - - {% block head %}{% endblock %} + {% endblock %} - - - - - - {% if pageHeader %} - {% include pageHeader %} - {% else %} - - {% endif %} + + {% endblock %} {# Sidebar #} {% if hasSidebar %} {# Mobile selectors #}