@@ -25,10 +25,27 @@ const { activeSlug } = Astro.props;
25
25
class :list = { [
26
26
{
27
27
active: activeSlug === item .url ,
28
+ external: item .external ,
28
29
},
29
30
]}
30
31
>
31
32
<span >{ item .display } </span >
33
+ { item .external && (
34
+ <svg
35
+ xmlns = " http://www.w3.org/2000/svg"
36
+ width = " 9"
37
+ height = " 9"
38
+ viewBox = " 0 0 12 13"
39
+ fill = " none"
40
+ >
41
+ <path
42
+ fill-rule = " evenodd"
43
+ clip-rule = " evenodd"
44
+ d = " M0 0.5H4V1.83333H1.33333V11.1667H10.6667V8.5H12V12.5H0V0.5ZM9.72386 1.83333H7.77778V0.5H12V4.72222H10.6667V2.77614L6.4714 6.9714L5.5286 6.0286L9.72386 1.83333Z"
45
+ style = { { fill: " var(--text-body-primary)" }}
46
+ />
47
+ </svg >
48
+ )}
32
49
</a >
33
50
</li >
34
51
))
@@ -78,10 +95,27 @@ const { activeSlug } = Astro.props;
78
95
class :list = { [
79
96
{
80
97
active: activeSlug === item .url ,
98
+ external: item .external ,
81
99
},
82
100
]}
83
101
>
84
102
<span >{ item .display } </span >
103
+ { item .external && (
104
+ <svg
105
+ xmlns = " http://www.w3.org/2000/svg"
106
+ width = " 9"
107
+ height = " 9"
108
+ viewBox = " 0 0 12 13"
109
+ fill = " none"
110
+ >
111
+ <path
112
+ fill-rule = " evenodd"
113
+ clip-rule = " evenodd"
114
+ d = " M0 0.5H4V1.83333H1.33333V11.1667H10.6667V8.5H12V12.5H0V0.5ZM9.72386 1.83333H7.77778V0.5H12V4.72222H10.6667V2.77614L6.4714 6.9714L5.5286 6.0286L9.72386 1.83333Z"
115
+ style = { { fill: " var(--text-body-primary)" }}
116
+ />
117
+ </svg >
118
+ )}
85
119
</a >
86
120
</li >
87
121
))
@@ -149,11 +183,23 @@ const { activeSlug } = Astro.props;
149
183
font-size: 18px;
150
184
border-left: 1px solid transparent;
151
185
box-sizing: border-box;
152
- padding: 5px 20px ;
186
+ padding: 5px 10px ;
153
187
154
188
&.active {
155
189
border-left-color: var(--text-body-primary);
156
190
}
191
+
192
+ &.external {
193
+ display: flex;
194
+ flex-flow: row;
195
+ align-items: center;
196
+ justify-content: flex-start;
197
+ column-gap: 5px;
198
+
199
+ svg {
200
+ user-select: none;
201
+ }
202
+ }
157
203
}
158
204
}
159
205
}
@@ -203,7 +249,7 @@ const { activeSlug } = Astro.props;
203
249
#desktop-nav {
204
250
// vars
205
251
--main-padding: 12px 32px;
206
- --items-gap: 0px ;
252
+ --items-gap: 10px ;
207
253
display: none;
208
254
background-color: var(--surface-frame-bg);
209
255
z-index: 4;
@@ -226,7 +272,7 @@ const { activeSlug } = Astro.props;
226
272
227
273
@include break-up(xl) {
228
274
--main-padding: 12px 64px;
229
- // --items-gap: 32px;
275
+ --items-gap: 32px;
230
276
}
231
277
232
278
.nav-logo {
@@ -257,7 +303,7 @@ const { activeSlug } = Astro.props;
257
303
align-items: center;
258
304
justify-content: center;
259
305
text-decoration: none;
260
- padding: 5px 20px ;
306
+ padding: 5px 10px ;
261
307
height: 31px;
262
308
border-top: 1px solid transparent;
263
309
border-bottom: 1px solid transparent;
@@ -276,6 +322,18 @@ const { activeSlug } = Astro.props;
276
322
&.active {
277
323
border-top-color: var(--text-body-primary);
278
324
}
325
+
326
+ &.external {
327
+ display: flex;
328
+ flex-flow: row;
329
+ align-items: center;
330
+ justify-content: center;
331
+ column-gap: 5px;
332
+
333
+ svg {
334
+ user-select: none;
335
+ }
336
+ }
279
337
}
280
338
}
281
339
}
0 commit comments