Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
fea8783
Improve the styling
Katalia91 May 6, 2025
b0681f4
Order elements in the grid
Katalia91 May 7, 2025
7314f88
Add images to the project
Katalia91 May 7, 2025
6c2168a
Add text, images, video and link stylesheets to HTML file
Katalia91 May 7, 2025
9148388
Add basic styling
Katalia91 May 7, 2025
484b429
Correct styling for grid-areas
Katalia91 May 7, 2025
d64386b
Add global.css stylesheet
Katalia91 May 11, 2025
9667d18
Add stylesheets for different breakpoints
Katalia91 May 11, 2025
95ab3e8
Add hamburger to html
Katalia91 May 19, 2025
a1df024
Add rwd styling and styling for hamburger
Katalia91 May 19, 2025
9f4038b
Refactor html code
Katalia91 May 19, 2025
4bdd950
Style navigation for different screens
Katalia91 May 19, 2025
1596c3a
Fix html tag
Katalia91 May 20, 2025
abf608e
Style dropdown menu, refactor the code
Katalia91 May 20, 2025
cdc2a70
Refactor css code
Katalia91 May 20, 2025
e0a6536
Adjust paddings and margins
Katalia91 May 21, 2025
92de7ae
Task 4: Remove file for styles for tablet
Katalia91 May 21, 2025
40f6c15
Task 4: Remove link to tablet styles
Katalia91 May 21, 2025
45b27c8
Task 5: Add basic html structure
Katalia91 May 21, 2025
5668f36
Task 5: Add basic global styles
Katalia91 May 21, 2025
47117e0
Task 5: Add mobile styles
Katalia91 May 21, 2025
a789698
Task 5: Add desktop styles
Katalia91 May 21, 2025
ae6b7ce
Add settings.json to .gitignore
Katalia91 May 21, 2025
54a3e48
Add content to html to be able to use order property
Katalia91 May 25, 2025
d38e3cf
Change order of elements on desktop
Katalia91 May 25, 2025
0e4c9a2
Increase border witdth
Katalia91 May 25, 2025
d549f23
Make hamburger menu interactive
Katalia91 May 25, 2025
ebd6512
Add padding to the container
Katalia91 May 25, 2025
3706547
Task 04: Fix issue with hover on desktop
Katalia91 May 29, 2025
033b024
Remove whitespace and add aspect-ratio to img
Katalia91 May 31, 2025
df91f28
Task 04: add class to menu
Katalia91 May 31, 2025
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 .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode/settings.json
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, 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.

👍

}
57 changes: 43 additions & 14 deletions 02/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,55 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
grid-template-areas:
"a"
"b"
"c";
}
.a,
.b,
.c {
border: 3px solid transparent;
min-height: 50px;
height: 50vh;

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

display: flex;
justify-content: center;
align-items: center;
display: flex;
justify-content: center;
align-items: center;
}

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

.b {
border-color: #ffdfba;
border-color: #ffdfba;
grid-area: b;
}

.c {
border-color: #baffc9;
}
border-color: #baffc9;
grid-area: c;
}
body {
display: grid;
grid-template-areas:
"a"
"b"
"c";
}

@media screen and (min-width: 600px) {
body {
display: grid;
grid-template-areas:
"a a"
"c b";
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/assets/img.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/img1200.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/img300.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/img600.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 70 additions & 13 deletions 03/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,73 @@
<!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">
<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" />
<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: 1200px)"
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>

</body>
</html>
</head>
<body>
<main class="t">
<p>
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Fuga porro
voluptas suscipit voluptatibus. Corrupti dolore asperiores ex distinctio
iusto iste! Lorem ipsum dolor sit amet consectetur, adipisicing elit.
Fuga porro voluptas suscipit voluptatibus. Corrupti dolore asperiores ex
distinctio iusto iste! Lorem ipsum dolor sit amet consectetur,
adipisicing elit. Fuga porro voluptas suscipit voluptatibus. Corrupti
dolore asperiores ex distinctio iusto iste!
</p>
<p></p>
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Fuga porro
voluptas suscipit voluptatibus. Corrupti dolore asperiores ex distinctio
iusto iste! Lorem ipsum dolor sit amet consectetur, adipisicing elit. Fuga
porro voluptas suscipit voluptatibus. Corrupti dolore asperiores ex
distinctio iusto iste! Lorem ipsum dolor sit amet consectetur, adipisicing
elit. Fuga porro voluptas suscipit voluptatibus. Corrupti dolore
asperiores ex distinctio iusto iste! Lorem ipsum dolor sit amet
consectetur, adipisicing elit. Fuga porro voluptas suscipit voluptatibus.
Corrupti dolore asperiores ex distinctio iusto iste!
<p>
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Fuga porro
voluptas suscipit voluptatibus. Corrupti dolore asperiores ex distinctio
iusto iste! Lorem ipsum dolor sit amet consectetur, adipisicing elit.
Fuga porro voluptas suscipit voluptatibus. Corrupti dolore asperiores ex
distinctio iusto iste! Lorem ipsum dolor sit amet consectetur,
adipisicing elit. Fuga porro voluptas suscipit voluptatibus. Corrupti
dolore asperiores ex distinctio iusto iste!
</p>
</main>
<header class="p">
<picture>
<source srcset="assets/img1200.jpg" media="(min-width: 1200px)" />
<source srcset="assets/img600.jpg" media="(min-width: 600px)" />
<source srcset="assets/img300.jpg" />
<img src="assets/img.jpg" alt="Fallback image" />
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.

Czy można coś zrobić z tym odstępem na mobile? ;>
Uploading Screenshot 2025-05-26 at 06.34.33.png…

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@devmentor-pl Nie widzę screenshota, chociaż być może wiem o co chodzi 🤓

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.

Screenshot 2025-05-30 at 06 10 55

Mam nadzieje, że teraz się dołączy :P

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@devmentor-pl Ok, to było wnikiem tego, że img docelowo byl inline. Zauważyłam też, że na tablecie obrazek nie wypełniał całego obramowania - dodałam więc aspect-ratio. Teraz już mam nadzieję wszystko jest ok ;)

