{{ .Title }}
Пока пусто. Нажмите ♥ на любой карточке, чтобы добавить её в избранное.
+diff --git a/assets/js/custom.js b/assets/js/custom.js
index a0e5eca4..f5371815 100644
--- a/assets/js/custom.js
+++ b/assets/js/custom.js
@@ -92,6 +92,22 @@
});
}
+ // Reduced-motion quick toggle (header ✦ button)
+ var mqBtn = document.getElementById('neo-motion-quick');
+ var mqState = localStorage.getItem('neo-motion-state');
+ function mqApply(on) {
+ document.documentElement.setAttribute('data-reduce-motion', on ? 'false' : 'true');
+ if (mqBtn) mqBtn.style.opacity = on ? '' : '.5';
+ localStorage.setItem('neo-motion-state', on ? 'on' : 'off');
+ }
+ if (mqBtn) {
+ if (mqState === 'off') mqApply(false);
+ mqBtn.addEventListener('click', function () {
+ var cur = document.documentElement.getAttribute('data-reduce-motion') === 'true';
+ mqApply(!cur);
+ });
+ }
+
// Quick light/dark toggle
var tog = document.getElementById('neo-theme-toggle');
if (tog){
diff --git a/content/favorites/_index.md b/content/favorites/_index.md
new file mode 100644
index 00000000..51368d20
--- /dev/null
+++ b/content/favorites/_index.md
@@ -0,0 +1,10 @@
+---
+title: "Избранное"
+description: "Сохранённые карточки (лайки). Хранится локально в браузере."
+layout: "favorites-hub"
+---
+
+Здесь собраны репозитории, гисты и awesome-списки, которые вы отметили лайком (♥) на сайте. Вся информация хранится локально в вашем браузере и не отправляется на сервер.
+
+- Нажмите ♥ на любой карточке, чтобы добавить её сюда.
+- Нажмите ♥ ещё раз, чтобы убрать.
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
new file mode 100644
index 00000000..f36f0494
--- /dev/null
+++ b/layouts/_default/_markup/render-image.html
@@ -0,0 +1,16 @@
+{{/* Image render hook: lazy-load + CLS guard.
+ Local Hugo image resources get intrinsic width/height (no layout shift).
+ Remote images get loading="lazy" decoding="async". */}}
+{{- $src := .Destination -}}
+{{- $alt := .Text -}}
+{{- $isRemote := or (strings.HasPrefix $src "http://") (strings.HasPrefix $src "https://") -}}
+{{- if and (not $isRemote) (not (strings.HasPrefix $src "/")) -}}
+ {{- $img := $.Page.Resources.Get $src -}}
+ {{- if $img -}}
+
+{{- else -}}
+
+{{- end -}}
+{{- else -}}
+
+{{- end -}}
diff --git a/layouts/awesome/list.html b/layouts/awesome/list.html
index 72c9f0ef..3da34b7e 100644
--- a/layouts/awesome/list.html
+++ b/layouts/awesome/list.html
@@ -27,7 +27,7 @@
Пока пусто. Нажмите ♥ на любой карточке, чтобы добавить её в избранное.
+