@internetarchive/ia-topnav 1.2.2-alpha4 → 1.2.2-alpha6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetarchive/ia-topnav",
3
- "version": "1.2.2-alpha4",
3
+ "version": "1.2.2-alpha6",
4
4
  "description": "Top nav for Internet Archive",
5
5
  "license": "AGPL-3.0-only",
6
6
  "main": "index.js",
@@ -1,7 +1,6 @@
1
1
  import { html, nothing } from 'https://offshoot.prod.archive.org/lit.js';
2
2
  import TrackedElement from './tracked-element.js';
3
3
  import icons from './assets/img/icons.js';
4
- import './assets/img/hamburger.js';
5
4
  import './login-button.js';
6
5
  import './nav-search.js';
7
6
  import './media-menu.js';
@@ -52,10 +52,6 @@ export default css`
52
52
  --savePageSubmitText: var(--white);
53
53
  --savePageInputBorder: var(--grey60);
54
54
  --savePageErrorText: var(--errorYellow);
55
-
56
- color: var(--primaryTextColor);
57
- font-size: 2rem;
58
- font-family: var(--themeFontFamily);
59
55
  }
60
56
 
61
57
  primary-nav:focus {
@@ -11,9 +11,10 @@ export default css`
11
11
  position: relative;
12
12
  display: -ms-grid;
13
13
  display: grid;
14
+ height: 4rem;
14
15
  grid-template-areas: 'hamburger empty heart search user';
15
16
  -ms-grid-columns: 4rem minmax(1rem, 100%) 4rem 4rem 4rem;
16
- grid-template-columns: 4rem auto 4rem 4rem 4rem;
17
+ grid-template-columns: 4rem auto 5rem 4rem 4rem;
17
18
  -ms-grid-rows: 100%;
18
19
  grid-template-rows: 100%;
19
20
  background: var(--primaryNavBg);
@@ -23,7 +24,7 @@ export default css`
23
24
  nav.hide-search {
24
25
  grid-template-areas: 'hamburger empty heart user';
25
26
  -ms-grid-columns: 4rem minmax(1rem, 100%) 4rem 4rem;
26
- grid-template-columns: 4rem auto 4rem 4rem;
27
+ grid-template-columns: 4rem auto 5rem 4rem;
27
28
  }
28
29
 
29
30
  .right-side-section {
@@ -32,11 +33,9 @@ export default css`
32
33
  align-items: center;
33
34
  }
34
35
  .right-side-item {
35
- position: static;
36
36
  padding: 0;
37
- background: transparent;
38
37
  }
