Skip to content
Open
Show file tree
Hide file tree
Changes from 7 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
2 changes: 2 additions & 0 deletions 01/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@
border: 150px solid #dcdcdc;
border-right-color: transparent;
border-bottom-color: transparent;

shape-outside: polygon( 30% 0%, 100% 0%, 0% 100%, 0% 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.

👍

}
19 changes: 18 additions & 1 deletion 02/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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"
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.

Zwróć uwagę na kolejność w wersji mobilnej powinno być a, b, c. Obecnie jest a, c, b,

"c b";
}
.a { grid-area: a; }
.b { grid-area: b; }
.c { grid-area: c; }
}
Binary file added 03/images/fallback.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/img-1200x675.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/img-2000x1125.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/img-600x338.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 27 additions & 3 deletions 03/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
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.

👍

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

👍

19 changes: 18 additions & 1 deletion 03/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,21 @@

.v {
border-color: #baffc9;
}
position: relative;
width: 100%;
padding-top: 56.25%;
}

.v iframe {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}

.p img {
max-width: 100%;
min-height: 100%;
height: 50vh;
}
22 changes: 22 additions & 0 deletions 03/styles/mobile.css
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;
}

}
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.

👍

16 changes: 16 additions & 0 deletions 03/styles/tablet.css
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; }
}
57 changes: 43 additions & 14 deletions 04/index.html
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"
>&#9776;</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>
47 changes: 47 additions & 0 deletions 04/styles/descktop.css
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;
}
}
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.

👍

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

👍

Loading