about summary refs log tree commit diff
path: root/uploader/sui.py
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/sui.py')
-rw-r--r--uploader/sui.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/uploader/sui.py b/uploader/sui.py
new file mode 100644
index 0000000..8eb863d
--- /dev/null
+++ b/uploader/sui.py
@@ -0,0 +1,8 @@
+"""Utilities for streamlined UI. This is a temporary module."""
+from flask import request
+
+def sui_template(template_path: str) -> str:
+    """Return the streamlined UI template for given template path."""
+    _sui="sui-" if request.args.get("streamlined_ui") else ""
+    _parts = template_path.split("/")
+    return "/".join(_parts[:-1] + [f"{_sui}{_parts[-1]}"])