diff --git a/assets/css/base.css b/assets/css/base.css index 60880c9..0fa6901 100644 --- a/assets/css/base.css +++ b/assets/css/base.css @@ -119,6 +119,10 @@ h5 { color: #604c2e; } +.bs-icon.bs-icon-primary svg { + fill: var(--bs-primary-bg-subtle); +} + /* Responsive Styles */ @media (max-width: 768px) { .navbar .container { diff --git a/assets/dist/icons/coffee.svg b/assets/dist/icons/coffee.svg new file mode 100644 index 0000000..4d4e30a --- /dev/null +++ b/assets/dist/icons/coffee.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/dist/icons/envelope.svg b/assets/dist/icons/envelope.svg new file mode 100644 index 0000000..30b1cee --- /dev/null +++ b/assets/dist/icons/envelope.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/main.py b/main.py index dc49b56..9312623 100644 --- a/main.py +++ b/main.py @@ -81,6 +81,13 @@ if os.environ.get("PRIVATECOFFEE_DEV"): app.development_mode = True +def icon(icon_name): + file = send_from_directory("assets", f"dist/icons/{icon_name}.svg") + file_content = file.response.file.read().decode("utf-8") + return file_content + +app.add_template_filter(icon) + if __name__ == "__main__": parser = ArgumentParser(description="Run the private.coffee web server.") parser.add_argument("--port", type=int, default=9810) diff --git a/templates/base.html b/templates/base.html index 13593f7..2a5fa97 100644 --- a/templates/base.html +++ b/templates/base.html @@ -75,21 +75,7 @@
- - {{ "coffee" | icon | safe }}Private.coffee

diff --git a/templates/index.html b/templates/index.html index 94bf775..19c0522 100644 --- a/templates/index.html +++ b/templates/index.html @@ -30,7 +30,7 @@

- {% if service.icon %}{{ service.name }}{% endif %} + {% if service.icon %}{{ service.icon | icon | safe }}{% endif %}
{{ service.name }}

{{ service.long_description }}

@@ -91,9 +91,7 @@
-
- -
+
{{ "envelope" | icon | safe }}
Email

support@private.coffee

@@ -106,9 +104,7 @@
-
- -
+
{{ "matrix-logo" | icon | safe }}