Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ To deploy by hand, run `npm run deploy`. `npm run preview` creates a Preview dep
- `src/_data/`: Global site metadata.
- `_site/`: The generated static site (output).

## Header banner

Any page can show an alert bar under the header by adding `banner` to its front matter:

```yaml
banner:
level: info # optional: primary, secondary, success, info (default), warning, danger, light, dark
icon: info-circle # optional: Bootstrap Icons name; defaults per level, "" for none
text: Heads up! <a href="https://example.com" class="alert-link">Details</a> # required, HTML allowed
```

## Sitemaps and SEO

Sitemaps are automatically generated during the build process. SEO metadata (Open Graph, Twitter cards, etc.) is managed via the Eleventy data cascade and layouts. Overrides can be set in the Front Matter of individual pages.
21 changes: 20 additions & 1 deletion src/_includes/components/header.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<nav class="navbar navbar-expand-lg navbar-light bg-body-tertiary border-bottom mb-4 position-relative">
<header class="mb-4">
<nav class="navbar navbar-expand-lg navbar-light bg-body-tertiary border-bottom position-relative">
<div class="container">
<a class="navbar-brand d-flex align-items-center me-4" href="/">
<img src="/assets/img/pdd-icon-color-simple.svg" alt="Logo" width="40" height="40" class="me-2 rounded-2">
Expand Down Expand Up @@ -41,3 +42,21 @@
</div>
</div>
</nav>
{% if banner and banner.text %}
{% set bannerIcons = {
primary: 'info-circle-fill',
secondary: 'info-circle-fill',
success: 'check-circle-fill',
info: 'info-circle-fill',
warning: 'exclamation-triangle-fill',
danger: 'exclamation-octagon-fill',
light: 'info-circle-fill',
dark: 'info-circle-fill'
} %}
{% set bannerLevel = banner.level if banner.level in bannerIcons else 'info' %}
{% set bannerIcon = banner.icon if banner.icon !== undefined else bannerIcons[bannerLevel] %}
<div class="alert alert-{{ bannerLevel }} text-center rounded-0 border-0 mb-0 py-2" role="{{ 'alert' if bannerLevel in ['warning', 'danger'] else 'note' }}">
{% if bannerIcon %}<i class="bi bi-{{ bannerIcon }} me-2"></i>{% endif %}{{ banner.text | safe }}
</div>
{% endif %}
</header>
11 changes: 5 additions & 6 deletions src/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ layout: layouts/base.njk
title: Passkey Developer Tools
description: A collection of developer tools for passkeys and WebAuthn!
alpine: true
banner:
level: info
text: Want to learn more about deploying passkeys? Check out <a href="https://passkeys.dev/" class="alert-link">passkeys.dev</a>
extra_scripts:
- /assets/js/ordered-checkbox-list.js
extra_modules:
- /assets/js/webauthn-demo.js
---
<div class="container" style="max-width: 1140px;">
<div class="text-center mt-2 mb-5 pt-0">
<p class="lead text-body-secondary mt-3">Tools for building and debugging passkeys & WebAuthn
</p>
<p>Want to learn more about deploying passkeys?<br />
<span class="fs-5">Check out <a href="https://passkeys.dev/">passkeys.dev</a></span>
</p>
<div class="text-center mb-4">
<h2 class="fs-4 fw-light fst-italic mb-0">Tools for building and debugging passkeys & WebAuthn</h2>
</div>

<div class="mx-auto" style="max-width: 680px;">
Expand Down
Loading