fix(i18n): keep en navigation within /en/ via pagePrefix

- build-pages.mjs: add pagePrefix (locale-root-relative, no en offset)
- use pagePrefix for nav links: logo, back-home, footer design-system/
  cookie-policy/, FAB #contact, cookie-notice link, cookie-policy body
  link, case-page #skills/#projects anchors (assetPrefix pointed to site
  root and leaked en pages to ru)
- docs/translation.md: document assetPrefix vs pagePrefix
This commit is contained in:
root committed 2026-09-15 23:00:32 +02:00
1 parent 1d25dcee47
commit e02ce1c629
11 files changed
+20 -16

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
<aside class="cookie-notice glass-neutral" hidden data-cookie-notice>
<p class="cookie-notice__text">
This site uses cookies for a comfortable experience. Read more in
<a href="{{assetPrefix}}cookie-policy/" data-cookie-policy-link>cookie policy</a>.
<a href="{{pagePrefix}}cookie-policy/" data-cookie-policy-link>cookie policy</a>.
</p>
<button type="button" class="btn btn--secondary btn--flat cookie-notice__accept" data-cookie-accept>
<span>Accept</span>
+1 -1
View File
@@ -1,7 +1,7 @@
<aside class="cookie-notice glass-neutral" hidden data-cookie-notice>
<p class="cookie-notice__text">
Сайт использует cookie для комфортной работы. Подробнее — в
<a href="{{assetPrefix}}cookie-policy/" data-cookie-policy-link>политике cookie</a>.
<a href="{{pagePrefix}}cookie-policy/" data-cookie-policy-link>cookie policy</a>.
</p>
<button type="button" class="btn btn--secondary btn--flat cookie-notice__accept" data-cookie-accept>
<span>Принять</span>
+1 -1
View File
@@ -55,7 +55,7 @@
</div>
</div>
</div>
<a class="fab fab--primary" href="{{assetPrefix}}#contact" aria-label="Связаться">
<a class="fab fab--primary" href="{{pagePrefix}}#contact" aria-label="Связаться">
<span class="fab-primary__ico" aria-hidden="true"></span>
</a>
</div>
+1 -1
View File
@@ -2,6 +2,6 @@
<div class="footer__inner">
<span class="footer__chunk footer__chunk--date">© 2015–2026<span class="footer__sep" aria-hidden="true"> · </span></span>
<span class="footer__chunk footer__chunk--main">{{i18n:footer.credit}}</span>
<span class="footer__chunk footer__chunk--meta footer__attr"><span class="footer__sep" aria-hidden="true"> · </span><a href="{{assetPrefix}}cases/design-system/">{{i18n:footer.designSystem}}</a><span class="footer__sep" aria-hidden="true"> · </span><a href="{{assetPrefix}}cookie-policy/">{{i18n:footer.cookiePolicy}}</a></span>
<span class="footer__chunk footer__chunk--meta footer__attr"><span class="footer__sep" aria-hidden="true"> · </span><a href="{{pagePrefix}}cases/design-system/">{{i18n:footer.designSystem}}</a><span class="footer__sep" aria-hidden="true"> · </span><a href="{{pagePrefix}}cookie-policy/">{{i18n:footer.cookiePolicy}}</a></span>
</div>
</footer>
+1 -1
View File
@@ -1,7 +1,7 @@
<a class="skip-link" href="#case-main">{{i18n:skip.case}}</a>
<header class="header" data-theme-picker>
<div class="header__inner">
<a class="logo" href="{{assetPrefix}}" aria-label="{{i18n:logo.aria}}">НМ</a>
<a class="logo" href="{{pagePrefix}}" aria-label="{{i18n:logo.aria}}">НМ</a>
<div class="header__cluster">
<nav class="nav" aria-label="{{i18n:nav.aria}}">
<a href="#contact">{{i18n:nav.contact}}</a>
+2 -2
View File
@@ -2,10 +2,10 @@
<header class="header" data-theme-picker>
<div class="header__inner">
<a class="logo" href="{{assetPrefix}}" aria-label="{{i18n:logo.aria}}">НМ</a>
<a class="logo" href="{{pagePrefix}}" aria-label="{{i18n:logo.aria}}">НМ</a>
<div class="header__cluster">
<nav class="nav" aria-label="{{i18n:nav.aria}}">
<a href="{{assetPrefix}}">{{i18n:back.home}}</a>
<a href="{{pagePrefix}}">{{i18n:back.home}}</a>
</nav>
{{> lang-switch}}
</div>