From 0ed68c5e9a7941b50aaff1f83e04a57da214ad2c Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Sun, 29 May 2022 22:48:27 -0700 Subject: [PATCH] Add webmention submission forms A long time coming --- assets/css/main.css | 6 +++--- layouts/partials/search.html | 8 +++++--- layouts/partials/webmention-form.html | 12 ++++++++++++ layouts/partials/webmentions.html | 1 + 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 layouts/partials/webmention-form.html diff --git a/assets/css/main.css b/assets/css/main.css index f730a8c..77e10c1 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -186,18 +186,18 @@ nav ul li { * single-row flexbox that supports more browsers. Kanged this CSS from * ww.gov.uk. Give the entire width of the row to the search box, but * allow the minimum width for the submit button. */ -form { +form > div { display: table; width: 100% } /* A text box should not look like a button */ -input[type="search"] { +input:not([type="submit"]) { display: table-cell; width: 98%; } -form > div { +form > div > div { display: table-cell; vertical-align: top; /* IE and some botique browsers need this */ width: 1%; diff --git a/layouts/partials/search.html b/layouts/partials/search.html index b290898..9209df7 100644 --- a/layouts/partials/search.html +++ b/layouts/partials/search.html @@ -1,7 +1,9 @@ -Search this site:
- -
+ +
+ +
+
diff --git a/layouts/partials/webmention-form.html b/layouts/partials/webmention-form.html new file mode 100644 index 0000000..4f12258 --- /dev/null +++ b/layouts/partials/webmention-form.html @@ -0,0 +1,12 @@ +
+ + + {{ $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}} + +
+ +
+
+
diff --git a/layouts/partials/webmentions.html b/layouts/partials/webmentions.html index 13e99b2..82a6e14 100644 --- a/layouts/partials/webmentions.html +++ b/layouts/partials/webmentions.html @@ -1,6 +1,7 @@

Webmen­tions

This site supports Webmentions. Webmentions received for this post will appear in the following list after I approve them. I sometimes send Webmentions to myself on behalf of linking sites that don't support them. Check the Wayback Machine if any links are broken.

+ {{ partial "webmention-form.html" }}
{{- $target := .RelPermalink | replaceRE "^/~seirdy/" "/" }} {{- $oldTarget := $target | replaceRE "/posts" "" | replaceRE "/$" ".html" -}}