From c264512f64e25e6fbddddf9bd61238faa2bbf12d Mon Sep 17 00:00:00 2001 From: alyx Date: Fri, 17 Nov 2023 13:10:33 -0500 Subject: Format TODO.md, add watermarking concept. --- TODO.md | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/TODO.md b/TODO.md index 46eeb39..b7be023 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,8 @@ # Future plans for this project: + ## Custom Fonts + For ease-of-inclusion this should probably be handled by internal code, and provided as a set of properties on `lfm_embed::ctx::model::Data`. There are 3 main kinds of fonts we should support. @@ -10,18 +12,52 @@ There are 3 main kinds of fonts we should support. There is no good way to expose a typed enum with the current wizard UI, and the resulting UI from this could allow added user flexibility. -I propose the following API: +### Query Parameters - `?font=foo` corresponds directly with `* { font-family: 'foo' }` in the CSS. - `?font=foo&include-font=https://example.com/font.otf` will additionally append `@font-face { font-family: 'foo' src: url('https://example.com/font.otf') }`. +- `?include-stylesheet` allows for general stylesheet inclusion. It may be specified N times. -There will also be a `?include-stylesheet` parameter, allowing for general custom styles, including google fonts et. al. +### Context Members + +- `font: object` null if no font params specified. +- `font.name: string` contains `?font` +- `font.additional_css` will contain the `?include-font` css, as well as the proxied contents of `?include-stylesheet`. ## Move more things internal -Of the crates currently relied on, the following appear too feature-packed should be replaced with simpler internal code. +Of the crates currently relied on, the following appear too feature-packed should be replaced with simpler internal code, to reduce binary size. - duration-str - htmlize - urlencoding + + +## Watermarking + +Support for a limited form of (optional) watermaking. It would be up to the themes to include it. + +### Query Parameters + +- `?watermark` specifies opting-in to the watermark. + +### Config Entries + +- `LFME_WATERMARK_MANDATORY: 0|1` forces a watermark if `1`. The main instance will not use this, but alternate instances may. +- `LFME_WATERMARK_TEXT: string` should contain the name of the specific instance, or a tagline. +- `LFME_WATERMARK_IMG: string` should contain a link to an image. The rendered size of this image is at the discretion of a given theme, but it should be around 32x32, and have an aspect ratio no greater than 1:2. +- `LFME_WATERMARK_URL: string` should contain a link to the host, or whoever else the watermarker wishes. + +### Context Members + +- `watermark: object` null, unless `(LFME_WATERMARK_TEXT || LFME_WATERMARK_IMG || LFME_WATERMARK_URL) && (?watermark || LFME_WATERMARK_MANDATORY)`. Should be interpreted as whether to render a watermark. +- `watermark.text` = `LFME_WATERMARK_TEXT`. Defaults to `lfm_embed`. +- `watermark.img` = `LFME_WATERMARK_IMG`. Defaults to null. +- `watermark.url` = `LFME_WATERMARK_URL`. Defaults to null. + +All that is guaranteed is the presence of `watermark.text`, so all themes should be able to fallback to text. +Image support should be considered optional. Linking should be considered optional. + +It is not an error to specify a mandatory watermark with no possible contents, as the watermark object will simply not be present. +A warning should be output on startup. -- cgit v1.2.3-70-g09d2