Removed old PHP code, migrated to Python and Flask

Update .dockerignore, .env, and 503 more files...
This commit is contained in:
2024-10-20 16:20:37 +02:00
parent 169e4b4fe0
commit a930331d6c
394 changed files with 4705 additions and 190131 deletions

View File

View File

@@ -0,0 +1,10 @@
from flask import render_template
def render_button(inner_html: str, disabled: bool = False) -> str:
return render_template(
"elements/button.jinja",
button_inner_html=inner_html,
button_disabled=disabled,
button_extra_classes=""
)

View File

@@ -0,0 +1,37 @@
from typing import Optional
from flask import render_template
def render_heading(inner_html: str, level: int = 1, icon: Optional[str] = None, right_html: Optional[str] = None,
anchor_id: Optional[str] = None, background_class: str = "bkgd-grid") -> str:
return render_template(
"elements/heading.jinja",
heading_inner_html=inner_html,
heading_level=level + 1,
heading_icon=icon,
heading_right_html=right_html,
heading_anchor_id=anchor_id,
heading_background_class=background_class,
)
def render_h1(inner_html: str, icon: Optional[str] = None, right_html: Optional[str] = None,
anchor_id: Optional[str] = None, background_class: str = "bkgd-grid") -> str:
return render_heading(
inner_html, 1, icon, right_html, anchor_id, background_class
)
def render_h2(inner_html: str, icon: Optional[str] = None, right_html: Optional[str] = None,
anchor_id: Optional[str] = None, background_class: str = "bkgd-grid") -> str:
return render_heading(
inner_html, 2, icon, right_html, anchor_id, background_class
)
def render_h3(inner_html: str, icon: Optional[str] = None, right_html: Optional[str] = None,
anchor_id: Optional[str] = None, background_class: str = "bkgd-grid") -> str:
return render_heading(
inner_html, 3, icon, right_html, anchor_id, background_class
)

View File

View File

@@ -0,0 +1,8 @@
from flask import render_template
def render_paragraph(inner_html: str) -> str:
return render_template(
"elements/paragraph.jinja",
paragraph_inner_html=inner_html,
)

View File

@@ -0,0 +1,8 @@
from flask import render_template
def render_splide(inner_html_panes: list[str]) -> str:
return render_template(
"elements/splide.jinja",
splide_inner_html_panes=inner_html_panes,
)