Prettyfies website

This commit is contained in:
procrastimax 2023-06-17 18:44:51 +02:00
parent f01e870716
commit 33c52cd07e
3 changed files with 46 additions and 9 deletions

43
app.py
View file

@ -1,13 +1,44 @@
from shiny import App, ui from pathlib import Path
from typing import List
from shiny import App, ui, Inputs, Outputs, Session
from shiny.types import NavSetArg
from src import mod_welcome from src import mod_welcome
app_ui = ui.page_fluid(
mod_welcome.welcome_ui("welcome"), def nav_controls() -> List[NavSetArg]:
return [
ui.nav(ui.h5("Intro"), mod_welcome.welcome_ui("Intro"), value="intro"),
ui.nav(ui.h5("Datensatz Analyse"), "Datensatz Analyse"),
ui.nav_control(
ui.a(
ui.h5("AG-Link"),
href="https://ag-link.xyz",
target="_blank",
),
),
]
app_ui = ui.page_navbar(
*nav_controls(),
selected="intro",
fluid=False,
title=ui.div(ui.img(src="favicon.ico", width="75dpi", height="75dpi"),
ui.h3("Copbird")),
lang="de",
window_title="Copbird",
collapsible=True,
bg="#ba289f",
inverse=True,
id="Intro",
) )
def server(input, output, session): def server(input: Inputs, output: Outputs, session: Session):
mod_welcome.welcome_server() # mod_welcome.welcome_server()
pass
app = App(app_ui, server) static_dir = Path(__file__).parent / "www"
app = App(app_ui, server, static_assets=static_dir)

View file

@ -7,9 +7,15 @@ from shiny import module, ui
@module.ui @module.ui
def welcome_ui(): def welcome_ui():
return ui.div( return ui.div(
{"style": "border: 1px solid #ccc; border-radius: 5px; margin: 5px 0;"}, ui.h2("Projekt Copbird: Eine Zusammenfassung"),
ui.h2("Das ist die Welcome Page"), ui.markdown("""
ui.markdown("""Hallo Welt""") Copbird ist ein Projekt der [AG-Link][0].
Im Rahmen dieses Projektes entstand ein Stück Software, dass es uns ermöglicht hat viele tausend Tweets von verschiedenen Titter Accounts der Polizei abzurufen und zu speichern.
[0]: https://ag-link.xyz
""")
) )

BIN
www/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB