@internetarchive/ia-topnav 2.0.0 → 2.0.1-alpha-webdev8396.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/dist/src/data/menus.js.map +1 -1
- package/dist/src/dropdown-menu.d.ts +3 -4
- package/dist/src/dropdown-menu.js +6 -13
- package/dist/src/dropdown-menu.js.map +1 -1
- package/dist/src/ia-topnav.d.ts +3 -0
- package/dist/src/ia-topnav.js +79 -69
- package/dist/src/ia-topnav.js.map +1 -1
- package/dist/src/login-button.d.ts +3 -0
- package/dist/src/login-button.js +28 -18
- package/dist/src/login-button.js.map +1 -1
- package/dist/src/models.js.map +1 -1
- package/dist/src/primary-nav.d.ts +4 -0
- package/dist/src/primary-nav.js +109 -90
- package/dist/src/primary-nav.js.map +1 -1
- package/dist/src/signed-out-dropdown.d.ts +1 -1
- package/dist/src/signed-out-dropdown.js +1 -2
- package/dist/src/signed-out-dropdown.js.map +1 -1
- package/dist/src/styles/dropdown-menu.js +1 -0
- package/dist/src/styles/dropdown-menu.js.map +1 -1
- package/dist/src/styles/ia-topnav.js +82 -82
- package/dist/src/styles/ia-topnav.js.map +1 -1
- package/dist/src/styles/primary-nav.js +353 -353
- package/dist/src/styles/primary-nav.js.map +1 -1
- package/dist/src/user-menu.d.ts +1 -2
- package/dist/src/user-menu.js +1 -2
- package/dist/src/user-menu.js.map +1 -1
- package/dist/test/ia-topnav.test.js +9 -9
- package/dist/test/ia-topnav.test.js.map +1 -1
- package/dist/test/primary-nav.test.js +7 -7
- package/dist/test/primary-nav.test.js.map +1 -1
- package/package.json +1 -1
- package/src/data/menus.ts +650 -650
- package/src/dropdown-menu.ts +6 -12
- package/src/ia-topnav.ts +332 -318
- package/src/login-button.ts +89 -78
- package/src/models.ts +58 -58
- package/src/primary-nav.ts +300 -277
- package/src/signed-out-dropdown.ts +1 -2
- package/src/styles/dropdown-menu.ts +1 -0
- package/src/styles/ia-topnav.ts +85 -85
- package/src/styles/primary-nav.ts +356 -356
- package/src/user-menu.ts +3 -4
- package/test/ia-topnav.test.ts +282 -282
- package/test/primary-nav.test.ts +135 -135
- package/dist/src/styles/signed-out-dropdown.d.ts +0 -2
- package/dist/src/styles/signed-out-dropdown.js +0 -31
- package/dist/src/styles/signed-out-dropdown.js.map +0 -1
- package/dist/src/styles/user-menu.d.ts +0 -2
- package/dist/src/styles/user-menu.js +0 -31
- package/dist/src/styles/user-menu.js.map +0 -1
- package/src/styles/signed-out-dropdown.ts +0 -31
- package/src/styles/user-menu.ts +0 -31
package/src/primary-nav.ts
CHANGED
|
@@ -1,277 +1,300 @@
|
|
|
1
|
-
import { html, nothing, PropertyValues } from 'lit';
|
|
2
|
-
import TrackedElement from './tracked-element';
|
|
3
|
-
import icons from './assets/img/icons';
|
|
4
|
-
import './assets/img/hamburger';
|
|
5
|
-
import './login-button';
|
|
6
|
-
import './
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@property({ type: String })
|
|
18
|
-
@property({ type:
|
|
19
|
-
@property({ type:
|
|
20
|
-
@property({ type:
|
|
21
|
-
@property({ type: String })
|
|
22
|
-
@property({ type: String })
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@property({ type:
|
|
26
|
-
@property({ type: Boolean })
|
|
27
|
-
@property({ type: Boolean })
|
|
28
|
-
@property({ type:
|
|
29
|
-
@property({ type: String })
|
|
30
|
-
@property({ type:
|
|
31
|
-
|
|
32
|
-
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
this.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
this.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
this.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
return
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
get
|
|
193
|
-
return
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
<
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}
|
|
1
|
+
import { html, nothing, PropertyValues } from 'lit';
|
|
2
|
+
import TrackedElement from './tracked-element';
|
|
3
|
+
import icons from './assets/img/icons';
|
|
4
|
+
import './assets/img/hamburger';
|
|
5
|
+
import './login-button';
|
|
6
|
+
import type { LoginButton } from './login-button';
|
|
7
|
+
import './media-menu';
|
|
8
|
+
import logoWordmarkStacked from './assets/img/wordmark-stacked';
|
|
9
|
+
import primaryNavCSS from './styles/primary-nav';
|
|
10
|
+
import formatUrl from './lib/format-url';
|
|
11
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
12
|
+
import { IATopNavConfig, IATopNavSecondIdentitySlotMode } from './models';
|
|
13
|
+
import { defaultTopNavConfig } from './data/menus';
|
|
14
|
+
|
|
15
|
+
@customElement('primary-nav')
|
|
16
|
+
export class PrimaryNav extends TrackedElement {
|
|
17
|
+
@property({ type: String }) mediaBaseHost = 'https://archive.org';
|
|
18
|
+
@property({ type: String }) baseHost = '';
|
|
19
|
+
@property({ type: Boolean }) hideSearch = false;
|
|
20
|
+
@property({ type: Object }) config: IATopNavConfig = defaultTopNavConfig;
|
|
21
|
+
@property({ type: String }) openMenu = '';
|
|
22
|
+
@property({ type: String }) screenName = '';
|
|
23
|
+
@property({ type: String })
|
|
24
|
+
secondIdentitySlotMode: IATopNavSecondIdentitySlotMode = '';
|
|
25
|
+
@property({ type: String }) selectedMenuOption = '';
|
|
26
|
+
@property({ type: Boolean }) signedOutMenuOpen = false;
|
|
27
|
+
@property({ type: Boolean }) userMenuOpen = false;
|
|
28
|
+
@property({ type: Boolean }) mediaMenuAnimate = false;
|
|
29
|
+
@property({ type: String }) username = '';
|
|
30
|
+
@property({ type: String }) userProfileImagePath = '';
|
|
31
|
+
@property({ type: Object }) currentTab:
|
|
32
|
+
| { mediatype: string; moveTo: string }
|
|
33
|
+
| undefined;
|
|
34
|
+
signedOutMenuToggled: unknown;
|
|
35
|
+
|
|
36
|
+
@query('button.user-menu') private userMenuButton?: HTMLButtonElement;
|
|
37
|
+
@query('login-button') private loginButton?: HTMLElement;
|
|
38
|
+
|
|
39
|
+
static get styles() {
|
|
40
|
+
return primaryNavCSS;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Distance (px) from this element's right edge to the right edge of the account dropdown toggle. */
|
|
44
|
+
getAccountDropdownOffset(): number {
|
|
45
|
+
const hostRect = this.getBoundingClientRect();
|
|
46
|
+
|
|
47
|
+
if (this.userMenuButton) {
|
|
48
|
+
return hostRect.right - this.userMenuButton.getBoundingClientRect().right;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (this.loginButton) {
|
|
52
|
+
const loginRect = this.loginButton.getBoundingClientRect();
|
|
53
|
+
const innerOffset = (
|
|
54
|
+
this.loginButton as LoginButton
|
|
55
|
+
).getDropdownToggleOffset();
|
|
56
|
+
return hostRect.right - loginRect.right + innerOffset;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
toggleMediaMenu(e: Event) {
|
|
63
|
+
this.trackClick(e);
|
|
64
|
+
this.dispatchEvent(
|
|
65
|
+
new CustomEvent('menuToggled', {
|
|
66
|
+
detail: {
|
|
67
|
+
menuName: 'media',
|
|
68
|
+
},
|
|
69
|
+
}),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
toggleSearchMenu(e: Event) {
|
|
74
|
+
this.trackClick(e);
|
|
75
|
+
this.dispatchEvent(
|
|
76
|
+
new CustomEvent('menuToggled', {
|
|
77
|
+
detail: {
|
|
78
|
+
menuName: 'search',
|
|
79
|
+
},
|
|
80
|
+
}),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
toggleUserMenu(e: Event) {
|
|
85
|
+
this.trackClick(e);
|
|
86
|
+
this.dispatchEvent(
|
|
87
|
+
new CustomEvent('menuToggled', {
|
|
88
|
+
detail: {
|
|
89
|
+
menuName: 'user',
|
|
90
|
+
},
|
|
91
|
+
}),
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
updated(props: PropertyValues) {
|
|
96
|
+
if (props.has('currentTab')) {
|
|
97
|
+
// early return
|
|
98
|
+
if (!this.currentTab || Object.keys(this.currentTab).length === 0)
|
|
99
|
+
return nothing;
|
|
100
|
+
|
|
101
|
+
const isUserMenuTab =
|
|
102
|
+
this.currentTab && this.currentTab.mediatype === 'usermenu';
|
|
103
|
+
if (isUserMenuTab) {
|
|
104
|
+
const mediaButtons = Array.from(
|
|
105
|
+
this.shadowRoot
|
|
106
|
+
?.querySelector('media-menu')
|
|
107
|
+
?.shadowRoot?.querySelectorAll('media-button') ?? [],
|
|
108
|
+
);
|
|
109
|
+
const lastMediaButton = mediaButtons.filter((element) => {
|
|
110
|
+
return element.shadowRoot
|
|
111
|
+
?.querySelector('a')
|
|
112
|
+
?.classList.contains('images');
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
let nextElement;
|
|
116
|
+
if (this.username) {
|
|
117
|
+
nextElement = this.shadowRoot?.querySelector('a.upload');
|
|
118
|
+
} else {
|
|
119
|
+
nextElement = this.shadowRoot
|
|
120
|
+
?.querySelector('login-button')
|
|
121
|
+
?.shadowRoot?.querySelector('span a');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const menuItemElement =
|
|
125
|
+
lastMediaButton[0]?.shadowRoot?.querySelector('a.menu-item');
|
|
126
|
+
|
|
127
|
+
const focusElement =
|
|
128
|
+
this.currentTab.moveTo === 'next' ? nextElement : menuItemElement;
|
|
129
|
+
|
|
130
|
+
if (focusElement) {
|
|
131
|
+
(focusElement as HTMLElement).focus();
|
|
132
|
+
}
|
|
133
|
+
} else if (this.currentTab.moveTo === 'next') {
|
|
134
|
+
if (this.shadowRoot?.querySelector('.user-menu')) {
|
|
135
|
+
(this.shadowRoot?.querySelector('.user-menu') as HTMLElement).focus();
|
|
136
|
+
} else {
|
|
137
|
+
(
|
|
138
|
+
this.shadowRoot
|
|
139
|
+
?.querySelector('login-button')
|
|
140
|
+
?.shadowRoot?.querySelectorAll('span a')[0] as HTMLElement
|
|
141
|
+
)?.focus();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
get userIcon() {
|
|
148
|
+
const userMenuClass = this.openMenu === 'user' ? 'active' : '';
|
|
149
|
+
const userMenuToolTip =
|
|
150
|
+
this.openMenu === 'user' ? 'Close user menu' : 'Expand user menu';
|
|
151
|
+
|
|
152
|
+
return html`
|
|
153
|
+
<button
|
|
154
|
+
class="user-menu ${userMenuClass}"
|
|
155
|
+
title="${userMenuToolTip}"
|
|
156
|
+
@click="${this.toggleUserMenu}"
|
|
157
|
+
data-event-click-tracking="${this.config?.eventCategory}|NavUserMenu"
|
|
158
|
+
>
|
|
159
|
+
<img
|
|
160
|
+
src="${this.mediaBaseHost}${this.userProfileImagePath}"
|
|
161
|
+
alt="Profile picture for ${this.screenName}"
|
|
162
|
+
/>
|
|
163
|
+
<span class="screen-name" dir="auto">${this.screenName}</span>
|
|
164
|
+
</button>
|
|
165
|
+
`;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
get loginIcon() {
|
|
169
|
+
return html`
|
|
170
|
+
<login-button
|
|
171
|
+
.baseHost=${this.baseHost}
|
|
172
|
+
.config=${this.config}
|
|
173
|
+
.dropdownOpen=${this.signedOutMenuOpen}
|
|
174
|
+
.openMenu=${this.openMenu}
|
|
175
|
+
@signedOutMenuToggled=${this.signedOutMenuToggled}
|
|
176
|
+
></login-button>
|
|
177
|
+
`;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
get searchMenuOpen() {
|
|
181
|
+
return this.openMenu === 'search';
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
get allowSecondaryIcon() {
|
|
185
|
+
return this.secondIdentitySlotMode === 'allow';
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The search slot container, rendered between media-menu and
|
|
190
|
+
* right-side-section so it sits left of the Upload button on desktop.
|
|
191
|
+
*/
|
|
192
|
+
get searchSlotContainer() {
|
|
193
|
+
if (this.hideSearch) return nothing;
|
|
194
|
+
return html`
|
|
195
|
+
<div class="search-container ${this.searchMenuOpen ? 'open' : ''}">
|
|
196
|
+
<slot name="search"></slot>
|
|
197
|
+
</div>
|
|
198
|
+
`;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
get searchMenu() {
|
|
202
|
+
if (this.hideSearch) return nothing;
|
|
203
|
+
|
|
204
|
+
return html`
|
|
205
|
+
<button
|
|
206
|
+
class="search-trigger"
|
|
207
|
+
@click="${this.toggleSearchMenu}"
|
|
208
|
+
data-event-click-tracking="${this.config?.eventCategory}|NavSearchOpen"
|
|
209
|
+
>
|
|
210
|
+
${icons.search}
|
|
211
|
+
</button>
|
|
212
|
+
`;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
get mobileDonateHeart() {
|
|
216
|
+
return html`
|
|
217
|
+
<a
|
|
218
|
+
class="mobile-donate-link"
|
|
219
|
+
.href=${formatUrl(
|
|
220
|
+
'/donate/?origin=iawww-mbhrt' as string & Location,
|
|
221
|
+
this.baseHost,
|
|
222
|
+
)}
|
|
223
|
+
>
|
|
224
|
+
${icons.donateUnpadded}
|
|
225
|
+
<span class="sr-only">"Donate to the archive"</span>
|
|
226
|
+
</a>
|
|
227
|
+
`;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
get uploadButtonTemplate() {
|
|
231
|
+
return html` <a
|
|
232
|
+
.href="${formatUrl('/upload' as string & Location, this.baseHost)}"
|
|
233
|
+
class="upload"
|
|
234
|
+
@focus=${this.toggleMediaMenu}
|
|
235
|
+
>
|
|
236
|
+
${icons.upload}
|
|
237
|
+
<span>Upload</span>
|
|
238
|
+
</a>`;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
get userStateTemplate() {
|
|
242
|
+
return html`<div class="user-info">
|
|
243
|
+
${this.username ? this.userIcon : this.loginIcon}
|
|
244
|
+
</div>`;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
get secondLogoSlot() {
|
|
248
|
+
return this.allowSecondaryIcon
|
|
249
|
+
? html`
|
|
250
|
+
<slot name="opt-sec-logo"></slot>
|
|
251
|
+
<slot name="opt-sec-logo-mobile"></slot>
|
|
252
|
+
`
|
|
253
|
+
: nothing;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
get secondLogoClass() {
|
|
257
|
+
return this.allowSecondaryIcon ? 'second-logo' : '';
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
render() {
|
|
261
|
+
// const mediaMenuTabIndex = this.openMenu === 'media' ? '' : '-1';
|
|
262
|
+
return html`
|
|
263
|
+
<nav class=${this.hideSearch ? 'hide-search' : ''}>
|
|
264
|
+
<button
|
|
265
|
+
class="hamburger"
|
|
266
|
+
@click="${this.toggleMediaMenu}"
|
|
267
|
+
data-event-click-tracking="${this.config?.eventCategory}|NavHamburger"
|
|
268
|
+
title="Open main menu"
|
|
269
|
+
>
|
|
270
|
+
<icon-hamburger ?active=${this.openMenu === 'media'}></icon-hamburger>
|
|
271
|
+
</button>
|
|
272
|
+
|
|
273
|
+
<div class=${`branding ${this.secondLogoClass}`}>
|
|
274
|
+
<a
|
|
275
|
+
.href=${formatUrl('/' as string & Location, this.baseHost)}
|
|
276
|
+
@click=${this.trackClick}
|
|
277
|
+
data-event-click-tracking="${this.config?.eventCategory}|NavHome"
|
|
278
|
+
title="Go home"
|
|
279
|
+
class="link-home"
|
|
280
|
+
>${icons.iaLogo}${logoWordmarkStacked}</a
|
|
281
|
+
>
|
|
282
|
+
${this.secondLogoSlot}
|
|
283
|
+
</div>
|
|
284
|
+
<media-menu
|
|
285
|
+
.baseHost=${this.baseHost}
|
|
286
|
+
.config=${this.config}
|
|
287
|
+
?mediaMenuAnimate=${this.mediaMenuAnimate}
|
|
288
|
+
.selectedMenuOption=${this.selectedMenuOption}
|
|
289
|
+
.openMenu=${this.openMenu}
|
|
290
|
+
.currentTab=${this.currentTab}
|
|
291
|
+
></media-menu>
|
|
292
|
+
${this.searchSlotContainer}
|
|
293
|
+
<div class="right-side-section">
|
|
294
|
+
${this.mobileDonateHeart} ${this.userStateTemplate}
|
|
295
|
+
${this.uploadButtonTemplate} ${this.searchMenu}
|
|
296
|
+
</div>
|
|
297
|
+
</nav>
|
|
298
|
+
`;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { customElement } from 'lit/decorators.js';
|
|
2
2
|
import DropdownMenu from './dropdown-menu';
|
|
3
3
|
import dropdownMenuCSS from './styles/dropdown-menu';
|
|
4
|
-
import signedOutDropdownStyles from './styles/signed-out-dropdown';
|
|
5
4
|
|
|
6
5
|
@customElement('signed-out-dropdown')
|
|
7
6
|
export class SignedOutDropdown extends DropdownMenu {
|
|
8
7
|
static get styles() {
|
|
9
|
-
return
|
|
8
|
+
return dropdownMenuCSS;
|
|
10
9
|
}
|
|
11
10
|
}
|