core-maugli 1.2.28 → 1.2.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "core-maugli",
3
3
  "description": "Astro & Tailwind CSS blog theme for Maugli.",
4
4
  "type": "module",
5
- "version": "1.2.28",
5
+ "version": "1.2.29",
6
6
  "license": "GPL-3.0-or-later OR Commercial",
7
7
  "repository": {
8
8
  "type": "git",
@@ -9,6 +9,7 @@ import { LANGUAGES } from '../i18n/languages';
9
9
  const lang = typeof maugliConfig.defaultLang === 'string' ? maugliConfig.defaultLang : 'en';
10
10
  const languageObj = LANGUAGES.find((l) => l.code === lang) || LANGUAGES.find((l) => l.code === 'en');
11
11
  const dict = languageObj?.dict && Object.keys(languageObj.dict).length > 0 ? languageObj.dict : LANGUAGES.find((l) => l.code === 'en')?.dict || {};
12
+ const langLabel = languageObj?.label || lang;
12
13
 
13
14
  const navLinks = (maugliConfig.navLinks || []).map((link) => {
14
15
  const d = dict as any;
@@ -18,8 +19,8 @@ const navLinks = (maugliConfig.navLinks || []).map((link) => {
18
19
  };
19
20
  });
20
21
 
21
- const openMenuLabel = (dict as any).openMenu || 'Open menu';
22
- const closeMenuLabel = (dict as any).closeMenu || 'Close menu';
22
+ const openMenuLabel = dict.nav?.openMenu || 'Open menu';
23
+ const closeMenuLabel = dict.nav?.closeMenu || 'Close menu';
23
24
  ---
24
25
 
25
26
  <nav class="fixed top-0 left-0 w-full z-50 bg-[var(--bg-main)] opacity-95 backdrop-blur-lg flex items-center justify-between pt-4 pb-4">
@@ -27,15 +28,7 @@ const closeMenuLabel = (dict as any).closeMenu || 'Close menu';
27
28
  <a href={maugliConfig.brand.logoHref && maugliConfig.brand.logoHref.trim() ? maugliConfig.brand.logoHref : '/'} class="ml-6 flex-shrink-0 card-blur">
28
29
  <picture>
29
30
  <source srcset={maugliConfig.brand.logoDark} media="(prefers-color-scheme: dark)" />
30
- <img
31
- src={maugliConfig.brand.logoLight}
32
- alt="Логотип"
33
- width="48"
34
- height="48"
35
- class="w-12 h-12"
36
- loading="eager"
37
- decoding="async"
38
- />
31
+ <img src={maugliConfig.brand.logoLight} alt="Логотип" width="48" height="48" class="w-12 h-12" loading="eager" decoding="async" />
39
32
  </picture>
40
33
  </a>
41
34
  <ul
@@ -125,8 +118,8 @@ const closeMenuLabel = (dict as any).closeMenu || 'Close menu';
125
118
  </style>
126
119
 
127
120
  <script>
128
- const openLabel = ${JSON.stringify(openMenuLabel)};
129
- const closeLabel = ${JSON.stringify(closeMenuLabel)};
121
+ const openLabel = '{openMenuLabel}';
122
+ const closeLabel = '{closeMenuLabel}';
130
123
 
131
124
  function menuToggle() {
132
125
  const menu = document.querySelector('.menu');