From f6ce2880d8fd40c928e50fc0dac75481ed0079bd Mon Sep 17 00:00:00 2001 From: Jonah Lawrence Date: Fri, 9 Sep 2022 11:19:39 -0600 Subject: [PATCH] feat: Update font to use Roboto, matching YouTube --- web/app.py | 2 +- web/templates/error.svg | 12 ++++++++++-- web/templates/main.svg | 14 +++++++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/web/app.py b/web/app.py index 520aa9c..76b4c12 100644 --- a/web/app.py +++ b/web/app.py @@ -23,7 +23,7 @@ def render(): background_color = validate_color(request, "background_color", default="#0d1117") title_color = validate_color(request, "title_color", default="#ffffff") stats_color = validate_color(request, "stats_color", default="#dedede") - title = trim_text(validate_string(request, "title"), (width - 32) // 8) + title = trim_text(validate_string(request, "title"), (width - 20) // 7) publish_timestamp = validate_int(request, "timestamp", default=0) duration_seconds = validate_int(request, "duration", default=0) video_id = validate_video_id(request, "id", required=True) diff --git a/web/templates/error.svg b/web/templates/error.svg index 8167e8f..4743bf3 100644 --- a/web/templates/error.svg +++ b/web/templates/error.svg @@ -1,6 +1,14 @@ + @@ -111,13 +119,13 @@ ko/3B2oPu5UDUoz3Plf5giIv/B//2Q==" height="140" width="250" clip-path="url(#image - + Error {{ code }} - + {{ message }} diff --git a/web/templates/main.svg b/web/templates/main.svg index 774ba3f..8a12f61 100644 --- a/web/templates/main.svg +++ b/web/templates/main.svg @@ -1,6 +1,14 @@ + @@ -16,20 +24,20 @@ - + {{ duration }} {% endif %} - + {{ title }} - + {{ stats }}