This commit is contained in:
kristof de spiegeleer 2024-09-11 22:19:48 +03:00
parent 21f1da3898
commit 28807cd014
7 changed files with 615 additions and 0 deletions

View File

@ -0,0 +1,21 @@
from fastapi import APIRouter, HTTPException, Request
from fastapi.responses import HTMLResponse
from jinja2 import TemplateNotFound
from webcomponents.timeline_white.web import render as render_timeline
router_timeline = APIRouter()
@router_timeline.get('/timeline/{id:int}', response_class=HTMLResponse)
async def timeline_example(request: Request, id: int):
# deps = request.app.deps
try:
return render_timeline()
except TemplateNotFound:
raise HTTPException(
status_code=404, detail=f'Template not found: {template_path}'
) from None
except Exception as e:
raise HTTPException(
status_code=500, detail=f'An unexpected error occurred: {str(e)}'
) from None

View File

@ -0,0 +1,3 @@
# TODO: calls the openrpc backend
# TODO: converts the data as comesback from backend to the model_view

View File

@ -0,0 +1,65 @@
class TimelineEvent:
def __init__(
self,
icon,
icon_color_from,
icon_color_to,
title,
date,
time,
description,
tags,
):
self.icon = icon
self.icon_color_from = icon_color_from
self.icon_color_to = icon_color_to
self.title = title
self.date = date
self.time = time
self.description = description
self.tags = tags
class Timeline:
def __init__(self, example=False):
if example:
self.events = self.example().events
def example():
events: list[TimelineEvent] = [
TimelineEvent(
icon='ni-bell-55',
icon_color_from='green-600',
icon_color_to='lime-400',
title='$2400, Design changes',
date='22 DEC',
time='7:20 PM',
description='People care about how you see the world, how you think, what motivates you, what youre struggling with or afraid of.',
tags=['design'],
),
TimelineEvent(
icon='ni-html5',
icon_color_from='red-600',
icon_color_to='rose-400',
title='New order #1832412',
date='21 DEC',
time='11 PM',
description='People care about how you see the world, how you think, what motivates you, what youre struggling with or afraid of.',
tags=['order', '#1832412'],
),
TimelineEvent(
icon='ni-cart',
icon_color_from='blue-600',
icon_color_to='cyan-400',
title='Server payments for April',
date='21 DEC',
time='9:34 PM',
description='People care about how you see the world, how you think, what motivates you, what youre struggling with or afraid of.',
tags=['server', 'payments'],
),
# Add more events as needed
]
timeline = Timeline()
timeline.events = events
return timeline

View File

@ -0,0 +1,16 @@
from jinja2 import Environment, FileSystemLoader
from webcomponents.timeline_white.model import TimeLine
def render(timeline_id: int) -> str:
# Create an agenda instance
timeline = TimeLine(example=True) # timeline_id=timeline_id
# Set up Jinja2 environment and load the template
env = Environment(loader=FileSystemLoader(searchpath='./templates'))
template = env.get_template('timeline.html')
# Render the template with the agenda data
output = template.render(timeline=timeline)
return output

View File

