Skip to content
Merged
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
43 changes: 32 additions & 11 deletions assets/css/design-system.css
Original file line number Diff line number Diff line change
Expand Up @@ -323,24 +323,45 @@ code {
}
.burger { display: inline-flex; }

/* ---------- MOBILE PANEL ---------- */
.mobile-panel {
/* ---------- MOBILE BACKDROP ---------- */
.neo-mobile-backdrop {
position: fixed;
inset: 0;
z-index: 140;
background: rgba(15,23,42,.55);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
z-index: 80;
background: rgba(0,0,0,.45);
backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px);
opacity: 0;
pointer-events: none;
transition: opacity .25s ease;
}
.neo-mobile-backdrop.open {
opacity: 1;
pointer-events: auto;
}
/* Slide-in side panel: slides from left, below the sticky header. */
.mobile-panel {
position: fixed;
top: 0;
left: 0;
bottom: 0;
z-index: 90;
width: min(320px, 80vw);
background: var(--paper-2);
border-right: 1px solid var(--line);
transform: translateX(-100%);
transition: transform .25s ease;
overflow-y: auto;
}
.mobile-panel[hidden] { display: none; }
.mobile-panel.open {
transform: translateX(0);
}
.mobile-panel-inner {
display: flex;
flex-direction: column;
height: 100%;
width: min(100%, 320px);
margin-left: auto;
background: var(--paper-2);
border-left: 1px solid var(--line);
padding: var(--space-6);
overflow-y: auto;
}
.mobile-panel-head {
display: flex;
Expand Down
141 changes: 0 additions & 141 deletions assets/css/neo.css
Original file line number Diff line number Diff line change
Expand Up @@ -216,147 +216,6 @@ body::before{
@media(max-width:900px){
.neo-menu{display:none}
.neo-burger{display:flex}
/* Mobile menu: slide-in side panel (NOT fullscreen) so page content stays
visible and tappable behind the nav overlay. z-index sits below the
sticky header (z-50) so the header row is never covered. */
.neo-mobile-nav{
display:none;
flex-direction:column;
gap:.5rem;
padding:5.5rem 1.25rem 2rem;
background:var(--panel);
border-right:1px solid var(--line);
border-radius:0;
position:fixed;
top:0;
left:0;
bottom:0;
z-index:100;
max-width:calc(100vw - 1rem);
width:min(320px,80vw);
max-height:none;
overflow-y:auto;
opacity:0;
transform:translateX(-100%);
transition:transform .25s ease,opacity .25s ease;
}
.neo-mobile-nav.open{
display:flex;
opacity:1;
transform:translateX(0);
}
.neo-mobile-backdrop{
display:none;
position:fixed;
inset:0;
z-index:95;
background:rgba(0,0,0,.45);
backdrop-filter:blur(2px);
-webkit-backdrop-filter:blur(2px);
}
.neo-mobile-backdrop.open{
display:block;
}
[data-theme="light"] .neo-mobile-nav.open{
background:rgba(246,248,251,.88);
}
[data-theme="solar"] .neo-mobile-nav.open{
background:rgba(28,25,23,.88);
}
[data-theme="mono"] .neo-mobile-nav.open{
background:rgba(10,10,10,.88);
}
[data-theme="dracula"] .neo-mobile-nav.open{
background:rgba(40,42,54,.88);
}
.neo-mobile-head{
width:100%;
max-width:460px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
margin-bottom: .5rem;
}
.neo-mobile-title {
font-family: var(--mono);
font-size: 11px;
color: var(--accent);
letter-spacing: 1px;
text-transform: uppercase;
}
.neo-mobile-close {
margin-left: auto;
}
.neo-tree {
width: 100%;
max-width: 460px;
border: 1px solid var(--line);
border-radius: 12px;
background: color-mix(in srgb, var(--panel) 92%, transparent);
backdrop-filter: blur(6px);
overflow: hidden;
}
.neo-tree + .neo-tree {
margin-top: .6rem;
}
.neo-tree summary {
list-style: none;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: .7rem .9rem;
cursor: pointer;
font-weight: 600;
color: var(--text);
user-select: none;
}
.neo-tree summary::-webkit-details-marker {
display: none;
}
.neo-tree summary::after {
content: "+";
font-family: var(--mono);
font-size: 13px;
color: var(--muted);
transition: transform .15s ease;
}
.neo-tree[open] > summary::after {
content: "−";
}
.neo-tree-body {
display: flex;
flex-direction: column;
gap: .2rem;
padding: .4rem .9rem .8rem;
border-top: 1px solid var(--line);
}
.neo-tree-body a {
font-size: .95rem;
padding: .45rem .5rem;
border-radius: 10px;
color: var(--muted);
text-align: left;
background: transparent;
border: 1px solid transparent;
}
.neo-tree-body a:hover {
border-color: var(--accent);
color: var(--accent);
}
.neo-mobile-footer {
width: 100%;
max-width: 460px;
margin-top: .8rem;
display: flex;
flex-wrap: wrap;
gap: .5rem;
justify-content: center;
}
.neo-mobile-footer .neo-theme-opt {
flex: 1 1 140px;
}
}
@media(min-width:901px){
.neo-burger{display:none}
Expand Down
14 changes: 3 additions & 11 deletions assets/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@
mnav.classList.toggle('open', isopen);
if (mBackdrop) mBackdrop.classList.toggle('open', isopen);
if (burger) burger.setAttribute('aria-expanded', String(isopen));
if (mnav) { mnav.hidden = !isopen; }
mnav.hidden = !isopen;
return isopen;
}
if (burger && mnav) {
mnav.hidden = false;
mnav.hidden = true;
burger.addEventListener('click', function (e) {
e.stopPropagation();
toggleMobileNav();
Expand All @@ -103,17 +103,9 @@
mBackdrop.addEventListener('click', function () { toggleMobileNav(false); });
}
mnav.addEventListener('click', function (e) {
if (e.target.tagName === 'A' || e.target.tagName === 'BUTTON') {
if (!e.target.closest('#neo-mobile-close')) toggleMobileNav(false);
}
});
document.addEventListener('click', function (e) {
if (!mnav.contains(e.target) && e.target !== burger && !mBackdrop?.contains(e.target)) {
toggleMobileNav(false);
}
if (e.target.tagName === 'A') toggleMobileNav(false);
});
}
// expose for palette favorites shortcut
window.__toggleMobileNav = toggleMobileNav;

// Reduced-motion quick toggle (header ✦ button)
Expand Down
12 changes: 6 additions & 6 deletions layouts/partials/neo-header.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{/*
Neo header — presentation layer. The primary navigation is auto-generated
from the site's categories taxonomy (raw data -> categories -> common menu),
so adding a category needs no menu edit. A settings drawer (theme/appearance/
accessibility/search) is wired by custom.js. EN is disabled, so no RU/EN.
Neo header — presentation layer.
Desktop: 6 primary links + search + theme toggle.
Mobile: slide-in side panel with grouped links, no accordion.
*/}}
<header class="site-header">
<a class="skip-link" href="#main">Перейти к содержанию</a>
Expand All @@ -16,7 +15,7 @@
<a href="{{ "blog/" | relURL }}">Блог</a>
<a href="{{ "repositories/" | relURL }}">Репозитории</a>
<a href="{{ "gists/" | relURL }}">Гисты</a>
<a href="{{ "knowledge-graph/" | relURL }}">Graph</a>
<a href="{{ "knowledge-graph/" | relURL }}">Граф знаний</a>
<a href="{{ "awesome/" | relURL }}">Awesome</a>
<a href="{{ "about/" | relURL }}">О сайте</a>
</nav>
Expand All @@ -28,6 +27,7 @@
</div>
</div>

{{/* Mobile slide-in panel — simple grouped links, no accordion */}}
<nav class="mobile-panel neo-mobile-nav" id="neo-mobile-nav" aria-label="Мобильное меню" hidden>
<div class="mobile-panel-inner">
<div class="mobile-panel-head">
Expand All @@ -40,7 +40,7 @@
<a href="{{ "blog/" | relURL }}">Блог</a>
<a href="{{ "repositories/" | relURL }}">Репозитории</a>
<a href="{{ "gists/" | relURL }}">Гисты</a>
<a href="{{ "knowledge-graph/" | relURL }}">Graph</a>
<a href="{{ "knowledge-graph/" | relURL }}">Граф знаний</a>
<a href="{{ "awesome/" | relURL }}">Awesome</a>
<a href="{{ "about/" | relURL }}">О сайте</a>
</div>
Expand Down
Loading