Skip to content

Commit

Permalink
добавил соц иконки и пофиксил скролл на мобилке
Browse files Browse the repository at this point in the history
  • Loading branch information
Poofikate committed Mar 27, 2022
1 parent 1868d09 commit 2585d4c
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/js/modules/locomotiveScroll.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import LocomotiveScroll from 'locomotive-scroll';

window.addEventListener('load', init);
const isMobile = window.matchMedia('(max-width: 900px)');

if (!isMobile.matches) {
window.addEventListener('load', init);
}

function init() {
const $container = document.querySelector('[data-scroll-container]');
Expand Down
14 changes: 14 additions & 0 deletions src/modules/sections/footer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,20 @@
<a href="tel: +79282103110" class="footer__phone">
+7 (928) 210-31-10
</a>

<div class="footer__socials">
<a href="#" class="footer__social footer__social--w">
<svg class="svg">
<use xlink:href="svg/sprite.svg#social-w"></use>
</svg>
</a>

<a href="#" class="footer__social footer__social--t">
<svg class="svg">
<use xlink:href="svg/sprite.svg#social-t"></use>
</svg>
</a>
</div>
</li>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/scss/components/card-service.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

.card-service__banner {
img {
[data-scroll-container] & {
.has-scroll-smooth & {
opacity: 0;
transform: scale(1.4);
}
Expand Down
36 changes: 36 additions & 0 deletions src/scss/sections/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,42 @@
}
}

.footer__socials {
display: inline-flex;
align-items: center;
margin-left: 17px;
}

.footer__social {
display: inline-flex;
align-items: center;
justify-content: center;

&--w {
color: #07d528;

&:hover {
color: #12b32c;
}
}

&--t {
color: #039be5;

&:hover {
color: #1c85b9;
}
}

&:not(:last-child) {
margin-right: 3px;
}

.svg {
font-size: 32px;
}
}

.footer__phone {
font-size: 16px;
font-weight: 300;
Expand Down
4 changes: 4 additions & 0 deletions src/svg/social-t.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/svg/social-w.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2585d4c

Please sign in to comment.