@ -0,0 +1,73 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Timeline</title>
<link
href="/static/css/soft-ui-dashboard-tailwind_2.css"
rel="stylesheet"
/>
</head>
<body>
<div class="w-full p-6 mx-auto">
<div class="flex flex-wrap -mx-3">
<div
class="w-full max-w-full px-3 lg:flex-0 shrink-0 lg:w-6/12"
>
<div
class="relative flex flex-col min-w-0 break-words bg-white border-0 shadow-soft-xl rounded-2xl bg-clip-border"
>
<div
class="border-black/12.5 rounded-t-2xl border-b-0 border-solid p-6 pb-0"
>
<h6>Timeline with dotted line</h6>
</div>
<div class="flex-auto p-4">
<div
class="relative before:absolute before:left-4 before:top-0 before:h-full before:border-r-2 before:border-solid before:border-slate-100 before:content-[''] lg:before:-ml-px"
>
{% for event in timeline.events %}
<div class="relative mb-4">
<span
class="w-6.5 h-6.5 rounded-circle text-base z-1 absolute left-4 inline-flex -translate-x-1/2 items-center justify-center bg-white text-center font-semibold"
>
<i
class="relative text-transparent ni leading-none {{ event.icon }} bg-gradient-to-tl from-{{ event.icon_color_from }} to-{{ event.icon_color_to }} leading-pro z-1 bg-clip-text"
></i>
</span>
<div
class="ml-12 pt-1.4 max-w-120 relative -top-1.5 w-auto"
>
<h6
class="mb-0 font-semibold leading-normal text-sm text-slate-700"
>
{{ event.title }}
</h6>
<p
class="mt-1 mb-0 font-semibold leading-tight text-xs text-slate-400"
>
{{ event.date }} {{ event.time }}
</p>
<p
class="mt-4 mb-2 leading-normal text-sm text-slate-500"
>
{{ event.description }}
</p>
{% for tag in event.tags %}
<span
class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-{{ event.icon_color_from }} to-{{ event.icon_color_to }} inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white"
>{{ tag }}</span
>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,435 @@
<!--
=========================================================
* Soft UI Dashboard Pro Tailwind - v1.1.0
=========================================================
* Product Page: https://www.creative-tim.com/product/soft-ui-dashboard-pro-tailwind
* Copyright 2024 Creative Tim (https://www.creative-tim.com)
* Coded by Creative Tim
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"/>
<link href="/static/img/apple-icon.png" rel="apple-touch-icon" sizes="76x76"/>
<link href="/static/img/apple-icon.png" rel="icon" type="image/png"/>
<title>
Soft UI Dashboard PRO Tailwind by Creative Tim
</title>
<!-- Fonts and icons -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet"/>
<!-- Nucleo Icons -->
<link href="/static/css/nucleo-icons.css" rel="stylesheet"/>
<link href="/static/css/nucleo-svg.css" rel="stylesheet"/>
<!-- Font Awesome Icons -->
<script crossorigin="anonymous" src="/static/js/42d5adcbca.js">
</script>
<!-- Main Styling -->
<link href="/static/css/soft-ui-dashboard-tailwind_2.css" rel="stylesheet"/>
<!-- Nepcha Analytics (nepcha.com) -->
<!-- Nepcha is a easy-to-use web analytics. No cookies and fully compliant with GDPR, CCPA and PECR. -->
<script data-site="YOUR_DOMAIN_HERE" defer="" src="/static/js/nepcha-analytics.js">
</script>
</head>
<body class="m-0 font-sans antialiased font-normal text-left leading-default text-base dark:bg-slate-950 bg-gray-50 text-slate-500 dark:text-white">
<div class="w-full p-6 mx-auto">
<div class="flex flex-wrap -mx-3">
<div class="w-full max-w-full px-3 lg:flex-0 shrink-0 lg:w-6/12">
<div class="relative flex flex-col min-w-0 break-words bg-white border-0 shadow-soft-xl rounded-2xl bg-clip-border">
<div class="border-black/12.5 rounded-t-2xl border-b-0 border-solid p-6 pb-0">
<h6>
Timeline with dotted line
</h6>
</div>
<div class="flex-auto p-4">
<div class="relative before:absolute before:left-4 before:top-0 before:h-full before:border-r-2 before:border-solid before:border-slate-100 before:content-[''] lg:before:-ml-px">
<div class="relative mb-4">
<span class="w-6.5 h-6.5 rounded-circle text-base z-1 absolute left-4 inline-flex -translate-x-1/2 items-center justify-center bg-white text-center font-semibold">
<i class="relative text-transparent ni leading-none ni-bell-55 bg-gradient-to-tl from-green-600 to-lime-400 leading-pro z-1 bg-clip-text">
</i>
</span>
<div class="ml-12 pt-1.4 max-w-120 relative -top-1.5 w-auto">
<h6 class="mb-0 font-semibold leading-normal text-sm text-slate-700">
$2400, Design changes
</h6>
<p class="mt-1 mb-0 font-semibold leading-tight text-xs text-slate-400">
22 DEC 7:20 PM
</p>
<p class="mt-4 mb-2 leading-normal text-sm text-slate-500">
People care about how you see the world, how you think, what motivates you, what youre struggling with or afraid of.
</p>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-green-600 to-lime-400 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
design
</span>
</div>
</div>
<div class="relative mb-4">
<span class="w-6.5 h-6.5 rounded-circle text-base z-1 absolute left-4 inline-flex -translate-x-1/2 items-center justify-center bg-white text-center font-semibold">
<i class="relative text-transparent ni leading-none ni-html5 bg-gradient-to-tl from-red-600 to-rose-400 leading-pro z-1 bg-clip-text">
</i>
</span>
<div class="ml-12 pt-1.4 max-w-120 relative -top-1.5 w-auto">
<h6 class="mb-0 font-semibold leading-normal text-sm text-slate-700">
New order #1832412
</h6>
<p class="mt-1 mb-0 font-semibold leading-tight text-xs text-slate-400">
21 DEC 11 PM
</p>
<p class="mt-4 mb-2 leading-normal text-sm text-slate-500">
People care about how you see the world, how you think, what motivates you, what youre struggling with or afraid of.
</p>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-red-600 to-rose-400 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
order
</span>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-red-600 to-rose-400 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
#1832412
</span>
</div>
</div>
<div class="relative mb-4">
<span class="w-6.5 h-6.5 rounded-circle text-base z-1 absolute left-4 inline-flex -translate-x-1/2 items-center justify-center bg-white text-center font-semibold">
<i class="relative text-transparent ni leading-none ni-cart bg-gradient-to-tl from-blue-600 to-cyan-400 leading-pro z-1 bg-clip-text">
</i>
</span>
<div class="ml-12 pt-1.4 max-w-120 relative -top-1.5 w-auto">
<h6 class="mb-0 font-semibold leading-normal text-sm text-slate-700">
Server payments for April
</h6>
<p class="mt-1 mb-0 font-semibold leading-tight text-xs text-slate-400">
21 DEC 9:34 PM
</p>
<p class="mt-4 mb-2 leading-normal text-sm text-slate-500">
People care about how you see the world, how you think, what motivates you, what youre struggling with or afraid of.
</p>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-blue-600 to-cyan-400 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
server
</span>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-blue-600 to-cyan-400 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
payments
</span>
</div>
</div>
<div class="relative mb-4">
<span class="w-6.5 h-6.5 rounded-circle text-base z-1 absolute left-4 inline-flex -translate-x-1/2 items-center justify-center bg-white text-center font-semibold">
<i class="relative text-transparent ni leading-none ni-credit-card bg-gradient-to-tl from-red-500 to-yellow-400 leading-pro z-1 bg-clip-text">
</i>
</span>
<div class="ml-12 pt-1.4 max-w-120 relative -top-1.5 w-auto">
<h6 class="mb-0 font-semibold leading-normal text-sm text-slate-700">
New card added for order #4395133
</h6>
<p class="mt-1 mb-0 font-semibold leading-tight text-xs text-slate-400">
20 DEC 2:20 AM
</p>
<p class="mt-4 mb-2 leading-normal text-sm text-slate-500">
People care about how you see the world, how you think, what motivates you, what youre struggling with or afraid of.
</p>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-red-500 to-yellow-400 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
card
</span>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-red-500 to-yellow-400 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
#4395133
</span>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-red-500 to-yellow-400 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
priority
</span>
</div>
</div>
<div class="relative mb-4">
<span class="w-6.5 h-6.5 rounded-circle text-base z-1 absolute left-4 inline-flex -translate-x-1/2 items-center justify-center bg-white text-center font-semibold">
<i class="relative text-transparent ni leading-none ni-key-25 bg-gradient-to-tl from-purple-700 to-pink-500 leading-pro z-1 bg-clip-text">
</i>
</span>
<div class="ml-12 pt-1.4 max-w-120 relative -top-1.5 w-auto">
<h6 class="mb-0 font-semibold leading-normal text-sm text-slate-700">
Unlock packages for development
</h6>
<p class="mt-1 mb-0 font-semibold leading-tight text-xs text-slate-400">
18 DEC 4:54 AM
</p>
<p class="mt-4 mb-2 leading-normal text-sm text-slate-500">
People care about how you see the world, how you think, what motivates you, what youre struggling with or afraid of.
</p>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-purple-700 to-pink-500 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
development
</span>
</div>
</div>
<div class="relative mb-4">
<span class="w-6.5 h-6.5 rounded-circle text-base z-1 absolute left-4 inline-flex -translate-x-1/2 items-center justify-center bg-white text-center font-semibold">
<i class="relative text-transparent ni leading-none ni-archive-2 bg-gradient-to-tl from-green-600 to-lime-400 leading-pro z-1 bg-clip-text">
</i>
</span>
<div class="ml-12 pt-1.4 max-w-120 relative -top-1.5 w-auto">
<h6 class="mb-0 font-semibold leading-normal text-sm text-slate-700">
New message unread
</h6>
<p class="mt-1 mb-0 font-semibold leading-tight text-xs text-slate-400">
16 DEC
</p>
<p class="mt-4 mb-2 leading-normal text-sm text-slate-500">
People care about how you see the world, how you think, what motivates you, what youre struggling with or afraid of.
</p>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-green-600 to-lime-400 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
message
</span>
</div>
</div>
<div class="relative mb-4">
<span class="w-6.5 h-6.5 rounded-circle text-base z-1 absolute left-4 inline-flex -translate-x-1/2 items-center justify-center bg-white text-center font-semibold">
<i class="relative text-transparent ni leading-none ni-check-bold bg-gradient-to-tl from-blue-600 to-cyan-400 leading-pro z-1 bg-clip-text">
</i>
</span>
<div class="ml-12 pt-1.4 max-w-120 relative -top-1.5 w-auto">
<h6 class="mb-0 font-semibold leading-normal text-sm text-slate-700">
Notifications unread
</h6>
<p class="mt-1 mb-0 font-semibold leading-tight text-xs text-slate-400">
15 DEC
</p>
<p class="mt-4 mb-2 leading-normal text-sm text-slate-500">
People care about how you see the world, how you think, what motivates you, what youre struggling with or afraid of.
</p>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-blue-600 to-cyan-400 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
notification
</span>
</div>
</div>
<div class="relative mb-4">
<span class="w-6.5 h-6.5 rounded-circle text-base z-1 absolute left-4 inline-flex -translate-x-1/2 items-center justify-center bg-white text-center font-semibold">
<i class="relative text-transparent ni leading-none ni-box-2 bg-gradient-to-tl from-red-500 to-yellow-400 leading-pro z-1 bg-clip-text">
</i>
</span>
<div class="ml-12 pt-1.4 max-w-120 relative -top-1.5 w-auto">
<h6 class="mb-0 font-semibold leading-normal text-sm text-slate-700">
New request
</h6>
<p class="mt-1 mb-0 font-semibold leading-tight text-xs text-slate-400">
14 DEC
</p>
<p class="mt-4 mb-2 leading-normal text-sm text-slate-500">
People care about how you see the world, how you think, what motivates you, what youre struggling with or afraid of.
</p>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-red-500 to-yellow-400 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
request
</span>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-red-500 to-yellow-400 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
priority
</span>
</div>
</div>
<div class="relative mb-0">
<span class="w-6.5 h-6.5 rounded-circle text-base z-1 absolute left-4 inline-flex -translate-x-1/2 items-center justify-center bg-white text-center font-semibold">
<i class="relative text-transparent ni leading-none ni-controller bg-gradient-to-tl from-gray-900 to-slate-800 leading-pro z-1 bg-clip-text">
</i>
</span>
<div class="ml-12 pt-1.4 max-w-120 relative -top-1.5 w-auto">
<h6 class="mb-0 font-semibold leading-normal text-sm text-slate-700">
Controller issues
</h6>
<p class="mt-1 mb-0 font-semibold leading-tight text-xs text-slate-400">
13 DEC
</p>
<p class="mt-4 mb-2 leading-normal text-sm text-slate-500">
People care about how you see the world, how you think, what motivates you, what youre struggling with or afraid of.
</p>
<span class="py-1.8 px-3 text-xxs rounded-1 bg-gradient-to-tl from-gray-900 to-slate-800 inline-block whitespace-nowrap text-center align-baseline font-bold uppercase leading-none text-white">
controller
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="pt-4">
<div class="w-full px-6 mx-auto">
<div class="flex flex-wrap items-center -mx-3 lg:justify-between">
<div class="w-full max-w-full px-3 mt-0 mb-6 shrink-0 lg:mb-0 lg:w-1/2 lg:flex-none">
<div class="leading-normal text-center copyright text-sm text-slate-500 lg:text-left">
©
<script>
document.write(new Date().getFullYear() + ",");
</script>
made with
<i class="fa fa-heart">
</i>
by
<a class="font-semibold text-slate-700 dark:text-white" href="https://www.creative-tim.com" target="_blank">
Creative Tim
</a>
for a better web.
</div>
</div>
<div class="w-full max-w-full px-3 mt-0 shrink-0 lg:w-1/2 lg:flex-none">
<ul class="flex flex-wrap justify-center pl-0 mb-0 list-none lg:justify-end">
<li class="nav-item">
<a class="block px-4 pt-0 pb-1 font-normal transition-colors ease-soft-in-out text-sm text-slate-500" href="https://www.creative-tim.com" target="_blank">
Creative Tim
</a>
</li>
<li class="nav-item">
<a class="block px-4 pt-0 pb-1 font-normal transition-colors ease-soft-in-out text-sm text-slate-500" href="https://www.creative-tim.com/presentation" target="_blank">
About Us
</a>
</li>
<li class="nav-item">
<a class="block px-4 pt-0 pb-1 font-normal transition-colors ease-soft-in-out text-sm text-slate-500" href="https://creative-tim.com/blog" target="_blank">
Blog
</a>
</li>
<li class="nav-item">
<a class="block px-4 pt-0 pb-1 pr-0 font-normal transition-colors ease-soft-in-out text-sm text-slate-500" href="https://www.creative-tim.com/license" target="_blank">
License
</a>
</li>
</ul>
</div>
</div>
</div>
</footer>
</main>
<div fixed-plugin="">
<a aria-expanded="false" class="fixed px-4 py-2 bg-white cursor-pointer bottom-7 right-7 text-xl z-990 shadow-soft-lg rounded-circle text-slate-700" fixed-plugin-button="">
<i class="py-2 pointer-events-none fa fa-cog">
</i>
</a>
<!-- -right-90 in loc de 0-->
<div class="dark:bg-gray-950/80 z-sticky shadow-soft-3xl w-90 ease-soft -right-90 fixed top-0 left-auto flex h-full min-w-0 flex-col break-words rounded-none border-0 bg-white/80 bg-clip-border px-2.5 backdrop-blur-2xl backdrop-saturate-200 duration-200" fixed-plugin-card="">
<div class="px-6 pt-4 pb-0 mb-0 border-b-0 rounded-t-2xl">
<div class="float-left">
<h5 class="mt-4 mb-0 dark:text-white">
Soft UI Configurator
</h5>
<p class="dark:text-white dark:opacity-60">
See our dashboard options.
</p>
</div>
<div class="float-right mt-6">
<button class="inline-block p-0 mb-4 font-bold text-center uppercase align-middle transition-all bg-transparent border-0 rounded-lg shadow-none cursor-pointer hover:scale-102 leading-pro text-xs ease-soft-in tracking-tight-soft bg-150 bg-x-25 active:opacity-85 text-slate-700 dark:text-white" fixed-plugin-close-button="">
<i class="fa fa-close">
</i>
</button>
</div>
<!-- End Toggle Button -->
</div>
<hr class="h-px mx-0 my-1 bg-transparent bg-gradient-to-r from-transparent via-black/40 to-transparent dark:bg-gradient-to-r dark:from-transparent dark:via-white dark:to-transparent"/>
<div class="flex-auto p-6 pt-0 sm:pt-4">
<!-- Sidebar Backgrounds -->
<div>
<h6 class="mb-0 dark:text-white">
Sidebar Colors
</h6>
</div>
<a class="switch-trigger background-color" href="javascript:void(0)">
<div class="my-2 text-left" sidenav-colors="">
<span active-color="" class="py-2.2 text-xs px-2.2 rounded-circle h-5.6 mr-1.25 w-5.6 ease-soft-in-out bg-gradient-to-tl from-purple-700 to-pink-500 relative inline-block cursor-pointer whitespace-nowrap border border-solid border-slate-700 text-center align-baseline font-bold uppercase leading-none text-white transition-all duration-200 hover:border-slate-700" data-color-from="purple-700" data-color-to="pink-500" onclick="sidebarColor(this)">
</span>
<span class="py-2.2 text-xs px-2.2 rounded-circle h-5.6 mr-1.25 w-5.6 ease-soft-in-out bg-gradient-to-tl from-gray-900 to-slate-800 dark:bg-gradient-to-tl dark:from-slate-850 dark:to-gray-850 relative inline-block cursor-pointer whitespace-nowrap border border-solid border-white text-center align-baseline font-bold uppercase leading-none text-white transition-all duration-200 hover:border-slate-700" data-color-from="gray-900" data-color-to="slate-800" onclick="sidebarColor(this)">
</span>
<span class="py-2.2 text-xs px-2.2 rounded-circle h-5.6 mr-1.25 w-5.6 ease-soft-in-out bg-gradient-to-tl from-blue-600 to-cyan-400 relative inline-block cursor-pointer whitespace-nowrap border border-solid border-white text-center align-baseline font-bold uppercase leading-none text-white transition-all duration-200 hover:border-slate-700" data-color-from="blue-600" data-color-to="cyan-400" onclick="sidebarColor(this)">
</span>
<span class="py-2.2 text-xs px-2.2 rounded-circle h-5.6 mr-1.25 w-5.6 ease-soft-in-out bg-gradient-to-tl from-green-600 to-lime-400 relative inline-block cursor-pointer whitespace-nowrap border border-solid border-white text-center align-baseline font-bold uppercase leading-none text-white transition-all duration-200 hover:border-slate-700" data-color-from="green-600" data-color-to="lime-400" onclick="sidebarColor(this)">
</span>
<span class="py-2.2 text-xs px-2.2 rounded-circle h-5.6 mr-1.25 w-5.6 ease-soft-in-out bg-gradient-to-tl from-red-500 to-yellow-400 relative inline-block cursor-pointer whitespace-nowrap border border-solid border-white text-center align-baseline font-bold uppercase leading-none text-white transition-all duration-200 hover:border-slate-700" data-color-from="red-500" data-color-to="yellow-400" onclick="sidebarColor(this)">
</span>
<span class="py-2.2 text-xs px-2.2 rounded-circle h-5.6 mr-1.25 w-5.6 ease-soft-in-out bg-gradient-to-tl from-red-600 to-rose-400 relative inline-block cursor-pointer whitespace-nowrap border border-solid border-white text-center align-baseline font-bold uppercase leading-none text-white transition-all duration-200 hover:border-slate-700" data-color-from="red-600" data-color-to="rose-400" onclick="sidebarColor(this)">
</span>
</div>
</a>
<!-- Sidenav Type -->
<div class="mt-4">
<h6 class="mb-0 dark:text-white">
Sidenav Type
</h6>
<p class="leading-normal text-sm dark:opacity-60">
Choose between 2 different sidenav types.
</p>
</div>
<div class="flex">
<button active-style="" class="inline-block w-full px-4 py-3 mb-2 font-bold text-center text-white uppercase align-middle transition-all border border-transparent border-solid rounded-lg cursor-pointer xl-max:cursor-not-allowed xl-max:opacity-65 xl-max:pointer-events-none xl-max:bg-gradient-to-tl xl-max:from-purple-700 xl-max:to-pink-500 xl-max:text-white xl-max:border-0 hover:scale-102 hover:shadow-soft-xs active:opacity-85 leading-pro text-xs ease-soft-in tracking-tight-soft shadow-soft-md bg-150 bg-x-25 bg-gradient-to-tl from-purple-700 to-pink-500 bg-fuchsia-500 hover:border-fuchsia-500 dark:pointer-events-none dark:cursor-not-allowed" data-class="bg-transparent" transparent-style-btn="">
Transparent
</button>
<button class="inline-block w-full px-4 py-3 mb-2 ml-2 font-bold text-center uppercase align-middle transition-all bg-transparent border border-solid rounded-lg cursor-pointer xl-max:cursor-not-allowed xl-max:opacity-65 xl-max:pointer-events-none xl-max:bg-gradient-to-tl xl-max:from-purple-700 xl-max:to-pink-500 xl-max:text-white xl-max:border-0 hover:scale-102 hover:shadow-soft-xs active:opacity-85 leading-pro text-xs ease-soft-in tracking-tight-soft shadow-soft-md bg-150 bg-x-25 border-fuchsia-500 bg-none text-fuchsia-500 hover:border-fuchsia-500 dark:pointer-events-none dark:cursor-not-allowed" data-class="bg-white" white-style-btn="">
White
</button>
</div>
<p class="block mt-2 leading-normal text-sm xl:hidden">
You can change the sidenav type just on desktop view.
</p>
<!-- Navbar Fixed -->
<div class="mt-4">
<h6 class="mb-0 dark:text-white">
Navbar Fixed
</h6>
</div>
<div class="min-h-6 mb-0.5 block pl-0">
<input class="rounded-10 duration-250 ease-soft-in-out after:rounded-circle after:shadow-soft-2xl after:duration-250 checked:after:translate-x-5.3 h-5 relative float-left mt-1 ml-auto w-10 cursor-pointer appearance-none border border-solid border-gray-200 bg-slate-800/10 bg-none bg-contain bg-left bg-no-repeat align-top transition-all after:absolute after:top-px after:h-4 after:w-4 after:translate-x-px after:bg-white after:content-[''] checked:border-slate-800/95 checked:bg-slate-800/95 checked:bg-none checked:bg-right" navbar-fixed-toggle="" type="checkbox"/>
</div>
<hr class="h-px mt-4 mb-1 bg-transparent bg-gradient-to-r from-transparent via-black/40 to-transparent dark:bg-gradient-to-r dark:from-transparent dark:via-white dark:to-transparent"/>
<div class="mt-2">
<h6 class="mb-0 dark:text-white">
Sidenav Mini
</h6>
</div>
<div class="min-h-6 mb-0.5 block pl-0">
<input class="rounded-10 duration-250 ease-soft-in-out after:rounded-circle after:shadow-soft-2xl after:duration-250 checked:after:translate-x-5.3 h-5 relative float-left mt-1 ml-auto w-10 cursor-pointer appearance-none border border-solid border-gray-200 bg-slate-800/10 bg-none bg-contain bg-left bg-no-repeat align-top transition-all after:absolute after:top-px after:h-4 after:w-4 after:translate-x-px after:bg-white after:content-[''] checked:border-slate-800/95 checked:bg-slate-800/95 checked:bg-none checked:bg-right" sidenav-mini-toggle="" type="checkbox"/>
</div>
<hr class="h-px mt-4 mb-1 bg-transparent bg-gradient-to-r from-transparent via-black/40 to-transparent dark:bg-gradient-to-r dark:from-transparent dark:via-white dark:to-transparent"/>
<div class="mt-2">
<h6 class="mb-0 dark:text-white">
Light/Dark
</h6>
</div>
<div class="min-h-6 mb-0.5 block pl-0">
<input class="rounded-10 duration-250 ease-soft-in-out after:rounded-circle after:shadow-soft-2xl after:duration-250 checked:after:translate-x-5.3 h-5 relative float-left mt-1 ml-auto w-10 cursor-pointer appearance-none border border-solid border-gray-200 bg-slate-800/10 bg-none bg-contain bg-left bg-no-repeat align-top transition-all after:absolute after:top-px after:h-4 after:w-4 after:translate-x-px after:bg-white after:content-[''] checked:border-slate-800/95 checked:bg-slate-800/95 checked:bg-none checked:bg-right" dark-toggle="" type="checkbox"/>
</div>
<hr class="h-px my-6 bg-transparent bg-gradient-to-r from-transparent via-black/40 to-transparent dark:bg-gradient-to-r dark:from-transparent dark:via-white dark:to-transparent"/>
<a class="inline-block w-full px-6 py-3 mb-4 font-bold text-center text-white uppercase align-middle transition-all bg-transparent border-0 rounded-lg cursor-pointer leading-pro text-xs ease-soft-in hover:shadow-soft-xs hover:scale-102 active:opacity-85 tracking-tight-soft shadow-soft-md bg-150 bg-x-25 bg-gradient-to-tl from-blue-600 to-cyan-400" href="https://www.creative-tim.com/product/soft-ui-dashboard-pro-tailwind" target="_blank">
Buy Now
</a>
<a class="inline-block w-full px-6 py-3 mb-4 font-bold text-center text-white uppercase align-middle transition-all bg-transparent border border-transparent border-solid rounded-lg cursor-pointer leading-pro text-xs ease-soft-in hover:shadow-soft-xs hover:scale-102 active:opacity-85 tracking-tight-soft shadow-soft-md bg-150 bg-x-25 bg-gradient-to-tl from-gray-900 to-slate-800 dark:bg-gradient-to-tl dark:from-slate-850 dark:to-gray-850 dark:border-white dark:text-white" href="https://www.creative-tim.com/product/soft-ui-dashboard-tailwind" target="_blank">
Free Demo
</a>
<a class="inline-block w-full px-6 py-3 mb-4 font-bold text-center uppercase align-middle transition-all bg-transparent border border-solid rounded-lg shadow-none cursor-pointer active:shadow-soft-xs hover:scale-102 active:opacity-85 leading-pro text-xs ease-soft-in tracking-tight-soft bg-150 bg-x-25 border-slate-700 text-slate-700 hover:bg-transparent hover:text-slate-700 hover:shadow-none active:bg-slate-700 active:text-white active:hover:bg-transparent active:hover:text-slate-700 active:hover:shadow-none dark:border-white dark:text-white" href="https://www.creative-tim.com/learning-lab/tailwind/html/quick-start/soft-ui-dashboard/" target="_blank">
View documentation
</a>
<div class="w-full text-center">
<a aria-label="Star creativetimofficial/soft-ui-dashboard on GitHub" class="github-button" data-icon="octicon-star" data-show-count="true" data-size="large" href="https://github.com/creativetimofficial/ct-soft-ui-dashboard-pro">
Star
</a>
<h6 class="mt-4">
Thank you for sharing!
</h6>
<a class="inline-block px-6 py-3 mb-0 mr-2 font-bold text-center text-white uppercase align-middle transition-all border-0 rounded-lg cursor-pointer hover:shadow-soft-xs hover:scale-102 active:opacity-85 leading-pro text-xs ease-soft-in tracking-tight-soft shadow-soft-md bg-150 bg-x-25 me-2 border-slate-700 bg-slate-700" href="https://twitter.com/intent/tweet?text=Check%20Soft%20UI%20Dashboard%20Pro%20Tailwind%20made%20by%20%40CreativeTim%20%23webdesign%20%23dashboard%20%23tailwindCSS&amp;url=https%3A%2F%2Fwww.creative-tim.com%2Fproduct%2Fsoft-ui-dashboard-pro-tailwind" target="_blank">
<i aria-hidden="true" class="mr-1 fab fa-twitter">
</i>
Tweet
</a>
<a class="inline-block px-6 py-3 mb-0 mr-2 font-bold text-center text-white uppercase align-middle transition-all border-0 rounded-lg cursor-pointer hover:shadow-soft-xs hover:scale-102 active:opacity-85 leading-pro text-xs ease-soft-in tracking-tight-soft shadow-soft-md bg-150 bg-x-25 me-2 border-slate-700 bg-slate-700" href="https://www.facebook.com/sharer/sharer.php?u=https://www.creative-tim.com/product/soft-ui-dashboard-pro-tailwind" target="_blank">
<i aria-hidden="true" class="mr-1 fab fa-facebook-square">
</i>
Share
</a>
</div>
</div>
</div>
</div>
</body>
<!-- Core JS Files -->
<script src="/static/js/plugins/nouislider.min.js">
</script>
<script src="/static/js/plugins/perfect-scrollbar.min.js">
</script>
<!-- main script file -->
<script src="/static/js/soft-ui-dashboard-pro-tailwind.js">
</script>
</html>

View File

@ -8,6 +8,7 @@ from fastapi.responses import (
from infoserver.dependencies import Dependencies from infoserver.dependencies import Dependencies
from infoserver.router_login import router_login from infoserver.router_login import router_login
from infoserver.router_pdf_preso import router_pdf from infoserver.router_pdf_preso import router_pdf
from infoserver.router_projects import router_projects
from infoserver.router_static import router_static from infoserver.router_static import router_static
from infoserver.router_template import router_template from infoserver.router_template import router_template
from jwt.exceptions import PyJWTError from jwt.exceptions import PyJWTError
@ -50,6 +51,7 @@ app.include_router(router_login)
app.include_router(router_pdf) app.include_router(router_pdf)
app.include_router(router_static) app.include_router(router_static)
app.include_router(router_template) app.include_router(router_template)
app.include_router(router_projects)
deps = Dependencies( deps = Dependencies(
DB_PATH, TEMPLATES_DIR, STATIC_DIR, HEROWEB_DIR, COLLECTIONS_DIR, SERVERHOST DB_PATH, TEMPLATES_DIR, STATIC_DIR, HEROWEB_DIR, COLLECTIONS_DIR, SERVERHOST