Widgets
Put Roosevelt's orders and proclamations on any page of trlibrary.com, or anywhere else. Add one script tag, then drop in a card. Each card loads live from the API, links back to the full record, and keeps its styles to itself so it won't disturb the page around it.
<script src="https://executiveactions.labs.trlibrary.com/widgets/executiveactions.js" defer></script>
One document
A card for a single order or proclamation, by its id. Ids appear in every document page's address.
<trpl-action id="proc-563"></trpl-action>
Signed on this day
What Roosevelt signed on today's date, in any year of his presidency, biggest first. If nothing carries today's date, it shows the next date that does. Set date="MM-DD" to fix a date.
<trpl-actions-on-this-day count="3"></trpl-actions-on-this-day> <trpl-actions-on-this-day date="06-08" count="4"></trpl-actions-on-this-day>
A filtered list
Any mix of subject, state, year and type. Without a year, it shows the most significant documents first, listed in date order; with a year, the earliest first. A “See all” link opens the same filter in the index.
<trpl-actions-list category="forests" state="Arizona" year="1908" limit="10"></trpl-actions-list> <trpl-actions-list category="monuments" limit="5" theme="dark"></trpl-actions-list>
A story teaser
A short card that sends readers to one of the stories, by number or slug.
<trpl-story n="2"></trpl-story>
Story teasers appear here once the first stories are published.
Then and now
Places today that began with a Roosevelt order or proclamation, oldest first, each linked to the document. Pick a kind of place, a state, or both. A “See all” link opens the full list.
<trpl-then-and-now kind="wildlife_refuge" state="Florida" limit="8"></trpl-then-and-now> <trpl-then-and-now kind="national_park" theme="dark"></trpl-then-and-now>
Options
| Attribute | Widgets | What it does |
|---|---|---|
theme | all | light (default), dark, or auto to follow the visitor's system setting |
cta | all | off hides the “Plan your visit” link |
data-api | all | Point at another copy of the API, such as a staging site. Can also go on the script tag |
id | trpl-action | Document id, e.g. proc-563, eo-1003, uo-018 |
date, count | trpl-actions-on-this-day | Fixed MM-DD date; how many to show (default 3, up to 12) |
category, state, year, type | trpl-actions-list | Filters. Subjects use the slugs in categories/index.json; states use plain names; type is executive_order, proclamation or unnumbered_order |
limit, sort, min, heading | trpl-actions-list | How many (default 10, up to 50); date or significance; lowest weight to include, 1–5; your own heading |
n or slug | trpl-story | Story number or slug |
kind, state, limit, heading | trpl-then-and-now | national_park, national_monument, national_forest, wildlife_refuge, lighthouse or other; a state name; how many (default 8, up to 60); your own heading |
Fonts follow the page when it sets --ea-display, --ea-serif and --ea-sans; otherwise the cards use the Library's brand fonts with sensible fallbacks.