@internetarchive/ia-topnav 1.1.39 → 1.2.1
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 +2 -2
- package/src/assets/img/icons.js +0 -2
- package/src/data/menus.js +0 -1
- package/src/dropdown-menu.js +0 -4
- package/src/styles/dropdown-menu.js +0 -15
- package/src/styles/ia-topnav.js +2 -4
- package/src/styles/nav-search.js +1 -1
- package/src/styles/primary-nav.js +1 -2
- package/src/styles/search-menu.js +0 -1
- package/src/assets/img/icon-upload-unpadded.js +0 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@internetarchive/ia-topnav",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Top nav for Internet Archive",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"main": "index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test": "ulimit -v unlimited; web-test-runner 'test/**/*.test.js' --node-resolve --coverage --puppeteer"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@internetarchive/ia-wayback-search": "^0.2.
|
|
24
|
+
"@internetarchive/ia-wayback-search": "^0.2.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@open-wc/demoing-storybook": "^2.4.7",
|
package/src/assets/img/icons.js
CHANGED
|
@@ -8,7 +8,6 @@ import search from './icon-search.js';
|
|
|
8
8
|
import software from './icon-software.js';
|
|
9
9
|
import texts from './icon-texts.js';
|
|
10
10
|
import upload from './icon-upload.js';
|
|
11
|
-
import uploadUnpadded from './icon-upload-unpadded.js';
|
|
12
11
|
import user from './icon-user.js';
|
|
13
12
|
import video from './icon-video.js';
|
|
14
13
|
import web from './icon-web.js';
|
|
@@ -24,7 +23,6 @@ export default {
|
|
|
24
23
|
software,
|
|
25
24
|
texts,
|
|
26
25
|
upload,
|
|
27
|
-
uploadUnpadded,
|
|
28
26
|
user,
|
|
29
27
|
video,
|
|
30
28
|
web,
|
package/src/data/menus.js
CHANGED
package/src/dropdown-menu.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { html, nothing } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
3
2
|
import TrackedElement from './tracked-element.js';
|
|
4
3
|
import dropdownMenuCSS from './styles/dropdown-menu.js';
|
|
5
4
|
import formatUrl from './lib/formatUrl.js';
|
|
6
|
-
import icons from './assets/img/icons.js';
|
|
7
5
|
|
|
8
6
|
class DropdownMenu extends TrackedElement {
|
|
9
7
|
static get styles() {
|
|
@@ -57,11 +55,9 @@ class DropdownMenu extends TrackedElement {
|
|
|
57
55
|
const calloutText = this.config.callouts?.[link.title];
|
|
58
56
|
return html`<a
|
|
59
57
|
href="${formatUrl(link.url, this.baseHost)}"
|
|
60
|
-
class="${ifDefined(link.class)}"
|
|
61
58
|
@click=${this.trackClick}
|
|
62
59
|
data-event-click-tracking="${this.config.eventCategory}|Nav${link.analyticsEvent}"
|
|
63
60
|
aria-label=${calloutText ? `New feature: ${link.title}` : nothing}>
|
|
64
|
-
${link.class === 'mobile-upload' ? icons.uploadUnpadded : nothing}
|
|
65
61
|
${link.title}
|
|
66
62
|
${calloutText ? html`<span class="callout" aria-hidden="true">${calloutText}</span>` : nothing}
|
|
67
63
|
</a>`;
|
|
@@ -3,7 +3,6 @@ import { css } from 'https://offshoot.prod.archive.org/lit.js';
|
|
|
3
3
|
export default css`
|
|
4
4
|
.nav-container {
|
|
5
5
|
position: relative;
|
|
6
|
-
z-index: 4;
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
nav {
|
|
@@ -79,16 +78,6 @@ export default css`
|
|
|
79
78
|
font-weight: bold;
|
|
80
79
|
}
|
|
81
80
|
|
|
82
|
-
a.mobile-upload {
|
|
83
|
-
display: flex;
|
|
84
|
-
justify-content: left;
|
|
85
|
-
align-items: center;
|
|
86
|
-
}
|
|
87
|
-
a.mobile-upload svg {
|
|
88
|
-
fill: #fff;
|
|
89
|
-
margin-right: 10px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
81
|
@media (min-width: 890px) {
|
|
93
82
|
nav {
|
|
94
83
|
overflow: visible;
|
|
@@ -157,9 +146,5 @@ export default css`
|
|
|
157
146
|
opacity: 1;
|
|
158
147
|
overflow: visible;
|
|
159
148
|
}
|
|
160
|
-
|
|
161
|
-
a.mobile-upload {
|
|
162
|
-
display: none;
|
|
163
|
-
}
|
|
164
149
|
}
|
|
165
150
|
`;
|
package/src/styles/ia-topnav.js
CHANGED
|
@@ -69,7 +69,7 @@ export default css`
|
|
|
69
69
|
right: 0;
|
|
70
70
|
bottom: 0;
|
|
71
71
|
left: 0;
|
|
72
|
-
z-index:
|
|
72
|
+
z-index: 0;
|
|
73
73
|
}
|
|
74
74
|
#close-layer.visible {
|
|
75
75
|
display: block;
|
|
@@ -77,14 +77,12 @@ export default css`
|
|
|
77
77
|
|
|
78
78
|
.topnav {
|
|
79
79
|
position: relative;
|
|
80
|
+
z-index: 3;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
@media (max-width: 889px) {
|
|
83
84
|
desktop-subnav {
|
|
84
85
|
display: none;
|
|
85
86
|
}
|
|
86
|
-
.topnav {
|
|
87
|
-
z-index: 4;
|
|
88
|
-
}
|
|
89
87
|
}
|
|
90
88
|
`;
|
package/src/styles/nav-search.js
CHANGED
|
@@ -201,6 +201,7 @@ export default css`
|
|
|
201
201
|
|
|
202
202
|
nav {
|
|
203
203
|
display: block;
|
|
204
|
+
z-index: 3;
|
|
204
205
|
height: 5rem;
|
|
205
206
|
padding-right: 1.5rem;
|
|
206
207
|
}
|
|
@@ -273,8 +274,6 @@ export default css`
|
|
|
273
274
|
nav-search {
|
|
274
275
|
float: right;
|
|
275
276
|
margin-left: 1rem;
|
|
276
|
-
z-index: 4;
|
|
277
|
-
position: inherit;
|
|
278
277
|
}
|
|
279
278
|
|
|
280
279
|
login-button {
|
|
@@ -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
|
-
`;
|