Skip to content

Commit

Permalink
favicon title and hover fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Stan1slav123 committed Oct 5, 2023
1 parent ef72d44 commit f7da3e3
Show file tree
Hide file tree
Showing 12 changed files with 129 additions and 69 deletions.
42 changes: 23 additions & 19 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Title</title>
<title>Creative Bakery</title>
<link
rel="icon"
type="image/x-icon"
href="images/icons/icon-cookie.png"
>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap" rel="stylesheet">
Expand All @@ -21,9 +26,9 @@
</a>

<ul class="nav__list">
<li><a href="#" class="nav__link">Products</a></li>
<li><a href="#" class="nav__link">About Us</a></li>
<li><a href="#" class="nav__link">Blog</a></li>
<li><a href="#what-we-bake" class="nav__link">Products</a></li>
<li><a href="#about-us" class="nav__link">About Us</a></li>
<li><a href="https://www.instagram.com/sgcreativebakery/?hl=en" class="nav__link">Blog</a></li>
<li><a href="tel:6295550129" class="nav__link nav__link--phone">Contact us</a></li>
</ul>

Expand All @@ -49,15 +54,15 @@ <h1 class="header__title">Creative bakery</h1>
</nav>

<ul class="menu__list">
<li><a href="#" class="menu__link">Products</a></li>
<li><a href="#" class="menu__link">About Us</a></li>
<li><a href="#" class="menu__link">Blog</a></li>
<li><a href="#what-we-bake" class="menu__link">Products</a></li>
<li><a href="#about-us" class="menu__link">About Us</a></li>
<li><a href="https://www.instagram.com/sgcreativebakery/?hl=en" class="menu__link">Blog</a></li>
<li><a href="tel:6295550129" class="menu__link menu__link--phone">Contact us</a></li>
</ul>

</aside>
<main class="main">
<section class="what-we-bake main__what-we-bake">
<section class="what-we-bake main__what-we-bake" id="what-we-bake">
<h2 class="section-title what-we-bake__title">What we bake</h2>

<p class="info what-we-bake__info">We can customize our cookies right for your needs. Just imagine it</p>
Expand Down Expand Up @@ -137,7 +142,7 @@ <h3 class="product__title">Cakes</h3>
</article>
</div>
</section>
<section class="about-us main__about-us">
<section class="about-us main__about-us" id="about-us">

<h2 class="section-title about-us__title">Few words About us</h2>

Expand Down Expand Up @@ -214,17 +219,16 @@ <h2 class="section-title footer__title">Contact us</h2>
<li><a href="mailto: [email protected]" class="footer__link">[email protected]</a></li>
</ul>
</div>

<div class="footer__socials">
<a href="#" class="icon icon--facebook icon--facebook--hover"></a>
<a href="#" class="icon icon--instagram icon--instagram--hover"></a>
<a href="#" class="icon icon--twitter icon--twitter--hover"></a>
</div>

<p class="footer__end">
© Bakerlab 2022
</p>
</section>
<div class="footer__socials">
<a href="#" class="icon icon--facebook icon--facebook--hover"></a>
<a href="#" class="icon icon--instagram icon--instagram--hover"></a>
<a href="#" class="icon icon--twitter icon--twitter--hover"></a>
</div>

<p class="footer__end">
© Bakerlab 2022
</p>
</footer>
<script type="text/javascript" src="scripts/main.js"></script>
</body>
Expand Down
4 changes: 0 additions & 4 deletions src/styles/_about-us.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,5 @@
@include onTablet {
grid-column: span 4;
}

@include onDesktop {

}
}
}
48 changes: 45 additions & 3 deletions src/styles/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@
@include pageGrid;
row-gap: 64px;


@include onTablet {
padding: 88px 44px;
}
&__navigation {
grid-column: span 2;

@include onTablet {
grid-column: 1 / 4;
}
}

&__logo {
Expand Down Expand Up @@ -49,13 +57,31 @@
line-height: 24px;
letter-spacing: -0.01em;
color: $white;


@include hoverUnderline {
background-color: $white;
}
}

&__contact {
display: grid;
row-gap: 40px;
grid-column: span 2;
}
margin-bottom: -24px;

@include onTablet {
grid-column: 5 / 8;
}

@include onDesktop {
grid-column: 5 / -1;
}

@include onDesktop {
grid-template-columns: repeat(2, 1fr);
}
}

