separation of routes, semver, base template

This commit is contained in:
Per Stark
2024-12-09 13:48:13 +01:00
parent 620530bce1
commit b61dae1ea8
4 changed files with 500 additions and 32 deletions

View File

@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}radien{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="assets/style.css">
<script src="https://unpkg.com/htmx.org@2.0.3"></script>
</head>
<body class="min-h-screen bg-gradient-to-br from-slate-50 to-purple-200">
<!-- Navbar -->
<nav class="bg-black/30 backdrop-blur-sm border-b border-white/10">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<div class="flex items-center">
<a href="/" class="flex items-center">
<!-- You can add your logo here -->
<span class="text-2xl hover:text-white font-bold text-gray-300 bg-clip-text">
radien
</span>
</a>
</div>
<div class="flex items-center space-x-4">
<a href="/upload"
class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition-colors">
Upload
</a>
<a href="/files"
class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition-colors">
Files
</a>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<main class="container mx-auto px-4 py-8">
{% block content %}{% endblock %}
</main>
</body>
</html>

View File

@@ -1,24 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="assets/style.css">
<script src="https://unpkg.com/htmx.org@2.0.3"></script>
<title>
radien
</title>
</head>
<body class="h-full bg-slate-100">
<h1 class="text-4xl bg-blue-300 p-2 font-mono font-bold">radien</h1>
<div class="p-10">
I am {{adjective}}
<div class="py-4">
<h2 class="text-lg font-bold">Queue:</h2>
<p class="">There are {{queue_length}} items queued </p>
</div>
{% extends "base.html" %}
{% block content %}
<div class="flex flex-col items-center justify-center min-h-[80vh] space-y-8">
<!-- Hero Section -->
<div class="text-center space-y-4 mb-8">
<h1
class="text-5xl font-bold bg-gradient-to-r from-blue-400 via-purple-500 to-pink-500 text-transparent bg-clip-text">
Welcome to radien
</h1>
<p class="text-gray-400 text-xl">
An experiment in creating a second brain
</p>
</div>
</body>
</html>
<!-- Search Bar -->
<div class="w-full max-w-2xl">
<input type="text" placeholder="Search..."
class="w-full px-6 py-4 bg-black/30 backdrop-blur-md text-white placeholder-gray-400 outline-none rounded-xl"
hx-get="/search" hx-trigger="keyup changed delay:500ms" hx-target="#search-results">
</div>
<!-- Search Results -->
<div id="search-results" class="w-full max-w-2xl mt-4">
<!-- Results will be populated here by HTMX -->
</div>
<!-- Quick Actions -->
<div class="flex gap-4 mt-8">
<a href="/upload"
class="px-6 py-3 bg-blue-600/20 hover:bg-blue-600/30 border border-blue-500/30 rounded-lg text-blue-400 transition-all hover:scale-105">
Upload File
</a>
<a href="/files"
class="px-6 py-3 bg-purple-600/20 hover:bg-purple-600/30 border border-purple-500/30 rounded-lg text-purple-400 transition-all hover:scale-105">
Browse Files
</a>
</div>
</div>
{% endblock %}