39
- .right-side-item svg {
38
+ .right-side-item svg1 {
40
39
  height: 4rem;
41
40
  width: 4rem;
42
41
  }
@@ -94,6 +93,10 @@ export default css`
94
93
  fill: var(--activeColor);
95
94
  }
96
95
 
96
+ .mobile-donate-link svg {
97
+ height: 5rem;
98
+ width: 5rem;
99
+ }
97
100
  .mobile-donate-link .fill-color {
98
101
  fill: rgb(255, 0, 0);
99
102
  }
@@ -144,7 +147,7 @@ export default css`
144
147
 
145
148
  .user-menu {
146
149
  color: var(--lightTextColor);
147
- padding: 0;
150
+ padding: 0.5rem;
148
151
  }
149
152
 
150
153
  .user-menu:hover {
@@ -158,8 +161,8 @@ export default css`
158
161
 
159
162
  .user-menu img {
160
163
  display: block;
161
- width: 4rem;
162
- height: 4rem;
164
+ width: 3rem;
165
+ height: 3rem;
163
166
  }
164
167
 
165
168
  .link-home {
@@ -201,6 +204,7 @@ export default css`
201
204
  display: block;
202
205
  z-index: 3;
203
206
  height: 5rem;
207
+ padding-right: 0.5rem;
204
208
  }
205
209
 
206
210
  slot[name='opt-sec-logo-mobile'] {
@@ -226,8 +230,14 @@ export default css`
226
230
  float: right;
227
231
  }
228
232
 
233
+ .user-info .user-menu img {
234
+ height: 3rem;
235
+ width: 3rem;
236
+ margin-right: 0;
237
+ }
238
+
229
239
  .user-menu {
230
- padding-top: 0;
240
+ padding: 0.5rem;
231
241
  }
232
242
 
233
243
  .user-menu.active {
@@ -237,6 +247,7 @@ export default css`
237
247
  .user-menu img {
238
248
  display: inline-block;
239
249
  vertical-align: middle;
250
+ margin-right: 0.5rem;
240
251
  }
241
252
 
242
253
  .upload {
@@ -5,7 +5,7 @@ export default css`
5
5
  .initial,
6
6
  .closed,
7
7
  .open {
8
- right: 20.5rem;
8
+ right: 21.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: 25.5rem;
22
+ right: 26.5rem;
23
23
  }
24
24
 
25
25
  .search-hidden.initial,
@@ -1,38 +0,0 @@
1
- import { html, css } from 'https://offshoot.prod.archive.org/lit.js';
2
- import Icon from './icon.js';
3
- import icons from './icons.js';
4
-
5
- class HamBurger extends Icon {
6
- static get styles() {
7
- return css`
8
- svg {
9
- display: block;
10
- height: 4rem;
11
- width: 4rem;
12
- }
13
- .fill-color {
14
- fill: var(--activeColor);
15
- }
16
- `;
17
- }
18
-
19
- static get closed() {
20
- return html`
21
- <svg height="40" viewBox="0 0 40 40" width="40" xmlns="http://www.w3.org/2000/svg" aria-labelledby="hamburgerTitleID hamburgerDescID">
22
- <title id="hamburgerTitleID">Hamburger icon</title>
23
- <desc id="hamburgerDescID">An icon used to represent a menu that can be toggled by interacting with this icon.</desc>
24
- <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"/>
25
- </svg>
26
- `;
27
- }
28
-
29
- static get opened() {
30
- return icons.close;
31
- }
32
-
33
- render() {
34
- return this.active ? HamBurger.opened : HamBurger.closed;
35
- }
36
- }
37
-
38
- customElements.define('icon-hamburger', HamBurger);
@@ -1,38 +0,0 @@
1
- import { html, css } from 'https://offshoot.prod.archive.org/lit.js';
2
- import Icon from './icon.js';
3
-
4
- class User extends Icon {
5
- static get styles() {
6
- return css`
7
- svg {
8
- vertical-align: middle;
9
- width: var(--userIconWidth);
10
- height: var(--userIconHeight);
11
- }
12
- path {
13
- fill: var(--baseColor);
14
- }
15
- .active {
16
- fill: var(--activeColor);
17
- }
18
- `;
19
- }
20
-
21
- render() {
22
- return html`
23
- <svg
24
- width="40"
25
- height="40"
26
- viewBox="0 0 40 40"
27
- xmlns="http://www.w3.org/2000/svg"
28
- aria-labelledby="userTitleID userDescID"
29
- >
30
- <title id="userTitleID">User icon</title>
31
- <desc id="userDescID">An illustration of a person's head and chest.</desc>
32
- <path class="${this.active ? 'active' : ''}" d="m20.7130435 18.0434783c-3.5658385 0-6.4565218-2.9198821-6.4565218-6.5217392 0-3.60185703 2.8906833-6.5217391 6.4565218-6.5217391s6.4565217 2.91988207 6.4565217 6.5217391c0 3.6018571-2.8906832 6.5217392-6.4565217 6.5217392zm-12.9130435 16.9565217c0-7.9240855 5.7813665-14.3478261 12.9130435-14.3478261s12.9130435 6.4237406 12.9130435 14.3478261z" fill-rule="evenodd"/>
33
- </svg>
34
- `;
35
- }
36
- }
37
-
38
- customElements.define('user-image', User);