summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorcyfraeviolae <cyfraeviolae>2022-02-26 01:00:00 -0500
committercyfraeviolae <cyfraeviolae>2022-02-26 01:00:00 -0500
commit2e3e6d8cbf5b32be8410437af9379b7f336f7884 (patch)
tree3cb47b5e4006d313421fecd2535b060dc691a8fc /static
parent65bdf80017962f1d0269c4ed8435e2e9ea625504 (diff)
cleanup
Diffstat (limited to 'static')
-rw-r--r--static/script.js6
-rw-r--r--static/styles.css16
2 files changed, 16 insertions, 6 deletions
diff --git a/static/script.js b/static/script.js
index 778fdd0..37c5725 100644
--- a/static/script.js
+++ b/static/script.js
@@ -150,7 +150,7 @@ function winGame(challenge) {
winEl.style = 'display: block;'
document.getElementById('btns').style = 'display: none;'
document.getElementById('meter').innerText = challenge.meter
- document.getElementById('ctx').innerHTML = challenge.ctx.replaceAll(/^(.*)/gm, '\t$1') + `\n\t<span class="byline">&mdash;<a href="${challenge.link}">${challenge.title}</a>, ${challenge.collection}, ${challenge.author}</span>`
+ document.getElementById('ctx').innerHTML = challenge.ctx.replaceAll(/^(.*)/gm, ' $1') + `\n\t<span class="byline">&mdash;<a href="${challenge.link}">${challenge.title}</a>, ${challenge.collection}, ${challenge.author}</span>`
var date = new Date().toISOString().slice(0, 10)
var firstguess = Object.values(guesses[0]).join(' ')
document.getElementById('share').value = `I solved the ${date} Prosodyle at cyfraeviolae.org/prosodyle. My first guess was: "${firstguess}".`
@@ -166,6 +166,9 @@ document.addEventListener('keydown', function(e) {
if (e.ctrlKey || e.altKey || (!"ABCDEFGHIJKLMNOPQRSTUVWXYZ".includes(e.key.toUpperCase()) && e.key != 'Backspace' && e.key != 'Enter')) {
return;
}
+ if (e.target.id == 'share') {
+ return;
+ }
e.preventDefault();
if (e.key == 'Enter') {
@@ -216,6 +219,7 @@ document.getElementById('copy').addEventListener('click', function(e) {
function focus(el) {
focused = parseInt(el.getAttribute('data-offset'))
el.classList.add('focus')
+ document.getElementById('kb').focus()
}
function unfocus(el) {
diff --git a/static/styles.css b/static/styles.css
index 06cb18a..5bd99f1 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -38,7 +38,8 @@ a:hover {
form {
border: 1px DarkSlateGrey solid;
padding: 10px;
- padding-left: 25px;
+ padding-left: 20px;
+ padding-right: 20px;
}
.sep {
@@ -52,18 +53,18 @@ button {
.box {
display: inline-block;
- width: 40px;
- height: 40px;
+ width: 25px;
+ height: 25px;
text-align: center;
font-weight: bold;
- font-size: 22px;
+ font-size: 14px;
border: 2px lightgrey solid;
margin-right: 0px;
margin-left: 0px;
color: black;
background-color: white;
vertical-align: top;
- line-height: 39px;
+ line-height: 25px;
font-family: Cantarell;
}
.focus {
@@ -135,6 +136,7 @@ hr {
}
.poetry {
+ font-size: 85%;
font-family: EBGaramond;
}
@@ -142,3 +144,7 @@ hr {
font-style: italic;
font-size: 75%;
}
+
+#share {
+ width: 90%;
+}