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
23 changes: 22 additions & 1 deletion 01/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,35 @@
min-width: 320px;
max-width: 600px;
text-align: justify;
padding: 0 16px;
}


.content::before {
float: left;
display: block;
content: '';
height: 0;
margin-right: 16px; /* Lapiej to wygada z marginesem */
margin: 0 16px 0 -16px;
border: 150px solid #dcdcdc;
border-right-color: transparent;
border-bottom-color: transparent;
border-bottom-color: transparent;
clip-path: polygon(0 0, 100% 0, 0 100%); /* "Ścieżka przycięcia " */
shape-outside: polygon(0 0, 100% 0, 0 100%); /* Dodanie wycięcia "kształt na zewnątrz" */
transition:
clip-path 0.6s ease-in-out,
shape-outside 0.6s ease-in-out,
margin-left 0.6s ease-in-out;
}

/* Na mobile */

@media (max-width: 600px) {
.content::before {
clip-path: polygon(0 0, 50% 0, 0 50%);
shape-outside: polygon(0 0, 50% 0, 0 50%);
margin: 0 16px 0 -16px;
line-height: 18px;
}
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.

👍

}
6 changes: 6 additions & 0 deletions 02/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
<!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 - #02</title>

<link rel="stylesheet" href="./styles/global.css">
<link rel="stylesheet" href="./styles/mobile.css">
<link rel="stylesheet" media="(min-width: 600px)" href="./styles/tablet.css">
<link rel="stylesheet" media="(min-width: 1281px)" href="./styles/desktop.css">
Comment on lines +11 to +13
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.

Twoje rozwiązanie działa odwrotnie do tego co zostało zapisane w zadaniu ;)

</head>

<body>
<header class="a">A</header>
<section class="c">C</section>
<main class="b">B</main>
</body>

</html>
4 changes: 4 additions & 0 deletions 02/styles/desktop.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
display: block;

}
5 changes: 2 additions & 3 deletions 02/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
}

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

display: flex;
justify-content: center;
align-items: center;
border: 3px solid transparent;
min-height: 50px;
}

.a {
Expand Down
40 changes: 40 additions & 0 deletions 02/styles/mobile.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
body {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(2, 1fr);
grid-column-gap: 0px;
grid-row-gap: 0px;
}

.a {
grid-area: 1 / 1 / 2 / 3; /* Zaczyna się na 1 wierszu i 1 kolumnie, kończy się na 2 wierszu 3 kolumnie */
}

.b {
grid-area: 2 / 1 / 3 / 2; /* Zaczyna się na 2 wierszu i 1 kolumnie, kończy się na 3 wierszu 2 kolumnie */
}

.c {
grid-area: 2 / 2 / 3 / 3; /* Zaczyna się na 2 wierszu i 2 kolumnie, kończy się na 3 wierszu 3 kolumnie */
}

/*

lub

.a {
grid-row: span 1;
grid-column: span 2;
}

.b {
grid-row: span 1;
grid-column: span 1;
}

.c {
grid-row: span 1;
grid-column: span 2;
}

*/
4 changes: 4 additions & 0 deletions 02/styles/tablet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
display: block;

}
Binary file added 03/assets/1280.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/assets/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/assets/5431.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/assets/640.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 44 additions & 4 deletions 03/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,56 @@
<!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 - #03</title>

<link rel="stylesheet" href="./styles/global.css">
<link rel="stylesheet" href="./styles/mobile.css">
<link rel="stylesheet" media="(min-width: 599px)" href="./styles/tablet.css">
<link rel="stylesheet" media="(min-width: 1199px)" href="./styles/desktop.css">
</head>

<body>

<main class="t">T</main>
<header class="p">P</header>
<side class="v">V</side>

<main class="t">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic
typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset
sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker
including versions of Lorem Ipsum.</p>
<p>
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
</p>
<p>
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.
</p>
</main>
<header class="p">
<picture>
<source srcset="./assets/640.jpg,
./assets/1280.jpg 2x
" media="(max-width: 599px)">
<source srcset="./assets/1280.jpg,
./assets/1920.jpg 2x
" media="(min-width: 1199px)">
<source srcset="
./assets/1920.jpg,
./assets/5431.jpg 2x
">
<img src="./assets/5431.jpg">
</picture>
</header>
<side class="v">
<iframe width="100%" height="100%" src="https://www.youtube.com/embed/2CHS7fdbX6o?si=Y8nkTgTm5SR-GRGA"
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>
31 changes: 31 additions & 0 deletions 03/styles/desktop.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
body {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(2, 1fr);
grid-column-gap: 0px;
grid-row-gap: 0px;
}

