From 0839b06f38a8fc8a722a900c12a749ed701345a7 Mon Sep 17 00:00:00 2001 From: Hugo Slepicka Date: Mon, 23 Oct 2023 15:14:35 -0700 Subject: [PATCH] Switch to use AddToAny for share buttons. --- build.py | 53 +++++++++++++++++++++++++---------------------- site/css/main.css | 4 ++++ 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/build.py b/build.py index 609aa04..9f3ce63 100644 --- a/build.py +++ b/build.py @@ -14,7 +14,7 @@ def generate_for_entry(deploy_path, uid, entry): entry["description"] = entry["description"].replace("\n", "
") # INTRO - intro = string.Template(""" + intro = string.Template(f"""
$name
by $author_name on $upload_date
@@ -36,30 +36,15 @@ def generate_for_entry(deploy_path, uid, entry): org = entry.get("repository_url", "").split("/")[-2] entry["org"] = org gh = string.Template( - f""" -
- Repository:
- - -
- * Source code may be subject to copyright, check with author for redistribution. -
- -
- - -
-
- -
- """ + f""" +
+ Repository:
+ + +
+ * Source code may be subject to copyright, check with author for redistribution. +
+ """ ).safe_substitute(**entry) html.append(gh) @@ -79,6 +64,24 @@ def generate_for_entry(deploy_path, uid, entry): upload_date_iso = "/".join(entry.get("upload_date").split("/")[::-1]) entry["upload_date_iso"] = upload_date_iso + share = f""" +
+ + Share this Bot:
+ +
+ + + + + +
+ + +
+ """ + html.append(share) + page = """ diff --git a/site/css/main.css b/site/css/main.css index a9c06c5..680b56f 100644 --- a/site/css/main.css +++ b/site/css/main.css @@ -254,6 +254,10 @@ body{ margin-top:10px; } +.div_share{ + margin-top:10px; +} + /** * FOOTER */