core-maugli 1.2.28 → 1.2.30
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
@@ -72,12 +72,12 @@ let authorImg = authorData.data.avatar || '/img/default/autor_default.webp';
|
|
72
72
|
data-astro-reload
|
73
73
|
style="text-decoration: none; color: inherit; z-index: 10; position: relative;"
|
74
74
|
>
|
75
|
-
<img src={authorImg} alt={authorName} class="w-8 h-8 rounded-full"
|
75
|
+
<img src={authorImg} alt={authorName} class="w-8 h-8 rounded-full" decoding="async" />
|
76
76
|
<span class="font-medium hover:text-[var(--brand-color)] transition-colors duration-200">{authorName}</span>
|
77
77
|
</a>
|
78
78
|
) : (
|
79
79
|
<>
|
80
|
-
<img src={authorImg} alt={authorName} class="w-8 h-8 rounded-full"
|
80
|
+
<img src={authorImg} alt={authorName} class="w-8 h-8 rounded-full" decoding="async" />
|
81
81
|
<span class="font-medium">{authorName}</span>
|
82
82
|
</>
|
83
83
|
)
|
@@ -16,6 +16,7 @@ export interface Props {
|
|
16
16
|
const { class: className = '' } = Astro.props;
|
17
17
|
const lang: string = maugliConfig.defaultLang || 'en';
|
18
18
|
const dict = dicts[lang] || dicts['en'] || {};
|
19
|
+
const en = dicts['en'] || {};
|
19
20
|
const navLinks = maugliConfig.navLinks || [];
|
20
21
|
const currentUrl = Astro.url.pathname;
|
21
22
|
|
@@ -61,7 +62,7 @@ const isTagPage = currentUrl.startsWith('/tags/') && pathParts.length === 1;
|
|
61
62
|
idx === 0 ? (
|
62
63
|
<a href={crumb.href} class="flex-shrink-0" target="_blank" rel="noopener noreferrer">
|
63
64
|
<picture>
|
64
|
-
<img src={crumb.icon} alt="Maugli" class="w-9 h-9"
|
65
|
+
<img src={crumb.icon} alt="Maugli" class="w-9 h-9" decoding="async" />
|
65
66
|
</picture>
|
66
67
|
</a>
|
67
68
|
) : (
|
package/src/components/Nav.astro
CHANGED
@@ -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 =
|
22
|
-
const closeMenuLabel =
|
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 =
|
129
|
-
const closeLabel =
|
121
|
+
const openLabel = '{openMenuLabel}';
|
122
|
+
const closeLabel = '{closeMenuLabel}';
|
130
123
|
|
131
124
|
function menuToggle() {
|
132
125
|
const menu = document.querySelector('.menu');
|
@@ -43,7 +43,6 @@ const rubricImageFinal = rubricImage && rubricImage.length > 0 ? rubricImage : m
|
|
43
43
|
alt={rubricName || tagsSection.rubricAlt}
|
44
44
|
class="w-20 h-20 sm:w-40 sm:h-40 object-cover rounded-[16px_48px_16px_48px] border border-[var(--border-main)]"
|
45
45
|
style="flex-shrink:0;"
|
46
|
-
loading="lazy"
|
47
46
|
decoding="async"
|
48
47
|
/>
|
49
48
|
<div class="flex flex-col items-center sm:items-start text-center sm:text-left">
|
@@ -105,7 +104,7 @@ const rubricImageFinal = rubricImage && rubricImage.length > 0 ? rubricImage : m
|
|
105
104
|
<a
|
106
105
|
href={allHref}
|
107
106
|
aria-label={allLabel + ` (${totalCount})`}
|
108
|
-
class="inline-flex items-center justify-center px-4 py-1.5 text-lg leading-[22px] font-inter font-normal whitespace-nowrap no-underline rounded-3xl bg-[var(--brand-color-20)] border border-[var(--brand-color)] text-[var(--brand-color)]"
|
107
|
+
class="inline-flex items-center justify-center min-w-12 min-h-12 px-4 py-1.5 text-lg leading-[22px] font-inter font-normal whitespace-nowrap no-underline rounded-3xl bg-[var(--brand-color-20)] border border-[var(--brand-color)] text-[var(--brand-color)]"
|
109
108
|
>
|
110
109
|
{allLabel} ({totalCount})
|
111
110
|
</a>
|
@@ -120,7 +119,7 @@ const rubricImageFinal = rubricImage && rubricImage.length > 0 ? rubricImage : m
|
|
120
119
|
<a
|
121
120
|
href={`${tagsBasePath}/${tag.id}`}
|
122
121
|
aria-label={ariaLabel}
|
123
|
-
class="inline-flex items-center justify-center px-4 py-1.5 text-lg leading-[22px] font-inter font-normal whitespace-nowrap no-underline rounded-3xl bg-[var(--brand-color-20)] border border-[var(--brand-color)] text-[var(--brand-color)]"
|
122
|
+
class="inline-flex items-center justify-center min-w-12 min-h-12 px-4 py-1.5 text-lg leading-[22px] font-inter font-normal whitespace-nowrap no-underline rounded-3xl bg-[var(--brand-color-20)] border border-[var(--brand-color)] text-[var(--brand-color)]"
|
124
123
|
>
|
125
124
|
{tag.name}
|
126
125
|
<span style="color: inherit; opacity: 0.6;"> ({tag.count})</span>
|
@@ -170,11 +169,11 @@ const rubricImageFinal = rubricImage && rubricImage.length > 0 ? rubricImage : m
|
|
170
169
|
}
|
171
170
|
</style>
|
172
171
|
</div>
|
173
|
-
<div class="tags-mobile-list flex-
|
172
|
+
<div class="tags-mobile-list flex gap-3 gap-y-3 py-4 mb-4" style="margin-top: 8px; flex-wrap: wrap;">
|
174
173
|
<a
|
175
174
|
href={allHref}
|
176
175
|
class:list={[
|
177
|
-
'inline-flex items-center justify-center px-
|
176
|
+
'inline-flex items-center justify-center min-w-12 min-h-12 px-3 py-2 text-base leading-tight font-inter font-normal whitespace-nowrap no-underline rounded-3xl',
|
178
177
|
isAllActive
|
179
178
|
? 'bg-[var(--brand-color-20)] border border-[var(--brand-color)] text-[var(--brand-color)] hover:bg-[var(--brand-color-60)]'
|
180
179
|
: 'border border-[var(--border-main)] text-[var(--text-heading)] hover:bg-[var(--bg-muted)]'
|
@@ -187,7 +186,7 @@ const rubricImageFinal = rubricImage && rubricImage.length > 0 ? rubricImage : m
|
|
187
186
|
<a
|
188
187
|
href={`${tagsBasePath}/${tag.id}`}
|
189
188
|
class:list={[
|
190
|
-
'inline-flex items-center justify-center px-
|
189
|
+
'inline-flex items-center justify-center min-w-12 min-h-12 px-3 py-2 text-base leading-tight font-inter font-normal whitespace-nowrap no-underline rounded-3xl',
|
191
190
|
activeTagId === tag.id
|
192
191
|
? 'bg-[var(--brand-color-20)] border border-[var(--brand-color)] text-[var(--brand-color)] hover:bg-[var(--brand-color-60)]'
|
193
192
|
: tag.isRubric
|
@@ -196,7 +195,7 @@ const rubricImageFinal = rubricImage && rubricImage.length > 0 ? rubricImage : m
|
|
196
195
|
]}
|
197
196
|
>
|
198
197
|
{tag.name}
|
199
|
-
<span style="color: inherit; opacity: 0.
|
198
|
+
<span style="color: inherit; opacity: 0.8;"> ({tag.count})</span>
|
200
199
|
</a>
|
201
200
|
))
|
202
201
|
}
|
@@ -91,7 +91,7 @@ const pageDescription = seo?.description || description;
|
|
91
91
|
<div class="flex flex-col sm:flex-row gap-6 sm:gap-8 items-start">
|
92
92
|
<!-- Аватар -->
|
93
93
|
<div class="w-32 h-32 sm:w-40 sm:h-40 bg-[var(--bg-main)] rounded-full overflow-hidden flex-shrink-0">
|
94
|
-
<img src={avatar || '/img/default/autor_default.webp'} alt={`Фото ${name}`} class="w-full h-full object-cover" />
|
94
|
+
<img src={avatar || '/img/default/autor_default.webp'} alt={`Фото ${name}`} class="w-full h-full object-cover" decoding="async" />
|
95
95
|
</div>
|
96
96
|
|
97
97
|
<!-- Информация -->
|
package/src/styles/global.css
CHANGED
@@ -10,22 +10,22 @@
|
|
10
10
|
@layer base {
|
11
11
|
:root {
|
12
12
|
/* Brand */
|
13
|
-
--brand-color-rgb:
|
13
|
+
--brand-color-rgb: 9, 157, 13;
|
14
14
|
--brand-color: rgb(var(--brand-color-rgb));
|
15
15
|
--brand-color-60: rgba(var(--brand-color-rgb), 0.6);
|
16
|
-
--brand-color-40: rgba(var(--brand-color-rgb), 0.
|
17
|
-
--brand-color-20: rgba(var(--brand-color-rgb), 0.
|
16
|
+
--brand-color-40: rgba(var(--brand-color-rgb), 0.3);
|
17
|
+
--brand-color-20: rgba(var(--brand-color-rgb), 0.08);
|
18
18
|
|
19
19
|
/* Light Theme */
|
20
20
|
--text-main: #111c2d;
|
21
|
-
--text-heading: #
|
22
|
-
--text-muted: #
|
21
|
+
--text-heading: #2d3e5b;
|
22
|
+
--text-muted: #585e6a;
|
23
23
|
--bg-main: #ffffff;
|
24
|
-
--bg-main-40: rgba(255, 255, 255, 0.
|
25
|
-
--bg-muted: rgba(
|
24
|
+
--bg-main-40: rgba(255, 255, 255, 0.3);
|
25
|
+
--bg-muted: rgba(245, 247, 249, 0.94);
|
26
26
|
--border-main: rgba(17, 28, 44, 0.13);
|
27
|
-
--font-sans: 'Inter Variable', sans-serif;
|
28
|
-
--font-serif: 'Geologica Variable', sans-serif;
|
27
|
+
--font-sans: 'Inter Variable', sans-serif;
|
28
|
+
--font-serif: 'Geologica Variable', sans-serif;
|
29
29
|
|
30
30
|
/* Card Styles */
|
31
31
|
--card-shadow:
|