</picture>
</header>
<side class="v"
><iframe
width="560"
height="315"
src="https://www.youtube.com/embed/czoEAKX9aaM?si=RWkj5jVXRHIYyqwr"
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 @@
/* desktop */
body {
max-width: 1400px;
margin: 0 auto;
display: grid;
grid-template-areas:
"p v"
"t t";
}
.p {
grid-area: p;
}
.v {
grid-area: v;
}
.t {
grid-area: t;
}
29 changes: 16 additions & 13 deletions 03/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
* {
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;
.p,
.t,
.v {
border: 3px solid transparent;
min-height: 50px;

display: flex;
justify-content: center;
align-items: center;
display: flex;
justify-content: center;
align-items: center;
}

.p {
border-color: #ffffba
border-color: #ff00bb;
aspect-ratio: 4/3;
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.

👍

}

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

.v {
border-color: #baffc9;
}
border-color: #baffc9;
}
25 changes: 25 additions & 0 deletions 03/styles/mobile.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* mobile css */
img {
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.

👍

picture,
picture img {
max-width: 100%;
width: 100%;
height: auto; /* Zachowuje proporcje obrazu */
aspect-ratio: 4/3;
}
side {
display: block;
height: 0;
padding-bottom: calc(315 / 560 * 100%);
position: relative;
width: 100%; /* domyślnie */
}
iframe {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
}
18 changes: 18 additions & 0 deletions 03/styles/tablet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* tablet */
body {
display: grid;
grid-template-areas:
"p t"
"v t";
grid-template-columns: minmax(200px, 50%) 1fr;
gap: 1rem;
}
.p {
grid-area: p;
}
.v {
grid-area: v;
}
.t {
grid-area: t;
}
64 changes: 41 additions & 23 deletions 04/index.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,48 @@
<!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">
<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" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="styles/global.css" />
<link rel="stylesheet" href="styles/mobile.css" />
<link
rel="stylesheet"
media="(min-width: 1200px)"
href="styles/desktop.css"
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>devmentor.pl - HTML & CSS: RWD - #04</title>
</head>
<body>

</head>
<body>
<nav>
<ul>
<li>
<a href="#">start</a>
<label for="menu-switcher"><div class="hamburger"></div></label>
<input type="checkbox" id="menu-switcher" />
<ul class="menu">
<li class="menu-item">
<a href="#">start</a>
</li>
<li class="menu-item">
<a href="#">oferta</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.

Chyba na wersji desktopowej tracimy :hover (podczas wolnego przesuwania kursora) - jak to naprawić?

Copy link
Copy Markdown
Author

@Katalia91 Katalia91 May 28, 2025

Choose a reason for hiding this comment

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

@devmentor-pl Chodzi Ci o to, że na desktopie nie da się najechać kursorem na elementy w submenu, czyli "strony internetowe" i "pozycjonowanie stron www"? Jeśli tak, to faktycznie, ale u mnie nie da się zarówno podczas wolnego przesuwania kursora jak i podczas normalnego przesuwania kursora - już to naprawiłam. Chyba, że jeszcze o coś innego chodziło?

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.

TAk, teraz jest ok :)

<ul class="menu-dropdown">
<li class="menu-item menu-subitem">
<a href="">strony internetowe</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 class="menu-item menu-subitem">
<a href="">pozycjonowanie stron www</a>
</li>
<li>
<a href="#">kontakt</a>
</li>
</ul>
</ul>
</li>
<li class="menu-item">
<a href="#">kontakt</a>
</li>
</ul>
</nav>

</body>
</html>
</body>
</html>
Loading