This gist has USWDS themes for two components. The CSS for these themes are in the other files in this gist.
Documentation for these components:
| @media print { | |
| /* Fixes paragraph truncation in Firefox */ | |
| body { | |
| display: block !important; | |
| overflow: visible !important; | |
| } | |
| .flex-fill { | |
| min-height: 0 !important; | |
| } |
This gist has USWDS themes for two components. The CSS for these themes are in the other files in this gist.
Documentation for these components:
Decap offers custom widgets, that can be added from Decap's markdown editor.
Dependencies:
usa-button class must be available)Widgets:
usa-button class must be available, from USWDSThis eleventy config does several things to make it easier to work with USWDS:
asMarkdown that can be used in hard-coded (non-markdown) HTML files. This uses the same markdown parser that Markdown uses, to prevent issues with having multiple instances or libraries.usa-link--external, and open in a new tabusa-listtypographer setting is enabled, giving us features like smart quotes.| const params = new Proxy(new URL(window.location), { | |
| get: (url, prop) => url.searchParams.get(prop), | |
| set: (url, prop, value) => { | |
| url.searchParams.set(prop, value); | |
| window.history.replaceState({}, "", url); | |
| }, | |
| }); | |
| window.addEventListener("DOMContentLoaded", async (event) => { | |
| // initialize the search UI | |
| const search = await new PagefindUI({ |
| // reading from the search parameter | |
| console.log(params.q); | |
| // writing to the URL in the navigation bar | |
| params.q = "new query"; |
These below snippets go into admin/main.js
| import { html, LitElement } from "lit"; | |
| import { customElement, property } from "lit/decorators.js"; | |
| import { submit } from "@open-wc/form-helpers"; | |
| import { importMdwdsLinkTag } from "../../lib/mdwdsAssetsPath.js"; | |
| @customElement("login-gov-button") | |
| export class LoginGovButton extends LitElement { | |
| @property({ type: Boolean }) | |
| big = false; |
| import { css, html, LitElement, nothing } from "lit"; | |
| import { | |
| customElement, | |
| property, | |
| queryAssignedNodes, | |
| state, | |
| } from "lit/decorators.js"; | |
| const sharedCSS = css` | |
| :host { |
When looking at a running CI job, it's nice to see some progress occur so you know it's not stuck. Without this formatter, if you look at a running RSpec job, it looks stuck, because it doesn't display any output until it's run every test.
This formatter was created by a coworker, but I wanted to share this out in case it helps other folks!