blob: 8eb863d1b7418d505eebc7b90732444ba05e4d0a (
plain)
1
2
3
4
5
6
7
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]}"])
|