Commit Β·
3f181bd
1
Parent(s): 57def2c
Nav: add Facebook entry linking to the Blind Monkeys Facebook page
Browse files- static/css/nav.js +16 -1
static/css/nav.js
CHANGED
|
@@ -118,6 +118,17 @@
|
|
| 118 |
}).forEach(function (el) { navLinks.appendChild(el); });
|
| 119 |
}
|
| 120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
// ---- Always: Regimes link (visible to everyone) ----
|
| 122 |
if (!navLinks.querySelector('a[href="/regimes"]')) {
|
| 123 |
const regLink = document.createElement('a');
|
|
@@ -217,13 +228,15 @@
|
|
| 217 |
['π Financials', '/financials/'],
|
| 218 |
['π Glossary', '/glossary'],
|
| 219 |
['π Performance', '/performance'],
|
| 220 |
-
['π Regimes', '/regimes']
|
|
|
|
| 221 |
];
|
| 222 |
anonItems.forEach(function(it) {
|
| 223 |
const a = document.createElement('a');
|
| 224 |
a.href = it[1];
|
| 225 |
a.className = 'nav-link';
|
| 226 |
a.textContent = it[0];
|
|
|
|
| 227 |
navLinks.appendChild(a);
|
| 228 |
});
|
| 229 |
navLinks.appendChild(authCol);
|
|
@@ -244,6 +257,7 @@
|
|
| 244 |
['π Performance', '/performance'],
|
| 245 |
['π Regimes', '/regimes'],
|
| 246 |
['βοΈ Settings', '/settings/'],
|
|
|
|
| 247 |
['π€ Profile', '/profile/'],
|
| 248 |
['πͺ Logout', '/logout']
|
| 249 |
];
|
|
@@ -253,6 +267,7 @@
|
|
| 253 |
a.href = it[1];
|
| 254 |
a.className = 'nav-link';
|
| 255 |
a.textContent = it[0];
|
|
|
|
| 256 |
navLinks.appendChild(a);
|
| 257 |
});
|
| 258 |
return;
|
|
|
|
| 118 |
}).forEach(function (el) { navLinks.appendChild(el); });
|
| 119 |
}
|
| 120 |
|
| 121 |
+
// ---- Always: Facebook link (visible to everyone) ----
|
| 122 |
+
if (!navLinks.querySelector('a[href*="facebook.com"]')) {
|
| 123 |
+
const fbLink = document.createElement('a');
|
| 124 |
+
fbLink.href = 'https://www.facebook.com/profile.php?id=61595994359028';
|
| 125 |
+
fbLink.className = 'nav-link';
|
| 126 |
+
fbLink.textContent = '\ud83d\udcd8 Facebook';
|
| 127 |
+
fbLink.target = '_blank';
|
| 128 |
+
fbLink.rel = 'noopener noreferrer';
|
| 129 |
+
navLinks.appendChild(fbLink);
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
// ---- Always: Regimes link (visible to everyone) ----
|
| 133 |
if (!navLinks.querySelector('a[href="/regimes"]')) {
|
| 134 |
const regLink = document.createElement('a');
|
|
|
|
| 228 |
['π Financials', '/financials/'],
|
| 229 |
['π Glossary', '/glossary'],
|
| 230 |
['π Performance', '/performance'],
|
| 231 |
+
['π Regimes', '/regimes'],
|
| 232 |
+
['π Facebook', 'https://www.facebook.com/profile.php?id=61595994359028']
|
| 233 |
];
|
| 234 |
anonItems.forEach(function(it) {
|
| 235 |
const a = document.createElement('a');
|
| 236 |
a.href = it[1];
|
| 237 |
a.className = 'nav-link';
|
| 238 |
a.textContent = it[0];
|
| 239 |
+
if (it[1].indexOf('http') === 0) { a.target = '_blank'; a.rel = 'noopener noreferrer'; }
|
| 240 |
navLinks.appendChild(a);
|
| 241 |
});
|
| 242 |
navLinks.appendChild(authCol);
|
|
|
|
| 257 |
['π Performance', '/performance'],
|
| 258 |
['π Regimes', '/regimes'],
|
| 259 |
['βοΈ Settings', '/settings/'],
|
| 260 |
+
['π Facebook', 'https://www.facebook.com/profile.php?id=61595994359028'],
|
| 261 |
['π€ Profile', '/profile/'],
|
| 262 |
['πͺ Logout', '/logout']
|
| 263 |
];
|
|
|
|
| 267 |
a.href = it[1];
|
| 268 |
a.className = 'nav-link';
|
| 269 |
a.textContent = it[0];
|
| 270 |
+
if (it[1].indexOf('http') === 0) { a.target = '_blank'; a.rel = 'noopener noreferrer'; }
|
| 271 |
navLinks.appendChild(a);
|
| 272 |
});
|
| 273 |
return;
|