@codecavepro/brand 2.5.1 → 2.5.3
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.
|
@@ -3,52 +3,26 @@ import { computed } from 'vue';
|
|
|
3
3
|
import { type MenuItem } from '../lib/menus/menuTypes';
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
6
|
-
|
|
7
|
-
section?: string;
|
|
8
|
-
/** The SUB item name to mark current, if any. */
|
|
9
|
-
current?: string;
|
|
10
|
-
/** '../' repeated once per directory level below the docs root. */
|
|
11
|
-
up: string;
|
|
12
|
-
items: Record<string, MenuItem[]>;
|
|
13
|
-
|
|
6
|
+
items: MenuItem[];
|
|
14
7
|
}
|
|
15
|
-
|
|
16
8
|
const props = defineProps<Props>();
|
|
17
|
-
|
|
18
|
-
const subNavBarItems = computed<MenuItem[]>(() => {
|
|
19
|
-
return (props.section && props.items[props.section]) || [];
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
/* An unknown `current` is a typo that would otherwise render a bar with
|
|
23
|
-
nothing marked, which looks exactly like a page that is legitimately not
|
|
24
|
-
in the bar, so fail early instead. */
|
|
25
|
-
if (
|
|
26
|
-
props.current &&
|
|
27
|
-
!subNavBarItems.value.some((item) => item.name === props.current)
|
|
28
|
-
) {
|
|
29
|
-
throw new Error(
|
|
30
|
-
`SubNav: no item named "${props.current}" in SUB["${props.section}"].\n` +
|
|
31
|
-
`Available: ${subNavBarItems.value.map((item) => item.name).join(', ') || '(none)'}`
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
9
|
</script>
|
|
35
10
|
|
|
36
11
|
<template>
|
|
37
12
|
<nav
|
|
38
|
-
v-if="
|
|
13
|
+
v-if="items.length > 0"
|
|
39
14
|
class="ds-subnav"
|
|
40
15
|
aria-label="Section"
|
|
41
16
|
>
|
|
42
17
|
<div class="page-container ds-subnav-inner">
|
|
43
18
|
<ul>
|
|
44
19
|
<li
|
|
45
|
-
v-for="item in
|
|
20
|
+
v-for="item in items"
|
|
46
21
|
:key="item.name"
|
|
47
22
|
>
|
|
48
23
|
<a
|
|
49
24
|
class="btn btn-ghost"
|
|
50
|
-
:href="`${
|
|
51
|
-
:aria-current="item.name === current ? 'true' : undefined"
|
|
25
|
+
:href="`${item.href}`"
|
|
52
26
|
>
|
|
53
27
|
{{ item.label }}
|
|
54
28
|
</a>
|
|
@@ -71,7 +71,7 @@ const carouselLocker = carouselGestureLocker()
|
|
|
71
71
|
${hideSelected ? 'pt-8' : 'flex flex-col pt-4 md:pt-14 pb-20 xl:pb-0 swipe-over'}`">
|
|
72
72
|
<div v-if="!hideSelected" class="flex flex-col items-center text-center">
|
|
73
73
|
<div class="space-y-3">
|
|
74
|
-
<div class="flex justify-center gap-6
|
|
74
|
+
<div class="flex justify-center gap-6 text-xl">
|
|
75
75
|
<div class="space-x-1">
|
|
76
76
|
<span class="font-bold text-body-primary">15+</span>
|
|
77
77
|
<span class="text-body-secondary">Years of experience</span>
|
package/package.json
CHANGED