Skip to content
Open

rwd #155

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
1 change: 1 addition & 0 deletions 01/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
border: 150px solid #dcdcdc;
border-right-color: transparent;
border-bottom-color: transparent;
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.

👍

}
59 changes: 57 additions & 2 deletions 02/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,30 @@
box-sizing: border-box;
}


html, body {
height: 100%;
}

body {
display: grid;
grid-template-columns: 100%;
grid-template-rows: 50% 50% 50%;
margin: 0;
}


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

width: 100%;
display: flex;
justify-content: center;
align-items: center;
}

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

.b {
Expand All @@ -23,4 +36,46 @@

.c {
border-color: #baffc9;
}


.a {
grid-row: 1;
}

.b {
grid-row: 2;
}

.c {
grid-row: 3;
}


@media (min-width: 600px) {
body {
grid-template-columns: 50% 50%;
grid-template-rows: auto auto;
max-width: 1200px;
margin: 0 auto;
}

.a {
grid-column: span 2;
}

.b, .c {
height: 100%;
}


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

.b {
grid-column: 2;
grid-row: 2;
}
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/img/borowiki.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 15 additions & 4 deletions 03/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,23 @@
<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>
<header class="p">
<picture>
<source srcset="/03/img/borowiki.jpg" media="(max-width: 600px)">
<source srcset="/03/img/borowiki.jpg" media="(min-width: 601px)">
<img src="/03/img/borowiki.jpg" alt="picture"> <!--przetestować różne szerokości-->
</picture>
</header>

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

<main class="t">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestias voluptas rerum obcaecati, sed labore illum consectetur eum corrupti eius neque aut odio sunt, a ab illo molestiae asperiores sapiente harum!</p>
</main>

<side class="v">
<iframe width="560" height="315" src="https://www.youtube.com/embed/9lUIkCpUwNM?si=-zv1TaQ5K4sNHY0a" 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>
90 changes: 88 additions & 2 deletions 03/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,30 @@
box-sizing: border-box;
}

html, body {
height: 100%;
font-family: Arial, sans-serif;
}

body {
display: grid;
grid-template-columns: 100%;
grid-template-rows: auto auto auto;
max-width: 100%;
height: auto;
}

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

padding: 10px;
display: flex;
justify-content: center;
align-items: center;
}

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

.t {
Expand All @@ -23,4 +36,77 @@

.v {
border-color: #baffc9;
}

iframe {
width: 100%;
height: auto;
}

img {
max-width: 100%;
}


@media (min-width: 600px) and (max-width: 1199px) {
body {
grid-template-columns: 50% 50%;
grid-template-rows: auto auto;
grid-template-areas:
"p t"
"v t";
max-width: 100%;
height: auto;
}

.p {
grid-area: p;
min-width: 200px;

}

.t {
grid-area: t;

}

.v {
grid-area: v;
min-width: 200px;

}
}


@media (min-width: 1200px) {
body {
grid-template-columns: 50% 50%;
grid-template-rows: auto auto;
grid-template-areas:
"p v"
"t t";
max-width: 1400px;
align-items: center; /* Wyśrodkowanie pionowe */
margin: 0 auto;
}
.v {
position: relative; /* Stosujemy pozycjonowanie względne */
padding-bottom: 56.25%; /* 16:9 proporcje, 9 / 16 = 0.5625 */
height: 0; /* Ustawiamy wysokość na zero, żeby działał padding */
overflow: hidden; /* Ukrywamy wszelkie nadmiarowe elementy */
}

.v iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%; /* iframe wypełnia cały kontener i zachowuje proporcje */
}

.t {
grid-area: t;
grid-column: span 2;
max-width: 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.

👍

}
25 changes: 11 additions & 14 deletions 04/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,24 @@
<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>
<title>Responsive Menu</title>
<link rel="stylesheet" href="/04/style/style.css">
</head>
<body>
<input type="checkbox" id="toggle-menu">
<label for="toggle-menu" class="hamburger"></label>

<nav>
<nav class="menu">
<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>
<li><a href="#">Start</a></li>
<li><a href="#">Oferta</a>
<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>
Loading