maverick-wave-astro 1.14.0 → 1.16.0
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/README.md +2 -2
- package/components/Footer.astro +5 -16
- package/components/FormatwerkeMark.astro +96 -0
- package/package.json +3 -3
- package/styles/formatwerke-mark.css +131 -0
package/README.md
CHANGED
|
@@ -66,8 +66,8 @@ The toggles come from the MaverickWave script.
|
|
|
66
66
|
## Components
|
|
67
67
|
|
|
68
68
|
- Frame: `Header`, `Footer` (social links and notes above a bar with copyright,
|
|
69
|
-
credit and the legal `links`; `dark`, `compact`),
|
|
70
|
-
`LanguageSwitch`, `Announcement`, `PromoBar`
|
|
69
|
+
the `FormatwerkeMark` for `credit` and the legal `links`; `dark`, `compact`),
|
|
70
|
+
`FormatwerkeMark`, `ThemeToggle`, `LanguageSwitch`, `Announcement`, `PromoBar`
|
|
71
71
|
- Sections: `Hero` (`variant` start | fade), `SplitHero` (text beside a photo,
|
|
72
72
|
no parallax), `Parallax` (a picture band between sections), `SectionHead`,
|
|
73
73
|
`IconCard`, `ValueList`, `OpeningHours`, `Address`, `Accordion`, `Calendar`,
|
package/components/Footer.astro
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { config } from '../dist/config.js';
|
|
7
7
|
import { linkTo, withBase } from '../dist/path.js';
|
|
8
|
+
import FormatwerkeMark from './FormatwerkeMark.astro';
|
|
8
9
|
import SocialLinks, { type SocialLink } from './SocialLinks.astro';
|
|
9
10
|
|
|
10
11
|
interface Props {
|
|
@@ -38,7 +39,8 @@ interface Props {
|
|
|
38
39
|
links?: readonly { label: string; href: string }[];
|
|
39
40
|
owner: string;
|
|
40
41
|
ownerHref?: string;
|
|
41
|
-
// "
|
|
42
|
+
// "ein Format von" - without it the formatwerke mark is left out. The slot
|
|
43
|
+
// "bar" takes its place, e.g. for the mark on formatwerke.de itself.
|
|
42
44
|
credit?: string;
|
|
43
45
|
lastUpdated?: { label: string; date: string };
|
|
44
46
|
// The dark bookend of the header bar, in both themes.
|
|
@@ -189,21 +191,6 @@ const frame = container
|
|
|
189
191
|
) : (
|
|
190
192
|
owner
|
|
191
193
|
)
|
|
192
|
-
}{
|
|
193
|
-
credit && (
|
|
194
|
-
<>
|
|
195
|
-
{' '}
|
|
196
|
-
· {credit}{' '}
|
|
197
|
-
<a
|
|
198
|
-
href="https://formatwerke.de"
|
|
199
|
-
target="_blank"
|
|
200
|
-
rel="noopener noreferrer"
|
|
201
|
-
class="mw-link"
|
|
202
|
-
>
|
|
203
|
-
formatwerke
|
|
204
|
-
</a>
|
|
205
|
-
</>
|
|
206
|
-
)
|
|
207
194
|
}
|
|
208
195
|
</p>
|
|
209
196
|
{
|
|
@@ -215,6 +202,8 @@ const frame = container
|
|
|
215
202
|
}
|
|
216
203
|
</div>
|
|
217
204
|
|
|
205
|
+
<slot name="bar">{credit && <FormatwerkeMark label={credit} />}</slot>
|
|
206
|
+
|
|
218
207
|
{
|
|
219
208
|
legalLinks.length > 0 && (
|
|
220
209
|
<nav aria-label={linksLabel}>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
// formatwerke's maker's mark under a customer site: the signet, whose three
|
|
3
|
+
// bars - the formats - are set in the site's colours.
|
|
4
|
+
|
|
5
|
+
import '../styles/formatwerke-mark.css';
|
|
6
|
+
|
|
7
|
+
import { config } from '../dist/config.js';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
// "ein Format von", followed by the name - empty for the name alone
|
|
11
|
+
label?: string;
|
|
12
|
+
// "/" on formatwerke.de itself; only an outside address opens a new tab
|
|
13
|
+
href?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const german = config.site.lang.startsWith('de');
|
|
17
|
+
const {
|
|
18
|
+
label = german ? 'ein Format von' : 'a format by',
|
|
19
|
+
href = 'https://formatwerke.de',
|
|
20
|
+
} = Astro.props;
|
|
21
|
+
const external = /^https?:/.test(href);
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<a
|
|
25
|
+
class="mwa-fw-mark"
|
|
26
|
+
href={href}
|
|
27
|
+
target={external ? '_blank' : undefined}
|
|
28
|
+
rel={external ? 'noopener noreferrer' : undefined}
|
|
29
|
+
>
|
|
30
|
+
<svg
|
|
31
|
+
class="mwa-fw-mark-signet"
|
|
32
|
+
viewBox="-6 -6 212 212"
|
|
33
|
+
aria-hidden="true"
|
|
34
|
+
focusable="false"
|
|
35
|
+
>
|
|
36
|
+
<path
|
|
37
|
+
class="mwa-fw-mark-frame"
|
|
38
|
+
d="M12.63,2.63L141.37,2.63C172.091,2.63 197.37,27.909 197.37,58.63L197.37,187.37C197.37,192.856 192.856,197.37 187.37,197.37L58.63,197.37C27.909,197.37 2.63,172.091 2.63,141.37L2.63,12.63C2.63,7.144 7.144,2.63 12.63,2.63Z"
|
|
39
|
+
></path>
|
|
40
|
+
<path
|
|
41
|
+
class="mwa-fw-mark-arc"
|
|
42
|
+
d="M100.365,197.37L58.63,197.37C27.909,197.37 2.63,172.091 2.63,141.37L2.63,117.611"
|
|
43
|
+
></path>
|
|
44
|
+
<path
|
|
45
|
+
class="mwa-fw-mark-arc"
|
|
46
|
+
transform="rotate(180 100 100)"
|
|
47
|
+
d="M100.365,197.37L58.63,197.37C27.909,197.37 2.63,172.091 2.63,141.37L2.63,117.611"
|
|
48
|
+
></path>
|
|
49
|
+
<g transform="translate(0 -4.2)">
|
|
50
|
+
<path
|
|
51
|
+
class="mwa-fw-mark-bar"
|
|
52
|
+
d="M28.5,74.66L165.19,74.66C169.804,74.66 173.6,78.456 173.6,83.07L173.6,97.82C173.6,98.972 172.652,99.92 171.5,99.92L34.81,99.92C30.196,99.92 26.4,96.124 26.4,91.51L26.4,76.76C26.4,75.608 27.348,74.66 28.5,74.66Z"
|
|
53
|
+
></path>
|
|
54
|
+
<path
|
|
55
|
+
class="mwa-fw-mark-bar"
|
|
56
|
+
d="M28.5,111.5L100.42,111.5C105.034,111.5 108.83,115.296 108.83,119.91L108.83,134.66C108.83,135.812 107.882,136.76 106.73,136.76L34.81,136.76C30.196,136.76 26.4,132.964 26.4,128.35L26.4,113.6C26.4,112.448 27.348,111.5 28.5,111.5Z"
|
|
57
|
+
></path>
|
|
58
|
+
<path
|
|
59
|
+
class="mwa-fw-mark-bar"
|
|
60
|
+
d="M28.5,148.34L135.75,148.34C140.364,148.34 144.16,152.136 144.16,156.75L144.16,171.5C144.16,172.652 143.212,173.6 142.06,173.6L34.81,173.6C30.196,173.6 26.4,169.804 26.4,165.19L26.4,150.44C26.4,149.288 27.348,148.34 28.5,148.34Z"
|
|
61
|
+
></path>
|
|
62
|
+
</g>
|
|
63
|
+
</svg>
|
|
64
|
+
<span>
|
|
65
|
+
{label && `${label} `}<span class="mwa-fw-mark-name">formatwerke</span>
|
|
66
|
+
</span>
|
|
67
|
+
</a>
|
|
68
|
+
|
|
69
|
+
<script>
|
|
70
|
+
// A mark below the fold waits with its bars unset, so they are set in view.
|
|
71
|
+
// One already on screen stays as it is - unsetting it would make it blink.
|
|
72
|
+
if (
|
|
73
|
+
'IntersectionObserver' in window &&
|
|
74
|
+
!matchMedia('(prefers-reduced-motion: reduce)').matches
|
|
75
|
+
) {
|
|
76
|
+
const seen = new IntersectionObserver(
|
|
77
|
+
entries => {
|
|
78
|
+
for (const entry of entries) {
|
|
79
|
+
if (!entry.isIntersecting) continue;
|
|
80
|
+
entry.target.classList.replace(
|
|
81
|
+
'mwa-fw-mark-waiting',
|
|
82
|
+
'mwa-fw-mark-in'
|
|
83
|
+
);
|
|
84
|
+
seen.unobserve(entry.target);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{ threshold: 0.6 }
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
for (const mark of document.querySelectorAll('.mwa-fw-mark')) {
|
|
91
|
+
if (mark.getBoundingClientRect().top < innerHeight) continue;
|
|
92
|
+
mark.classList.add('mwa-fw-mark-waiting');
|
|
93
|
+
seen.observe(mark);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maverick-wave-astro",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "Shared frame for static Astro homepages built with MaverickWave: layout, SEO, design variants, schedule, building blocks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"astro": "^7.2.0",
|
|
55
|
-
"maverick-wave": "^6.
|
|
55
|
+
"maverick-wave": "^6.12.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@astrojs/sitemap": "^3.7.3",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"eslint-plugin-astro": "^1.5.0",
|
|
68
68
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
69
69
|
"globals": "^16.5.0",
|
|
70
|
-
"maverick-wave": "^6.
|
|
70
|
+
"maverick-wave": "^6.12.0",
|
|
71
71
|
"prettier": "^3.6.2",
|
|
72
72
|
"prettier-plugin-astro": "^0.14.1",
|
|
73
73
|
"typescript": "^6.0.3",
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/* At rest the signet carries the site's own colours, on hover it turns into
|
|
2
|
+
formatwerke - where the click leads. */
|
|
3
|
+
.mwa-fw-mark {
|
|
4
|
+
--mwa-fw-mark-ink: var(--mw-text-muted-color);
|
|
5
|
+
--mwa-fw-mark-name: var(--mw-primary-text-color);
|
|
6
|
+
--mwa-fw-mark-line: color-mix(in srgb, currentColor 28%, transparent);
|
|
7
|
+
--mwa-fw-mark-surface: transparent;
|
|
8
|
+
--mwa-fw-mark-frame: color-mix(in srgb, currentColor 40%, transparent);
|
|
9
|
+
--mwa-fw-mark-arc: var(--mw-primary-color);
|
|
10
|
+
--mwa-fw-mark-bar: var(--mw-secondary-color);
|
|
11
|
+
--mwa-fw-mark-bar-lead: var(--mw-primary-color);
|
|
12
|
+
--mwa-fw-mark-ease: var(--mw-ease-out, ease-out);
|
|
13
|
+
--mwa-fw-mark-fade: calc(350ms * var(--mw-motion-scale, 1));
|
|
14
|
+
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 0.5em;
|
|
18
|
+
padding: 0.2em 0.85em 0.2em 0.5em;
|
|
19
|
+
/* formatwerke's own corners, whatever shape the site gives its surfaces */
|
|
20
|
+
border: 1px solid var(--mwa-fw-mark-line);
|
|
21
|
+
border-radius: 4px 12px;
|
|
22
|
+
background: var(--mwa-fw-mark-surface);
|
|
23
|
+
color: var(--mwa-fw-mark-ink);
|
|
24
|
+
font-size: 0.9rem;
|
|
25
|
+
line-height: 1.2;
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
transition:
|
|
29
|
+
background-color var(--mwa-fw-mark-fade) var(--mwa-fw-mark-ease),
|
|
30
|
+
border-color var(--mwa-fw-mark-fade) var(--mwa-fw-mark-ease),
|
|
31
|
+
color var(--mwa-fw-mark-fade) var(--mwa-fw-mark-ease);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mwa-fw-mark:is(:hover, :focus-visible) {
|
|
35
|
+
--mwa-fw-mark-ink: #c9c9d1;
|
|
36
|
+
--mwa-fw-mark-name: #f5f5f6;
|
|
37
|
+
--mwa-fw-mark-line: #535357;
|
|
38
|
+
--mwa-fw-mark-surface: #26262b;
|
|
39
|
+
--mwa-fw-mark-frame: #535357;
|
|
40
|
+
--mwa-fw-mark-arc: #f5f5f6;
|
|
41
|
+
--mwa-fw-mark-bar: #a7a7b1;
|
|
42
|
+
--mwa-fw-mark-bar-lead: #f5f5f9;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.mwa-fw-mark:focus-visible {
|
|
46
|
+
outline: var(--mw-focus-ring-width, 2px) solid var(--mw-focus-ring-color);
|
|
47
|
+
outline-offset: var(--mw-focus-ring-offset, 2px);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.mwa-fw-mark-name {
|
|
51
|
+
color: var(--mwa-fw-mark-name);
|
|
52
|
+
font-weight: 600;
|
|
53
|
+
transition: color var(--mwa-fw-mark-fade) var(--mwa-fw-mark-ease);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.mwa-fw-mark-signet {
|
|
57
|
+
flex: none;
|
|
58
|
+
width: 1.5em;
|
|
59
|
+
height: 1.5em;
|
|
60
|
+
overflow: visible;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.mwa-fw-mark-frame,
|
|
64
|
+
.mwa-fw-mark-arc {
|
|
65
|
+
fill: none;
|
|
66
|
+
stroke-width: 12;
|
|
67
|
+
transition: stroke var(--mwa-fw-mark-fade) var(--mwa-fw-mark-ease);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.mwa-fw-mark-frame {
|
|
71
|
+
stroke: var(--mwa-fw-mark-frame);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.mwa-fw-mark-arc {
|
|
75
|
+
stroke: var(--mwa-fw-mark-arc);
|
|
76
|
+
stroke-linecap: round;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.mwa-fw-mark-bar {
|
|
80
|
+
--mwa-fw-mark-step: 0;
|
|
81
|
+
|
|
82
|
+
fill: var(--mwa-fw-mark-bar);
|
|
83
|
+
transform-box: fill-box;
|
|
84
|
+
transform-origin: left center;
|
|
85
|
+
transition: fill var(--mwa-fw-mark-fade) var(--mwa-fw-mark-ease);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mwa-fw-mark-bar:nth-child(2) {
|
|
89
|
+
--mwa-fw-mark-step: 1;
|
|
90
|
+
|
|
91
|
+
fill: var(--mwa-fw-mark-bar-lead);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.mwa-fw-mark-bar:nth-child(3) {
|
|
95
|
+
--mwa-fw-mark-step: 2;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
99
|
+
.mwa-fw-mark-waiting:not(:hover, :focus-visible) .mwa-fw-mark-bar {
|
|
100
|
+
transform: scaleX(0);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.mwa-fw-mark-in .mwa-fw-mark-bar {
|
|
104
|
+
animation: mwa-fw-mark-set calc(600ms * var(--mw-motion-scale, 1))
|
|
105
|
+
var(--mwa-fw-mark-ease)
|
|
106
|
+
calc(var(--mwa-fw-mark-step) * 90ms * var(--mw-motion-scale, 1)) backwards;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.mwa-fw-mark:is(:hover, :focus-visible) .mwa-fw-mark-bar {
|
|
110
|
+
animation-name: mwa-fw-mark-reset;
|
|
111
|
+
animation-duration: calc(600ms * var(--mw-motion-scale, 1));
|
|
112
|
+
animation-timing-function: var(--mwa-fw-mark-ease);
|
|
113
|
+
animation-delay: calc(
|
|
114
|
+
var(--mwa-fw-mark-step) * 90ms * var(--mw-motion-scale, 1)
|
|
115
|
+
);
|
|
116
|
+
animation-fill-mode: backwards;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Two names for one move: switching the name is what restarts it on hover. */
|
|
121
|
+
@keyframes mwa-fw-mark-set {
|
|
122
|
+
from {
|
|
123
|
+
transform: scaleX(0);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@keyframes mwa-fw-mark-reset {
|
|
128
|
+
from {
|
|
129
|
+
transform: scaleX(0);
|
|
130
|
+
}
|
|
131
|
+
}
|