From 839607e86828c0ce051408b28123811cf4cfc1ba Mon Sep 17 00:00:00 2001 From: Marvin Steadfast Date: Thu, 12 Mar 2020 16:45:18 +0100 Subject: [PATCH] first try to get webmentions going --- .drone.yml | 6 ++++- .gitignore | 1 + data/.gitkeep | 0 themes/xsfx/layouts/_default/single.html | 1 + themes/xsfx/layouts/partials/mentions.html | 26 ++++++++++++++++++++++ themes/xsfx/static/css/xsfx.css | 26 ++++++++++++++++++++++ 6 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 data/.gitkeep create mode 100644 themes/xsfx/layouts/partials/mentions.html diff --git a/.drone.yml b/.drone.yml index 283ba9d..1923a2a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,12 +10,16 @@ steps: environment: FTP_PASS: from_secret: ftp_pass + WEBMENTIONIO_TOKEN: + from_secret: webmentionio_token commands: - - apk add --no-cache make + - apk add --no-cache curl make - mkdir -p ~/.config/rclone - make rclone_config - cat ~/.config/rclone/rclone.conf - make install_deps + - curl "https://webmention.io/api/mentions?token=${WEBMENTIONIO_TOKEN}" -o data/mentions.json + - ls -lah data/ - make build - make ftp_upload when: diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..141fde6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +data/mentions.json diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/themes/xsfx/layouts/_default/single.html b/themes/xsfx/layouts/_default/single.html index 9eb4be7..1ac8352 100644 --- a/themes/xsfx/layouts/_default/single.html +++ b/themes/xsfx/layouts/_default/single.html @@ -2,6 +2,7 @@
{{ partial "article.html" . }} + {{ partial "mentions.html" . }}
{{ end }} diff --git a/themes/xsfx/layouts/partials/mentions.html b/themes/xsfx/layouts/partials/mentions.html new file mode 100644 index 0000000..cb54522 --- /dev/null +++ b/themes/xsfx/layouts/partials/mentions.html @@ -0,0 +1,26 @@ +
+
+
+
+ + +
+
+ +
+
+ +
+
+
+
+ + + {{ range where .Site.Data.mentions.links "target" .Permalink }} + + + + + {{ end }} +
{{ .data.content | safeHTML}} - {{ .data.author.name }} @ {{ dateFormat "Monday, Jan 2, 2006" .data.published }}
+
diff --git a/themes/xsfx/static/css/xsfx.css b/themes/xsfx/static/css/xsfx.css index 87d4ea9..86e8e19 100644 --- a/themes/xsfx/static/css/xsfx.css +++ b/themes/xsfx/static/css/xsfx.css @@ -189,3 +189,29 @@ body .meta { article .p-author.h-card { display: none; } + +article #mentions { + padding-top: 5rem; + padding-left: 0px; +} + +article.h-entry section#mentions form fieldset div.row div.column { + padding-left: 0px; +} + +.button.default, +button.default, +[type="button"][default], +[type="button"].default, +[type="reset"].default, +[type="submit"] { + background-color: #000000; +} + +.button, +button, +[type="button"], +[type="reset"], +[type="submit"] { + border: 0.1rem solid #000000; +}