-
Notifications
You must be signed in to change notification settings - Fork 192
practice-html-and-css-rwd done #167
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
2a7f815
43c5942
b9beb9b
c7af5b8
fda784e
88eecf7
35af579
ae87cc3
0f62349
ac7c206
0b49d24
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 |
|---|---|---|
| @@ -1,16 +1,33 @@ | ||
| <!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" | ||
| > | ||
| <title>devmentor.pl - HTML & CSS: RWD - #02</title> | ||
|
|
||
| <link rel="stylesheet" href="./styles/global.css"> | ||
| <link | ||
| rel="stylesheet" | ||
| href="./styles/global.css" | ||
| > | ||
| <link | ||
| rel="stylesheet" | ||
| media="(min-width: 600px)" | ||
| href="./styles/tablet.css" | ||
| > | ||
| </head> | ||
|
|
||
| <body> | ||
| <header class="a">A</header> | ||
| <section class="c">C</section> | ||
| <main class="b">B</main> | ||
| </body> | ||
|
|
||
| </html> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,23 +4,39 @@ | |
| box-sizing: border-box; | ||
| } | ||
|
|
||
| body { | ||
| display: grid; | ||
| grid-template-areas: | ||
| "a-top" | ||
| "a-mid" | ||
| "a-bottom"; | ||
| grid-template-rows: | ||
|
|
||
| minmax(calc(50% -6px), auto); | ||
| } | ||
|
|
||
|
|
||
| .a, .b, .c { | ||
| border: 3px solid transparent; | ||
| min-height: 50px; | ||
|
|
||
| height: 50vh; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
|
|
||
| } | ||
|
|
||
| .a { | ||
| grid-area: a-top; | ||
| border-color: #ffffba | ||
| } | ||
|
|
||
| .b { | ||
| grid-area: a-mid; | ||
| border-color: #ffdfba; | ||
| } | ||
|
|
||
| .c { | ||
| grid-area: a-bottom; | ||
|
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. Brakuje jeszcze wysokości dla każdego elementu (50vh) |
||
| border-color: #baffc9; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| body { | ||
| display: grid; | ||
| grid-template-areas: | ||
| "a-top a-top" | ||
| "a-mid a-bottom"; | ||
| max-width: 1200px; | ||
| margin: 0 auto; | ||
| } | ||
|
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 |
|---|---|---|
| @@ -1,16 +1,49 @@ | ||
| <!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/global.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> | ||
| <header class="p"> | ||
| <picture> | ||
| <source | ||
| media="(max-width: 600px)" | ||
| srcset="./images/city600.jpg" | ||
| > | ||
| <source | ||
| srcset="./images/city1200.jpg" | ||
| media="(max-width: 1200px)" | ||
| > | ||
| <source | ||
| srcset="./images/city1900.jpg" | ||
| media="(min-width: 1201px)" | ||
| > | ||
| <img | ||
| src="./images/city1900.jpg" | ||
| alt="" | ||
| > | ||
| </picture> | ||
| </header> | ||
| <side class="v"><iframe width="560" height="315" src="https://www.youtube.com/embed/RhUuMl3R1PE?si=lY_1I9X4lzqCIM0e" 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> | ||
|
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. 👍 |
||
|
|
||
| </body> | ||
|
|
||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,16 @@ | |
| box-sizing: border-box; | ||
| } | ||
|
|
||
| body { | ||
| display: grid; | ||
| grid-template-areas: | ||
| "P" | ||
| "T" | ||
| "V" | ||
| ; | ||
| } | ||
|
|
||
|
|
||
| .p, .t, .v { | ||
| border: 3px solid transparent; | ||
| min-height: 50px; | ||
|
|
@@ -14,13 +24,57 @@ | |
| } | ||
|
|
||
| .p { | ||
| grid-area: P; | ||
| border-color: #ffffba | ||
| } | ||
|
|
||
| .t { | ||
| grid-area: T; | ||
| border-color: #ffdfba; | ||
| } | ||
|
|
||
| .v { | ||
| position: relative; | ||
| padding-bottom: calc((315 / 560 * 100%)); | ||
| grid-area: V; | ||
| border-color: #baffc9; | ||
| } | ||
|
|
||
| img { | ||
| max-width: 100%; | ||
| } | ||
|
|
||
| iframe { | ||
| position: absolute; | ||
| width: 100%; | ||
| height: 100%; | ||
| left: 0; | ||
| top: 0; | ||
|
|
||
| min-width: 200px; | ||
| aspect-ratio: 16/8; | ||
| } | ||
|
|
||
| @media (min-width:600px) { | ||
| body { | ||
| display: grid; | ||
| grid-template-areas: | ||
| "P T" | ||
| "V T" | ||
| ; | ||
| grid-template-columns: minmax(200px, 50%) auto; | ||
| } | ||
| } | ||
|
|
||
|
|
||
| @media (min-width:1200px) { | ||
| body { | ||
| display: grid; | ||
| grid-template-areas: | ||
| "P V" | ||
| "T T" | ||
| ; | ||
| max-width: 1400px; | ||
| margin: 0 auto; | ||
| } | ||
|
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 |
|---|---|---|
| @@ -1,30 +1,85 @@ | ||
| <!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/global.css" | ||
| > | ||
| <link | ||
| rel="stylesheet" | ||
| href="./styles/mobile.css" | ||
| > | ||
| <link | ||
| rel="stylesheet" | ||
| media="(min-width: 761px)" | ||
| href="./styles/tablet.css" | ||
| > | ||
| <script | ||
| src="https://kit.fontawesome.com/98e4a0361f.js" | ||
| crossorigin="anonymous" | ||
| ></script> | ||
| <title>devmentor.pl - HTML & CSS: RWD - #04</title> | ||
| </head> | ||
| <body> | ||
|
|
||
| <nav> | ||
| <ul> | ||
| <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> | ||
| </li> | ||
| <li> | ||
| <a href="#">kontakt</a> | ||
| </li> | ||
| </ul> | ||
| </nav> | ||
|
|
||
| <body> | ||
| <header class="header__container"> | ||
| <h1 class="header__logo">Logo</h1> | ||
| <nav class="nav__container"> | ||
| <label | ||
| class="nav__label" | ||
| for="menu-switcher" | ||
| ><i class="fa-solid fa-bars"></i></label> | ||
| <input | ||
| class="header__input" | ||
| type="checkbox" | ||
| id="menu-switcher" | ||
| > | ||
| <ul class="nav dropdown"> | ||
| <li class="nav__item"> | ||
| <a | ||
| class="nav__link" | ||
| href="#" | ||
| >start</a> | ||
| </li> | ||
| <li class="nav__item arrow"> oferta | ||
|
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. 👍 |
||
| <ul class="nav__dropdown dropdown"> | ||
| <li class="dropdown__item nav__item"><a | ||
| class="nav__link" | ||
| href="#" | ||
| >strony internetowe</a></li> | ||
| <li class="dropdown__item nav__item"> pozycjonowanie<div class="arrow__right"> > </div> | ||
|
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. Zamiast tworzyć element |
||
| <ul class="nav__dropdown dropdown--right nav__dropdown-left dropdown"> | ||
| <li class="dropdown__item-sub "><a | ||
| class="nav__link" | ||
| href="#" | ||
| >kampanie google ads</a></li> | ||
| <li class="dropdown__item-sub "><a | ||
| class="nav__link" | ||
| href="#" | ||
| >pozycjonowanie stron www</a></li> | ||
| </ul> | ||
| </li> | ||
| </ul> | ||
| </li> | ||
| <li class="nav__item"> | ||
| <a | ||
| class="nav__link" | ||
| href="#" | ||
| >kontakt</a> | ||
| </li> | ||
| </ul> | ||
| </nav> | ||
| </header> | ||
| </body> | ||
|
|
||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| * { | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
|
|
||
| .nav, .nav__dropdown, .dropdown__item-sub { | ||
| list-style: none; | ||
| text-transform: uppercase; | ||
| } | ||
|
|
||
| .nav__link{ | ||
| color: #336699; | ||
| text-decoration: none; | ||
| } | ||
|
|
||
|
|
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.
Jak wpisujemy 0 to nie musimy dawać jednostki bo 0 to zero - obojętnie czy px czy %