Improve discoverability of contributors

This commit is contained in:
Oliver Blanthorn 2018-05-23 15:39:40 +01:00
parent bd4bd3077d
commit 98ad63cfc8
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
6 changed files with 103 additions and 0 deletions

8
scripts/authors.sh Executable file
View file

@ -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/^/<p>/' | sed 's/$/<\/p>/' >> "$authors"
sed "1,/REPLACETHIS/ d" authors.html >> "$authors"

View file

@ -56,6 +56,7 @@ fi
wait
scripts/bodgecss.sh
scripts/authors.sh
if [ -e "$CLEANSLATE" ] ; then
cp -v "$CLEANSLATE" build/static/css/cleanslate.css

View file

@ -175,6 +175,7 @@ const DEFAULTS = o({
sanitize: "sanitise",
tutorial: "tutor",
h: "help",
authors: "credits",
openwith: "hint -W",
"!": "exclaim",
"!s": "exclaim_quiet",

View file

@ -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.

23
src/static/authors.html Normal file
View file

@ -0,0 +1,23 @@
<!doctype html>
<html lang="en" class="TridactylOwnNamespace">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/content.css">
<link rel="stylesheet" href="css/viewsource.css">
<link rel="stylesheet" href="css/authors.css">
<link rel="shortcut icon" href="logo/Tridactyl_64px.png">
</head>
<div class="fade"></div>
<section class="star-wars">
<div class="crawl">
<h2>Tridactyl: The Return of The Ed-i</h2>
<br />
<h3>The version of Tridactyl you are using was made by the following people:</h3>
REPLACETHIS
</div>
</section>
<script src="../content.js"></script>
</html>

View file

@ -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);
}
}