-
Notifications
You must be signed in to change notification settings - Fork 0
Huiswerk #1
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
base: main
Are you sure you want to change the base?
Huiswerk #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| /*Opdracht 1a*/ | ||
|
|
||
| .navbar-one ul { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| list-style: none; | ||
| } | ||
|
|
||
| /*Opdracht 1b*/ | ||
|
|
||
| .navbar-two ul { | ||
| display: flex; | ||
| justify-content: flex-end; | ||
| list-style: none; | ||
| } | ||
|
|
||
| /*Opdracht 1c*/ | ||
|
|
||
| .navbar-three { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| } | ||
|
|
||
| .navbar-three ul { | ||
| display: flex; | ||
| justify-content: flex-end; | ||
| align-items: center; | ||
| list-style: none; | ||
| } | ||
|
|
||
| .image-wrapper { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 10px; | ||
| } | ||
|
|
||
| /*Opdracht 1d*/ | ||
| .navbar-four { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Er is in deze 4e subopdracht misschien wat weinig ruimte tussen 'Novi Futuristic Inc' en 'Home', omdat ze allebei bij een andere 'groep' horen had je hier nog een gap kunnen aanmaken voor meer ruimte (2rem in de uitwerkingen). |
||
|
|
||
| .navbar-four ul { | ||
| display: flex; | ||
| gap: 10px; | ||
| align-items: center; | ||
| list-style: none; | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ook hier kan een relatieve gap-maat dus ook, en list-style is in de uitwerkingen in een aparte class selector gezet die globaal wordt toegepast. Maar dit is simpelweg een andere manier om het goed te doen lijkt me. |
||
|
|
||
| .navbar-four .nav-links { | ||
| flex: 1; | ||
| } | ||
|
|
||
| /*Opdracht 1e*/ | ||
| .navbar-five { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| } | ||
|
|
||
| .navbar-five ul { | ||
| display: flex; | ||
| gap: 10px; | ||
| align-items: center; | ||
| list-style: none; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,86 @@ | |
| <title>NOVI Flexbox opdracht 2</title> | ||
| </head> | ||
| <body> | ||
| <p>It's Flexbox time!</p> | ||
| <nav> | ||
| <div class="image-wrapper"> | ||
| <img src="../assets/logo-acme.svg" alt="Company logo"/> | ||
| <p>NOVI Futuristic Inc</p> | ||
| </div> | ||
| <div class="menu"> | ||
| <div> | ||
| <ul> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In vergelijking met de uitwerkingen ben je hier 2 div's dieper gegaan, in plaats van het gebruik van een class voor de
|
||
| <li><a href="/"><img src="../assets/home.svg" alt="home-icon"/>Dashboard</a></li> | ||
| <li><a href="/"><img src="../assets/apps.svg" alt="apps-icon"/>Projecten</a></li> | ||
| <li><a href="/"><img src="../assets/calendar.svg" alt="calendar-icon"/>Opleidingen en trainingen</a> | ||
| </li> | ||
| <li><a href="/"><img src="../assets/graduation-cap.svg" alt="graduation-cap-icon"/>Cursusmateriaal</a> | ||
| </li> | ||
| </ul> | ||
| </div> | ||
| <div class="login"> | ||
| <button type="button" class="button-primary"> | ||
| Meld je aan | ||
| </button> | ||
| <button type="button" class="button-secondary"> | ||
| Login | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </nav> | ||
| <div class="main-content"> | ||
| <header> | ||
| <h1>Opleidingsaanbod</h1> | ||
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. <br/> Animi at aut, consectetur fuga fugit magni | ||
| minus quo quos repudiandae veniam.</p> | ||
| </header> | ||
| <main> | ||
| <article> | ||
| <img src="../assets/placeholder-image.svg" alt="placeholder-image" /> | ||
| <h2>Some amazing title</h2> | ||
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> | ||
| <span>€1390,-<img src="../assets/users-alt.svg" alt="users-icon" class="icon"/></span> | ||
| <button type="button" class="button-secondary">Inschrijven</button> | ||
| </article> | ||
| <article> | ||
| <img src="../assets/placeholder-image.svg" alt="placeholder-image" /> | ||
| <h2>Some amazing title</h2> | ||
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> | ||
| <span>€1390,-<img src="../assets/users-alt.svg" alt="users-icon" class="icon"/></span> | ||
| <button type="button" class="button-secondary">Inschrijven</button> | ||
| </article> | ||
| <article> | ||
| <img src="../assets/placeholder-image.svg" alt="placeholder-image" /> | ||
| <h2>Some amazing title</h2> | ||
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> | ||
| <span>€1390,-<img src="../assets/users-alt.svg" alt="users-icon" class="icon"/></span> | ||
| <button type="button" class="button-secondary">Inschrijven</button> | ||
| </article> | ||
| <article> | ||
| <img src="../assets/placeholder-image.svg" alt="placeholder-image" /> | ||
| <h2>Some amazing title</h2> | ||
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> | ||
| <span>€1390,-<img src="../assets/users-alt.svg" alt="users-icon" class="icon"/></span> | ||
| <button type="button" class="button-secondary">Inschrijven</button> | ||
| </article> | ||
| <article> | ||
| <img src="../assets/placeholder-image.svg" alt="placeholder-image" /> | ||
| <h2>Some amazing title</h2> | ||
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> | ||
| <span>€1390,-<img src="../assets/users-alt.svg" alt="users-icon" class="icon"/></span> | ||
| <button type="button" class="button-secondary">Inschrijven</button> | ||
| </article> | ||
| <article> | ||
| <img src="../assets/placeholder-image.svg" alt="placeholder-image" /> | ||
| <h2>Some amazing title</h2> | ||
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> | ||
| <span>€1390,-<img src="../assets/users-alt.svg" alt="users-icon" class="icon"/></span> | ||
| <button type="button" class="button-secondary">Inschrijven</button> | ||
| </article> | ||
| </main> | ||
| <footer> | ||
| <p>© NOVI Hogeschool</p> | ||
| </footer> | ||
| </div> | ||
|
|
||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| body { | ||
| display: flex; | ||
| height: 100vh; | ||
| } | ||
|
|
||
| /*------------------------------- NAVIGATION BAR -------------------------------*/ | ||
|
|
||
| nav { | ||
| display: flex; | ||
| flex: 1 0 250px; | ||
| flex-direction: column; | ||
| gap: 20px; | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Zelfde als bij eerste deel opdracht, absolute px-waarden ipv relatieve rem-waarden. |
||
|
|
||
| ul { | ||
| list-style: none; | ||
| } | ||
|
|
||
| li a { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 12px; | ||
| } | ||
|
|
||
| .image-wrapper { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 12px; | ||
| } | ||
|
|
||
| .menu { | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content: space-between; | ||
| flex: auto; | ||
| } | ||
|
|
||
| .login { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 12px; | ||
| } | ||
| /*------------------------------- MAIN CONTENT -------------------------------*/ | ||
|
|
||
| .main-content { | ||
| display: flex; | ||
| flex-direction: column; | ||
| flex: 9; | ||
| } | ||
|
|
||
| header, | ||
| main, | ||
| footer, | ||
| article { | ||
| display: flex; | ||
| } | ||
|
|
||
| header { | ||
| flex-direction: column; | ||
| flex: 0 0 40vh; | ||
| justify-content: center; | ||
| background: url("../assets/placeholder-image.svg") center no-repeat; | ||
| background-size: cover; | ||
| text-align: center; | ||
| } | ||
|
|
||
| main { | ||
| flex: 1 0 0; | ||
| overflow: scroll; | ||
| flex-wrap: wrap; | ||
| gap: 24px; | ||
| justify-content: center; | ||
| padding: 24px; | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. De uitwerkingen kiezen hier voor alleen een overflow-waarde op de y-as (overflow-y: scroll;). |
||
|
|
||
| article { | ||
| display: flex; | ||
| max-width: 260px; | ||
| max-height: 500px; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In plaats van absolute afmetingen geeft de uitwerkingen een 'aspect-ratio' attribuut terug, die ik zelf ook nog niet kende (aspect-ratio: 1 / 1.4;). Zodat het meeschaalt afhankelijk van de content maar wel in dezelfde proporties blijft. |
||
| flex-direction: column; | ||
| justify-content: space-between; | ||
| gap: 12px; | ||
| } | ||
|
|
||
| span { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| } | ||
|
|
||
| .icon { | ||
| max-width: 16px; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Width of max-width lijkt hier tot hetzelfde resultaat te leiden. |
||
| } | ||
|
|
||
| footer { | ||
| background-color: #383838; | ||
| color: #fff; | ||
| justify-content: center; | ||
| font-size: 12px; | ||
| padding: 12px; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In de uitwerkingen wordt hier een relatieve maat (1rem) gebruikt, maar volgens mij hadden we die destijds nog niet behandeld (had het zelf ook niet).