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
72 changes: 71 additions & 1 deletion 01/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,76 @@
<title>devmentor.pl - HTML & CSS BASICS - #01</title>
</head>
<body>

<header>
<div>Logo</div>
<div>Menu
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.

Skoro menu to raczej jest to nawigacja czyli znacznik<nav>

<li>
<ul>
<li>Start</li>
<li>Tytuł</li>
<li>Autor</li>
<li>Data</li>
</ul>
</li>
</div>
</header>
<main>
<article>
<div>
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.

Można użyć znacznika <header> - nie tylko oznacza on nagłówek strony, ale może również sekcji lub artykułu.

<h1>Tytuł</h1>
<span>Autor</span>
<span>Data publikacji</span>
</div>
<p>Treść</p>
<img />
<table>
<tr>
<th>Animal</th>
<th>Paws</th>
</tr>
<tr>
<td>Dog</td>
<td>4</td>
</tr>
<tr>
<td>Chicken</td>
<td>2</td>
</tr>
<tr>
<td>Snake</td>
<td>0</td>
</tr>
<tr>
<td>Spider</td>
<td>8</td>
</tr>
</table>
</article>
<form>
<div>
<input name="fname"/>
<input name="comment"/>
<input type="submit" value="Submit">
</div>
</form>
<div>
<article>
<span>Autor</span>
<span>Data</span>
<p>Treść komentarza</p>
</article>
<article>
<span>Autor</span>
<span>Data</span>
<p>Treść komentarza</p>
</article>
<article>
<span>Autor</span>
<span>Data</span>
<p>Treść komentarza</p>
</article>
</div>
</main>
<footer>Prawa autorskie Sandra Mstowska</footer>
</body>
</html>
12 changes: 6 additions & 6 deletions 02/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Znacznik label, którego przodkiem jest klasa .ac-container
(0, 1, 1)
*/
?? {
.ac-container label {
height: 30px !important;
line-height: 21px !important;
font-size: 12px !important;
Expand Down Expand Up @@ -47,7 +47,7 @@ Zmiana koloru tła po najechaniu przez kursor myszy na znacznik label,
który znajduje się wewnątrze elementu o klasie .ac-container
(0, 2, 1)
*/
?? {
.ac-container label:hover {
background: #fff;
}

Expand All @@ -61,8 +61,8 @@ i ten brat musi posiadać przodka o klasie .ac-container
to samo co w 1) ale z efektem najechania kursorem na label
(0, 3, 2)
*/
??,
?? {
.ac-container label:hover,
.ac-container label:active {
background: #f1f2f3;
color: #666;
text-shadow: 0 1px 1px rgba(255,255,255,0.6);
Expand All @@ -89,7 +89,7 @@ którego poprzedni brat jest zaznaczonym inputem (użyj pseudoklasy),
którego przodek to element o klasie .ac-container
(0, 3, 3)
*/
?? {
.ac-container input:active label:hover {
background-image: url(../images/arrow_up.png);
}

Expand Down Expand Up @@ -126,7 +126,7 @@ Rodzeństwo o typie article, dla elementu input, który jest zaznaczony (użyj p
oraz posiada przodka o klasie .ac-container
(0, 2, 2)
*/
?? {
.ac-container input:active article {
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.

👍

-webkit-transition: height 0.5s ease-in-out,box-shadow 0.1s linear;
-moz-transition: height 0.5s ease-in-out,box-shadow 0.1s linear;
-o-transition: height 0.5s ease-in-out,box-shadow 0.1s linear;
Expand Down
1 change: 1 addition & 0 deletions 03/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<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 BASICS - #03</title>
<link rel="stylesheet" href="./styles/index.css">
</head>
<body>

Expand Down
62 changes: 62 additions & 0 deletions 03/styles/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
@font-face {
font-family: 'Source Sans PRO';
src: url(source-sans-pro/SourceSansPro-Bold.otf) format('opentype');
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.

Każdy krój powinien być podpięty, nie tylko "pogrubiony". Oczywiście przeglądarka sobie poradzi, ale każda może inaczej renderować font, jeśli nie ma konkretnych wytycznych (zaimportowanych fontów).
Tutan zjadziesz więcej informacji: https://www.smashingmagazine.com/2013/02/setting-weights-and-styles-at-font-face-declaration/

font-style: normal;
font-weight: normal;
}

.parent {
width: 600px;
padding: 20px;
}

.child {
box-sizing: border-box;
display: inline-block;
vertical-align: top;
}

.child--first,
.child--middle {
width: calc(30% - 10px);
margin-right: 10px;
}

.child--first {
font-family: 'Source Sans PRO';
font-weight: normal;
}

.child--middle {
font-family: 'Source Sans PRO';
font-weight: bold;
}

.child--last {
width: 40%;
font-family: 'Source Sans PRO';
font-style: italic;
}

.parent--flexbox {
display: flex;
gap: 10px;
}

.parent--inline-block {
font-size: 0;
}

.parent--inline-block .child {
font-size: 16px;
}

.parent--float::after {
content: '';
display: block;
clear: both;
}

.parent--float .child {
float: left;
}
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.

👍

31 changes: 31 additions & 0 deletions 04/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./styles/styles.css" >
</head>
<body>
<header class="header">
<nav>
<ul class="menu-list">
<li class="menu-li">HOME</li>
<li class="menu-li">ITEMS<span class="rotate"> > </span>
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 zrobić "strzałkę" przy pomocy ":after" - jest bardziej PRO :)

<ul class="submenu">
<li class="submenu-li">Item 1</li>
<li class="submenu-li has-submenu">Item 2<span class="rotate-submenu"> > </span>
<ul class="submenu">
<li class="submenu-li">Item 2.1</li>
<li class="submenu-li">Item 2.2</li>
</ul>
</li>
</ul>
</li>
<li class="menu-li">SETTINGS</li>
<li class="menu-li">CONTACT</li>
</ul>
</nav>
</header>
</body>
</html>
91 changes: 91 additions & 0 deletions 04/styles/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
body {
background-color: #f6f6f6;
}

.header {
width: auto;
background-color: white;
border: none;
}

.menu-list {
display: flex;
justify-content: flex-start;
gap: 2rem;
font-family: Arial, Helvetica, sans-serif;
font-weight: 500;
font-size: 1rem;
}

.menu-li {
padding: 1rem;
cursor: pointer;
position: relative;
list-style: none;
}

.rotate {
display: inline-block;
background-color: transparent;
transform: rotate(90deg);
margin-left: 0.5rem;
}

.rotate-submenu {
display: inline-block;
margin-left: 5rem;
}


.menu-li:hover {
color: #54BBEA;
}

.menu-li::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 3px;
background-color: #54BBEA;
opacity: 0;
transition: opacity 0.2s ease;
}

.menu-li:hover::before {
opacity: 1;
}


.submenu {
display: none;
flex-direction: column;
position: absolute;
top: 100%;
left: 0;
list-style: none;
color: white;
background-color:#222;
min-width: 10rem;
gap: 1rem;
}
.submenu-li {
position: relative;
padding: 0.5rem;
}

.has-submenu {
position: relative;
}

.menu-li:hover > .submenu,
.has-submenu:hover > .submenu {
display: flex;
}

.has-submenu .submenu {
top: 0;
left: 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.

👍

Binary file added 05/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions 05/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./styles/styles.css">
</head>
<body>
<div class="container">
<header class="header">
<img class="logo" src="./assets/logo.png" alt="Logo">
<nav class="menu">
<span>Home</span>
<span>Contact</span>
<span>Map</span>
<span>Adres</span>
</nav>
</header>
</div>
<div class="container">
<section class="section-1">
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</div>
<div>
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam,
eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim
ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui
ratione voluptatem sequi nesciunt.
</div>
</section>
</div>
<div class="container">
<section class="section-2">
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
<div>
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam,
eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
</div>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
</section>
</div>
<footer class="footer">
<p>Author: Sandra Mstowska</p>
<p>sandra.mstowskaa@gmail.com</p>
</footer>
</body>
</html>
Loading