From 8a774760420bb6be5d080ce59a781e2915ab6478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 14 Jun 2020 12:28:05 +0200 Subject: [PATCH] image tweaks pt. 2 --- sdbs_infra/dashboard/models.py | 5 ++++- sdbs_infra/dashboard/static/main.css | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sdbs_infra/dashboard/models.py b/sdbs_infra/dashboard/models.py index 316e5db..77f8336 100644 --- a/sdbs_infra/dashboard/models.py +++ b/sdbs_infra/dashboard/models.py @@ -50,4 +50,7 @@ class Service(OrderedModel): for link_tag in link_tags: if rel in link_tag.attrs['rel']: result = link_tag.attrs['href'] - return (self.url + result) if self.url not in result else result + if self.url not in result: + return self.url + result if result.startswith("/") else f"/{result}" + else: + return result diff --git a/sdbs_infra/dashboard/static/main.css b/sdbs_infra/dashboard/static/main.css index 21107d2..2eff6c5 100644 --- a/sdbs_infra/dashboard/static/main.css +++ b/sdbs_infra/dashboard/static/main.css @@ -51,7 +51,7 @@ main { } .service-content img { - min-width: 66%; + min-width: 50%; filter: grayscale(100%); }