sfc-utils 1.3.1 → 1.3.4
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/css/nav2.less +63 -0
- package/nav2.js +9 -9
- package/package.json +1 -1
package/css/nav2.less
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
|
|
2
|
+
.nav2-container {
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
left: 0;
|
|
7
|
+
height: 37px;
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.nav2-container.invert {
|
|
14
|
+
background-color: #fff;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.nav2-left, .nav2-right {
|
|
18
|
+
display: flex;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.nav2-left {
|
|
22
|
+
justify-content: flex-start;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.nav2-right {
|
|
26
|
+
justify-content: flex-end;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
#nav2-sub-box {
|
|
30
|
+
border: 1px solid var(--brand-color);
|
|
31
|
+
border-radius: 3px;
|
|
32
|
+
color: var(--brand-color);
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
letter-spacing: 0.05em;
|
|
35
|
+
margin-right: 10px;
|
|
36
|
+
padding: 3px 8px 2px;
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
text-transform: uppercase;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.nav2-desk-logo, .nav2-mobile-logo {
|
|
42
|
+
max-height: 20px;
|
|
43
|
+
margin-left: 0.335rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.nav2-mobile-logo {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
@media (max-width: 490px){
|
|
50
|
+
.nav2-mobile-logo {
|
|
51
|
+
display: block;
|
|
52
|
+
}
|
|
53
|
+
.nav2-desk-logo {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
.nav2-left {
|
|
57
|
+
order: 1;
|
|
58
|
+
}
|
|
59
|
+
.nav2-right {
|
|
60
|
+
flex: 25 1;
|
|
61
|
+
order: 2;
|
|
62
|
+
}
|
|
63
|
+
}
|
package/nav2.js
CHANGED
|
@@ -129,8 +129,8 @@ let getNav2 = function (
|
|
|
129
129
|
if (navLink) {
|
|
130
130
|
navLinkInsert = `
|
|
131
131
|
<a
|
|
132
|
-
class="
|
|
133
|
-
id="
|
|
132
|
+
class="nav2-title"
|
|
133
|
+
id="nav2-title"
|
|
134
134
|
href="${navLink.url}"
|
|
135
135
|
target="${navLink.target || "_blank"}"
|
|
136
136
|
>
|
|
@@ -140,17 +140,17 @@ let getNav2 = function (
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
let rightBlock = `
|
|
143
|
-
<a
|
|
143
|
+
<a id="nav2-sub-box" href="${subscribeLink}" target="_blank">
|
|
144
144
|
<div>Subscribe</div>
|
|
145
145
|
</a>
|
|
146
146
|
`;
|
|
147
147
|
|
|
148
148
|
|
|
149
|
-
let navHTML = `<nav class="
|
|
150
|
-
<div class="
|
|
149
|
+
let navHTML = `<nav class="nav2-container ${invertClass}">
|
|
150
|
+
<div class="nav2-left">
|
|
151
151
|
${navLinkInsert}
|
|
152
152
|
</div>
|
|
153
|
-
<div class="
|
|
153
|
+
<div class="nav2-center">
|
|
154
154
|
<a
|
|
155
155
|
href="/"
|
|
156
156
|
target="_blank"
|
|
@@ -158,19 +158,19 @@ let getNav2 = function (
|
|
|
158
158
|
>
|
|
159
159
|
<div>
|
|
160
160
|
<img
|
|
161
|
-
class="
|
|
161
|
+
class="nav2-desk-logo"
|
|
162
162
|
alt="Logo"
|
|
163
163
|
src="https://files.sfchronicle.com/static-assets/logos/${marketPrefix}-${color}.png"
|
|
164
164
|
></img>
|
|
165
165
|
<img
|
|
166
|
-
class="
|
|
166
|
+
class="nav2-mobile-logo"
|
|
167
167
|
alt="Logo"
|
|
168
168
|
src="https://files.sfchronicle.com/static-assets/logos/${marketPrefix}-square-${color}.png"
|
|
169
169
|
></img>
|
|
170
170
|
</div>
|
|
171
171
|
</a>
|
|
172
172
|
</div>
|
|
173
|
-
<div class="
|
|
173
|
+
<div class="nav2-right">
|
|
174
174
|
${rightBlock}
|
|
175
175
|
</div>
|
|
176
176
|
${subnav}
|