@internetarchive/ia-topnav 1.2.2-alpha5 → 1.2.2-alpha7

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-alpha5",
3
+ "version": "1.2.2-alpha7",
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';
@@ -3,6 +3,7 @@ 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;
6
7
  text-transform: uppercase;
7
8
  color: var(--grey80);
8
9
  cursor: pointer;
@@ -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
  }
@@ -137,13 +140,14 @@ export default css`
137
140
 
138
141
  .screen-name {
139
142
  display: none;
143
+ font-size: 1.3rem;
140
144
  vertical-align: middle;
141
145
  text-transform: uppercase;
142
146
  }
143
147
 
144
148
  .user-menu {
145
149
  color: var(--lightTextColor);
146
- padding: 0;
150
+ padding: 0.5rem;
147
151
  }
148
152
 
149
153
  .user-menu:hover {
@@ -194,7 +198,7 @@ export default css`
194
198
  display: contents;
195
199
  }
196
200
  .right-side-item {
197
- padding: 0.5rem 0.5rem;
201
+ padding: 0.5rem 0rem;
198
202
  }
199
203
  nav {
200
204
  display: block;
@@ -229,6 +233,7 @@ export default css`
229
233
  .user-info .user-menu img {
230
234
  height: 3rem;
231
235
  width: 3rem;
236
+ margin-right: 0;
232
237
  }
233
238
 
234
239
  .user-menu {
@@ -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);