mirror of
https://github.com/genemecija/learn-morse-code.git
synced 2026-04-21 06:03:56 +00:00
Challenge mode functionality complete; layout updates
This commit is contained in:
parent
dd077e6d12
commit
113e4a2348
20 changed files with 1100 additions and 272 deletions
444
src/css/App.css
444
src/css/App.css
|
|
@ -160,6 +160,10 @@ html, body {
|
|||
border-color: #508090;
|
||||
}
|
||||
|
||||
#main-content .sidebar#left #sidebar-container .navbar .nav-item#nav-play {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#main-content .sidebar#left #sidebar-container #info-icon {
|
||||
width: -webkit-fit-content;
|
||||
width: -moz-fit-content;
|
||||
|
|
@ -239,7 +243,7 @@ html, body {
|
|||
height: fit-content;
|
||||
padding: 2.5em;
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 0.9rem;
|
||||
font-size: 1.2rem;
|
||||
line-height: 1.5em;
|
||||
opacity: 100%;
|
||||
-webkit-transition: all 500ms ease-in-out;
|
||||
|
|
@ -481,7 +485,22 @@ i[class*="ri-"] {
|
|||
margin-bottom: 45px;
|
||||
}
|
||||
|
||||
#playMorseInput i:hover {
|
||||
#playMorseInput #input {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#playMorseInput #input i {
|
||||
font-size: 1.3em;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#playMorseInput #input i:hover {
|
||||
color: goldenrod;
|
||||
}
|
||||
|
||||
|
|
@ -491,7 +510,7 @@ i[class*="ri-"] {
|
|||
border: 1px solid #ddd;
|
||||
height: 1.5rem;
|
||||
font-size: 0.9em;
|
||||
width: 70%;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#playMorseInput #morseTrans {
|
||||
|
|
@ -614,6 +633,8 @@ i[class*="ri-"] {
|
|||
}
|
||||
|
||||
#morseButton {
|
||||
-ms-touch-action: manipulation;
|
||||
touch-action: manipulation;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-top: 30px;
|
||||
|
|
@ -781,18 +802,26 @@ i[class*="ri-"] {
|
|||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding: 1.5rem;
|
||||
height: 250px;
|
||||
background: #fefefe;
|
||||
margin-top: 30%;
|
||||
width: 45%;
|
||||
padding: 1.7em;
|
||||
height: 40%;
|
||||
background: #eee;
|
||||
margin-top: 25%;
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.5);
|
||||
border: 3px solid #666;
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady #notify-title, #challenge-overlay #challengeComplete #notify-title {
|
||||
font-size: 2.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady #message, #challenge-overlay #challengeComplete #message {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
font-size: 1.7em;
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady #count, #challenge-overlay #challengeComplete #count {
|
||||
|
|
@ -817,13 +846,24 @@ i[class*="ri-"] {
|
|||
margin-right: 10px;
|
||||
font-size: 0.75em;
|
||||
color: #333;
|
||||
max-width: 250px;
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady button#startChallenge, #challenge-overlay #challengeReady button#continue, #challenge-overlay #challengeComplete button#startChallenge, #challenge-overlay #challengeComplete button#continue {
|
||||
font-size: 1.2em;
|
||||
width: 100%;
|
||||
font-size: 1.7em;
|
||||
font-weight: bold;
|
||||
padding: 0.3em;
|
||||
background: #666;
|
||||
color: goldenrod;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.3rem;
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady button#startChallenge:active, #challenge-overlay #challengeReady button#continue:active, #challenge-overlay #challengeComplete button#startChallenge:active, #challenge-overlay #challengeComplete button#continue:active {
|
||||
-webkit-transform: translateY(3px);
|
||||
transform: translateY(3px);
|
||||
-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady button.selected, #challenge-overlay #challengeComplete button.selected {
|
||||
|
|
@ -832,6 +872,7 @@ i[class*="ri-"] {
|
|||
}
|
||||
|
||||
#challenge-overlay #challengeReady #challengeOptions, #challenge-overlay #challengeComplete #challengeOptions {
|
||||
width: 100%;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
|
|
@ -842,12 +883,13 @@ i[class*="ri-"] {
|
|||
-webkit-box-pack: start;
|
||||
-ms-flex-pack: start;
|
||||
justify-content: flex-start;
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady #challengeOptions .mode-picker, #challenge-overlay #challengeComplete #challengeOptions .mode-picker {
|
||||
width: 90%;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
|
|
@ -865,7 +907,7 @@ i[class*="ri-"] {
|
|||
|
||||
#challenge-overlay #challengeReady #challengeOptions .mode-picker div#title, #challenge-overlay #challengeComplete #challengeOptions .mode-picker div#title {
|
||||
font-weight: bold;
|
||||
font-size: 1.08em;
|
||||
font-size: 1.4em;
|
||||
height: 100%;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
|
|
@ -889,45 +931,68 @@ i[class*="ri-"] {
|
|||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady #challengeOptions .mode-picker div#input, #challenge-overlay #challengeComplete #challengeOptions .mode-picker div#input {
|
||||
margin-left: 10px;
|
||||
#challenge-overlay #challengeReady #challengeOptions .mode-picker div#buttons button, #challenge-overlay #challengeComplete #challengeOptions .mode-picker div#buttons button {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady #challengeOptions .mode-picker div#info, #challenge-overlay #challengeComplete #challengeOptions .mode-picker div#info {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
font-size: 1.2em;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady #challengeOptions .mode-picker div#input input, #challenge-overlay #challengeComplete #challengeOptions .mode-picker div#input input {
|
||||
width: 50px;
|
||||
-webkit-appearance: textfield;
|
||||
-moz-appearance: textfield;
|
||||
appearance: textfield;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #ddd;
|
||||
height: 1.3rem;
|
||||
font-size: 0.75em;
|
||||
#challenge-overlay #challengeReady #challengeOptions .mode-picker div#input, #challenge-overlay #challengeComplete #challengeOptions .mode-picker div#input {
|
||||
margin-left: 10px;
|
||||
margin-top: 0.25em;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady #challengeOptions .mode-picker div#input select, #challenge-overlay #challengeComplete #challengeOptions .mode-picker div#input select {
|
||||
height: 1.4rem;
|
||||
height: auto;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady #challengeOptions .mode-picker div#input button, #challenge-overlay #challengeComplete #challengeOptions .mode-picker div#input button {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 3px;
|
||||
#challenge-header {
|
||||
width: 100%;
|
||||
padding: 1em;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#challenge-overlay #challengeReady #challengeOptions .mode-picker div#input button i, #challenge-overlay #challengeComplete #challengeOptions .mode-picker div#input button i {
|
||||
position: relative;
|
||||
left: -1px;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
#challenge-header #gameClock {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
#challenge-header #challengeControls button {
|
||||
border: 0px;
|
||||
border-radius: 5px;
|
||||
padding: 0.3em;
|
||||
font-size: 1.2em;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
#challenge-header #challengeControls button:hover {
|
||||
color: maroon;
|
||||
}
|
||||
|
||||
#challengeWord {
|
||||
|
|
@ -1209,12 +1274,29 @@ i[class*="ri-"] {
|
|||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#morseHistory-textbox {
|
||||
#morse-history {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: end;
|
||||
-ms-flex-align: end;
|
||||
align-items: flex-end;
|
||||
width: 80%;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
#morse-history #morseHistory-textbox {
|
||||
background: #f8f8f8;
|
||||
border-radius: 5px;
|
||||
min-height: 4em;
|
||||
width: 80%;
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
padding: 0.5em;
|
||||
font-family: Courier;
|
||||
font-size: 1.5rem;
|
||||
|
|
@ -1227,7 +1309,7 @@ i[class*="ri-"] {
|
|||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
#morseHistory-textbox span {
|
||||
#morse-history #morseHistory-textbox span {
|
||||
margin: 5px;
|
||||
background: #fdfdfd;
|
||||
height: 1.5rem;
|
||||
|
|
@ -1347,4 +1429,284 @@ i[class*="ri-"] {
|
|||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 415px) {
|
||||
html, body, #root, #main-interface {
|
||||
width: 100vw;
|
||||
overflow: hidden;
|
||||
}
|
||||
#header {
|
||||
font-size: 2.1em;
|
||||
line-height: 1.2em;
|
||||
height: auto;
|
||||
}
|
||||
#playerAndLegend {
|
||||
padding: 0 !important;
|
||||
overflow-x: hidden;
|
||||
width: 100vw;
|
||||
}
|
||||
#playerAndLegend #legend {
|
||||
width: 100vw;
|
||||
}
|
||||
#legend {
|
||||
margin-top: 0px;
|
||||
background: #eee;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-pack: space-evenly;
|
||||
-ms-flex-pack: space-evenly;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
#legend #legend-title {
|
||||
margin-left: 0em;
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.3em;
|
||||
}
|
||||
#legend #legend-items {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
width: -webkit-fit-content;
|
||||
width: -moz-fit-content;
|
||||
width: fit-content;
|
||||
height: -webkit-fit-content;
|
||||
height: -moz-fit-content;
|
||||
height: fit-content;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#legend #legend-items .item, #legend #legend-items span {
|
||||
cursor: pointer;
|
||||
}
|
||||
#legend #legend-items .item {
|
||||
font-family: "Courier", monospace;
|
||||
font-size: 0.7em;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
width: 20%;
|
||||
margin: 5px;
|
||||
padding: 0.3em;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 3px;
|
||||
-webkit-transition: all 50ms ease-in-out;
|
||||
transition: all 50ms ease-in-out;
|
||||
background: #ddd;
|
||||
border: 0px;
|
||||
background: #eee;
|
||||
-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.35), 0px -1px 1px white;
|
||||
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.35), 0px -1px 1px white;
|
||||
}
|
||||
#legend #legend-items .item span {
|
||||
-webkit-transition: all 50ms ease-in-out;
|
||||
transition: all 50ms ease-in-out;
|
||||
}
|
||||
#legend #legend-items .item:active {
|
||||
-webkit-transform: scale(0.95);
|
||||
transform: scale(0.95);
|
||||
border-color: rgba(112, 128, 144, 0.6);
|
||||
background: #ddd;
|
||||
}
|
||||
#legend #legend-items .item:active span:first-child {
|
||||
background: rgba(112, 128, 144, 0.6);
|
||||
}
|
||||
#legend #legend-items .item:hover {
|
||||
border-color: rgba(112, 128, 144, 0.6);
|
||||
background: #ddd;
|
||||
}
|
||||
#legend #legend-items .item:hover span:first-child {
|
||||
background: rgba(112, 128, 144, 0.6);
|
||||
}
|
||||
#legend #legend-items .item span:first-child {
|
||||
display: inline-block;
|
||||
padding: 1px;
|
||||
width: 1.5em;
|
||||
background: #d6d6d6;
|
||||
border-radius: 2px;
|
||||
font-size: 1.5em;
|
||||
-webkit-transition: all 75ms ease-in-out;
|
||||
transition: all 75ms ease-in-out;
|
||||
}
|
||||
#legend #legend-items .item span:last-child {
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
display: inline-block;
|
||||
padding-left: 5px;
|
||||
width: 100%;
|
||||
}
|
||||
#main-content {
|
||||
top: 2.5em;
|
||||
width: 100vw;
|
||||
}
|
||||
#main-content .sidebar#left {
|
||||
min-width: 100vw;
|
||||
-webkit-transition: all 500ms ease-in-out;
|
||||
transition: all 500ms ease-in-out;
|
||||
}
|
||||
#main-content .sidebar#left.hide {
|
||||
left: calc(-100vw + 40px);
|
||||
top: 50px;
|
||||
overflow-y: hidden;
|
||||
background: transparent;
|
||||
-webkit-box-shadow: 0px 0px 0px transparent;
|
||||
box-shadow: 0px 0px 0px transparent;
|
||||
}
|
||||
#main-content .sidebar#left.hide #sidebar-container #sidebar-content #info {
|
||||
opacity: 0%;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
#main-content .sidebar#left.hide #sidebar-container #info-icon {
|
||||
background: white;
|
||||
}
|
||||
#main-content .sidebar#left.hide #sidebar-container #info-icon::after {
|
||||
content: ">";
|
||||
}
|
||||
#main-content .sidebar#left #sidebar-container {
|
||||
width: 100%;
|
||||
padding: 0em;
|
||||
}
|
||||
#main-content .sidebar#left #sidebar-container .navbar {
|
||||
width: 100%;
|
||||
}
|
||||
#main-content .sidebar#left #sidebar-container .navbar .nav-item {
|
||||
width: 25%;
|
||||
}
|
||||
#main-content .sidebar#left #sidebar-container .navbar .nav-item#nav-play {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
}
|
||||
#main-content .sidebar#left #sidebar-container #info-icon {
|
||||
display: none;
|
||||
}
|
||||
#main-content .sidebar#left #sidebar-container #sidebar-content #info {
|
||||
width: 100%;
|
||||
padding: 1em;
|
||||
}
|
||||
#main-content #main-interface {
|
||||
width: 100vw;
|
||||
left: 0;
|
||||
}
|
||||
#main-content #main-interface #morseBufferDisplay {
|
||||
margin-bottom: 0px;
|
||||
height: -webkit-fit-content;
|
||||
height: -moz-fit-content;
|
||||
height: fit-content;
|
||||
}
|
||||
#main-content #main-interface #morseBufferDisplay #overlay {
|
||||
-webkit-box-shadow: inset 20px 0px 20px -5px #eee;
|
||||
box-shadow: inset 20px 0px 20px -5px #eee;
|
||||
}
|
||||
#main-content #main-interface #morseBufferDisplay #alphanumeric-container {
|
||||
text-align: center;
|
||||
max-width: 75%;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
padding-top: 0px;
|
||||
}
|
||||
#main-content #main-interface #morseBufferDisplay #alphanumeric-container #alphanumeric {
|
||||
height: 4rem;
|
||||
padding-top: 0.45rem;
|
||||
font-size: 3rem;
|
||||
margin-bottom: 0px;
|
||||
border-radius: 3px;
|
||||
float: right;
|
||||
}
|
||||
#main-content #main-interface * {
|
||||
z-index: 1000;
|
||||
}
|
||||
#main-content #main-interface.expandLeft {
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
}
|
||||
#main-content #main-interface #morse-history {
|
||||
width: 95%;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
#main-content #main-interface #morse-history #morseHistory-textbox {
|
||||
width: 100%;
|
||||
overflow-y: scroll;
|
||||
padding: 5px;
|
||||
margin: 0px;
|
||||
min-height: 2.3em;
|
||||
}
|
||||
#main-content #main-interface #morse-history #clear-history {
|
||||
border: 0px;
|
||||
}
|
||||
#main-content #main-interface #morseButton {
|
||||
margin-top: 5px;
|
||||
}
|
||||
#main-content #main-interface #mainOptions {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
height: 10em;
|
||||
width: 100vw;
|
||||
}
|
||||
#main-content #main-interface #mainOptions #options-left .mode-picker #title, #main-content #main-interface #mainOptions #options-right .mode-picker #title {
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
justify-content: flex-end;
|
||||
width: 5em;
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
}
|
||||
#main-content #main-interface #mainOptions #options-left .mode-picker #title span#range, #main-content #main-interface #mainOptions #options-right .mode-picker #title span#range {
|
||||
display: none;
|
||||
}
|
||||
#main-content #main-interface #mainOptions #options-left .mode-picker #buttons button, #main-content #main-interface #mainOptions #options-right .mode-picker #buttons button {
|
||||
margin: 5px;
|
||||
}
|
||||
#main-content #main-interface #mainOptions #options-left .mode-picker #input, #main-content #main-interface #mainOptions #options-right .mode-picker #input {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#main-content #main-interface #mainOptions #options-left .mode-picker #input input, #main-content #main-interface #mainOptions #options-right .mode-picker #input input {
|
||||
height: 1.1rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
#main-content #main-interface #mainOptions #options-left .mode-picker #input select, #main-content #main-interface #mainOptions #options-right .mode-picker #input select {
|
||||
height: 1.4rem;
|
||||
}
|
||||
#main-content #main-interface #mainOptions #options-left .mode-picker #input button, #main-content #main-interface #mainOptions #options-right .mode-picker #input button {
|
||||
width: 1.2em;
|
||||
height: 1.2em;
|
||||
border-radius: 3px;
|
||||
font-size: 1em;
|
||||
}
|
||||
#main-content #main-interface #mainOptions #options-left .mode-picker #input button i, #main-content #main-interface #mainOptions #options-right .mode-picker #input button i {
|
||||
left: -7px;
|
||||
top: -3px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
#main-content #main-interface #mainOptions #options-left .mode-picker button, #main-content #main-interface #mainOptions #options-right .mode-picker button {
|
||||
font-size: 0.8em;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
/*# sourceMappingURL=App.css.map */
|
||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue