File tree 3 files changed +52
-3
lines changed
packages/frontendmu-nuxt/components 3 files changed +52
-3
lines changed Original file line number Diff line number Diff line change
1
+ <template >
2
+ <svg
3
+ version =" 1.0" xmlns =" http://www.w3.org/2000/svg"
4
+ class:list =" {[props.class]}"
5
+ viewBox =" 0 0 989.000000 1024.000000"
6
+ preserveAspectRatio =" xMidYMid meet"
7
+ fill =" currentColor"
8
+ >
9
+
10
+ <g
11
+ transform =" translate(0.000000,1024.000000) scale(0.100000,-0.100000)"
12
+ fill =" currentColor"
13
+ >
14
+ <path
15
+ d =" M2826 9489 c-300 -41 -562 -284 -636 -589 -18 -75 -20 -118 -20 -372
16
+ l0 -288 -347 0 c-394 0 -439 -6 -556 -67 -126 -66 -249 -210 -298 -349 -11
17
+ -30 -24 -90 -30 -132 -6 -51 -9 -1158 -7 -3252 l3 -3175 22 -65 c65 -188 213
18
+ -342 400 -413 l58 -22 3503 -3 c3863 -2 3563 -7 3698 59 132 65 258 216 311
19
+ 372 l28 82 3 3185 c2 3485 6 3282 -56 3413 -62 132 -167 239 -299 306 -112 56
20
+ -152 61 -535 61 l-348 0 0 288 c0 308 -7 367 -53 482 -81 198 -256 367 -458
21
+ 441 -112 41 -233 53 -483 46 -242 -6 -284 -14 -423 -82 -151 -74 -292 -221
22
+ -363 -379 -59 -129 -63 -156 -67 -488 l-5 -308 -924 0 -924 0 0 273 c-1 362
23
+ -20 463 -120 620 -60 96 -199 224 -298 275 -139 73 -201 84 -472 88 -129 1
24
+ -266 -2 -304 -7z m511 -655 c15 -11 36 -36 45 -55 17 -31 18 -89 18 -779 0
25
+ -703 -1 -747 -18 -779 -35 -65 -61 -71 -292 -71 -186 0 -208 2 -237 20 -71 43
26
+ -68 5 -71 799 -2 483 1 731 8 766 11 55 43 95 90 114 15 6 107 9 227 8 186 -2
27
+ 204 -4 230 -23z m3670 15 c49 -18 81 -58 93 -114 7 -35 10 -283 8 -766 -3
28
+ -697 -3 -715 -23 -749 -38 -65 -63 -71 -300 -68 -192 3 -212 5 -237 23 -60 45
29
+ -58 16 -58 826 0 787 0 779 48 822 11 10 33 22 48 27 42 12 387 12 421 -1z
30
+ m1333 -4979 l0 -2500 -3395 0 -3395 0 0 2500 0 2500 3395 0 3395 0 0 -2500z"
31
+ />
32
+ </g >
33
+ </svg >
34
+ </template >
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ const links: TMenu = {
99
99
advent: {
100
100
title: ' Advent Calendar' ,
101
101
href: ' https://advent.frontend.mu' ,
102
- class: ' hidden md:block ' ,
102
+
103
103
},
104
104
}
105
105
@@ -195,7 +195,7 @@ onMounted(toggleHeader)
195
195
</div >
196
196
<nav >
197
197
<ul
198
- class =" nav-links text-sm md:text-sm lg:text-base flex md:gap-4 font-medium font-heading"
198
+ class =" nav-links text-sm md:text-sm lg:text-base flex md:gap-4 gap-2 font-medium font-heading"
199
199
>
200
200
<template v-for =" item of Object .keys (links )" :key =" item " >
201
201
<SiteMenuItem :links =" links" :item =" item" />
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ const { links, item } = defineProps<Props>()
3
3
4
4
const currentPath = computed (() => useRoute ().path )
5
5
6
+ const today = new Date ().getDate ()
7
+
6
8
interface TMenuItem {
7
9
title: string
8
10
href: string
@@ -30,7 +32,7 @@ interface Props {
30
32
:aria-haspopup =" links[item].title === 'About' ? 'true' : undefined"
31
33
>
32
34
<NuxtLink
33
- :class =" [links[item].title === 'Advent Calendar' && 'text-red-600 dark:text-green-500']"
35
+ :class =" [links[item].title === 'Advent Calendar' && 'hidden md:flex text-red-600 dark:text-green-500']"
34
36
class =" flex items-center" :href =" links[item].href"
35
37
:target =" !!links[item].href.includes(" ; https" ; ) ? " ; _blank" ; : " ; _self" ; "
36
38
>
@@ -40,8 +42,21 @@ interface Props {
40
42
/>
41
43
42
44
<span class =" relative z-20 p-2" >{{ links[item].title }}</span >
45
+
43
46
<Icon v-if =" !!links[item].href.includes(" ; https" ; )" name =" carbon:launch" height =" 1em" />
44
47
</NuxtLink >
48
+
49
+ <NuxtLink
50
+ v-if =" links[item].title === 'Advent Calendar'" class =" md:hidden text-green-600 relative flex justify-center items-center animate-bounce"
51
+ :href =" links[item].href"
52
+
53
+ :target =" !!links[item].href.includes(" ; https" ; ) ? " ; _blank" ; : " ; _self" ; "
54
+ >
55
+ <IconCalendar class =" w-8 h-8" />
56
+ <div class =" text-xs text-red-600 dark:text-red-100 absolute top-1/3 " >
57
+ {{ today }}
58
+ </div >
59
+ </NuxtLink >
45
60
<div v-if =" links[item].children" class =" menu-dropdown px-2 pb-2 bg-white rounded-md text-black" >
46
61
<div class =" menu-dropdown-item theme-dark" >
47
62
<ul class =" flex flex-col gap-2" >
You can’t perform that action at this time.
0 commit comments