From f2a006b3974d8602dbef21a2557191e1e1e9097f Mon Sep 17 00:00:00 2001 From: Stef Date: Sun, 31 Aug 2025 13:31:15 +0200 Subject: [PATCH] Updated frontend and changed a little backend Added svg icons to the applications. Frontend will display the icon by name of [id].[icon_filetype] which defaults to svg. Able to set to other filetypes. Changed the frontend to center the application --- mem/__init__.py | 4 ++-- static/icons/0.svg | 12 ++++++++++++ static/icons/1.svg | 1 + static/icons/2.svg | 5 +++++ static/icons/3.svg | 9 +++++++++ static/icons/4.svg | 5 +++++ static/icons/5.svg | 1 + static/icons/6.svg | 1 + static/icons/7.svg | 1 + static/icons/8.svg | 1 + static/icons/9.svg | 1 + static/placeholder.svg | 2 -- templates/home.html | 9 ++++----- 13 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 static/icons/0.svg create mode 100644 static/icons/1.svg create mode 100644 static/icons/2.svg create mode 100644 static/icons/3.svg create mode 100644 static/icons/4.svg create mode 100644 static/icons/5.svg create mode 100644 static/icons/6.svg create mode 100644 static/icons/7.svg create mode 100644 static/icons/8.svg create mode 100644 static/icons/9.svg delete mode 100644 static/placeholder.svg diff --git a/mem/__init__.py b/mem/__init__.py index ff44d4c..8af79dd 100644 --- a/mem/__init__.py +++ b/mem/__init__.py @@ -9,7 +9,7 @@ class service: public: bool error: Optional[str] ping: Optional[int] - icon_filetype: Optional[str] + icon_filetype: str def __init__( self, @@ -17,7 +17,7 @@ class service: url: str = "", label: str = "", public: bool = True, - icon_filetype: Optional[str] = None, + icon_filetype: str = "svg", ): self.id = id self.url = url diff --git a/static/icons/0.svg b/static/icons/0.svg new file mode 100644 index 0000000..3d0c51b --- /dev/null +++ b/static/icons/0.svg @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/static/icons/1.svg b/static/icons/1.svg new file mode 100644 index 0000000..872b135 --- /dev/null +++ b/static/icons/1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/icons/2.svg b/static/icons/2.svg new file mode 100644 index 0000000..ca47c42 --- /dev/null +++ b/static/icons/2.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/static/icons/3.svg b/static/icons/3.svg new file mode 100644 index 0000000..2820b8e --- /dev/null +++ b/static/icons/3.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/static/icons/4.svg b/static/icons/4.svg new file mode 100644 index 0000000..6fa8a8e --- /dev/null +++ b/static/icons/4.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/static/icons/5.svg b/static/icons/5.svg new file mode 100644 index 0000000..b76d638 --- /dev/null +++ b/static/icons/5.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/icons/6.svg b/static/icons/6.svg new file mode 100644 index 0000000..917a2a9 --- /dev/null +++ b/static/icons/6.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/icons/7.svg b/static/icons/7.svg new file mode 100644 index 0000000..04560ee --- /dev/null +++ b/static/icons/7.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/icons/8.svg b/static/icons/8.svg new file mode 100644 index 0000000..4c59526 --- /dev/null +++ b/static/icons/8.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/icons/9.svg b/static/icons/9.svg new file mode 100644 index 0000000..0b91ca6 --- /dev/null +++ b/static/icons/9.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/placeholder.svg b/static/placeholder.svg deleted file mode 100644 index e7d6ed8..0000000 --- a/static/placeholder.svg +++ /dev/null @@ -1,2 +0,0 @@ - - Placeholder \ No newline at end of file diff --git a/templates/home.html b/templates/home.html index 4587618..4911bb5 100644 --- a/templates/home.html +++ b/templates/home.html @@ -11,16 +11,15 @@ crossorigin="anonymous"> - + {% for s in services %} -
+

{{s.label}}

-
- +
+