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
33 changes: 17 additions & 16 deletions 01/style.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
box-sizing: border-box;
}

.content {
background-color: #fff;
min-height: 320px;
min-width: 320px;
max-width: 600px;
text-align: justify;
background-color: #fff;
min-height: 320px;
min-width: 320px;
max-width: 600px;
text-align: justify;
}

.content::before {
float: left;
display: block;
content: '';
height: 0;
border: 150px solid #dcdcdc;
border-right-color: transparent;
border-bottom-color: transparent;
}
float: left;
display: block;
content: "";
height: 0;
border: 150px solid #dcdcdc;
border-right-color: transparent;
border-bottom-color: transparent;
shape-outside: polygon(0 0, -5px 300px, 600px -300px);
}
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.

👍

54 changes: 40 additions & 14 deletions 02/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,52 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: grid;
height: 100vh;
}

.a, .b, .c {
border: 3px solid transparent;
min-height: 50px;

display: flex;
justify-content: center;
align-items: center;
.a,
.b,
.c {
display: flex;
justify-content: center;
align-items: center;
max-width: 1200px;
border: 5px solid transparent;
width: 100%;
min-height: 50px;
margin: 0 auto;
}

.a {
border-color: #ffffba
height: 50%;
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.

Raczje 50vh :)

border-color: #ffffba;
}

.b {
border-color: #ffdfba;
height: 50%;
border-color: #ffdfba;
}

.c {
border-color: #baffc9;
}
grid-row: 3 / 3;
height: 50%;
border-color: #baffc9;
}
@media (max-width: 601px) {
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.

Raczej odwrotnie - jak przekroczy czyli jak ma min-width: 601 to wtedy mają być 2 kolumny :)

.a {
grid-row: 1 / 2;
grid-column: 1 /3;
}
.b {
grid-row: 2 /2;
grid-column: 2 / 3;
}
.c {
grid-row: 2 / 2;
grid-column: 1 / 2;
}
}
Binary file added 03/img/crystal-7428278_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/img/crystal-7428278_640.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions 03/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@
<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 - #03</title>
<link rel="stylesheet" href="./styles/global.css">
</head>
<body>

<main class="t">T</main>
<header class="p">P</header>
<side class="v">V</side>
<main class="t" >
<p class="text">Lorem ipsum dolor sit amet consectetur adipisicing elit. Enim deserunt praesentium id hic cupiditate nihil tempora asperiores voluptates, itaque, delectus rem vitae, corporis placeat ea magni maxime consequuntur voluptas. Provident error perspiciatis dolore quibusdam recusandae dignissimos itaque maxime inventore? Blanditiis accusamus culpa hic adipisci, iste cumque! Assumenda, odit distinctio aspernatur hic possimus culpa eius nemo ipsum eveniet cumque iusto odio, molestiae commodi nesciunt nobis doloribus magni. Tempora odio ducimus perferendis, dolorum est beatae quisquam incidunt omnis aliquid nobis veniam, obcaecati soluta, debitis fugiat quis quod? Corporis, nostrum eligendi. Neque pariatur minus est necessitatibus suscipit sapiente. Quasi officiis ducimus hic est. Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolore, harum. Sed animi, deleniti officiis nobis vitae rem inventore. Enim et eveniet adipisci ad temporibus similique dignissimos, voluptatum ut vitae? Nihil labore numquam recusandae vel vero nam nesciunt dicta veniam error pariatur consectetur soluta necessitatibus ad sequi quam vitae, cupiditate id aliquam modi ducimus! Itaque debitis dolorum odio sapiente eaque molestiae neque sunt, ea a! Asperiores error eligendi eveniet eius numquam harum illum hic, cumque molestias quis, doloribus amet sit officia officiis quam, quibusdam reiciendis distinctio. Fugit, tempora. Tenetur, ipsum amet itaque esse porro et libero tempora doloribus maxime voluptatem vel? </p>
</main>
<header class="p">
<picture class="img"></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.

Brakuje różnych rozmiarów - należało użyć source + img: https://www.w3schools.com/tags/tag_picture.asp

