-
Notifications
You must be signed in to change notification settings - Fork 192
Practice-HTML/CSS-rwd #171
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: master
Are you sure you want to change the base?
Changes from all commits
e47bc30
be1eda1
624f829
08297aa
7105f08
be91711
9cf74b0
2fd8b58
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 |
|---|---|---|
|
|
@@ -4,10 +4,10 @@ | |
| box-sizing: border-box; | ||
| } | ||
|
|
||
|
|
||
| .a, .b, .c { | ||
| border: 3px solid transparent; | ||
| min-height: 50px; | ||
|
|
||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
|
|
@@ -23,4 +23,21 @@ | |
|
|
||
| .c { | ||
| border-color: #baffc9; | ||
| } | ||
|
|
||
|
|
||
| @media(min-width: 600px) { | ||
| body { | ||
| display: grid; | ||
| max-width: 1200px; | ||
| margin: 0 auto; | ||
| grid-template-rows: 50% 1fr; | ||
| grid-template-columns: 50% 50%; | ||
| grid-template-areas: | ||
| "a a" | ||
|
Owner
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. Zwróć uwagę na kolejność w wersji mobilnej powinno być |
||
| "c b"; | ||
| } | ||
| .a { grid-area: a; } | ||
| .b { grid-area: b; } | ||
| .c { grid-area: c; } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,13 +4,37 @@ | |
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
| <link rel="stylesheet" href="./styles/global.css"> | ||
| <link rel="stylesheet" href="./styles/mobile.css"> | ||
| <link rel="stylesheet" href="./styles/tablet.css"> | ||
| <link rel="stylesheet" href="./styles/desktop.css"> | ||
| <title>devmentor.pl - HTML & CSS: RWD - #03</title> | ||
| </head> | ||
| <body> | ||
|
|
||
| <main class="t">T</main> | ||
| <header class="p">P</header> | ||
| <side class="v">V</side> | ||
| <main class="t">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Maxime quod nam consectetur error iure omnis velit asperiores eos voluptates ullam iste totam quaerat labore expedita quidem obcaecati, illum quasi dicta?</main> | ||
| <header class="p"> | ||
| <picture> | ||
| <source | ||
| srcset="./images/img-2000x1125.jpg" | ||
| media="(min-width: 1200px)" | ||
| > | ||
| <source | ||
| srcset="./images/img-1200x675.jpg" | ||
| media="(min-width: 600px)" | ||
| > | ||
|
|
||
| <source | ||
| srcset="./images/img-600x338.jpg" | ||
| media="(max-width: 599px)" | ||
| > | ||
|
|
||
| <img src="./images/fallback.jpg" alt="fallback"> | ||
| </picture> | ||
|
Owner
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. 👍 |
||
| </header> | ||
| <side class="v"> | ||
| <iframe src="https://www.youtube.com/embed/sdQGqO9xuao?si=stU8gcrR6vkP_W9t" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> | ||
| </side> | ||
|
|
||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| @media (min-width: 1200px) { | ||
| body { | ||
| display: grid; | ||
| min-height: 100vh; | ||
| max-width: 1400px; | ||
| margin: 0 auto; | ||
| grid-template-rows: 1fr 1fr; | ||
| grid-template-columns: 51% 1fr; | ||
| grid-template-areas: | ||
| "p v" | ||
| "t t"; | ||
| } | ||
|
|
||
|
|
||
| .p { grid-area: p; } | ||
| .t { grid-area: t; } | ||
| .v { grid-area: v; } | ||
| } | ||
|
Owner
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. 👍 |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| @media (max-width: 599px) { | ||
| body { | ||
| display: grid; | ||
| min-height: 100vh; | ||
| grid-template-rows: auto auto auto; | ||
| grid-template-columns: 100%; | ||
| grid-template-areas: | ||
| "p" | ||
| "t" | ||
| "v"; | ||
| } | ||
|
|
||
|
|
||
| .p { grid-area: p; } | ||
| .t { grid-area: t; } | ||
| .v { grid-area: v; } | ||
|
|
||
| .v{ | ||
| height: 30vh; | ||
| } | ||
|
|
||
| } | ||
|
Owner
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. 👍 |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| @media (min-width: 600px) { | ||
| body { | ||
| display: grid; | ||
| min-height: 100vh; | ||
| grid-template-rows: 1fr 1fr; | ||
| grid-template-columns: 51% 1fr; | ||
| grid-template-areas: | ||
| "p t" | ||
| "v t"; | ||
| } | ||
|
|
||
|
|
||
| .p { grid-area: p; } | ||
| .t { grid-area: t; } | ||
| .v { grid-area: v; } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,59 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="pl"> | ||
|
|
||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
| <meta | ||
| name="viewport" | ||
| content="width=device-width, initial-scale=1.0" | ||
| > | ||
| <meta | ||
| http-equiv="X-UA-Compatible" | ||
| content="ie=edge" | ||
| > | ||
| <link | ||
| rel="stylesheet" | ||
| href="./styles/reset.css" | ||
| > | ||
| <link | ||
| rel="stylesheet" | ||
| href="./styles/mobile.css" | ||
| > | ||
| <link | ||
| rel="stylesheet" | ||
| href="./styles/descktop.css" | ||
| > | ||
| <title>devmentor.pl - HTML & CSS: RWD - #04</title> | ||
| </head> | ||
|
|
||
| <body> | ||
|
|
||
| <nav> | ||
| <ul> | ||
| <li> | ||
| <a href="#">start</a> | ||
| </li> | ||
|
|
||
| <nav class="nav"> | ||
|
|
||
| <input | ||
| type="checkbox" | ||
| id="menu-toggle" | ||
| class="menu-toggle" | ||
| > | ||
|
|
||
| <label | ||
| for="menu-toggle" | ||
| class="menu-icon" | ||
| >☰</label> | ||
|
|
||
| <ul class="menu"> | ||
| <li><a href="#">start</a></li> | ||
| <li> | ||
| <a href="#">oferta</a> | ||
| <ul> | ||
| <li><a href="">strony internetowe</a></li> | ||
| <li><a href="">pozycjonowanie stron www</a></li> | ||
| <ul class="submenu"> | ||
| <li><a href="#">strony internetowe</a></li> | ||
| <li><a href="#">pozycjonowanie stron www</a></li> | ||
| </ul> | ||
| </li> | ||
| <li> | ||
| <a href="#">kontakt</a> | ||
| </li> | ||
| <li><a href="#">kontakt</a></li> | ||
| </ul> | ||
| </nav> | ||
|
|
||
| </body> | ||
|
|
||
| </html> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| @media (min-width: 801px) { | ||
| .menu-toggle { | ||
| display: none; | ||
| } | ||
|
|
||
| .menu-icon { | ||
| display: none; | ||
| } | ||
|
|
||
| .menu { | ||
| display: flex; | ||
| justify-content: flex-end; | ||
| gap: 20px; | ||
|
|
||
|
|
||
| } | ||
|
|
||
| .menu li { | ||
| display: flex; | ||
| position: relative; | ||
| } | ||
|
|
||
| .menu li a { | ||
| display: flex; | ||
| padding: 10px 15px; | ||
| color: #fff; | ||
| background: #333; | ||
| } | ||
|
|
||
| .submenu { | ||
| display: none; | ||
| position: absolute; | ||
| top: 100%; | ||
| left: 0; | ||
| background: #444; | ||
| width: 200px; | ||
| } | ||
|
|
||
| .submenu li a { | ||
| padding: 0.75rem; | ||
| } | ||
|
|
||
|
|
||
| .menu li:hover > .submenu { | ||
| display: block; | ||
| } | ||
| } | ||
|
Owner
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. 👍 |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| .nav { | ||
| background: #333; | ||
| color: white; | ||
| position: relative; | ||
| } | ||
|
|
||
|
|
||
| .menu-icon { | ||
| display: block; | ||
| font-size: 2rem; | ||
| padding: 1rem; | ||
| cursor: pointer; | ||
| color: white; | ||
| } | ||
|
|
||
| @media(max-width: 800px) { | ||
| .menu-toggle { | ||
| display: none; | ||
| } | ||
|
|
||
|
|
||
| .menu { | ||
| display: none; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
|
|
||
| .menu-toggle:checked ~ .menu { | ||
| display: flex; | ||
| } | ||
|
|
||
|
|
||
| .menu li a { | ||
| display: flex; | ||
| padding: 1rem; | ||
| border-bottom: 1px solid #444; | ||
| font-size: 2rem; | ||
| justify-content: center; | ||
| } | ||
|
|
||
|
|
||
| .submenu { | ||
| display: none; | ||
| padding-left: 1rem; | ||
| } | ||
|
|
||
| .menu li:focus-within > .submenu { | ||
| display: block; | ||
| } | ||
| } | ||
|
Owner
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. 👍 |
||
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.
👍