Framework setup

This commit is contained in:
2025-10-18 00:26:57 +02:00
parent be80a33eed
commit d4fed48074
9 changed files with 898 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
def main() -> None:
print("Hello from allmende-payment-system!")

View File

@@ -0,0 +1,12 @@
# backend/app/main.py
from fastapi import FastAPI, Request
from fastapi.templating import Jinja2Templates
from fastapi.staticfiles import StaticFiles
app = FastAPI()
templates = Jinja2Templates(directory="src/allmende_payment_system/templates")
app.mount("/static", StaticFiles(directory="src/allmende_payment_system/static"), name="static")
@app.get("/")
async def landing_page(request: Request):
return templates.TemplateResponse("index.html.jinja", {"request": request})

View File

@@ -0,0 +1,58 @@
/* frontend/static/css/custom.css */
/* Green theme colors */
:root {
--sidebar-bg: #2d5a3d; /* Dark green background */
--sidebar-link-color: #e0f7e9; /* Light green text */
--sidebar-link-hover: #4caf50; /* Medium green hover */
--main-bg: #f8f9fa; /* Light gray background for main content */
--logo-height: 40px;
}
/* Sidebar styles */
.sidebar {
min-height: 100vh;
background-color: var(--sidebar-bg);
position: sticky;
top: 0;
z-index: 100;
color: var(--sidebar-link-color);
}
.navbar-brand img {
height: var(--logo-height);
}
.sidebar .nav-link {
padding: 10px 15px;
color: var(--sidebar-link-color);
transition: background-color 0.2s;
}
.sidebar .nav-link:hover {
background-color: var(--sidebar-link-hover);
color: white;
}
.sidebar .nav-link.active {
background-color: var(--sidebar-link-hover);
color: white;
}
/* Main content styles */
.main-content {
background-color: var(--main-bg);
min-height: 100vh;
}
/* Mobile responsiveness */
@media (max-width: 767.98px) {
.sidebar {
width: 100%;
position: relative;
min-height: auto;
}
.main-content {
margin-left: 0;
}
}

View File

@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Allmende Bezahlsystem</title>
<!-- Bootstrap 5 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
<link href="/static/css/aps.css" rel="stylesheet">
</head>
<body>
<div class="container-fluid">
<div class="row">
<!-- Left Sidebar (always visible, stacks on mobile) -->
<div class="col-md-3 col-lg-2 p-0 sidebar">
<div class="d-flex flex-column p-3">
<a href="/" class="navbar-brand d-flex align-items-center mb-4">
<img src="https://via.placeholder.com/40" alt="Logo" class="me-2">
<span class="fs-4">APS</span>
</a>
<ul class="nav nav-pills flex-column mb-auto">
<li class="nav-item">
<a href="#" class="nav-link active">
Dashboard
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Projects
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Reports
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Settings
</a>
</li>
</ul>
</div>
</div>
<!-- Main Content -->
<main class="col-md-9 ms-sm-auto col-lg-10 p-md-4 main-content">
{% block content %}
{% endblock %}
</main>
</div>
</div>
<!-- Bootstrap 5 JS Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
</body>
</html>

View File

@@ -0,0 +1,7 @@
{% extends "base.html.jinja" %}
{% block content %}
<div class="p-3">
<h1>Welcome to My App</h1>
<p>This is your landing page content. Replace this with your actual content.</p>
</div>
{% endblock %}