From 0ad0bb0ff502c9461319124b9cc0676977e9ad7a Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Sat, 24 Feb 2024 08:40:57 -0500 Subject: [PATCH] fix instance table styling and add footer --- relay/frontend/base.haml | 6 ++++++ relay/frontend/page/home.haml | 3 --- relay/frontend/style.css | 35 ++++++++++++++++++++++------------- relay/template.py | 2 ++ 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/relay/frontend/base.haml b/relay/frontend/base.haml index a47d508..2df7899 100644 --- a/relay/frontend/base.haml +++ b/relay/frontend/base.haml @@ -14,3 +14,9 @@ #content -block content + + #footer.section + .col1 + .version + %a(href="https://git.pleroma.social/pleroma/relay") + ActivityRelay/{{version}} diff --git a/relay/frontend/page/home.haml b/relay/frontend/page/home.haml index 6af5b2b..efa7088 100644 --- a/relay/frontend/page/home.haml +++ b/relay/frontend/page/home.haml @@ -11,9 +11,6 @@ %p You may subscribe to this relay with the address: %a(href="https://{{domain}}/actor") << https://{{domain}}/actor - %p - To host your own relay, you may download the code at - %a(href="https://git.pleroma.social/pleroma/relay") << git.pleroma.social/pleroma/relay -if config["whitelist-enabled"] %p.section.message diff --git a/relay/frontend/style.css b/relay/frontend/style.css index e48c200..743b2b5 100644 --- a/relay/frontend/style.css +++ b/relay/frontend/style.css @@ -43,30 +43,30 @@ p:not(:last-child) { } table { - border-spacing: 0px; -/* border-radius: 10px; */ - border-collapse: collapse; -} - -td { border: 1px solid var(--primary); + border-radius: 5px; + border-spacing: 0px; } -/*thead td:first-child { - border-top-left-radius: 10px; +table tbody tr:nth-child(even) td { + background-color: var(--section-background); +} + +thead td:first-child { + border-top-left-radius: 3px; } thead td:last-child { - border-top-right-radius: 10px; + border-top-right-radius: 3px; } tbody tr:last-child td:first-child { - border-bottom-left-radius: 10px; + border-bottom-left-radius: 5px; } tbody tr:last-child td:last-child { - border-bottom-right-radius: 10px; -}*/ + border-bottom-right-radius: 5px; +} table td { padding: 5px; @@ -111,6 +111,15 @@ table tbody td { text-align: center !important; } +#footer { + display: grid; + grid-template-columns: auto auto; +} + +#footer .version { + text-align: right +} + .message { color: var(--message-text) !important; @@ -122,7 +131,7 @@ table tbody td { background-color: var(--section-background); padding: var(--spacing); border: 1px solid var(--border); - border-radius: 10px; + border-radius: 5px; } .section:not(:first-child) { diff --git a/relay/template.py b/relay/template.py index 11687b5..9f3a09b 100644 --- a/relay/template.py +++ b/relay/template.py @@ -5,6 +5,7 @@ import typing from hamlish_jinja.extension import HamlishExtension from jinja2 import Environment, FileSystemLoader +from . import __version__ from .database.config import THEMES from .misc import get_resource @@ -41,6 +42,7 @@ class Template(Environment): new_context = { 'view': view, 'domain': self.app.config.domain, + 'version': __version__, 'config': config, 'theme': THEMES.get(config['theme'], THEMES['default']), **(context or {})