summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyfraeviolae <cyfraeviolae>2022-02-26 12:33:11 -0500
committercyfraeviolae <cyfraeviolae>2022-02-26 12:33:11 -0500
commit07f6564f68c03d0d73cc43753db36bc023ce268b (patch)
tree15ecdb2a3324c97dc80fa0ac98d0b35f5c5fd3ce
parent4f4852df1a79f25dc5ad51e328d1f341aeabd8e5 (diff)
restyle
-rw-r--r--index.html85
-rw-r--r--static/EBGaramond-Italic-VariableFont_wght.ttfbin829752 -> 0 bytes
-rw-r--r--static/EBGaramond-VariableFont_wght.ttfbin897728 -> 0 bytes
-rw-r--r--static/OFL.txt93
-rw-r--r--static/script.js2
-rw-r--r--static/styles.css73
6 files changed, 69 insertions, 184 deletions
diff --git a/index.html b/index.html
index 938c9b4..0e1b3e1 100644
--- a/index.html
+++ b/index.html
@@ -4,13 +4,16 @@
<title>Prosodyle</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link rel="stylesheet" type="text/css" href="/cyfraeviolae/static/styles.css">
<link rel="stylesheet" type="text/css" href="/prosodyle/static/styles.css">
<link rel="shortcut icon" type="image/x-icon" href="/prosodyle/static/favicon.ico">
</head>
<body>
<div class="container">
<div>
- <a href="/" class="title">Prosodyle</a><span>@</span><a href="https://cyfraeviolae.org">cyfraeviolae.org</a>
+ <span class="home">
+ <a href="/prosodyle" class="title">Prosodyle</a><span>@</span><a href="https://cyfraeviolae.org">cyfraeviolae.org</a>
+ </span>
<span class="sep">|</span>
<a href="https://cyfraeviolae.org/git/prosodyle">source code</a>
</div>
@@ -24,15 +27,57 @@
place 🟨, or not in the word at all ⬜.
</p>
<noscript>Sorry, JavaScript is required to play Prosodyle.</noscript>
+ <br>
<form id="game" action="javascript:void(0);" method="none">
<p>
Write a line of poetry. Syllables in dark boxes should be stressed.
</p>
+ <br>
<div id="entry"></div>
<div id="btns">
<button id="check" type="submit">Check</button>
<button id="clear">Clear</button>
</div>
+ <br>
+ <div style="text-align: center;">
+ <div class="keyboard">
+ <div class="kbrow">
+ <div class="key" data-key="Q">Q</div>
+ <div class="key" data-key="W">W</div>
+ <div class="key" data-key="E">E</div>
+ <div class="key" data-key="R">R</div>
+ <div class="key" data-key="T">T</div>
+ <div class="key" data-key="Y">Y</div>
+ <div class="key" data-key="U">U</div>
+ <div class="key" data-key="I">I</div>
+ <div class="key" data-key="O">O</div>
+ <div class="key" data-key="P">P</div>
+ </div>
+ <div class="kbrow">
+ <div class="key" data-key="A">A</div>
+ <div class="key" data-key="S">S</div>
+ <div class="key" data-key="D">D</div>
+ <div class="key" data-key="F">F</div>
+ <div class="key" data-key="G">G</div>
+ <div class="key" data-key="H">H</div>
+ <div class="key" data-key="J">J</div>
+ <div class="key" data-key="K">K</div>
+ <div class="key" data-key="L">L</div>
+ <div class="key" data-key="Backspace">⇤</div>
+ </div>
+ <div class="kbrow">
+ <div class="key" data-key="Z">Z</div>
+ <div class="key" data-key="X">X</div>
+ <div class="key" data-key="C">C</div>
+ <div class="key" data-key="V">V</div>
+ <div class="key" data-key="B">B</div>
+ <div class="key" data-key="N">N</div>
+ <div class="key" data-key="M">M</div>
+ <div class="key" data-key="ArrowLeft">&larr;</div>
+ <div class="key" data-key="ArrowRight">&rarr;</div>
+ </div>
+ </div>
+ </div>
<hr>
<div id="win" style="display: none;">
<p>
@@ -49,6 +94,7 @@
In the meantime, you may share your results with your fellow acolytes,
adding punctuation as desired.
</p>
+ <br>
<div>
<textarea rows="4" id="share"></textarea>
</div>
@@ -58,43 +104,6 @@
<p id="guesses"></p>
</form>
</div>
- <div class="keyboard">
- <div class="kbrow">
- <div class="key" data-key="Q">Q</div>
- <div class="key" data-key="W">W</div>
- <div class="key" data-key="E">E</div>
- <div class="key" data-key="R">R</div>
- <div class="key" data-key="T">T</div>
- <div class="key" data-key="Y">Y</div>
- <div class="key" data-key="U">U</div>
- <div class="key" data-key="I">I</div>
- <div class="key" data-key="O">O</div>
- <div class="key" data-key="P">P</div>
- </div>
- <div class="kbrow">
- <div class="key" data-key="A">A</div>
- <div class="key" data-key="S">S</div>
- <div class="key" data-key="D">D</div>
- <div class="key" data-key="F">F</div>
- <div class="key" data-key="G">G</div>
- <div class="key" data-key="H">H</div>
- <div class="key" data-key="J">J</div>
- <div class="key" data-key="K">K</div>
- <div class="key" data-key="L">L</div>
- <div class="key" data-key="Backspace">⇤</div>
- </div>
- <div class="kbrow">
- <div class="key" data-key="Z">Z</div>
- <div class="key" data-key="X">X</div>
- <div class="key" data-key="C">C</div>
- <div class="key" data-key="V">V</div>
- <div class="key" data-key="B">B</div>
- <div class="key" data-key="N">N</div>
- <div class="key" data-key="M">M</div>
- <div class="key" data-key="ArrowLeft">&larr;</div>
- <div class="key" data-key="ArrowRight">&rarr;</div>
- </div>
- </div>
<script src="/prosodyle/static/poems.js"></script>
<script src="/prosodyle/static/script.js"></script>
</body>
diff --git a/static/EBGaramond-Italic-VariableFont_wght.ttf b/static/EBGaramond-Italic-VariableFont_wght.ttf
deleted file mode 100644
index fa31b71..0000000
--- a/static/EBGaramond-Italic-VariableFont_wght.ttf
+++ /dev/null
Binary files differ
diff --git a/static/EBGaramond-VariableFont_wght.ttf b/static/EBGaramond-VariableFont_wght.ttf
deleted file mode 100644
index 123d5dd..0000000
--- a/static/EBGaramond-VariableFont_wght.ttf
+++ /dev/null
Binary files differ
diff --git a/static/OFL.txt b/static/OFL.txt
deleted file mode 100644
index 1ba1596..0000000
--- a/static/OFL.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-Copyright (c) 2012-2013, The Mozilla Corporation and Telefonica S.A.
-
-This Font Software is licensed under the SIL Open Font License, Version 1.1.
-This license is copied below, and is also available with a FAQ at:
-http://scripts.sil.org/OFL
-
-
------------------------------------------------------------
-SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
------------------------------------------------------------
-
-PREAMBLE
-The goals of the Open Font License (OFL) are to stimulate worldwide
-development of collaborative font projects, to support the font creation
-efforts of academic and linguistic communities, and to provide a free and
-open framework in which fonts may be shared and improved in partnership
-with others.
-
-The OFL allows the licensed fonts to be used, studied, modified and
-redistributed freely as long as they are not sold by themselves. The
-fonts, including any derivative works, can be bundled, embedded,
-redistributed and/or sold with any software provided that any reserved
-names are not used by derivative works. The fonts and derivatives,
-however, cannot be released under any other type of license. The
-requirement for fonts to remain under this license does not apply
-to any document created using the fonts or their derivatives.
-
-DEFINITIONS
-"Font Software" refers to the set of files released by the Copyright
-Holder(s) under this license and clearly marked as such. This may
-include source files, build scripts and documentation.
-
-"Reserved Font Name" refers to any names specified as such after the
-copyright statement(s).
-
-"Original Version" refers to the collection of Font Software components as
-distributed by the Copyright Holder(s).
-
-"Modified Version" refers to any derivative made by adding to, deleting,
-or substituting -- in part or in whole -- any of the components of the
-Original Version, by changing formats or by porting the Font Software to a
-new environment.
-
-"Author" refers to any designer, engineer, programmer, technical
-writer or other person who contributed to the Font Software.
-
-PERMISSION & CONDITIONS
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of the Font Software, to use, study, copy, merge, embed, modify,
-redistribute, and sell modified and unmodified copies of the Font
-Software, subject to the following conditions:
-
-1) Neither the Font Software nor any of its individual components,
-in Original or Modified Versions, may be sold by itself.
-
-2) Original or Modified Versions of the Font Software may be bundled,
-redistributed and/or sold with any software, provided that each copy
-contains the above copyright notice and this license. These can be
-included either as stand-alone text files, human-readable headers or
-in the appropriate machine-readable metadata fields within text or
-binary files as long as those fields can be easily viewed by the user.
-
-3) No Modified Version of the Font Software may use the Reserved Font
-Name(s) unless explicit written permission is granted by the corresponding
-Copyright Holder. This restriction only applies to the primary font name as
-presented to the users.
-
-4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
-Software shall not be used to promote, endorse or advertise any
-Modified Version, except to acknowledge the contribution(s) of the
-Copyright Holder(s) and the Author(s) or with their explicit written
-permission.
-
-5) The Font Software, modified or unmodified, in part or in whole,
-must be distributed entirely under this license, and must not be
-distributed under any other license. The requirement for fonts to
-remain under this license does not apply to any document created
-using the Font Software.
-
-TERMINATION
-This license becomes null and void if any of the above conditions are
-not met.
-
-DISCLAIMER
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
-DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
-OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/static/script.js b/static/script.js
index 7585efa..7ed08db 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, ' $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>\n\t\t${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}".`
diff --git a/static/styles.css b/static/styles.css
index b57c82a..eca59a2 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -1,50 +1,8 @@
-@font-face {
- font-family: EBGaramond;
- src: url(/prosodyle/static/EBGaramond-VariableFont_wght.ttf) format('woff2-variations');
- font-style: normal;
-}
-
-@font-face {
- font-family: EBGaramond;
- src: url(/prosodyle/static/EBGaramond-Italic-VariableFont_wght.ttf) format('woff2-variations');
- font-style: italic;
-}
-
-body {
- background: #fdf3f3;
- color: DarkSlateGrey;
- font-family: EBGaramond, serif;
- font-size: large;
-}
-
-a {
- color: #1a97bf;
-}
-
-a:hover {
- color: #075d77;
-}
-
-.container {
- margin: 1em;
- max-width: 40em;
-}
-
-.title {
- letter-spacing: -0.5px;
- font-weight: bold;
-}
-
form {
border: 1px DarkSlateGrey solid;
- padding: 10px;
- padding-left: 20px;
- padding-right: 20px;
-}
-
-.sep {
- margin-left: 6px;
- margin-right: 6px;
+ padding: 1em;
+ padding-left: 2em;
+ padding-right: 2em;
}
button {
@@ -67,26 +25,33 @@ button {
line-height: 25px;
font-family: Cantarell;
}
+
.focus {
background-color: #fff079;
}
+
.syllable .box:not(:first-child) {
margin-left: -1px;
border-left-style: dotted;
}
+
.syllable .box:not(:last-child) {
margin-right: -1px;
border-right-style: dotted;
}
+
.word .syllable:not(:first-child) {
margin-left: -1px;
}
+
.word .syllable:not(:last-child) {
margin-right: -1px;
}
+
.syllable.stress + .syllable .entrybox:first-child {
border-left-color: darkslategrey;
}
+
.stress {
z-index: 9999;
}
@@ -150,20 +115,24 @@ hr {
}
.keyboard {
- border-top: 2px darkslategrey solid;
- padding-top:10px;
- padding-bottom:7px;
- background-color: #fdf3f3;
- position: sticky;
- bottom: 0;
+ display: inline-block;
text-align: center;
max-width: 40em;
- left: 26px;
touch-action: manipulation;
}
+
+@media only screen and (min-width: 600px) {
+ .keyboard {
+ border: 1px darkslategrey dotted;
+ border-radius: 4px;
+ padding: 1.2em;
+ }
+}
+
.kbrow {
margin-bottom: 5px;
}
+
.key {
font-family: Cantarell;
display: inline-block;