learn-morse-code/src/scss/App.scss

422 lines
9 KiB
SCSS
Raw Normal View History

2020-01-03 08:53:56 +01:00
$main-bg-color: #FFF;
$main-box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2);
$main-border-radius: 5px;
$border-radius-neumorphic: 0px -6px 10px rgba(255, 255, 255, 1), 0px 4px 15px rgba(0, 0, 0, 0.15);
2020-01-18 11:38:21 +01:00
$border-radius-neumorphic-active: 0 15px 20px rgba(0, 0, 0, 0.015), inset 0px -2px 5px rgb(255, 255, 255), inset 0px 2px 5px rgba(0, 0, 0, 0.15);
* {
box-sizing: border-box;
2019-12-27 09:41:53 +01:00
margin: 0px;
padding: 0px
}
html, body {
2019-12-27 09:41:53 +01:00
height: 100%;
width: 100%;
background: $main-bg-color;
// background: #444;
2019-12-27 09:41:53 +01:00
}
#root {
height: 100%;
display: flex;
flex-direction: column;
// justify-content: center;
2019-12-27 09:41:53 +01:00
align-items: center;
width: 100%;
border: 3px solid green;
}
header {
margin-top: 100px;
}
#main-content {
display: flex;
flex-direction: column;
width: 95vw;
border: 1px solid red;
align-items: center;
2019-12-27 09:41:53 +01:00
}
footer {
}
.mode-picker {
2019-12-27 09:41:53 +01:00
display: flex;
2020-01-09 10:06:38 +01:00
align-self: center;
button {
2020-01-03 08:53:56 +01:00
background: #fcfcfc;
2019-12-27 09:41:53 +01:00
margin: 15px;
padding: 5px;
2020-01-03 08:53:56 +01:00
box-shadow: $main-box-shadow;
2020-01-09 10:06:38 +01:00
border: 0px;
2020-01-03 08:53:56 +01:00
border-radius: $main-border-radius;
2019-12-27 09:41:53 +01:00
}
.selected {
box-shadow: $border-radius-neumorphic;
}
2019-12-27 09:41:53 +01:00
}
2020-01-15 09:41:40 +01:00
#legend {
width: 450px;
display: flex;
justify-content: space-evenly;
position: fixed;
top: 50px;
left: 50px;
2020-01-15 09:41:40 +01:00
flex-wrap: wrap;
div {
width: 80px;
display: flex;
flex-wrap: nowrap;
button {
width: 40px;
margin: 4px;
}
}
}
2019-12-27 09:41:53 +01:00
#morseButton {
2020-01-18 11:38:21 +01:00
width: 100px;
2020-01-15 09:41:40 +01:00
height: 100px;
2019-12-27 09:41:53 +01:00
margin: 30px;
2020-01-18 11:38:21 +01:00
// background: goldenrod;
border-radius: 50px;
2019-12-27 09:41:53 +01:00
align-self: center;
2020-01-18 11:38:21 +01:00
display: flex;
justify-content: center;
align-items: center;
transition: all 500ms ease-in-out;
}
#morseButton.showPaddles {
width: 239px;
background: transparent;
box-shadow: 0px 0px 0px transparent;
}
.paddle {
font-size: 1rem;
color: transparent;
2020-01-18 11:38:21 +01:00
width: 100px;
height: 100px;
background: goldenrod;
margin: 0px;
border: 0px;
transition: all 500ms ease-in-out;
&#left {
border-radius: 50px 0 0 50px;
&.showPaddles{
margin-right: 7px;
border-radius: 20px 0 0 20px;
}
}
&#right {
border-radius: 0 50px 50px 0;
&.showPaddles{
margin-left: 7px;
border-radius: 0 20px 20px 0;
}
}
&.showPaddles {
color: #000;
font-size: 2.5rem;
font-weight: bold;
width: 250px;
height: 100px;
}
2019-12-27 09:41:53 +01:00
}
2020-01-18 11:38:21 +01:00
2020-01-09 10:06:38 +01:00
#challengeWord {
display: flex;
justify-content: center;
align-items: center;
// border: 1px solid green;
height: 50px;
margin-bottom: 20px;
padding-left: 10px;
padding-right: 10px;
border-radius: 5px;
2020-01-09 10:06:38 +01:00
width: fit-content;
display: flex;
font-size: 40px;
font-family: 'Courier';
font-weight: bold;
background: #EEE;
text-transform: uppercase;
align-self: center;
transition: all 300ms ease-in-out;
2020-01-19 19:26:55 +01:00
span {
padding: 4px;
margin: 1px;
transition: background 300ms ease-in-out; //, opacity 100ms ease-in-out;
}
&.correct {
background: rgba(0,200,0,0.7);
2020-01-19 19:26:55 +01:00
}
2020-01-09 10:06:38 +01:00
}
2020-01-21 11:04:46 +01:00
2020-01-21 11:04:46 +01:00
#morseBufferDisplay {
border: 1px solid green;
display: flex;
justify-content: center;
flex-direction: column-reverse;
align-items: center;
width: 100%;
height: 150px;
margin-bottom: 20px;
#alphanumeric-container {
// border-left: 2px solid #000;
background: #ccc;
display: flex;
padding-left: 5px;
height: 50px;
min-width: 50px;
margin-bottom: 10px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 5px;
box-shadow: $main-box-shadow;
#alphanumeric {
font-size: 40px;
font-family: 'Courier';
font-weight: bold;
background-color: transparent;
&:first-child {
padding-left: 5px;
padding-right: 5px;
// box-shadow: $main-box-shadow;
}
span {
padding: 4px;
transition: background 300ms ease-in-out;
}
}
}
#ditDahs {
width: 50%;
height: 50px;
padding-right: 5px;
// border-right: 2px solid #000;
display: flex;
flex-direction: row;
justify-content: center;
font-size: 25px;
font-family: 'Courier';
font-weight: bold;
span {
padding: 4px;
transition: background 100ms ease-in-out;
}
.ditDah {
background: #DDD;
height: 40px;
width: 30px !important;
margin-left: 3px;
// box-shadow: 0px 1px 0px #000;
border-radius: $main-border-radius;
box-shadow: $main-box-shadow;
display: flex;
justify-content: center;
align-items: center;
opacity: 50%;
transition: all 100ms ease-in-out;
}
}
}
.example-appear {
opacity: 0.01;
}
.example-appear.example-appear-active {
opacity: 1;
transition: opacity .5s ease-in;
}
#challengeBufferDisplay {
2019-12-27 09:41:53 +01:00
display: flex;
justify-content: center;
2020-01-19 19:26:55 +01:00
border: 1px solid green;
flex-direction: column;
align-items: center;
2019-12-27 09:41:53 +01:00
width: 100%;
height: 150px;
2020-01-03 08:53:56 +01:00
margin-bottom: 20px;
2019-12-27 09:41:53 +01:00
2020-01-19 19:26:55 +01:00
#alphanumeric-container {
// border-left: 2px solid #000;
padding-left: 5px;
width: 50%;
display: flex;
justify-content: center;
#alphanumeric {
font-size: 40px;
font-family: 'Courier';
font-weight: bold;
background-color: transparent;
2020-01-21 12:43:21 +01:00
margin-bottom: 10px;
2020-01-19 19:26:55 +01:00
&:first-child {
padding-left: 5px;
padding-right: 5px;
// box-shadow: $main-box-shadow;
}
2020-01-21 12:43:21 +01:00
span {
padding: 4px;
transition: background 300ms ease-in-out;
2020-01-21 12:43:21 +01:00
}
2020-01-19 19:26:55 +01:00
}
}
2019-12-27 09:41:53 +01:00
#ditDahs {
width: 50%;
padding-right: 5px;
2020-01-19 19:26:55 +01:00
// border-right: 2px solid #000;
2019-12-27 09:41:53 +01:00
display: flex;
flex-direction: row;
2020-01-19 19:26:55 +01:00
justify-content: center;
2020-01-21 12:43:21 +01:00
font-size: 25px;
font-family: 'Courier';
font-weight: bold;
span {
padding: 4px;
transition: background 100ms ease-in-out;
}
2019-12-27 09:41:53 +01:00
.ditDah {
// background: #DDD;
2019-12-27 09:41:53 +01:00
height: 40px;
width: 30px !important;
margin-left: 3px;
2020-01-03 08:53:56 +01:00
// box-shadow: 0px 1px 0px #000;
border-radius: $main-border-radius;
box-shadow: $main-box-shadow;
2019-12-27 09:41:53 +01:00
display: flex;
justify-content: center;
align-items: center;
}
}
}
.space {
font-size: 20px;
}
.strike {
text-decoration: line-through;
opacity: 30%;
}
2019-12-27 09:41:53 +01:00
.morseError {
background: rgba(255,0,0,0.4);
2020-01-03 08:53:56 +01:00
color: rgb(120, 0, 0);
border-radius: 5px;
2020-01-19 19:26:55 +01:00
// text-decoration: line-through;
2019-12-27 09:41:53 +01:00
}
2020-01-10 03:24:54 +01:00
.correct {
background: rgba(0,255,0,0.4);
// color: rgb(120, 0, 0);
border-radius: 5px;
}
2019-12-27 09:41:53 +01:00
// #morseHistory {
// border: 1px solid purple;
// padding: 5px;
// width: 650px;
// font-family: 'Verdana';
// font-size: 1.5em;
// }
#morseHistory {
// /* border: 1px solid blue; */
2019-12-27 09:41:53 +01:00
display: flex;
flex-direction: column;
.morseCard:nth-child(1){
opacity: 100%;
}
.morseCard:nth-child(2){
opacity: 90%;
2019-12-27 09:41:53 +01:00
}
.morseCard:nth-child(3){
opacity: 80%;
2019-12-27 09:41:53 +01:00
}
.morseCard:nth-child(4){
opacity: 70%;
2019-12-27 09:41:53 +01:00
}
.morseCard:nth-child(5){
opacity: 60%;
}
.morseCard:nth-child(6){
opacity: 50%;
}
.morseCard:nth-child(7){
opacity: 40%;
}
.morseCard:nth-child(8){
opacity: 30%;
}
.morseCard:nth-child(9){
opacity: 20%;
}
.morseCard:nth-child(10){
2019-12-27 09:41:53 +01:00
opacity: 10%;
}
}
.morseCard {
display: flex;
flex-direction: row !important;
justify-content: center;
/* border: 1px solid orange; */
margin-bottom: 2px;
font-size: 1.5rem;
2019-12-27 09:41:53 +01:00
font-family: 'Courier';
/* width: 100%; */
2020-01-03 08:53:56 +01:00
div div {
// border: 1px solid purple;
cursor: default;
2019-12-27 09:41:53 +01:00
padding: 5px;
2020-01-03 08:53:56 +01:00
margin: 3px;
2019-12-27 09:41:53 +01:00
background: #EEE;
2020-01-03 08:53:56 +01:00
// width: 50%;
2019-12-27 09:41:53 +01:00
white-space: nowrap;
2020-01-03 08:53:56 +01:00
border-radius: $main-border-radius;
box-shadow: $main-box-shadow;
line-height: 1rem;
2020-01-03 08:53:56 +01:00
}
.ditDahs-container, .alphanumeric-container {
display: flex;
width: 50%;
font-weight: bold;
2020-01-03 08:53:56 +01:00
}
.ditDahs-container {
justify-content: flex-end;
2019-12-27 09:41:53 +01:00
}
.ditDahs {
2020-01-03 08:53:56 +01:00
// border: 1px solid red;
2019-12-27 09:41:53 +01:00
display: flex;
justify-content: flex-end;
align-items: center;
overflow-wrap: break-word;
}
}