Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/_includes/home-lhn.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ul class="lhn-items">
<li class="home-link">
<a href="/index.html">Home</a>
<div class="link" onclick="navigateToHome()">Home</div>
</li>
<li>
<div onclick="navigateTo('/hubs/send-money')" class="icon-with-link">
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/request-money-lhn.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ul class="lhn-items">
<li class="home-link">
<a href="/index.html">Home</a>
<div class="link" onclick="navigateToHome()">Home</div>
</li>
<li>
<div onclick="navigateTo('/hubs/send-money')" class="icon-with-link">
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/send-money-lhn.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ul class="lhn-items">
<li class="home-link">
<a href="/index.html">Home</a>
<div class="link" onclick="navigateToHome()">Home</div>
</li>
<li>
<div class="icon-with-link selected">
Expand Down
16 changes: 11 additions & 5 deletions docs/assets/js/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@

function navigateTo(path) { // eslint-disable-line no-unused-vars
/* eslint-disable no-unused-vars */
function navigateTo(path) {
window.location.href = path;
}

function toggleHeaderMenu() { // eslint-disable-line no-unused-vars
function navigateToHome() {
// TODO: Change to '/index' when the site is live
navigateTo('/main');
}

function toggleHeaderMenu() {
const lhn = document.getElementById('lhn');
const lhnContent = document.getElementById('lhn-content');
const anguleUpIcon = document.getElementById('angle-up-icon');
Expand All @@ -23,11 +29,11 @@ function toggleHeaderMenu() { // eslint-disable-line no-unused-vars
}
}

function navigateBack() { // eslint-disable-line no-unused-vars
function navigateBack() {
if (window.location.pathname.includes('/request-money/')) {
window.location.href = '/hubs/request-money/';
window.location.href = '/hubs/request-money';
} else {
window.location.href = '/hubs/send-money/';
window.location.href = '/hubs/send-money';
}

// Add a little delay to avoid showing the previous content in a fraction of a time
Expand Down