diff --git a/admin/pages/DocsBrowser.svelte b/admin/pages/DocsBrowser.svelte index 25717cb..ab9c321 100644 --- a/admin/pages/DocsBrowser.svelte +++ b/admin/pages/DocsBrowser.svelte @@ -121,7 +121,18 @@ display: block; } + /* FOOTGUN: https://github.com/sveltejs/svelte/issues/2967 + When you @html in Svelte it can't apply any styles from here. + You have to scope the a tag style inside module-header, BUT, + set it to global so Svelte will apply it to the whole doc, + not its special class. + */ + module-header :global(a) { + color: var(--color-text-inverted); + } + module-header { + display: block; padding: 0.5rem; background-color: var(--color-bg-inverted); color: var(--color-text-inverted); @@ -141,7 +152,7 @@ {#if docs_data} - +

{ url }

{#if docs_data.comment} {@html docs_data.comment} diff --git a/lib/models.js b/lib/models.js index 438eeb2..370820e 100644 --- a/lib/models.js +++ b/lib/models.js @@ -1,3 +1,24 @@ +/* + This contains the base classes for the `Model`s in the database. It uses + the [lib/ormish.js](/admin/#/docs/lib/ormish.js) module to build up classes for: + + + `User` -- A simple user model. + + `Payment` -- A Payment model that is simple but can support Stripe, Paypal, and BTCPayServer. + + `Product` -- A simple Product for the site. + + `Media` -- Media information common to video and music files, but could work with anything. + + `Livestream` -- Metadata for livestream sessions (see `client/pages/Livestream.svelte`). + + `Site` -- Simple key=value store for settings you might want in your site. + + As with all other code in this project these models are _complete_ but don't have everything + under the sun. For example, it acts as if `User` pays one time to access the entire site and + all `Product`. That is one very valid model of payment, and it's the simplest one which you + can then build on. The rationale is you get a starter kit that you can then mold into what you + need because this is simple enough to understand while also being useful to get started. + + ### Tests + + You should look at the tests in `tests/models` for many examples of using these. + */ import { knex, Model } from './ormish.js'; import bcrypt from 'bcryptjs'; import {v4 as uuid} from "uuid";