</header>
<side class="v">
<div class="video"><iframe min-width="200" height="315" src="https://www.youtube.com/embed/0DfkHS2-e1Y?si=Pd_Bjp4jGEPCkEvO" 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></div>
</side>

</body>
</html>
182 changes: 168 additions & 14 deletions 03/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,180 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
box-sizing: border-box;
}

.p, .t, .v {
border: 3px solid transparent;
min-height: 50px;

display: flex;
justify-content: center;
align-items: center;
.p,
.t,
.v {
border: 5px solid transparent;
min-height: 50px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}

.p {
border-color: #ffffba
border-color: #ffffba;
}

.t {
border-color: #ffdfba;
border-color: #ffdfba;
}

.v {
border-color: #baffc9;
}
border-color: #baffc9;
}

@media (max-width: 599px) {
body {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
}
.t,
.text {
margin: 5px;
text-align: justify;
}.p,
.img {
grid-row: 1 / 2;
background-image: url(../img/crystal-7428278_640.jpg);
width: 100%;
height: 100vh;
background-size: cover;
background-position: center;
}
.video {
position: relative;
width: 100%;
height: 0;
padding-bottom: calc(315 / 560 * 100%);
}
iframe {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
}
}

@media (min-width: 600px) and (max-width: 1199px) {
body {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
}
.t {
grid-column: 2 / 3;
grid-row: 1 / 3;
}
.text {
margin: 10px 20px;
text-align: justify;
}
.p {
grid-column: 1/2;
}
.p,
.img {
background-image: url(../img/crystal-7428278_1920.jpg);
width: 100%;
height: 100vh;
background-size: cover;
background-position: center;
min-width: 200px;
}
.v {
min-width: 200px;
}
.video {
position: relative;
width: 100%;
height: 0;
padding-bottom: calc(315 / 560 * 100%);
min-width: 200px;
}
iframe {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
}
}
@media (min-width: 1200px) and (max-width: 1400px) {
body {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
}
.t {
grid-column: 1 /3;
grid-row: 2 / 2;
}
.text {
margin: 10px 20px;
text-align: justify;
}
.p,
.img {
background-image: url(../img/crystal-7428278_1920.jpg);
width: 100%;
height: 100vh;
background-size: cover;
background-position: center;
}
.video {
position: relative;
width: 100%;
height: 0;
padding-bottom: calc(315 / 560 * 100%);
}
iframe {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
}
}
@media (min-width: 1401px) {
body {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
margin: 0 100px;
}
.t {
grid-column: 1 /3;
grid-row: 2 / 2;
}
.text {
margin: 10px 20px;
text-align: justify;
}
.p,
.img {
background-image: url(../img/crystal-7428278_1920.jpg);
width: 100%;
height: 100vh;
background-size: cover;
background-position: center;
}
.video {
position: relative;
width: 100%;
height: 0;
padding-bottom: calc(315 / 560 * 100%);
}
iframe {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
}
}
58 changes: 31 additions & 27 deletions 04/index.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
<!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">
<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>
<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" />
<title>devmentor.pl - HTML & CSS: RWD - #04</title>

</body>
</html>
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<nav class="nav">
<button class="nav__hamburger"></button>

<ul class="nav__list">
<li class="nav__list--item">
<a href="#home">Start</a>
</li>

<li class="nav__list--item menu__display">
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.

Pamiętaj, że w BEM Modyfikator występuje (nav__list--item) razem z Elementem (nav__list) tj. <li class="nav__list nav__list--item menu__display">

Tutaj znajdziesz więcej informacji: https://devmentor.pl/b/metodologia-bem-w-css-i-sass

<a href="#items">oferta<span class="arrow-right">▶</span></a>

<ul class="nav__under">
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.

Na wersji mobilne zagnieżdżenie powinno pokazać się poniżej. Inaczej przy małych ekranach kolejny poziom menu może być przesłonięty, a nawet w skrajnym przypadku niewidoczne:

Screenshot 2024-04-19 at 06 13 44

<li class="nav__under--list"><a href="">strona internetowa</a></li>
<li class="nav__under--list">
<a href="">pozycjonowanie stron www</a>
</li>
</ul>
</li>
<li class="nav__list--item"><a href="#contact">Contact</a></li>
</ul>
</nav>
</body>
</html>
Loading