Skip to content

Commit

Permalink
Templates update
Browse files Browse the repository at this point in the history
  • Loading branch information
ZEZE1020 committed Jan 13, 2025
1 parent cfab1d2 commit 7ee5800
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% load static %}
<title>{% block title %}My Social Media API{% endblock %}</title>
{% load static %}
<link rel="stylesheet" href="{% static 'css/styles.css' %}">
</head>
<body>
Expand All @@ -17,14 +17,44 @@
<li><a href="/api/notifications/">Notifications API</a></li>
<li><a href="/api/posts/">Posts API</a></li>
<li><a href="/accounts/">Accounts</a></li>
{% if user.is_authenticated %}
<li><a href="{% url 'logout' %}">Sign Out</a></li>
{% else %}
<li><a href="{% url 'signup' %}">Sign Up</a></li>
<li><a href="{% url 'login' %}">Sign In</a></li>
{% endif %}
</ul>
</nav>
</header>


<main>
{% block content %}
{% endblock %}
</main>

<footer>
<p>&copy; 2025 Ogembo Godfrey</p>
<nav>
<ul>
<li><a href="{% url 'home' %}">Home</a></li>
<li><a href="/admin/">Admin</a></li>
<li><a href="/api/accounts/">Accounts API</a></li>
<li><a href="/api/notifications/">Notifications API</a></li>
<li><a href="/api/posts/">Posts API</a></li>
<li><a href="/accounts/">Accounts</a></li>
{% if user.is_authenticated %}
<li><a href="{% url 'logout' %}">Sign Out</a></li>
{% else %}
<li><a href="{% url 'signup' %}">Sign Up</a></li>
<li><a href="{% url 'login' %}">Sign In</a></li>
{% endif %}
</ul>
</nav>
<p>&copy; <span id="current-year"></span> My Social Media API</p>
</footer>

<script>
// JavaScript to capture the current year and display it in the footer
document.getElementById('current-year').textContent = new Date().getFullYear();
</script>
</body>
</html>

0 comments on commit 7ee5800

Please sign in to comment.