spanish-quizzer

An app to quiz you on Spanish vocabulary and verb conjugations
git clone https://git.ashermorgan.net/spanish-quizzer/
Log | Files | Refs | README

commit 00a9297db97b87d998644f2fe17d08e49313029c
parent 8993d7c0fefcd0a6a5f20aff22840d4036c46474
Author: AsherMorgan <59518073+AsherMorgan@users.noreply.github.com>
Date:   Thu, 24 Dec 2020 11:19:16 -0800

Remove footer.

Diffstat:
Mcss/global.css | 12+-----------
Mcss/reference.css | 2+-
Mindex.html | 11-----------
Mjs/app.js | 5++---
Mjs/global.js | 19++-----------------
Mjs/reference.js | 9++++-----
Mreference.html | 12------------
Mvocab/index.html | 2+-
8 files changed, 11 insertions(+), 61 deletions(-)

diff --git a/css/global.css b/css/global.css @@ -35,7 +35,7 @@ body { height: 100%; display: grid; - grid-template-rows: auto auto 1fr auto; + grid-template-rows: auto auto 1fr; grid-template-columns: 1fr auto 1fr; } @@ -118,16 +118,6 @@ main { color: red; } -footer { - grid-row: 4; - grid-column: 2; - text-align: center; - padding-bottom: 5px; - padding-top: 5px; - width: 100%; - background-color: var(--background-color); -} - /******** Dark mode styles ********/ diff --git a/css/reference.css b/css/reference.css @@ -51,7 +51,7 @@ main > h1 { --hover-color: #FFFFFF; } - header, h1, #controls, footer, label, br { + header, h1, #controls, label, br { display: none; } diff --git a/index.html b/index.html @@ -70,17 +70,6 @@ <button @click="Back">Continue</button> </div> </main> - - <footer hidden> - <div id="share" hidden> - <a href="mailto:?Subject=Spanish-Quizzer&amp;Body=https://ashermorgan.github.io/Spanish-Quizzer">Email</a>&nbsp; - <a rel="noopener" href="http://www.facebook.com/sharer.php?u=https://ashermorgan.github.io/Spanish-Quizzer" target="_blank">Facebook</a>&nbsp; - <a rel="noopener" href="https://twitter.com/share?url=https://ashermorgan.github.io/Spanish-Quizzer&amp;text=Spanish-Quizzer" target="_blank">Twitter</a>&nbsp; - <a rel="noopener" href="http://reddit.com/submit?url=https://ashermorgan.github.io/Spanish-Quizzer&amp;title=Spanish-Quizzer" target="_blank">Reddit</a>&nbsp; - <a id="shareSMS" href="sms:&body=https://ashermorgan.github.io/Spanish-Quizzer" hidden>SMS</a>&nbsp; - </div> - <a href="javascript:document.getElementById('share').hidden = false; void 0;">Share</a>&nbsp; - </footer> </div> </body> </html> \ No newline at end of file diff --git a/js/app.js b/js/app.js @@ -139,8 +139,8 @@ function loadVue() { * Load the document. */ async function Load() { - // Call LoadPage method from global.js - LoadPage(); + // Set theme + SetTheme(null); // Initialize the Vue app loadVue(); @@ -150,7 +150,6 @@ async function Load() { document.getElementById("home").hidden = false; document.getElementById("settings").hidden = false; document.getElementById("congrats").hidden = false; - document.querySelector("footer").hidden = false; // Add event Listeners document.addEventListener("keydown", KeyDown); diff --git a/js/global.js b/js/global.js @@ -23,21 +23,6 @@ function SetTheme(darkTheme = null) { /** - * Loads the page. - */ -function LoadPage() { - // Add event Listeners - document.addEventListener("click", function (e) { - document.getElementById('share').hidden = true; - }); - - // Update theme - SetTheme(null); -} - - - -/** * Get the language code that matches a label. * @param {String} label - The label. * @returns {String} - The language code ("en", "es", etc.) @@ -154,7 +139,7 @@ function loadVocab() { ]; let progress = 0; let sets = {}; - + // Load vocab for (let setName of setNames) { Papa.parse(`vocab/${setName}.csv`, { @@ -162,7 +147,7 @@ function loadVocab() { complete: function(results) { sets[setName] = results.data; progress++; - + if (progress === setNames.length) { resolve(sets); } diff --git a/js/reference.js b/js/reference.js @@ -24,9 +24,9 @@ function loadVue() { * Load the document */ async function Load() { - // Call LoadPage method from global.js - LoadPage(); - + // Update theme + SetTheme(null); + // Initialize the Vue loadVue(); @@ -35,7 +35,6 @@ async function Load() { document.querySelector("h1").hidden = false; document.getElementById("controls").hidden = false; document.getElementById("referenceTable").hidden = false; - document.querySelector("footer").hidden = false; // Set table height setTableHeight(); @@ -70,5 +69,5 @@ async function Load() { */ function setTableHeight() { var tableY = document.getElementById("referenceTable").offsetTop; - document.getElementById("referenceTable").style.height = `${window.innerHeight - tableY - 50}px`; + document.getElementById("referenceTable").style.height = `${window.innerHeight - tableY - 10}px`; } diff --git a/reference.html b/reference.html @@ -77,18 +77,6 @@ </table> </div> </main> - - <footer hidden> - <div id="share" hidden> - <a href="mailto:?Subject=Spanish-Quizzer&amp;Body=https://ashermorgan.github.io/Spanish-Quizzer/Reference">Email</a>&nbsp; - <a rel="noopener" href="http://www.facebook.com/sharer.php?u=https://ashermorgan.github.io/Spanish-Quizzer/Reference" target="_blank">Facebook</a>&nbsp; - <a rel="noopener" href="https://twitter.com/share?url=https://ashermorgan.github.io/Spanish-Quizzer/Reference&amp;text=Spanish-Quizzer" target="_blank">Twitter</a>&nbsp; - <a rel="noopener" href="http://reddit.com/submit?url=https://ashermorgan.github.io/Spanish-Quizzer/Reference&amp;title=Spanish-Quizzer" target="_blank">Reddit</a>&nbsp; - <a id="shareSMS" href="sms:&body=https://ashermorgan.github.io/Spanish-Quizzer/Reference" hidden>SMS</a>&nbsp; - </div> - <a href="./">Home</a>&nbsp; - <a href="javascript:document.getElementById('share').hidden = false; void 0;">Share</a>&nbsp; - </footer> </div> </body> </html> \ No newline at end of file diff --git a/vocab/index.html b/vocab/index.html @@ -12,7 +12,7 @@ <script src="../js/global.js"></script> </head> - <body onload="LoadPage();"> + <body onload="SetTheme();"> <header onclick="window.location = '../';">Spanish-Quizzer</header> <main>