From dfe38495cd211b8b397c2b28550b52ddddcb6110 Mon Sep 17 00:00:00 2001 From: Mo <hadizadeh@dkrz.de> Date: Thu, 9 Jan 2025 18:13:49 +0100 Subject: [PATCH] made the html layer mobile-friendly --- pet-wrapper-api.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pet-wrapper-api.py b/pet-wrapper-api.py index 942142a..4f2d388 100644 --- a/pet-wrapper-api.py +++ b/pet-wrapper-api.py @@ -208,7 +208,7 @@ class PET(plugin.PluginAbstract): <html> <head> <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> <style> body {{ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; @@ -269,10 +269,12 @@ class PET(plugin.PluginAbstract): line-height: 1.5; color: #fff; overflow-x: auto; + -webkit-overflow-scrolling: touch; }} .prompt {{ color: #98c379; margin-bottom: 10px; + word-break: break-all; }} .command {{ color: #61afef; @@ -280,9 +282,13 @@ class PET(plugin.PluginAbstract): }} .output {{ color: #abb2bf; - white-space: pre; + white-space: pre-wrap; margin: 10px 0 20px 0; }} + @media (max-width: 480px) {{ + body {{ padding: 10px; }} + .terminal-body {{ padding: 15px; }} + }} </style> </head> <body> -- GitLab