Skip to content

Commit

Permalink
Bug fixes and look improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kyletimmermans committed Feb 28, 2024
1 parent 44e48a3 commit d07b9dc
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
1 change: 1 addition & 0 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<title>Ошибка 404</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="google" content="notranslate">
<link rel="icon" type="image/svg+xml" href="/favicon/favicon.svg">
<meta name="description" content="Practice Russian grammar with exercises!">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
Expand Down
13 changes: 6 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ const verb = () => {
while (q[3] == "-") {
q = randomVerb(jsonVerb);
}
document.getElementById("question").innerHTML = q[2]+" ____ (<b>"+q[0]
+"</b> - \""+q[4]+"\") ("
document.getElementById("question").innerHTML = q[2]+" ____ <b>"+q[0]
+"</b> (\""+q[4]+"\") ("
+q[1]+")";
correctAnswer = q[3];
}
Expand Down Expand Up @@ -491,7 +491,7 @@ const plurAdj = () => {
fetchList.push("adj");
let q = randomAdjective(jsonAdj, "p");
document.getElementById("question").innerHTML = "Plural "+q[2]+" <b>"
+q[0]+"</b>"+ " (\""
+q[0]+"</b>"+" (\""
+q[1]+"\")";
correctAnswer = q[4];
});
Expand All @@ -518,7 +518,7 @@ const pronoun = () => {
fetchList.push("pro");
let q = randomPronoun(jsonPronoun);
if (q[2] === undefined || q[2] == 0) {
document.getElementById("question").innerHTML = q[1]+"<b> "+q[0]+"</b>";
document.getElementById("question").innerHTML = q[1]+" <b>"+q[0]+"</b>";
// No "(н)"
if (q[3].substring(0, 3) == "(н)") {
correctAnswer = q[3].slice(3);
Expand Down Expand Up @@ -625,8 +625,7 @@ const questionword = () => {
} else {
let q = randomQuestionWord(jsonQuestion);
if (q.length == 3) {
document.getElementById("question").innerHTML = q[1]+" <b>"
+q[0]+"</b>";
document.getElementById("question").innerHTML = q[1]+" <b>"+q[0]+"</b>";
correctAnswer = q[2];
} else {
document.getElementById("question").innerHTML = q[1]+" "+q[2]
Expand Down Expand Up @@ -658,7 +657,7 @@ const comparative = () => {
let q = randomComparative(jsonCompare);
document.getElementById("question").innerHTML = "<b>"+q[0]+"</b> (\""
+q[1]+"\") → ____ (\""
+q[2]+"\")"
+q[2]+"\")";
correctAnswer = q[3];
}
};
Expand Down
13 changes: 12 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@
#centered-title { font-size: 2.92vw; }

#question, #result { font-size: 2.64vw; }

/* Big screens - Increase size of widgets, buttons, and modal */
@media screen and (min-width: 1600px) and (min-height: 900px) {
#dropdownMenu2, #inputAnswer, #check-button { font-size: 1.10vw; }
#dropdownMenu2 .dropdown-menu { font-size: 1.10vw }
.btn-primary { font-size: 1.10vw; }
.modal-title { font-size: 1.09vw; }
.modal-body { font-size: 1.02vw; }
.btn-success { font-size: 1.00vw; }
.modal { --bs-modal-width: 27.34vw; }
}
</style>

<body>
Expand Down Expand Up @@ -63,7 +74,7 @@ <h5 class="modal-title" id="aboutModalLabel">About</h5>
<div class="modal-body">
<div>Made with 💚 by <a href="https://www.kyles.world/" target="_blank" rel="noopener noreferrer">Kyle</a></div>
<div>&nbsp;</div>
<p>Found a vocab / grammar issue or technical bug? Have an improvement in mind? Let me know on <a href="https://www.github.com/rus-grammar-practice/rus-grammar-practice.github.io" target="_blank" rel="noopener noreferrer">GitHub</a>!</p>
<div>Found a vocab / grammar issue or technical bug? Have an improvement in mind? Let me know on <a href="https://www.github.com/rus-grammar-practice/rus-grammar-practice.github.io" target="_blank" rel="noopener noreferrer">GitHub</a>!</div>
<div>&nbsp;</div>
<i>Russian Learning Resources:</i>
<ul>
Expand Down
2 changes: 2 additions & 0 deletions main.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* Shared CSS */

#centered-title {
position: relative;
color: white;
Expand Down
9 changes: 8 additions & 1 deletion mobile/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
}

#question, #result { font-size: 30px; }

/* Prevent mobile :hover active state leftovers */
.btn-outline-info {
--bs-btn-hover-bg: transparent;
--bs-btn-hover-color: #0dcaf0;
}
</style>

<body>
Expand All @@ -46,6 +52,7 @@
}
});


// When mobile keyboard pops up, continue to show the question and don't pull page down
document.addEventListener('focusin', function(e) {
// Only for portrait mode
Expand Down Expand Up @@ -94,7 +101,7 @@ <h5 class="modal-title" id="aboutModalLabel">About</h5>
<div class="modal-body">
<div>Made with 💚 by <a href="https://www.kyles.world/" target="_blank" rel="noopener noreferrer">Kyle</a></div>
<div>&nbsp;</div>
<p>Found a vocab / grammar issue or technical bug? Have an improvement in mind? Let me know on <a href="https://www.github.com/rus-grammar-practice/rus-grammar-practice.github.io" target="_blank" rel="noopener noreferrer">GitHub</a>!</p>
<div>Found a vocab / grammar issue or technical bug? Have an improvement in mind? Let me know on <a href="https://www.github.com/rus-grammar-practice/rus-grammar-practice.github.io" target="_blank" rel="noopener noreferrer">GitHub</a>!</div>
<div>&nbsp;</div>
<i>Russian Learning Resources:</i>
<ul>
Expand Down

0 comments on commit d07b9dc

Please sign in to comment.