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
4 changes: 2 additions & 2 deletions src/_includes/header/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</nav>

<%# External links %>
<div class="D-f Fld-c Gap2u Pt2u Bdt1;s;$core760 md_P0 md_Bd-n">
<div class="D-f Fld-c Gap2u P2u;0;4u Bdt1;s;$core760 md_P0 md_Bd-n">
<div class="P2u md_D-n">
<span>Community:</span>
</div>
Expand All @@ -52,7 +52,7 @@
</div>
</div>

<div class="Ps-a W58p Apcr1 T85p R-20p Bd1u;s;#5865A2 Bdrd100p <%= decorCss.square %> <%= decorCss.arc %> md_D-n">
<div class="Ps-a W58p Apcr1 T100p L100p Tf -Tr-70p;-75p Bd1u;s;#5865A2 Bdrd100p <%= decorCss.square %> <%= decorCss.arc %> md_D-n">
<div class="<%= decorCss.squareFrame %>"></div>
</div>
</div>
Expand Down
32 changes: 28 additions & 4 deletions src/assets/script/nav-links.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
class NavLinks extends HTMLElement {
constructor() {
super();
this._burger = null;
}

connectedCallback() {
const burger = this.querySelector('#menu-toggle');
if (!burger) return;
this._burger = this.querySelector('#menu-toggle');

if (!this._burger) {
return;
}

this._handleResize();
window.addEventListener('resize', this._handleResize);

this.addEventListener('click', (e) => {
const link = e.target.closest('a');

if (link) {
burger.checked = false;
this._burger.checked = false;
document.body.classList.remove('Ov-h');
}
});

this._burger.addEventListener('change', () => {
document.body.classList.toggle('Ov-h', this._burger.checked);
});
}

disconnectedCallback() {
window.removeEventListener('resize', this._handleResize);
}

_handleResize = () => {
if (window.innerWidth > 768 && this._burger && this._burger.checked) {
this._burger.checked = false;
document.body.classList.remove('Ov-h');
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/assets/style/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ a {
--ml-core740: rgba(249, 207, 103, 0.00);
--ml-core745: #394EB6;
--ml-core750: rgb(253, 173, 245, 0.6);
--ml-core760: #D2B5D0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Так этот цвет используется или нет?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Да, это цвет линии после ссылок в мобильном меню

--ml-core650: rgba(240, 67, 140, 0);
--ml-core600: rgba(249, 207, 103, 0);
--ml-primary800: rgba(239,246,255,1);
Expand Down Expand Up @@ -156,6 +157,7 @@ a {
--ml-core740: rgba(249, 207, 103, 0.00);
--ml-core745: #394EB6;
--ml-core750: #121828;
--ml-core760: #5865A2;
--ml-core650: rgba(57, 78, 182, 0);
--ml-core600: rgba(129, 200, 241, 0);
--ml-core500: #2e2e2e;
Expand Down