Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quiz #398

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
4 changes: 0 additions & 4 deletions assets/scss/_normalize.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ hr {
height: 0;
}

pre {
overflow: auto;
}

code,
kbd,
pre,
Expand Down
4 changes: 3 additions & 1 deletion assets/scss/base/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ $color-dark: #0d3a5a;
$color-light: #2ecccb;
$color-text: #390725;
$color-info: #1e7695;
$color-danger: #ef4055;
$color-warning: #dbb371;
$color-success: #00cc99;

// Breakpoints
$screen-lg: 1280px; // desktop
Expand All @@ -22,4 +24,4 @@ $code-background: #fee3e4;
$code-primary: #7f1A55;
$code-tertiary: #f4756d;
$code-info: #1e7695;
$code-mute: #616161;
$code-mute: #616161;
57 changes: 57 additions & 0 deletions assets/scss/components/checkbox.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
.checkbox {
margin-top: .5em;
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
padding-left: 2.1em;
color: #fff;

code {
background-color: transparent;
color: $color-light;
font-family: Courier, monospace;
white-space: unset;
}

pre {
background-color: transparent !important;
padding: 5px;
}

div {
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
padding: .5em;
display: flex;
background-color: $color-dark ;
margin: .3em;
}
}

.checkbox__input {
display: none;
}

.checkbox__label {
position: relative;
font-size: .8em;
line-height: 1.3;

&::before {
content: '';
width: 20px;
height: 20px;
background-color: #fff;
position: absolute;
top: 0;
left: -35px;
cursor: pointer;
}
}

.checkbox__input:checked + .checkbox__label {
&::after {
font-family: 'icomoon';
content: '\e918';
position: absolute;
left: -32px;
font-size: 16px;
top: 2px;
color: $color-dark;
}
}
38 changes: 38 additions & 0 deletions assets/scss/components/question.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.question__info {
display: flex;
flex-direction: column;
background-color: #fff;
padding: 1em 2em;
margin-top: 2em;
font-size: 75%;
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved

span {
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
padding: .3em;
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
font-family: faktum bold;
color: $color-danger;
}

.solution {
font-family: faktum regular;
color: unset;
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
}

code {
font-size: 15px;
padding: 0 .3em .25em;
border-radius: 8px;
}
}

.question--answered {
.question__content {
padding-left: 20px;
}
}

.question--success {
border-left: solid 4px $color-success;
}
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
.question--error {
border-left: solid 4px $color-danger;
}
73 changes: 73 additions & 0 deletions assets/scss/components/quiz.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
.quiz {
display: flex;
flex-direction: column;
background-color: $color-dark;
padding: 4em 2em;

p {
color: #fff;
padding: 1em;
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
}
}

.quiz__title {
h1 {
color: $color-light;
}
}

.quiz__submit {
display: flex;
flex: wrap;
flex-direction: row-reverse;
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
justify-content: flex-start;
align-items: center;
margin-top: 2em;

button {
color: #fff;
font-size: .95em;
font-family: 'antikor bold';
padding: 1em 2.5em;
background-color: $color-light;
}
}

.quiz__answer {
margin-top: .8em;
color: #fff;
padding: 0 .3em;
}

.correct {
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
background-color: $color-success;
}

.wrong {
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
background-color: $color-danger;
}

.quiz__score {
display: flex;
flex: wrap;
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
width: 150px;
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
align-self: center;
align-items: center;
flex-direction: column;
font-family: 'faktum bold';
color: #2ecccb;
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved

strong {
line-height: 1;
font-size: .7em;
}

.emoji {
font-size: 2.7em;
margin: .3em;
}

.percentage {
font-size: 3em;
}
}
64 changes: 64 additions & 0 deletions assets/scss/components/radio.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.radio {
margin-top: .5em;
padding-left: 2.1em;
color: #fff;

code {
font-size: 15px;
background-color: #fff;
color: $color-dark;
padding: 0 .3em .25em;
border-radius: 8px;
}

pre {
margin: 0;
height: 90px;
width: 1059px;
background-color: #fff !important;
padding: .5em;
border-radius: 10px;
}

div {
display: flex;
background-color: $color-dark ;
margin: .3em;
}
}

.radio__input {
display: none;
}

.radio__label {
position: relative;
font-size: .8em;
line-height: 1.3;

&::before {
content: '';
height: 18px;
width: 18px;
/* border: 2px solid #fff; */
ameliedefrance marked this conversation as resolved.
Show resolved Hide resolved
border-radius: 50%;
position: absolute;
top: 1px;
left: -37px;
cursor: pointer;
background-color: #fff;
}
}

.radio__input:checked + .radio__label {
&::after {
content: '';
position: absolute;
height: 14px;
width: 14px;
border-radius: 50%;
background: #0d3a5a;
left: -35px;
top: 3px;
}
}
2 changes: 1 addition & 1 deletion assets/scss/generic/_code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pre {
word-break: normal;
word-wrap: normal;
line-height: 1.5;
overflow: auto;
overflow-x: auto;
tab-size: 4;
hyphens: none;
background: $code-background;
Expand Down
5 changes: 5 additions & 0 deletions assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ html.no-js [data-aos] {
@import "components/_titles";
@import "components/_values";
@import "components/_social-post";
@import "components/quiz";
@import "components/checkbox";
@import "components/radio";
@import "components/question";


// generic
@import "generic/_a";
Expand Down
Loading