rweb_starterkit/src/views/base.html
Mahmoud Emad 363a15776b feat: Add environment configuration and Gitea OAuth
This commit introduces environment configuration and Gitea OAuth
authentication.

- Added a `.env.sample` file for configuring server settings,
  database connection, authentication, and OAuth.  This allows
  for easier customization and separation of configuration from
  code.

- Implemented Gitea OAuth for user authentication.  This provides
  a secure and convenient way for users to log in using their
  existing Gitea accounts.

- Created a troubleshooting guide to help users resolve common
  issues, including authentication and server problems.  This
  improves the overall user experience.

- Added a debug controller and view to aid in development and
  troubleshooting. This provides developers with more tools to
  investigate issues.

- Improved the user interface for login and registration. The
  changes include a cleaner design and clearer instructions.  This
  enhances the user experience.
2025-05-07 16:26:58 +03:00

69 lines
2.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Hostbasket{% endblock %}</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="/static/css/styles.css">
{% block head %}{% endblock %}
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<a class="navbar-brand" href="/">Hostbasket</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link {{ active_class(current=active_page, page=" home") }}" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link {{ active_class(current=active_page, page=" about") }}"
href="/about">About</a>
</li>
</ul>
<ul class="navbar-nav">
{% if user_json %}
<li class="nav-item">
<span class="nav-link">Hello, {{ user.name }}</span>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout">Logout</a>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link {{ active_class(current=active_page, page=" login") }}"
href="/login">Login</a>
</li>
<li class="nav-item">
<a class="nav-link {{ active_class(current=active_page, page=" register") }}"
href="/register">Register</a>
</li>
{% endif %}
</ul>
</div>
</div>
</nav>
<main class="py-4">
{% block content %}{% endblock %}
</main>
<footer class="footer mt-auto py-3 bg-light">
<div class="container text-center">
<span class="text-muted">© 2023 Hostbasket Powered byThreefold. All rights reserved.</span>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
{% block scripts %}{% endblock %}
</body>
</html>