diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-04-24 18:03:55 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-04-24 18:03:55 +0200 |
commit | 3a00f977849b8d96a98236a5163d38a448103a3e (patch) | |
tree | 977de0b1b6705fa223b8bccfb6784c2d3d1913c7 /mu4web | |
parent | Change imports to relative. (diff) | |
download | mu4web-3a00f977849b8d96a98236a5163d38a448103a3e.tar.gz mu4web-3a00f977849b8d96a98236a5163d38a448103a3e.tar.xz |
Hopefully fix installation issues.
Diffstat (limited to 'mu4web')
-rw-r--r-- | mu4web/main.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mu4web/main.py b/mu4web/main.py index 681041e..c147ab7 100644 --- a/mu4web/main.py +++ b/mu4web/main.py @@ -149,7 +149,7 @@ def page_base(title: Optional[str] = None, ('meta', {'name': 'viewport', 'content': 'width=device-width, initial-scale=0.5'}), ('title', title, ' — Mu4Web'), - include_stylesheet('/static/style.css'), + include_stylesheet(url_for('static', 'style.css')), ), ('body', ('nav', @@ -500,7 +500,7 @@ class IMGParser(HTMLParser): self.result += f' {key}="{data}"' key = 'src' - data = '/static/content-blocked.svg' + data = url_for('static', 'content-blocked.svg') self.result += f' {key}="{data}"' else: key = html.escape(key) @@ -571,7 +571,8 @@ def attachement_part_page(): # above, which unblocks it. # TODO this "fails" for images wrapped in anchor tags, since # the anchor tag has priority. - result += "\n<script src='/static/enable_images.js'></script>" + url = url_for('static', 'enable_images.js') + result += f"\n<script src='{url}'></script>" return str(result) |