aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hooks/post-receive6
-rw-r--r--web/scripts/gen_tool.py24
2 files changed, 16 insertions, 14 deletions
diff --git a/hooks/post-receive b/hooks/post-receive
new file mode 100644
index 0000000..8ba2d97
--- /dev/null
+++ b/hooks/post-receive
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+cd /home/git/build/ugi
+python3 web/scripts/gen_tool.py spec/ugi_registry_v0.json /var/www/ugi.gumx.cc/index.html
+rsync -rlptD fonts/ /var/www/ugi.gumx.cc/fonts/
+echo "ugi deployed"
diff --git a/web/scripts/gen_tool.py b/web/scripts/gen_tool.py
index 232a7eb..0681020 100644
--- a/web/scripts/gen_tool.py
+++ b/web/scripts/gen_tool.py
@@ -20,6 +20,7 @@ def generate_html(reg):
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="icon" type="image/svg+xml" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1IDUiPjxyZWN0IHg9IjEiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiLz48cmVjdCB4PSIyIiB5PSIxIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIi8+PHJlY3QgeD0iMCIgeT0iMiIgd2lkdGg9IjEiIGhlaWdodD0iMSIvPjxyZWN0IHg9IjEiIHk9IjIiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiLz48cmVjdCB4PSIyIiB5PSIyIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIi8+PC9zdmc+">
<title>UGI Tool v{reg['spec']['version']} — Encoder / Decoder / Converter</title>
<style>
@font-face {{ font-family: "Kawkab Mono"; src: url(fonts/KawkabMono-Regular.woff2); font-weight: normal; }}
@@ -28,9 +29,10 @@ def generate_html(reg):
html {{ color: black; background-color: white; }}
body {{
font-family: "Kawkab Mono", monospace;
- font-size: 14px; line-height: 1.5;
+ font-size: 16px; line-height: 1.5;
max-width: 900px; margin: 0 auto; padding: 1rem;
}}
+header {{ font-size: 0.9rem; margin-bottom: 1.5rem; }}
h1 {{ font-size: 1.3rem; margin-bottom: 0.5rem; }}
h2 {{ font-size: 1.1rem; margin: 1rem 0 0.5rem; }}
h3 {{ font-size: 0.95rem; margin: 0.8rem 0 0.3rem; }}
@@ -43,9 +45,9 @@ a {{ color: inherit; }}
.tab {{
padding: 0.4rem 1rem; cursor: pointer; border: 1px solid transparent;
border-bottom: none; background: rgba(128,128,128,0.1);
- font-family: inherit; font-size: inherit;
+ font-family: inherit; font-size: inherit; color: inherit;
}}
-.tab.active {{ background: white; border-color: currentColor; border-bottom: 1px solid white; margin-bottom: -2px; font-weight: bold; }}
+.tab.active {{ background: white; color: inherit; border-color: currentColor; border-bottom: 1px solid white; margin-bottom: -2px; font-weight: bold; }}
.tab-content {{ display: none; }}
.tab-content.active {{ display: block; }}
label {{ display: block; margin: 0.3rem 0 0.1rem; font-weight: bold; }}
@@ -88,11 +90,15 @@ button:hover {{ opacity: 0.7; }}
details {{ margin: 0.5rem 0; }}
details summary {{ cursor: pointer; }}
.skip-check {{ margin-left: 0.5rem; font-weight: normal; font-size: 0.85rem; }}
-footer {{ text-align: center; margin-top: 3rem; font-size: 0.85rem; }}
+footer {{ text-align: center; margin-top: 3rem; }}
</style>
</head>
<body>
+<header>
+<a href="https://gumx.cc">gumx</a> / <a href="https://ugi.gumx.cc">ugi</a>
+</header>
+
<h1>UGI Tool v{reg['spec']['version']}</h1>
<p>{html.escape(reg['spec']['description'])}</p>
<hr>
@@ -1354,16 +1360,6 @@ buildQuickRef();
buildSpec();
encodeUGI();
</script>
-<footer>
-<hr>
-<a href="https://gumx.cc">gumx.cc</a> /
-<a href="https://git.gumx.cc">git</a> /
-<a href="https://mail.gumx.cc">mail</a> /
-<a href="https://irc.gumx.cc">irc</a> /
-<a href="https://vpn.gumx.cc">vpn</a> /
-<a href="https://pgp.gumx.cc">pgp</a> /
-<a href="https://wk.fo">wk.fo</a>
-</footer>
</body>
</html>"""