Repository navigation
feat: кнопка «наверх», 404-страница, OG-изображения, CSS-консолидация #409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -323,7 +323,35 @@ code { | |
| } | ||
| .burger { display: inline-flex; } | ||
|
|
||
| /* ---------- MOBILE BACKDROP ---------- */ | ||
| /* ---------- SCROLL TO TOP ---------- */ | ||
| .scroll-to-top { | ||
| position: fixed; | ||
| bottom: 2rem; | ||
| right: 2rem; | ||
| z-index: 100; | ||
| width: 48px; | ||
| height: 48px; | ||
| border-radius: 50%; | ||
| border: 1px solid var(--line); | ||
| background: var(--paper-2); | ||
| color: var(--ink-700); | ||
| font-size: 1.25rem; | ||
| cursor: pointer; | ||
| opacity: 0; | ||
| transform: translateY(20px); | ||
| transition: opacity .25s ease, transform .25s ease, background .25s ease; | ||
| pointer-events: none; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Remove the hidden button from keyboard focus.
Proposed fix .scroll-to-top {
+ visibility: hidden;
opacity: 0;
transform: translateY(20px);
pointer-events: none;
}
.scroll-to-top.visible {
+ visibility: visible;
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}🤖 Prompt for AI Agents |
||
| } | ||
| .scroll-to-top.visible { | ||
| opacity: 1; | ||
| transform: translateY(0); | ||
| pointer-events: auto; | ||
| } | ||
| .scroll-to-top:hover { | ||
| background: var(--accent); | ||
| color: #fff; | ||
| border-color: var(--accent); | ||
| } | ||
| .neo-mobile-backdrop { | ||
| position: fixed; | ||
| inset: 0; | ||
|
|
@@ -448,25 +476,56 @@ code { | |
| flex-wrap: wrap; | ||
| } | ||
|
|
||
| /* ---------- FEATURED EDITORIAL GRID ---------- */ | ||
| .editorial-grid { | ||
| /* ---------- FEATURED EDITORIAL LAYOUT ---------- */ | ||
| /* 1 large lead card + 2 smaller sub cards stacked on the right */ | ||
| .editorial-featured { | ||
| display: grid; | ||
| grid-template-columns: 1.4fr 1fr; | ||
| grid-template-rows: auto auto; | ||
| grid-template-columns: 1.6fr 1fr; | ||
| gap: var(--space-4); | ||
| margin-top: var(--space-8); | ||
| } | ||
| .editorial-grid .card.lead { | ||
| grid-row: span 2; | ||
| .card-lead { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: var(--space-3); | ||
| padding: var(--space-6); | ||
| background: var(--paper-2); | ||
| border: 1px solid var(--line); | ||
| border-radius: var(--radius); | ||
| } | ||
| .editorial-grid .card h3 { | ||
| .card-lead h3 { | ||
| font-family: var(--font-display); | ||
| font-size: 1.25rem; | ||
| font-size: 1.5rem; | ||
| line-height: 1.25; | ||
| } | ||
| .editorial-grid .card p { | ||
| .card-lead p { | ||
| color: var(--ink-600); | ||
| margin-top: var(--space-2); | ||
| font-size: 1.05rem; | ||
| line-height: 1.6; | ||
| } | ||
| .editorial-side { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: var(--space-4); | ||
| } | ||
| .card-sub { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: var(--space-2); | ||
| padding: var(--space-4); | ||
| background: var(--paper-2); | ||
| border: 1px solid var(--line); | ||
| border-radius: var(--radius); | ||
| } | ||
| .card-sub h3 { | ||
| font-family: var(--font-display); | ||
| font-size: 1rem; | ||
| line-height: 1.3; | ||
| } | ||
| .card-sub p { | ||
| color: var(--ink-600); | ||
| font-size: .9rem; | ||
| line-height: 1.5; | ||
| } | ||
| .editorial-meta { | ||
| color: var(--ink-500); | ||
|
|
@@ -642,7 +701,7 @@ code { | |
| .post-layout { grid-template-columns: 1fr; } | ||
| .toc { display: none; } | ||
| .primary-nav { display: none; } | ||
| .editorial-grid { grid-template-columns: 1fr; } | ||
| .editorial-featured { grid-template-columns: 1fr; } | ||
| .recent-row { grid-template-columns: 1fr; gap: var(--space-1); } | ||
| .hero { padding: var(--space-10) 0; } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // Scroll-to-top button — appears after scrolling 400px, smooth scrolls to top. | ||
| (function () { | ||
| var btn = document.getElementById('scroll-to-top'); | ||
| if (!btn) return; | ||
|
|
||
| var show = function () { btn.classList.toggle('visible', window.scrollY > 400); }; | ||
| window.addEventListener('scroll', show, { passive: true }); | ||
| show(); | ||
|
|
||
| btn.addEventListener('click', function () { | ||
| window.scrollTo({ top: 0, behavior: 'smooth' }); | ||
| }); | ||
| })(); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,49 @@ | ||
| {{/* | ||
| Smart 404 — unified design system. | ||
| Shows a friendly message, search box, 5 popular posts, and section links. | ||
| */}} | ||
| {{ partial "neo-base.html" . }} | ||
| <!DOCTYPE html> | ||
| <html lang="{{ site.Language.Locale | default "ru" }}" data-theme="dark"> | ||
| {{ partial "neo-head.html" . }} | ||
| <body> | ||
| {{ partial "neo-header.html" . }} | ||
| <main class="container" id="main"> | ||
| <section class="hero" style="text-align:center;padding:4rem 0 2rem"> | ||
| <h1 style="font-size:clamp(2rem,6vw,3.5rem);margin-bottom:.5rem">Страница не найдена</h1> | ||
| <p class="lead" style="margin-bottom:2rem">Возможно, она была перемещена или удалена. Попробуйте поиск или выберите раздел ниже.</p> | ||
|
|
||
| {{/* Search box */}} | ||
| <form action="{{ "search/" | relURL }}" style="max-width:480px;margin:0 auto 3rem"> | ||
| <input type="search" name="q" placeholder="Поиск по сайту…" class="neo-search-input" style="width:100%;padding:.8rem 1rem;border-radius:var(--radius);border:1px solid var(--line);background:var(--paper-2);color:var(--ink-700);font-size:1rem"> | ||
| </form> | ||
|
|
||
| {{/* Popular posts — first 5 blog posts */}} | ||
| <div style="max-width:720px;margin:0 auto 3rem;text-align:left"> | ||
| <div class="section-header"><h2>Популярные записи</h2></div> | ||
| <div class="recent-rows"> | ||
| {{ range first 5 (where site.RegularPages "Section" "blog") }} | ||
| <a class="recent-row" href="{{ .RelPermalink }}"> | ||
| <span class="date">{{ .Date.Format "2006-01-02" }}</span> | ||
| <span class="title">{{ .Title }}</span> | ||
| <span class="meta">⏱ {{ .ReadingTime }} мин</span> | ||
| </a> | ||
| {{ end }} | ||
| </div> | ||
| </div> | ||
|
|
||
| {{/* Section links */}} | ||
| <div style="display:flex;gap:.5rem;flex-wrap:wrap;justify-content:center"> | ||
| <a class="tag" href="{{ "blog/" | relURL }}">Блог</a> | ||
| <a class="tag" href="{{ "repositories/" | relURL }}">Репозитории</a> | ||
| <a class="tag" href="{{ "gists/" | relURL }}">Гисты</a> | ||
| <a class="tag" href="{{ "knowle 8 dge-grap 10BC8 h/" | relURL }}">Граф знаний</a> | ||
| <a class="tag" href="{{ "awesome/" | relURL }}">Awesome</a> | ||
| <a class="tag" href="{{ "about/" | relURL }}">О сайте</a> | ||
| <a class="tag" href="{{ "categories/" | relURL }}">Категории</a> | ||
| <a class="tag" href="{{ "tags/" | relURL }}">Теги</a> | ||
| </div> | ||
| </section> | ||
| </main> | ||
| {{ partial "neo-footer.html" . }} | ||
| </body> | ||
| </html> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| {{/*\n List / archive / category-term pages — unified design system.\n*/}}\n<!DOCTYPE html>\n<html lang="{{ site.Language.LanguageCode | default "ru" }}" data-theme="dark">\n{{ partial "neo-head.html" . }}\n<body>\n{{ partial "neo-header.html" . }}\n<main class="container" id="main">\n <div style="margin-top:20px">\n <div class="section-header"><h2>{{ .Title }}</h2><span class="more">{{ len .Pages }} записей</span></div>\n {{ $pages := .Paginate .Pages }}\n <div class="recent-rows">\n {{ range $pages.Pages }}\n <a class="recent-row" href="{{ .RelPermalink }}">\n <span class="date"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" data-time="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time></span>\n <span class="title">{{ .Title }}</span>\n <span class="meta">{{ with .Params.tags }}<span class="tag">{{ index . 0 }}</span>{{ end }}<span style="color:var(--ink-500)">⏱ {{ .ReadingTime }} мин</span></span>\n </a>\n {{ end }}\n </div>\n {{ partial "pagination.html" . }}\n </div>\n</main>\n{{ partial "neo-footer.html" . }}\n</body>\n</html>\n | ||
| {{/*\n List / archive / category-term pages — unified design system.\n*/}}\n<!DOCTYPE html>\n<html lang="{{ site.Language.Locale | default "ru" }}" data-theme="dark">\n{{ partial "neo-head.html" . }}\n<body>\n{{ partial "neo-header.html" . }}\n<main class="container" id="main">\n <div style="margin-top:20px">\n <div class="section-header"><h2>{{ .Title }}</h2><span class="more">{{ len .Pages }} записей</span></div>\n {{ $pages := .Paginate .Pages }}\n <div class="recent-rows">\n {{ range $pages.Pages }}\n <a class="recent-row" href="{{ .RelPermalink }}">\n <span class="date"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" data-time="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time></span>\n <span class="title">{{ .Title }}</span>\n <span class="meta">{{ with .Params.tags }}<span class="tag">{{ index . 0 }}</span>{{ end }}<span style="color:var(--ink-500)">⏱ {{ .ReadingTime }} мин</span></span>\n </a>\n {{ end }}\n </div>\n {{ partial "pagination.html" . }}\n </div>\n</main>\n{{ partial "neo-footer.html" . }}\n</body>\n</html>\n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: dominicusin/dominicusin.github.io
Length of output: 5615
🤖 get_repo_knowledge executed:
get_repo_knowledge dominicusin/dominicusin.github.io /tmp/coderabbit-repo-knowledge/dominicusin-dominicusin-github-io-fa795971Length of output: 1570
🏁 Script executed:
Repository: dominicusin/dominicusin.github.io
Length of output: 10081
🏁 Script executed:
Repository: dominicusin/dominicusin.github.io
Length of output: 7664
🌐 Web query:
Playwright Test CLI --update-snapshots toHaveScreenshot official documentation💡 Result:
In Playwright Test, the --update-snapshots flag (or -u) is used to automatically update reference screenshots that do not match the actual test results [1][2]. When using the toHaveScreenshot assertion, you can run the following command in your terminal to update the snapshots [1][2]: npx playwright test --update-snapshots By default, running this command without a value will update snapshots that have "changed" [3][4]. You can also pass specific modes to the flag, such as "all", "changed", "missing", or "none" [3][4]. Additionally, if you want to control how the source code is updated when snapshots are changed, you can use the --update-source-method option with values like "patch" (default), "3way", or "overwrite" [3][4]. For example: npx playwright test --update-snapshots --update-source-method=3way These screenshot assertions must be used with the Playwright Test runner [5]. Once updated, the new screenshots serve as the new baseline for subsequent test runs [2].
Citations:
Run Playwright visual regression tests against committed snapshots.
--update-snapshotscreates or overwritestoHaveScreenshotbaselines, so CI does not compare the render with a committed baseline. No Playwright snapshots are tracked, andcontinue-on-error: trueallows assertion failures to pass. Commit the intended snapshots, runnpx playwright test, and removecontinue-on-error.🤖 Prompt for AI Agents