Skip to content
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
6 changes: 4 additions & 2 deletions 01/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
display: block;
content: '';
height: 0;
border: 150px solid #dcdcdc;
shape-outside: polygon(0 0%, 0% 100%, 100% 0);

Copy link
Copy Markdown
Owner

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 %

margin-right: 20px;
border: 150px solid #c4b8b8;
border-right-color: transparent;
border-bottom-color: transparent;
border-bottom-color: transparent;
}
23 changes: 20 additions & 3 deletions 02/index.html
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>
18 changes: 17 additions & 1 deletion 02/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brakuje jeszcze wysokości dla każdego elementu (50vh)

border-color: #baffc9;
}
8 changes: 8 additions & 0 deletions 02/styles/tablet.css
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;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Binary file added 03/images/city-7359472_1920.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 03/images/city1200.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 03/images/city1900.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 03/images/city600.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 38 additions & 5 deletions 03/index.html
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>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


</body>

</html>
54 changes: 54 additions & 0 deletions 03/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}
97 changes: 76 additions & 21 deletions 04/index.html
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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The 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>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zamiast tworzyć element div.arrow_right można wykorzystać pseudo-element ::after

<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>
18 changes: 18 additions & 0 deletions 04/styles/global.css
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;
}


Loading