@internetarchive/ia-topnav 1.2.2-alpha3 → 1.2.2-alpha4
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/package.json +1 -1
- package/src/assets/img/hamburger.js +2 -0
- package/src/assets/img/icon-hamburger.js +17 -0
- package/src/assets/img/icons.js +2 -2
- package/src/data/menus.js +0 -1
- package/src/dropdown-menu.js +0 -3
- package/src/primary-nav.js +23 -14
- package/src/styles/base.js +1 -1
- package/src/styles/desktop-subnav.js +3 -3
- package/src/styles/dropdown-menu.js +0 -14
- package/src/styles/login-button.js +5 -7
- package/src/styles/media-button.js +7 -5
- package/src/styles/media-menu.js +2 -2
- package/src/styles/nav-search.js +9 -7
- package/src/styles/primary-nav.js +57 -63
- package/src/styles/user-menu.js +2 -2
- package/test/ia-topnav.test.js +1 -1
- package/test/primary-nav.test.js +1 -1
- package/src/assets/img/icon-upload-unpadded.js +0 -15
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { html } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
|
+
|
|
3
|
+
export default html`
|
|
4
|
+
<svg
|
|
5
|
+
viewBox="0 0 40 40"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
aria-labelledby="hamburgerTitleID hamburgerDescID"
|
|
8
|
+
>
|
|
9
|
+
<title id="hamburgerTitleID">Hamburger icon</title>
|
|
10
|
+
<desc id="hamburgerDescID">
|
|
11
|
+
An icon used to represent a menu that can be toggled by interacting with this icon.
|
|
12
|
+
</desc>
|
|
13
|
+
<path d="m30.5 26.5c.8284271 0 1.5.6715729 1.5 1.5s-.6715729 1.5-1.5 1.5h-21c-.82842712 0-1.5-.6715729-1.5-1.5s.67157288-1.5 1.5-1.5zm0-8c.8284271 0 1.5.6715729 1.5 1.5s-.6715729 1.5-1.5 1.5h-21c-.82842712 0-1.5-.6715729-1.5-1.5s.67157288-1.5 1.5-1.5zm0-8c.8284271 0 1.5.6715729 1.5 1.5s-.6715729 1.5-1.5 1.5h-21c-.82842712 0-1.5-.6715729-1.5-1.5s.67157288-1.5 1.5-1.5z" fill="#999" fill-rule="evenodd"/>
|
|
14
|
+
</svg>
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
|
package/src/assets/img/icons.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import audio from './icon-audio.js';
|
|
2
2
|
import close from './icon-close.js';
|
|
3
|
+
import hamburger from './icon-hamburger.js';
|
|
3
4
|
import donate from './icon-donate.js';
|
|
4
5
|
import ellipses from './icon-ellipses.js';
|
|
5
6
|
import iaLogo from './icon-ia-logo.js';
|
|
@@ -8,7 +9,6 @@ import search from './icon-search.js';
|
|
|
8
9
|
import software from './icon-software.js';
|
|
9
10
|
import texts from './icon-texts.js';
|
|
10
11
|
import upload from './icon-upload.js';
|
|
11
|
-
import uploadUnpadded from './icon-upload-unpadded.js';
|
|
12
12
|
import user from './icon-user.js';
|
|
13
13
|
import video from './icon-video.js';
|
|
14
14
|
import web from './icon-web.js';
|
|
@@ -16,6 +16,7 @@ import web from './icon-web.js';
|
|
|
16
16
|
export default {
|
|
17
17
|
audio,
|
|
18
18
|
close,
|
|
19
|
+
hamburger,
|
|
19
20
|
donate,
|
|
20
21
|
ellipses,
|
|
21
22
|
iaLogo,
|
|
@@ -24,7 +25,6 @@ export default {
|
|
|
24
25
|
software,
|
|
25
26
|
texts,
|
|
26
27
|
upload,
|
|
27
|
-
uploadUnpadded,
|
|
28
28
|
user,
|
|
29
29
|
video,
|
|
30
30
|
web,
|
package/src/data/menus.js
CHANGED
package/src/dropdown-menu.js
CHANGED
|
@@ -2,7 +2,6 @@ import { html, nothing } from 'https://offshoot.prod.archive.org/lit.js';
|
|
|
2
2
|
import TrackedElement from './tracked-element.js';
|
|
3
3
|
import dropdownMenuCSS from './styles/dropdown-menu.js';
|
|
4
4
|
import formatUrl from './lib/formatUrl.js';
|
|
5
|
-
import icons from './assets/img/icons.js';
|
|
6
5
|
|
|
7
6
|
class DropdownMenu extends TrackedElement {
|
|
8
7
|
static get styles() {
|
|
@@ -56,11 +55,9 @@ class DropdownMenu extends TrackedElement {
|
|
|
56
55
|
const calloutText = this.config.callouts?.[link.title];
|
|
57
56
|
return html`<a
|
|
58
57
|
href="${formatUrl(link.url, this.baseHost)}"
|
|
59
|
-
class="${link.class}"
|
|
60
58
|
@click=${this.trackClick}
|
|
61
59
|
data-event-click-tracking="${this.config.eventCategory}|Nav${link.analyticsEvent}"
|
|
62
60
|
aria-label=${calloutText ? `New feature: ${link.title}` : nothing}>
|
|
63
|
-
${link.class === 'mobile-upload' ? icons.uploadUnpadded : nothing}
|
|
64
61
|
${link.title}
|
|
65
62
|
${calloutText ? html`<span class="callout" aria-hidden="true">${calloutText}</span>` : nothing}
|
|
66
63
|
</a>`;
|
package/src/primary-nav.js
CHANGED
|
@@ -124,7 +124,7 @@ class PrimaryNav extends TrackedElement {
|
|
|
124
124
|
|
|
125
125
|
return html`
|
|
126
126
|
<button
|
|
127
|
-
class="search-trigger"
|
|
127
|
+
class="mobile-search-trigger right-side-item"
|
|
128
128
|
@click="${this.toggleSearchMenu}"
|
|
129
129
|
data-event-click-tracking="${this.config.eventCategory}|NavSearchOpen"
|
|
130
130
|
>
|
|
@@ -144,15 +144,26 @@ class PrimaryNav extends TrackedElement {
|
|
|
144
144
|
|
|
145
145
|
get mobileDonateHeart() {
|
|
146
146
|
return html`
|
|
147
|
-
<a class="mobile-donate-link" href=${formatUrl('/donate/?origin=iawww-mbhrt', this.baseHost)}>
|
|
148
|
-
<span class="icon">
|
|
147
|
+
<a class="mobile-donate-link right-side-item" href=${formatUrl('/donate/?origin=iawww-mbhrt', this.baseHost)}>
|
|
149
148
|
${icons.donate}
|
|
150
|
-
|
|
151
|
-
<span class="label">"Donate to the archive"</span>
|
|
149
|
+
<span class="sr-only">"Donate to the archive"</span>
|
|
152
150
|
</a>
|
|
153
151
|
`;
|
|
154
152
|
}
|
|
155
153
|
|
|
154
|
+
get uploadButtonTemplate() {
|
|
155
|
+
return html`<a href="${formatUrl('/create', this.baseHost)}" class="upload right-side-item">
|
|
156
|
+
${icons.upload}
|
|
157
|
+
<span>Upload</span>
|
|
158
|
+
</a>`;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
get userStateTemplate() {
|
|
162
|
+
return html`<div class="user-info right-side-item">
|
|
163
|
+
${this.username ? this.userIcon : this.loginIcon}
|
|
164
|
+
</div>`;
|
|
165
|
+
}
|
|
166
|
+
|
|
156
167
|
get secondLogoSlot() {
|
|
157
168
|
return this.allowSecondaryIcon
|
|
158
169
|
? html`
|
|
@@ -181,14 +192,12 @@ class PrimaryNav extends TrackedElement {
|
|
|
181
192
|
>
|
|
182
193
|
${this.secondLogoSlot}
|
|
183
194
|
</div>
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
${
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
<div class="user-info">
|
|
191
|
-
${this.username ? this.userIcon : this.loginIcon}
|
|
195
|
+
|
|
196
|
+
<div class="right-side-section">
|
|
197
|
+
${this.mobileDonateHeart}
|
|
198
|
+
${this.searchMenu}
|
|
199
|
+
${this.uploadButtonTemplate}
|
|
200
|
+
${this.userStateTemplate}
|
|
192
201
|
</div>
|
|
193
202
|
<media-menu
|
|
194
203
|
.baseHost=${this.baseHost}
|
|
@@ -205,7 +214,7 @@ class PrimaryNav extends TrackedElement {
|
|
|
205
214
|
data-event-click-tracking="${this.config.eventCategory}|NavHamburger"
|
|
206
215
|
title="Open main menu"
|
|
207
216
|
>
|
|
208
|
-
|
|
217
|
+
${this.openMenu === 'media' ? icons.close : icons.hamburger}
|
|
209
218
|
</button>
|
|
210
219
|
</nav>
|
|
211
220
|
`;
|
package/src/styles/base.js
CHANGED
|
@@ -78,16 +78,6 @@ export default css`
|
|
|
78
78
|
font-weight: bold;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
a.mobile-upload {
|
|
82
|
-
display: flex;
|
|
83
|
-
justify-content: left;
|
|
84
|
-
align-items: center;
|
|
85
|
-
}
|
|
86
|
-
a.mobile-upload svg {
|
|
87
|
-
fill: #fff;
|
|
88
|
-
margin-right: 10px;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
81
|
@media (min-width: 890px) {
|
|
92
82
|
nav {
|
|
93
83
|
overflow: visible;
|
|
@@ -156,9 +146,5 @@ export default css`
|
|
|
156
146
|
opacity: 1;
|
|
157
147
|
overflow: visible;
|
|
158
148
|
}
|
|
159
|
-
|
|
160
|
-
a.mobile-upload {
|
|
161
|
-
display: none;
|
|
162
|
-
}
|
|
163
149
|
}
|
|
164
150
|
`;
|
|
@@ -3,14 +3,16 @@ import { css } from 'https://offshoot.prod.archive.org/lit.js';
|
|
|
3
3
|
export default css`
|
|
4
4
|
.dropdown-toggle {
|
|
5
5
|
display: block;
|
|
6
|
-
height: 4rem;
|
|
7
|
-
font-size: 1.6rem;
|
|
8
6
|
text-transform: uppercase;
|
|
9
|
-
text-decoration: none;
|
|
10
7
|
color: var(--grey80);
|
|
11
8
|
cursor: pointer;
|
|
12
9
|
}
|
|
13
10
|
|
|
11
|
+
.dropdown-toggle svg {
|
|
12
|
+
height: 4rem;
|
|
13
|
+
width: 4rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
14
16
|
.dropdown-toggle .fill-color {
|
|
15
17
|
fill: var(--iconFill);
|
|
16
18
|
}
|
|
@@ -49,10 +51,6 @@ export default css`
|
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
@media (min-width: 890px) {
|
|
52
|
-
.logged-out-toolbar {
|
|
53
|
-
transform: translateY(-.5rem);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
54
|
.active {
|
|
57
55
|
background: transparent;
|
|
58
56
|
}
|
|
@@ -33,8 +33,6 @@ export default css`
|
|
|
33
33
|
|
|
34
34
|
.menu-item > .icon {
|
|
35
35
|
display: inline-flex;
|
|
36
|
-
width: 42px;
|
|
37
|
-
height: 42px;
|
|
38
36
|
vertical-align: middle;
|
|
39
37
|
-webkit-box-align: center;
|
|
40
38
|
-ms-flex-align: center;
|
|
@@ -44,6 +42,11 @@ export default css`
|
|
|
44
42
|
justify-content: center;
|
|
45
43
|
}
|
|
46
44
|
|
|
45
|
+
.menu-item > .icon > svg {
|
|
46
|
+
height: 4rem;
|
|
47
|
+
width: 4rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
47
50
|
.menu-item.selected .icon {
|
|
48
51
|
background-color: var(--activeButtonBg);
|
|
49
52
|
border-radius: 1rem 0 0 1rem;
|
|
@@ -61,7 +64,7 @@ export default css`
|
|
|
61
64
|
fill: #f00;
|
|
62
65
|
}
|
|
63
66
|
|
|
64
|
-
@media (min-width:
|
|
67
|
+
@media (min-width: 55.62rem) {
|
|
65
68
|
.menu-item {
|
|
66
69
|
width: auto;
|
|
67
70
|
height: 5rem;
|
|
@@ -91,7 +94,6 @@ export default css`
|
|
|
91
94
|
color: inherit;
|
|
92
95
|
}
|
|
93
96
|
|
|
94
|
-
|
|
95
97
|
.web:after {
|
|
96
98
|
display: none;
|
|
97
99
|
content: "web";
|
|
@@ -140,7 +142,7 @@ export default css`
|
|
|
140
142
|
}
|
|
141
143
|
}
|
|
142
144
|
|
|
143
|
-
@media (min-width:
|
|
145
|
+
@media (min-width: 81.25rem) {
|
|
144
146
|
.label,
|
|
145
147
|
.web:after {
|
|
146
148
|
display: inline;
|
package/src/styles/media-menu.js
CHANGED
package/src/styles/nav-search.js
CHANGED
|
@@ -24,8 +24,6 @@ export default css`
|
|
|
24
24
|
}
|
|
25
25
|
.search svg {
|
|
26
26
|
position: relative;
|
|
27
|
-
top: -5px;
|
|
28
|
-
right: -3px;
|
|
29
27
|
fill: var(--activeSearchColor);
|
|
30
28
|
}
|
|
31
29
|
.search-activated {
|
|
@@ -65,6 +63,10 @@ export default css`
|
|
|
65
63
|
-ms-grid-row-align: center;
|
|
66
64
|
align-self: center;
|
|
67
65
|
}
|
|
66
|
+
.search-activated .search svg {
|
|
67
|
+
height: 3rem;
|
|
68
|
+
width: 3rem;
|
|
69
|
+
}
|
|
68
70
|
.search-activated .search-field {
|
|
69
71
|
width: 100%;
|
|
70
72
|
height: 100%;
|
|
@@ -93,8 +95,8 @@ export default css`
|
|
|
93
95
|
@media (min-width: 890px) {
|
|
94
96
|
.search svg {
|
|
95
97
|
display: inline;
|
|
96
|
-
width:
|
|
97
|
-
height:
|
|
98
|
+
width: 2.8rem;
|
|
99
|
+
height: 2.8rem;
|
|
98
100
|
vertical-align: -14px;
|
|
99
101
|
}
|
|
100
102
|
.search path {
|
|
@@ -105,7 +107,7 @@ export default css`
|
|
|
105
107
|
.search-activated {
|
|
106
108
|
display: block;
|
|
107
109
|
position: static;
|
|
108
|
-
padding: 1.
|
|
110
|
+
padding: 1.1rem 0.2rem;
|
|
109
111
|
background: transparent;
|
|
110
112
|
}
|
|
111
113
|
|
|
@@ -127,8 +129,8 @@ export default css`
|
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
.search-activated .search svg {
|
|
130
|
-
width:
|
|
131
|
-
height:
|
|
132
|
+
width: 2.8rem;
|
|
133
|
+
height: 2.8rem;
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
`;
|
|
@@ -11,10 +11,9 @@ export default css`
|
|
|
11
11
|
position: relative;
|
|
12
12
|
display: -ms-grid;
|
|
13
13
|
display: grid;
|
|
14
|
-
height: 40px;
|
|
15
14
|
grid-template-areas: 'hamburger empty heart search user';
|
|
16
|
-
-ms-grid-columns:
|
|
17
|
-
grid-template-columns:
|
|
15
|
+
-ms-grid-columns: 4rem minmax(1rem, 100%) 4rem 4rem 4rem;
|
|
16
|
+
grid-template-columns: 4rem auto 4rem 4rem 4rem;
|
|
18
17
|
-ms-grid-rows: 100%;
|
|
19
18
|
grid-template-rows: 100%;
|
|
20
19
|
background: var(--primaryNavBg);
|
|
@@ -23,10 +22,24 @@ export default css`
|
|
|
23
22
|
|
|
24
23
|
nav.hide-search {
|
|
25
24
|
grid-template-areas: 'hamburger empty heart user';
|
|
26
|
-
-ms-grid-columns:
|
|
27
|
-
grid-template-columns:
|
|
25
|
+
-ms-grid-columns: 4rem minmax(1rem, 100%) 4rem 4rem;
|
|
26
|
+
grid-template-columns: 4rem auto 4rem 4rem;
|
|
28
27
|
}
|
|
29
28
|
|
|
29
|
+
.right-side-section {
|
|
30
|
+
display: flex;
|
|
31
|
+
user-select: none;
|
|
32
|
+
align-items: center;
|
|
33
|
+
}
|
|
34
|
+
.right-side-item {
|
|
35
|
+
position: static;
|
|
36
|
+
padding: 0;
|
|
37
|
+
background: transparent;
|
|
38
|
+
}
|
|
39
|
+
.right-side-item svg {
|
|
40
|
+
height: 4rem;
|
|
41
|
+
width: 4rem;
|
|
42
|
+
}
|
|
30
43
|
button {
|
|
31
44
|
background: none;
|
|
32
45
|
color: inherit;
|
|
@@ -56,6 +69,14 @@ export default css`
|
|
|
56
69
|
grid-column-end: user-end;
|
|
57
70
|
}
|
|
58
71
|
|
|
72
|
+
.ia-logo {
|
|
73
|
+
height: 3rem;
|
|
74
|
+
width: 3rem;
|
|
75
|
+
}
|
|
76
|
+
.ia-wordmark {
|
|
77
|
+
height: 3rem;
|
|
78
|
+
width: 9.5rem;
|
|
79
|
+
}
|
|
59
80
|
.ia-logo,
|
|
60
81
|
.ia-wordmark {
|
|
61
82
|
margin-right: 5px;
|
|
@@ -67,55 +88,32 @@ export default css`
|
|
|
67
88
|
grid-area: hamburger;
|
|
68
89
|
padding: 0;
|
|
69
90
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
grid-area: heart;
|
|
75
|
-
position: relative;
|
|
76
|
-
padding: 0;
|
|
77
|
-
z-index: 1;
|
|
78
|
-
width: 100%;
|
|
79
|
-
text-align: right;
|
|
80
|
-
-webkit-box-align: center;
|
|
81
|
-
-ms-flex-align: center;
|
|
82
|
-
align-items: center;
|
|
83
|
-
}
|
|
84
|
-
.mobile-donate-link svg {
|
|
85
|
-
height: 50px;
|
|
86
|
-
width: 50px;
|
|
87
|
-
margin-top: -5px;
|
|
88
|
-
margin-left: -5px;
|
|
91
|
+
.hamburger svg {
|
|
92
|
+
height: 4rem;
|
|
93
|
+
width: 4rem;
|
|
94
|
+
fill: var(--activeColor);
|
|
89
95
|
}
|
|
96
|
+
|
|
90
97
|
.mobile-donate-link .fill-color {
|
|
91
98
|
fill: rgb(255, 0, 0);
|
|
92
99
|
}
|
|
93
|
-
|
|
100
|
+
|
|
101
|
+
.sr-only {
|
|
94
102
|
position: absolute;
|
|
95
103
|
width: 1px;
|
|
96
104
|
height: 1px;
|
|
97
|
-
padding: 0;
|
|
98
105
|
margin: -1px;
|
|
99
|
-
overflow: hidden;
|
|
100
|
-
clip: rect(0,0,0,0);
|
|
101
|
-
border: 0;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.search-trigger {
|
|
105
|
-
-ms-grid-row: 1;
|
|
106
|
-
-ms-grid-column: 4;
|
|
107
|
-
grid-area: search;
|
|
108
|
-
position: relative;
|
|
109
106
|
padding: 0;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
|
|
107
|
+
border: 0;
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
white-space: nowrap;
|
|
110
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
111
|
+
-webkit-clip-path: inset(50%);
|
|
112
|
+
clip-path: inset(50%);
|
|
113
|
+
user-select: none;
|
|
116
114
|
}
|
|
117
115
|
|
|
118
|
-
.search-trigger .fill-color {
|
|
116
|
+
.mobile-search-trigger .fill-color {
|
|
119
117
|
fill: var(--iconFill);
|
|
120
118
|
}
|
|
121
119
|
|
|
@@ -132,14 +130,9 @@ export default css`
|
|
|
132
130
|
display: none;
|
|
133
131
|
}
|
|
134
132
|
|
|
135
|
-
.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
grid-area: user;
|
|
139
|
-
-ms-grid-row-align: stretch;
|
|
140
|
-
align-self: stretch;
|
|
141
|
-
-ms-grid-column-align: end;
|
|
142
|
-
justify-self: end;
|
|
133
|
+
.upload svg {
|
|
134
|
+
height: 3rem;
|
|
135
|
+
width: 3rem;
|
|
143
136
|
}
|
|
144
137
|
|
|
145
138
|
.screen-name {
|
|
@@ -150,9 +143,8 @@ export default css`
|
|
|
150
143
|
}
|
|
151
144
|
|
|
152
145
|
.user-menu {
|
|
153
|
-
height: 100%;
|
|
154
|
-
padding: 0.5rem 1rem;
|
|
155
146
|
color: var(--lightTextColor);
|
|
147
|
+
padding: 0;
|
|
156
148
|
}
|
|
157
149
|
|
|
158
150
|
.user-menu:hover {
|
|
@@ -166,8 +158,8 @@ export default css`
|
|
|
166
158
|
|
|
167
159
|
.user-menu img {
|
|
168
160
|
display: block;
|
|
169
|
-
width:
|
|
170
|
-
height:
|
|
161
|
+
width: 4rem;
|
|
162
|
+
height: 4rem;
|
|
171
163
|
}
|
|
172
164
|
|
|
173
165
|
.link-home {
|
|
@@ -195,15 +187,20 @@ export default css`
|
|
|
195
187
|
|
|
196
188
|
@media (min-width: 890px) {
|
|
197
189
|
:host {
|
|
198
|
-
--userIconWidth:
|
|
199
|
-
--userIconHeight:
|
|
190
|
+
--userIconWidth: 3.2rem;
|
|
191
|
+
--userIconHeight: 3.2rem;
|
|
200
192
|
}
|
|
201
193
|
|
|
194
|
+
.right-side-section {
|
|
195
|
+
display: contents;
|
|
196
|
+
}
|
|
197
|
+
.right-side-item {
|
|
198
|
+
padding: 0.5rem 0.5rem;
|
|
199
|
+
}
|
|
202
200
|
nav {
|
|
203
201
|
display: block;
|
|
204
202
|
z-index: 3;
|
|
205
203
|
height: 5rem;
|
|
206
|
-
padding-right: 1.5rem;
|
|
207
204
|
}
|
|
208
205
|
|
|
209
206
|
slot[name='opt-sec-logo-mobile'] {
|
|
@@ -220,14 +217,13 @@ export default css`
|
|
|
220
217
|
}
|
|
221
218
|
|
|
222
219
|
.hamburger,
|
|
223
|
-
.search-trigger,
|
|
220
|
+
.mobile-search-trigger,
|
|
224
221
|
.mobile-donate-link {
|
|
225
222
|
display: none;
|
|
226
223
|
}
|
|
227
224
|
|
|
228
225
|
.user-info {
|
|
229
226
|
float: right;
|
|
230
|
-
padding-top: 1rem;
|
|
231
227
|
}
|
|
232
228
|
|
|
233
229
|
.user-menu {
|
|
@@ -245,8 +241,8 @@ export default css`
|
|
|
245
241
|
|
|
246
242
|
.upload {
|
|
247
243
|
display: block;
|
|
244
|
+
padding: 1rem 0.5rem;
|
|
248
245
|
float: right;
|
|
249
|
-
margin-top: 1rem;
|
|
250
246
|
font-size: 1.4rem;
|
|
251
247
|
text-transform: uppercase;
|
|
252
248
|
text-decoration: none;
|
|
@@ -259,8 +255,6 @@ export default css`
|
|
|
259
255
|
}
|
|
260
256
|
|
|
261
257
|
.upload svg {
|
|
262
|
-
width: 32px;
|
|
263
|
-
height: 32px;
|
|
264
258
|
vertical-align: middle;
|
|
265
259
|
fill: var(--iconFill);
|
|
266
260
|
}
|
package/src/styles/user-menu.js
CHANGED
|
@@ -5,7 +5,7 @@ export default css`
|
|
|
5
5
|
.initial,
|
|
6
6
|
.closed,
|
|
7
7
|
.open {
|
|
8
|
-
right:
|
|
8
|
+
right: 20.5rem;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.search-hidden.initial,
|
|
@@ -19,7 +19,7 @@ export default css`
|
|
|
19
19
|
.initial,
|
|
20
20
|
.closed,
|
|
21
21
|
.open {
|
|
22
|
-
right:
|
|
22
|
+
right: 25.5rem;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.search-hidden.initial,
|
package/test/ia-topnav.test.js
CHANGED
|
@@ -198,7 +198,7 @@ describe('<ia-topnav>', () => {
|
|
|
198
198
|
|
|
199
199
|
it('toggles search menu when search toggle button clicked', async () => {
|
|
200
200
|
const el = await fixture(container());
|
|
201
|
-
el.shadowRoot.querySelector('primary-nav').shadowRoot.querySelector('.search-trigger').click();
|
|
201
|
+
el.shadowRoot.querySelector('primary-nav').shadowRoot.querySelector('.mobile-search-trigger').click();
|
|
202
202
|
await el.updateComplete;
|
|
203
203
|
|
|
204
204
|
expect(el.openMenu).to.equal('search');
|
package/test/primary-nav.test.js
CHANGED
|
@@ -40,7 +40,7 @@ describe('<primary-nav>', () => {
|
|
|
40
40
|
hideSearch: true,
|
|
41
41
|
}));
|
|
42
42
|
|
|
43
|
-
expect(el.shadowRoot.querySelector('.search-trigger')).to.equal(null);
|
|
43
|
+
expect(el.shadowRoot.querySelector('.mobile-search-trigger')).to.equal(null);
|
|
44
44
|
expect(el.shadowRoot.querySelector('nav-search')).to.equal(null);
|
|
45
45
|
});
|
|
46
46
|
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { html } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
|
-
|
|
3
|
-
export default html`
|
|
4
|
-
<svg
|
|
5
|
-
height="14"
|
|
6
|
-
width="14"
|
|
7
|
-
viewBox="8 8 24 24"
|
|
8
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
-
aria-labelledby="uploadTitleID uploadDescID"
|
|
10
|
-
>
|
|
11
|
-
<title id="uploadTitleID">Upload icon</title>
|
|
12
|
-
<desc id="uploadDescID">An illustration of a horizontal line over an up pointing arrow.</desc>
|
|
13
|
-
<path class="fill-color" d="m20 12.8 8 10.4h-4.8v8.8h-6.4v-8.8h-4.8zm12-4.8v3.2h-24v-3.2z" fill-rule="evenodd"/>
|
|
14
|
-
</svg>
|
|
15
|
-
`;
|