&__title {
grid-column: span 2;
Expand All @@ -64,16 +90,29 @@

&__phone-num {
grid-column: span 2;

@include onDesktop {
grid-column: span 1;
}
}

&__email {
grid-column: span 2;

@include onDesktop {
grid-column: span 1;
}
}

&__socials {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(3, 24px);
column-gap: 32px;
margin-bottom: -24px;

@include onTablet {
grid-column: 1 / 4;
}
}

&__end {
Expand All @@ -84,6 +123,9 @@
letter-spacing: -0.01em;
text-align: left;
color: $grey;

@include onTablet {
grid-column: 5 / -1;
}
}
}

2 changes: 1 addition & 1 deletion src/styles/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
transition: 0.3s;

&::before {
content: '';
content: "";
background-image: url(../images/icons/icon-cookie.png);
height: 24px;
width: 24px;
Expand Down
2 changes: 1 addition & 1 deletion src/styles/_items.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}

@include onDesktop {
grid-column: span 2;
grid-column: span 2;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/styles/_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
color: $accentorange;

&::before {
content: '';
content: "";
background-image: url(../images/icons/icon-phone.png);
height: 24px;
width: 24px;
Expand Down
20 changes: 2 additions & 18 deletions src/styles/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
}

&__link {
position: relative;
text-decoration: none;
font-family: inherit;
font-size: 16px;
Expand All @@ -42,23 +41,8 @@
letter-spacing: -0.01em;
color: $black;

&::after {
content: "";
position: absolute;
bottom: -4px;
display: block;
width: 100%;
height: 1px;
@include hoverUnderline {
background-color: $black;

transform: scale(0);
transition: transform 0.3s;
transform-origin: left;
}

&:hover::after {
transform: scale(1);
transform-origin: left;
}

&--phone {
Expand All @@ -72,7 +56,7 @@
color: $accentorange;

&::before {
content: '';
content: "";
background-image: url(../images/icons/icon-phone.png);
height: 24px;
width: 24px;
Expand Down
35 changes: 20 additions & 15 deletions src/styles/_product.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

border-radius: 8px;
margin-bottom: 16px;

@include onTablet {
width: 328px;
height: 424px;
Expand All @@ -50,20 +50,21 @@
}

&__info {
font-size: 16px;
font-weight: 400;
line-height: 24px;
letter-spacing: -0.01em;
text-align: left;
color: $black;

margin-bottom: 16px;
font-size: 16px;
font-weight: 400;
line-height: 24px;
letter-spacing: -0.01em;
text-align: left;
color: $black;

margin-bottom: 16px;
}

&__button {
display: flex;
align-items: center;
justify-content: start;
width: fit-content;
gap: 4px;

font-size: 16px;
Expand All @@ -75,11 +76,15 @@
text-transform: uppercase;
color: $accentorange;

&::before {
content: '';
height: 24px;
width: 24px;
background-image: url(../images/icons/icon-arrow.png);
}
&::before {
content: "";
height: 24px;
width: 24px;
background-image: url(../images/icons/icon-arrow.png);
}

@include hoverUnderline {
background-color: $accentorange;
}
}
}
4 changes: 2 additions & 2 deletions src/styles/_section-title.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

@include onTablet {
font-size: 56px;
line-height: 47.6px
line-height: 47.6px;
}

@include onDesktop {
font-size: 72px;
line-height: 61.2px
line-height: 61.2px;
}
}
11 changes: 8 additions & 3 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,19 @@
box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6, p {
h1,
h2,
h3,
h4,
h5,
h6,
p {
margin: 0;
padding: 0;
}

.page {
scroll-behavior: smooth;
&__body {
margin: 0;
padding: 0;
Expand All @@ -49,5 +56,3 @@ h1, h2, h3, h4, h5, h6, p {
}
}
}


26 changes: 25 additions & 1 deletion src/styles/utils/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,31 @@
@mixin paddingInline {
padding-inline: 16px;

@include onTablet{
@include onTablet {
padding-inline: 44px;
}
}

@mixin hoverUnderline {
position: relative;

&::after {
content: "";
position: absolute;
bottom: -4px;
display: block;
width: 100%;
height: 1px;
@content;

transform: scale(0);
transition: transform 0.3s;
transform-origin: left;
}

&:hover::after {
transform: scale(1);
transform-origin: left;
}
}

2 changes: 1 addition & 1 deletion src/styles/utils/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ $white: #fff;
$tablet-width: 744px;
$desktop-width: 1200px;

$font-family: 'Inter', sans-serif;
$font-family: "Inter", sans-serif;

0 comments on commit f7da3e3

Please sign in to comment.