maverick-wave-astro 1.15.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.
@@ -39,7 +39,8 @@ interface Props {
39
39
  links?: readonly { label: string; href: string }[];
40
40
  owner: string;
41
41
  ownerHref?: string;
42
- // "ein Format von" - without it the formatwerke mark is left out.
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.
43
44
  credit?: string;
44
45
  lastUpdated?: { label: string; date: string };
45
46
  // The dark bookend of the header bar, in both themes.
@@ -201,7 +202,7 @@ const frame = container
201
202
  }
202
203
  </div>
203
204
 
204
- {credit && <FormatwerkeMark label={credit} />}
205
+ <slot name="bar">{credit && <FormatwerkeMark label={credit} />}</slot>
205
206
 
206
207
  {
207
208
  legalLinks.length > 0 && (
@@ -7,19 +7,25 @@ import '../styles/formatwerke-mark.css';
7
7
  import { config } from '../dist/config.js';
8
8
 
9
9
  interface Props {
10
- // "ein Format von", followed by the name
10
+ // "ein Format von", followed by the name - empty for the name alone
11
11
  label?: string;
12
+ // "/" on formatwerke.de itself; only an outside address opens a new tab
13
+ href?: string;
12
14
  }
13
15
 
14
16
  const german = config.site.lang.startsWith('de');
15
- const { label = german ? 'ein Format von' : 'a format by' } = Astro.props;
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);
16
22
  ---
17
23
 
18
24
  <a
19
25
  class="mwa-fw-mark"
20
- href="https://formatwerke.de"
21
- target="_blank"
22
- rel="noopener noreferrer"
26
+ href={href}
27
+ target={external ? '_blank' : undefined}
28
+ rel={external ? 'noopener noreferrer' : undefined}
23
29
  >
24
30
  <svg
25
31
  class="mwa-fw-mark-signet"
@@ -55,7 +61,9 @@ const { label = german ? 'ein Format von' : 'a format by' } = Astro.props;
55
61
  ></path>
56
62
  </g>
57
63
  </svg>
58
- <span>{label} <span class="mwa-fw-mark-name">formatwerke</span></span>
64
+ <span>
65
+ {label && `${label} `}<span class="mwa-fw-mark-name">formatwerke</span>
66
+ </span>
59
67
  </a>
60
68
 
61
69
  <script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maverick-wave-astro",
3
- "version": "1.15.0",
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",