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

256 lines
5.4 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);
2020-01-09 10:06:38 +01:00
$main-border-radius: 0px;
$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);
2020-01-03 08:53:56 +01:00
2019-12-27 09:41:53 +01:00
html, body {
margin: 0px;
padding: 0px;
height: 100%;
width: 100%;
box-sizing: border-box;
background: $main-bg-color;
// background: #444
2019-12-27 09:41:53 +01:00
}
#root {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
.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;
2020-01-18 11:38:21 +01:00
position: absolute;
align-self: left;
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
#main-content {
width: 95vw;
border: 1px solid red;
display: flex;
flex-direction: column;
}
#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 {
width: 100px;
height: 100px;
background: goldenrod;
margin: 0px;
border: 0px;
transition: all 500ms ease-in-out;
}
.paddle#left {
border-radius: 50px 0 0 50px;
}
.paddle#right {
border-radius: 0 50px 50px 0;
}
.paddle.showPaddles {
width: 250px;
height: 100px;
}
.paddle#left.showPaddles{
margin-right: 7px;
}
.paddle#right.showPaddles{
margin-left: 7px;
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;
width: fit-content;
display: flex;
font-size: 40px;
font-family: 'Courier';
font-weight: bold;
background: #EEE;
text-transform: uppercase;
align-self: center;
}
2020-01-10 09:56:38 +01:00
#morseBufferDisplay, #challengeBufferDisplay {
2019-12-27 09:41:53 +01:00
display: flex;
justify-content: center;
2020-01-03 08:53:56 +01:00
// border: 1px solid green;
2019-12-27 09:41:53 +01:00
width: 100%;
height: 40px;
2020-01-03 08:53:56 +01:00
margin-bottom: 20px;
2019-12-27 09:41:53 +01:00
#ditDahs {
width: 50%;
padding-right: 5px;
border-right: 2px solid #000;
display: flex;
flex-direction: row;
justify-content: flex-end;
.ditDah {
background: #DDD;
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;
font-size: 35px;
font-family: 'Courier';
font-weight: bold;
}
}
2020-01-03 08:53:56 +01:00
#alphanumeric-container {
2019-12-27 09:41:53 +01:00
border-left: 2px solid #000;
2020-01-03 08:53:56 +01:00
padding-left: 5px;
2019-12-27 09:41:53 +01:00
width: 50%;
2020-01-03 08:53:56 +01:00
display: flex;
#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;
}
}
2019-12-27 09:41:53 +01:00
}
}
.space {
font-size: 20px;
}
.morseError {
background: rgba(255,0,0,0.4);
2020-01-03 08:53:56 +01:00
color: rgb(120, 0, 0);
border-radius: 5px;
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
#morseDisplay {
/* border: 1px solid blue; */
display: flex;
flex-direction: column;
.morseCard:nth-child(1){
opacity: 100%;
}
.morseCard:nth-child(2){
opacity: 70%;
}
.morseCard:nth-child(3){
opacity: 50%;
}
.morseCard:nth-child(4){
opacity: 30%;
}
.morseCard:nth-child(5){
opacity: 10%;
}
}
.morseCard {
display: flex;
flex-direction: row !important;
justify-content: center;
/* border: 1px solid orange; */
margin-bottom: 2px;
2020-01-03 08:53:56 +01:00
font-size: 2.5rem;
2019-12-27 09:41:53 +01:00
font-family: 'Courier';
font-weight: bold;
/* 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: 2rem;
}
.ditDahs-container, .alphanumeric-container {
display: flex;
width: 50%;
}
.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;
}
}