Skip to content

Redesign quiz from scratch #261

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
_site/
.sass-cache/
.jekyll-metadata
.DS_Store
.DS_Store
.jekyll-cache
14 changes: 13 additions & 1 deletion _posts/2017-09-19-ops-s1-hello.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Wait, nothing happened! Is that a bug? No! In fact, something did happen. You st

You are now inside the container running a Linux shell and you can try out a few commands like `ls -l`, `uname -a` and others. Note that Alpine is a small Linux OS so several commands might be missing. Exit out of the shell and container by typing the `exit` command.

Ok, we said that we had run each of our commands above in a separate container instance. We can see these instances using the `docker container ls` command. The `docker container ls` command by itself shows you all containers that are currently running:
Ok, we said that we had run each of our commands above in a separate container instance. We can see these instances using the `docker container ls` (same as `docker ps`) command. The `docker container ls` command by itself shows you all containers that are currently running:

```.term1
docker container ls
Expand Down Expand Up @@ -242,3 +242,15 @@ Which command lists your Docker images?
- (x) docker image ls
- ( ) docker run
- ( ) docker container ls

{:.quiz}
What command would you use to inspect "ubuntu" Docker image?
> docker image inspect ubuntu

{:.quiz}
Which command(s) list your currently running docker containers?
- \[x] docker container ls
- \[ ] docker containers
- \[ ] docker ls container
- \[x] docker ps
- \[ ] docker list-containers
10 changes: 5 additions & 5 deletions _posts/2017-09-19-ops-s1-swarm-intro.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ What is a stack?

{:.quiz}
A stack can:
- (x) be deployed from the commandline
- (x) use the compose file format to deploy
- ( ) run a Dockerfile
- ( ) be used to manage your hosts
- (x) be used to manage services over multiple nodes
- \[x] be deployed from the commandline
- \[x] use the compose file format to deploy
- \[ ] run a Dockerfile
- \[ ] be used to manage your hosts
- \[x] be used to manage services over multiple nodes
5 changes: 5 additions & 0 deletions _sass/_custom.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-size: 16px;
}

.panel-left .container {
width: 100% !important;
}
176 changes: 148 additions & 28 deletions css/quiz.css
Original file line number Diff line number Diff line change
@@ -1,41 +1,161 @@
/* Carousel base class */
.carousel {
height: 500px;
margin-bottom: 60px;
:root {
--primary-color: #0083da;
--primary-highlight-color: #056fb6;
--primary-text-color: #000000;
--background-color: #ffffff;
--background-color2: #97cfec;
--second-bg-color: rgb(244, 244, 244);
--wrong-choice-color: red;
--wrong-choice-color2: rgb(255, 231, 231);
--correct-choice-color: green;
--correct-choice-color2: rgb(164, 238, 201);
}
/* Since positioning the image, we need to help out the caption */
.carousel-caption {
z-index: 10;

:root[data-theme='dark'],
:root[data-force-color-mode="dark"] {
--primary-color: #4a6572;
--background-color: #eeeeee;
--second-bg-color: #dddddd;
}

/* Declare heights because of positioning of img element */
.carousel .item {
height: 500px;
background-color: #777;
body {
background-color: var(--background-color);
color: var(--primary-text-color);
}
.carousel-inner > .item > img {
position: absolute;
top: 0;
left: 0;
min-width: 100%;
height: 500px;

.quiz-title {
font-weight: 400;
font-size: 20px;
line-height: 22px;
margin-top: 20px;
margin-bottom: 5px;
}

.carousel-caption {
text-align: left;
top: 0%;
.quiz-question-content {
display: flex;
flex-flow: column;
gap: 5px;
}

.carousel-caption label {
margin-bottom: 20px;
font-size: 21px;
line-height: 1;
.quiz-question-content.open-ended {
flex-flow: row;
}

.quiz-success {
color: #5cb85c;
.quiz-question-content input.answer {
flex: 3 1 0%;
border: none;
border-radius: 4px;
padding: 10px;
background: var(--second-bg-color);
}

.quiz-error {
color: #d9534f;
.quiz-question-content input.answer:focus {
border: none !important;
}

.quiz-question-content button.check {
border: none;
border-radius: 4px;
min-height: 30px;
background-color: var(--primary-color);
flex-grow: 1;
max-width: 40%;
cursor: pointer;
color: var(--background-color);
font-size: 14px;
font-weight: 600;
}

.quiz-question-content button.check:hover {
background: var(--primary-highlight-color);
}

.quiz-question-content button.check:active {
transform: translateY(1px);
}

input[type="radio"],
input[type="checkbox"] {
font: inherit;
width: 1em;
height: 1em;
border: 0.15em solid currentColor;
border-radius: 0.15em;
transform: translateY(-0.075em);
place-content: center;
vertical-align: middle;
position: relative;
z-index: 1;
margin: 15px;
/* Currently this is the way to handle bootstrap style.
Suboptimal since it's not very accessible. */
display: none;
}

input[type="checkbox"]:checked::before {
transform: scale(1);
}

.control-label {
box-shadow: none;
font-size: 1em;
display: flex;
vertical-align: middle;
border: var(--second-bg-color) solid 1px;
border-radius: 4px;
background: var(--second-bg-color);
padding: 10px;
/* padding-left: 50px; */
cursor: pointer;
font-weight: 400;
}

input:is([type="checkbox"], [type="radio"]):focus~.control-label,
.control-label:hover {
border: 1px solid var(--primary-color);
background: var(--background-color2);
}

input:is([type="checkbox"], [type="radio"]):checked~.control-label {
font-weight: 600;
transform: scale(1);
transition: 520ms transform ease-in-out;
border: 1px solid var(--primary-color);
}

.no-select {
user-select: none;
}

.post-content {
display: flex;
flex-direction: column;
}

.font-medium {
font-weight: 500;
}

.font-semibold {
font-weight: 600;
}

.wrong-choice {
color: var(--wrong-choice-color);
background: var(--wrong-choice-color2);
}

.correct-choice {
color: var(--correct-choice-color);
background: var(--correct-choice-color2);
}

.answered {
border: currentColor solid 1px !important;
border-radius: 4px;
}

.question-description {
color: gray;
font-size: 14px;
}
Loading