From 98ad63cfc8dc5ffe0563c2bedb6778d270470103 Mon Sep 17 00:00:00 2001 From: Oliver Blanthorn Date: Wed, 23 May 2018 15:39:40 +0100 Subject: [PATCH] Improve discoverability of contributors --- scripts/authors.sh | 8 +++++ scripts/build.sh | 1 + src/config.ts | 1 + src/excmds.ts | 9 ++++++ src/static/authors.html | 23 ++++++++++++++ src/static/css/authors.css | 61 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 103 insertions(+) create mode 100755 scripts/authors.sh create mode 100644 src/static/authors.html create mode 100644 src/static/css/authors.css diff --git a/scripts/authors.sh b/scripts/authors.sh new file mode 100755 index 00000000..ab942f85 --- /dev/null +++ b/scripts/authors.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +cd src/static + +authors="../../build/static/authors.html" + +sed "/REPLACETHIS/,$ d" authors.html > "$authors" +git shortlog -sn | cut -c8- | sed 's/^/

/' | sed 's/$/<\/p>/' >> "$authors" +sed "1,/REPLACETHIS/ d" authors.html >> "$authors" diff --git a/scripts/build.sh b/scripts/build.sh index f69f2653..3aa321b0 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -56,6 +56,7 @@ fi wait scripts/bodgecss.sh +scripts/authors.sh if [ -e "$CLEANSLATE" ] ; then cp -v "$CLEANSLATE" build/static/css/cleanslate.css diff --git a/src/config.ts b/src/config.ts index 3e30213b..3bda9300 100644 --- a/src/config.ts +++ b/src/config.ts @@ -175,6 +175,7 @@ const DEFAULTS = o({ sanitize: "sanitise", tutorial: "tutor", h: "help", + authors: "credits", openwith: "hint -W", "!": "exclaim", "!s": "exclaim_quiet", diff --git a/src/excmds.ts b/src/excmds.ts index aeef1053..22d53268 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -779,6 +779,15 @@ export async function tutor(newtab?: string) { else open(tutor) } +/** + * Display Tridactyl's contributors in order of commits in a user-friendly fashion + */ +//#background +export async function credits(excmd?: string) { + const creditspage = browser.extension.getURL("static/authors.html") + tabopen(creditspage) +} + /** @hidden */ // Find clickable next-page/previous-page links whose text matches the supplied pattern, // and return the last such link. diff --git a/src/static/authors.html b/src/static/authors.html new file mode 100644 index 00000000..fd54242d --- /dev/null +++ b/src/static/authors.html @@ -0,0 +1,23 @@ + + + + + + + + + + +

+
+ +
+

Tridactyl: The Return of The Ed-i

+
+

The version of Tridactyl you are using was made by the following people:

+ REPLACETHIS +
+ +
+ + diff --git a/src/static/css/authors.css b/src/static/css/authors.css new file mode 100644 index 00000000..fa9f9cc3 --- /dev/null +++ b/src/static/css/authors.css @@ -0,0 +1,61 @@ +/* From https://css-tricks.com/snippets/css/star-wars-crawl-text/ */ +body { + width: 100%; + height: 100%; + background: #000; + overflow: hidden; +} + +* { text-align: left !important } + +.fade { + position: relative; + width: 100%; + min-height: 60vh; + top: -25px; + background-image: linear-gradient(0deg, transparent, black 75%); + z-index: 1; +} + +.star-wars { + display: flex; + justify-content: center; + position: relative; + height: 800px; + color: #feda4a; + font-family: 'Pathway Gothic One', sans-serif; + font-size: 500%; + font-weight: 600; + letter-spacing: 6px; + line-height: 150%; + perspective: 400px; + text-align: justify; +} + +.crawl { + position: relative; + top: 9999px; + transform-origin: 50% 100%; + animation: crawl 90s linear; +} + +.crawl > .title { + font-size: 90%; + text-align: center; +} + +.crawl > .title h1 { + margin: 0 0 100px; + text-transform: uppercase; +} + +@keyframes crawl { + 0% { + top: 0; + transform: rotateX(20deg) translateZ(0); + } + 100% { + top: -25000px; + transform: rotateX(25deg) translateZ(-10000px); + } +}