A personal web app to store & search URLs and descriptions you want to save.
TODO
- HTML view
- CSS styles
- JS application
Preexisting HTML view for search form. User browser form submissions, rather than javascript event handler.
<form role="search" method="GET" action="#"></form>
Search state is stored in URL as search params, application/x-www-form-urlencoded
, so URLs can be saved & shared.
- Styles preexisting HTML
- Styles classes provided by search results list
- Script to hydrate view from state stored in URL search params
- Web component for search results view
- Javascript class providing search functionality, business logic, & data access
interface Fact {
badge: string;
title: string;
content: string;
keyValue: [string, string][];
link: URL;
}
interface ExternalBrain {
init(): Promise<void>; // Loads data from internet sources
search(searchTerm: string): Fact[];
}
interface {
properties: {
status: 'loading' | 'failure' | 'success';
factsList: Fact[];
}
}
/**
* @cssprop --wc-external-brain-badge-bkg - `background` of a fact's badge. Maybe you want to do reverse-text coloring?
* @cssprop --wc-external-brain-badge-text - `color` of a fact's badge. Maybe you want to do reverse-text coloring?
*/