From 3c67b646066f372968ca2e7c48312b0caff8b41f Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me> Date: Thu, 19 Oct 2023 03:25:51 -0400 Subject: [PATCH] Added info field and container-split shortcodes --- CHANGELOG.md | 7 +++++- api/nodeinfo/2.1.ts | 2 +- assets/css/main.css | 33 +++++++++++++++++++++++++ layouts/shortcodes/container-split.html | 3 +++ layouts/shortcodes/info-entry.html | 3 +++ layouts/shortcodes/info-field.html | 3 +++ layouts/shortcodes/info-key.html | 1 + layouts/shortcodes/info-value.html | 1 + 8 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 layouts/shortcodes/container-split.html create mode 100644 layouts/shortcodes/info-entry.html create mode 100644 layouts/shortcodes/info-field.html create mode 100644 layouts/shortcodes/info-key.html create mode 100644 layouts/shortcodes/info-value.html diff --git a/CHANGELOG.md b/CHANGELOG.md index a979f6bfc..415df4de6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,14 @@ # Changelog -## 2.0.1 +## 2.1.0 * Card shortcode will not longer render the horizontal rule when there is no bottom text to render. +* Added several shortcodes and CSS for rendering info-fields, for example for + contact info. See `info-entry.html`, `info-field.html`, `info-key.html` and + `info-value.html` under the `/layouts/shortcodes/` directory. +* Added the `container-split` short code which will split a container into two + columns. ## 2.0.0 diff --git a/api/nodeinfo/2.1.ts b/api/nodeinfo/2.1.ts index 65078feb3..5c287d349 100644 --- a/api/nodeinfo/2.1.ts +++ b/api/nodeinfo/2.1.ts @@ -9,7 +9,7 @@ export default function (req: VercelRequest, res: VercelResponse) { "name": "Fedipage", "repository": "https://git.qoto.org/fedipage/fedipage", "homepage": "https://fedipage.com/", - "version": "2.0.1" + "version": "2.1.0" }, "protocols": [ "activitypub" diff --git a/assets/css/main.css b/assets/css/main.css index 8571585da..b56f1ac5f 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -736,3 +736,36 @@ div#ch-tooltip { content: '- '; font-size: 2rem; } + +/* Infofield css */ +.info-field h2 { + font-size: 1em; + border-bottom-style: ridge; +} + +.entry { + display: grid; + grid-template-columns: auto max-content; + grid-template-areas: "key value"; + + align-items: end; + gap: 0 .25rem; +} + +.value { + grid-area: value; +} + +.key { + grid-area: key; + position: relative; + overflow: hidden; +} + +.key::after { + content: " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " + ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " + ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "; + position: absolute; + text-align: right; +} diff --git a/layouts/shortcodes/container-split.html b/layouts/shortcodes/container-split.html new file mode 100644 index 000000000..930368761 --- /dev/null +++ b/layouts/shortcodes/container-split.html @@ -0,0 +1,3 @@ +<div class="col-md-6"> + {{ .Inner }} +</div> diff --git a/layouts/shortcodes/info-entry.html b/layouts/shortcodes/info-entry.html new file mode 100644 index 000000000..655fcb8d7 --- /dev/null +++ b/layouts/shortcodes/info-entry.html @@ -0,0 +1,3 @@ +<div class="entry"> + {{ .Inner }} +</div> diff --git a/layouts/shortcodes/info-field.html b/layouts/shortcodes/info-field.html new file mode 100644 index 000000000..ae37628af --- /dev/null +++ b/layouts/shortcodes/info-field.html @@ -0,0 +1,3 @@ +<div class="info-field row"> + {{ .Inner }} +</div> diff --git a/layouts/shortcodes/info-key.html b/layouts/shortcodes/info-key.html new file mode 100644 index 000000000..19133f1c2 --- /dev/null +++ b/layouts/shortcodes/info-key.html @@ -0,0 +1 @@ +<div class="key">{{ .Inner }}</div> diff --git a/layouts/shortcodes/info-value.html b/layouts/shortcodes/info-value.html new file mode 100644 index 000000000..673e3b9ab --- /dev/null +++ b/layouts/shortcodes/info-value.html @@ -0,0 +1 @@ +<div class="value">{{ .Inner }}</div> -- GitLab