init commit
This commit is contained in:
40
app/templates/bases/login_base.html
Normal file
40
app/templates/bases/login_base.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<!doctype html>
|
||||
<html lang="en" data-bs-theme="dark">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{{ title or "Code of Conquest" }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<!-- Halfmoon CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/halfmoon@2.0.2/css/halfmoon.min.css" rel="stylesheet" integrity="sha256-RjeFzczeuZHCyS+Gvz+kleETzBF/o84ZRHukze/yv6o=" crossorigin="anonymous">
|
||||
|
||||
<!-- Google Font -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Martian+Mono:wght@300;400;500;700&display=swap">
|
||||
|
||||
<!-- Custom CSS -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body class="d-flex flex-column justify-content-center align-items-center vh-100">
|
||||
|
||||
<!-- Centered content block -->
|
||||
<main class="w-100 d-flex justify-content-center align-items-center flex-grow-1">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="text-center mt-auto mb-3 small text-muted">
|
||||
<p class="mb-0">© 2025 <a href="/" class="text-reset text-decoration-none">Code of Conquest</a></p>
|
||||
<p class="mb-0"><span class="version">v 0.1.0</span></p>
|
||||
</footer>
|
||||
|
||||
<!-- App Write JS Client -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/appwrite@17.0.0"></script>
|
||||
|
||||
<!-- Bootstrap JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha256-CDOy6cOibCWEdsRiZuaHf8dSGGJRYuBGC+mjoJimHGw=" crossorigin="anonymous"></script>
|
||||
{% include "_flash_sticky.html" %}
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
65
app/templates/bases/main_base.html
Normal file
65
app/templates/bases/main_base.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" data-bs-theme="dark" data-bs-core="elegant">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>{% block title %}Admin Panel{% endblock %} - {{app_version}}</title>
|
||||
|
||||
<link rel="icon" href="{{ url_for('static', filename='images/favicons/favicon-32x32.png') }}" type="image/png">
|
||||
|
||||
<!-- Halfmoon CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/halfmoon@2.0.2/css/halfmoon.min.css" rel="stylesheet" integrity="sha256-RjeFzczeuZHCyS+Gvz+kleETzBF/o84ZRHukze/yv6o=" crossorigin="anonymous">
|
||||
|
||||
<!-- Google Font -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Martian+Mono:wght@300;400;500;700&display=swap">
|
||||
|
||||
<!-- Custom CSS -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
|
||||
</head>
|
||||
|
||||
<body class="ps-xxl-sbwidth">
|
||||
|
||||
<!-- Top navbar (mobile) -->
|
||||
<nav class="navbar navbar-expand-xxl bg-body-tertiary border-bottom border-opacity-25 d-flex d-xxl-none">
|
||||
<div class="container-fluid">
|
||||
<a href="{{ url_for('main.dashboard') }}" class="navbar-brand">
|
||||
<img src="{{ url_for('static', filename='images/COC_Icon.png') }}" alt="icon" width="24" height="24"> Admin Panel
|
||||
</a>
|
||||
<button class="btn btn-secondary" type="button" data-bs-toggle="offcanvas" data-bs-target="#sidebar">
|
||||
<i class="fa-solid fa-bars"></i>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{% include "bases/side_nav.html" %}
|
||||
|
||||
{% if current_user.is_authenticated and not current_user.email_verification %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
Please verify your email to unlock all features.
|
||||
<form method="post" action="{{ url_for('auth.send') }}" style="display:inline">
|
||||
<button class="btn btn-sm btn-primary">Resend verification email</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% block body %}
|
||||
<!-- Page content goes here -->
|
||||
{% endblock %}
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="text-center mt-auto mb-3 small text-muted">
|
||||
<p class="mb-0">© 2025 <a href="/" class="text-reset text-decoration-none">Code of Conquest</a></p>
|
||||
<p class="mb-0"><span class="version">{{app_version}}</span></p>
|
||||
</footer>
|
||||
|
||||
<!-- Bootstrap JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha256-CDOy6cOibCWEdsRiZuaHf8dSGGJRYuBGC+mjoJimHGw=" crossorigin="anonymous"></script>
|
||||
<!-- <script src="/static/halfmoon/halfmoon-1.1.1.min.js"></script> -->
|
||||
{% include "_flash_sticky.html" %}
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
40
app/templates/bases/side_nav.html
Normal file
40
app/templates/bases/side_nav.html
Normal file
@@ -0,0 +1,40 @@
|
||||
{# Helper to mark active links by endpoint name #}
|
||||
{% macro nav_link(endpoint, text) -%}
|
||||
{%- set href = url_for(endpoint) -%}
|
||||
{%- set active = 'active' if request.endpoint == endpoint else '' -%}
|
||||
<a href="{{ href }}" class="nav-link {{ active }}" {% if active %}aria-current="page"{% endif %}>{{ text }}</a>
|
||||
{%- endmacro %}
|
||||
|
||||
<nav class="sidebar offcanvas-start offcanvas-xxl" id="sidebar" tabindex="-1">
|
||||
<div class="offcanvas-header bg-body-tertiary border-bottom border-opacity-25">
|
||||
<a class="sidebar-brand" href="{{ url_for('main.dashboard') }}">
|
||||
<img src="{{ url_for('static', filename='images/COC_Icon.png') }}" alt="icon" width="32" height="32"> Admin Panel
|
||||
</a>
|
||||
<small>
|
||||
<span class="version">{{ version or '' }}</span>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="offcanvas-body">
|
||||
<ul class="sidebar-nav">
|
||||
|
||||
<li><h6 class="sidebar-header text-uppercase">Dashboard</h6></li>
|
||||
<li><hr class="sidebar-divider"></li>
|
||||
|
||||
<li class="nav-item">
|
||||
{{ nav_link('main.dashboard', 'Home') }}
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
{# nav_link('profile', 'Profile') #}
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
{# nav_link('login', 'Login') #}
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
{{ nav_link('auth.logout', 'Logout') }}
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user