.t {
grid-area: 2 / 1 / 2 / 3; /* Zaczyna się na 1 wierszu i 1 kolumnie, kończy się na 2 wierszu 3 kolumnie */
padding: 5% 10%;
display: flex;
flex-flow: row wrap;
align-content: flex-start;
gap: 20px;
justify-content: center;
}

.p {
grid-area: 1 / 1 / 2 / 2; /* Zaczyna się na 2 wierszu i 1 kolumnie, kończy się na 3 wierszu 2 kolumnie */
}

.p img{
max-width: 100%;
}

.v {
grid-area: 1 / 2 / 2 / 3; /* Zaczyna się na 2 wierszu i 2 kolumnie, kończy się na 3 wierszu 3 kolumnie */
width: 100%;
height: 100%;
}
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.

👍

3 changes: 2 additions & 1 deletion 03/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
}

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

.t {
Expand Down
26 changes: 26 additions & 0 deletions 03/styles/mobile.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
body {
display: flex;
flex-flow: row wrap;
}

.t {
order: 2;
width: 100%;
padding: 5% 4%;
display: flex;
flex-flow: row wrap;
align-content: flex-start;
gap: 20px;
justify-content: center;
}

.p {
order: 1;
max-width: 100%;
}

.v {
order: 3;
width: 100%;
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.

👍

28 changes: 28 additions & 0 deletions 03/styles/tablet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
body {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(2, 1fr);
grid-column-gap: 0px;
grid-row-gap: 0px;
}

.t {
grid-area: 1 / 2 / 3 / 3; /* Zaczyna się na 1 wierszu i 1 kolumnie, kończy się na 2 wierszu 3 kolumnie */
padding: 5% 10%;
display: flex;
align-items: center;
}

.p {
grid-area: 1 / 1 / 2 / 2; /* Zaczyna się na 2 wierszu i 1 kolumnie, kończy się na 3 wierszu 2 kolumnie */
}

.p img{
max-width: 100%;
}

.v {
grid-area: 2 / 1 / 3 / 2; /* Zaczyna się na 2 wierszu i 2 kolumnie, kończy się na 3 wierszu 3 kolumnie */
width: 100%;
height: 100%;
}
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.

👍

15 changes: 14 additions & 1 deletion 04/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,22 @@
<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>
<link rel="stylesheet" href="./styles/global.css">
<link rel="stylesheet" href="./styles/mobile.css">
<link rel="stylesheet" media="(min-width: 599px)" href="./styles/tablet.css">
<link rel="stylesheet" media="(min-width: 1199px)" href="./styles/desktop.css">
</head>
<body>


<!-- hamburger mobile start -->

<input type="checkbox" id="menu__mobile--hamburger" />

<label class="hamburger" for="menu__mobile--hamburger"></label>

<!-- hamburger jako label -->

<!-- menu start -->
<nav>
<ul>
<li>
Expand Down
67 changes: 67 additions & 0 deletions 04/styles/desktop.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
:root {
--color-alfa: hwb(0 75% 25%);
--color-beta: hwb(0 55% 45%);
--color-gamma: hwb(0 45% 55%);
--color-delta: hwb(0 35% 65%);
--color-epsilon: hwb(0 25% 75%);
}

.hamburger {
display: none;
}

#menu__mobile--hamburger:checked~nav {
display: block;
}

nav {
display: block;
position: static;
padding-top: 0;
}

nav ul {
display: flex;
width: 5vw;
min-width: max-content;
}


nav ul > li > a {
display: block;
padding: 15px 20px;
text-decoration: none;
color: var(--color-alfa);
border-bottom: 2px solid var(--color-delta);
}

nav ul > li > a:hover {
display: block;
padding: 15px 20px;
text-decoration: none;
color: var(--color-alfa);
border-bottom: 2px solid var(--color-alfa);
}

nav ul li ul li a {
display: block;
padding: 15px 20px;
background: var(--color-beta);
border-bottom: 1px solid var(--color-delta);
}

/* Ukrycie */

nav ul li ul {
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.

Lepiej jest stylować po klasach - wtedy jest mniej problemów, spróbuj dołożyć jeszcze jedno zagnieżdżenie i zobaczysz co tam się może wydarzyć :P

position: absolute;
top: 100%;
left: 0;
width: 200px;
display: none;
}

/* Odkrycie menu */

nav ul li:hover ul {
display: block;
}
Loading