Skip to content

Commit

Permalink
Merge pull request #114 from iKAN2025/main
Browse files Browse the repository at this point in the history
change navbar
  • Loading branch information
jm1021 authored Nov 21, 2024
2 parents b8137c0 + e7f6239 commit 3678b09
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions _includes/nav/home.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<table>
<tr>
<td><img src="{{site.baseurl}}/images/logo.png" height="60" title="Home" alt=""></td>
<td><a href="{{site.baseurl}}/profile">Profile</a></td>
<td><a href="{{site.baseurl}}/post">Posts</a></td>
<td id="loginArea"><a href="{{site.baseurl}}/login">Login</a></td>
</tr>
</table>

<script type="module">
import { pythonURI, fetchOptions } from '{{site.baseurl}}/assets/js/api/config.js';

Expand All @@ -18,8 +20,6 @@
<button class="dropbtn">${data.name}</button>
<div class="dropdown-content">
<a href="{{site.baseurl}}/logout">Logout</a>
<a href="{{site.baseurl}}/profile">Profile</a>
<a href="{{site.baseurl}}/post">Post</a>
</div>
</div>
`;
Expand All @@ -33,9 +33,8 @@
// Handle any errors that occurred during getCredentials
});
});

function getCredentials() {
const URL = pythonURI + '/api/user';
const URL = pythonURI + '/api/id';
return fetch(URL, fetchOptions)
.then(response => { // API response handler
if (response.status !== 200) {
Expand All @@ -54,5 +53,4 @@
return null;
});
}

</script>

0 comments on commit 3678b09

Please sign in to comment.