From 66c7e9d29949e4dd5713d30ffec5fc848db9f361 Mon Sep 17 00:00:00 2001
From: asonix
Date: Thu, 26 Mar 2020 14:19:23 -0500
Subject: [PATCH] A couple more ui tweaks
---
scss/index.scss | 20 ++++++++++++++------
templates/admin.rs.html | 9 +++++++--
templates/instance.rs.html | 25 +++++++++++++++----------
3 files changed, 36 insertions(+), 18 deletions(-)
diff --git a/scss/index.scss b/scss/index.scss
index 605c52a..1377f8b 100644
--- a/scss/index.scss
+++ b/scss/index.scss
@@ -63,12 +63,12 @@ section {
}
.info {
- border-bottom: 1px solid #e5e5e5;
padding-bottom: 36px;
}
li {
padding-top: 36px;
+ border-bottom: 1px solid #e5e5e5;
}
.padded {
@@ -82,10 +82,13 @@ section {
a {
&,
&:focus,
- &:hover,
&:active {
color: #c92a60;
}
+
+ &:hover {
+ color: #9d2a60;
+ }
}
}
@@ -113,10 +116,13 @@ pre {
a {
&,
&:focus,
- &:hover,
&:active {
color: #f9a6c2;
}
+
+ &:hover {
+ color: #f2739f;
+ }
}
footer {
@@ -142,16 +148,18 @@ footer {
}
.instance-info {
- background-color: #f5f5f5;
- border-top: 1px solid #e5e5e5;
- border-bottom: 1px solid #e5e5e5;
padding: 24px;
padding-bottom: 36px;
+ border-top: 1px solid #e5e5e5;
+ background-color: #f5f5f5;
.instance-description {
margin: 0;
margin-bottom: 24px;
}
+ .instance-admin {
+ margin: 24px 0;
+ }
}
a {
diff --git a/templates/admin.rs.html b/templates/admin.rs.html
index d88e047..ffb570d 100644
--- a/templates/admin.rs.html
+++ b/templates/admin.rs.html
@@ -1,6 +1,7 @@
@use crate::data::Contact;
+@use activitystreams::primitives::XsdAnyUri;
-@(contact: &Contact)
+@(contact: &Contact, base: &XsdAnyUri)
@@ -10,6 +11,10 @@
@contact.display_name
-
@@@contact.username
+ @if let Some(domain) = base.as_url().domain() {
+
@@@contact.username@@@domain
+ } else {
+
@@@contact.username
+ }
diff --git a/templates/instance.rs.html b/templates/instance.rs.html
index 6bdb3d7..29082c9 100644
--- a/templates/instance.rs.html
+++ b/templates/instance.rs.html
@@ -18,15 +18,20 @@
Registration is closed
}
-
-
Description:
-
-
- @Html(&instance.description)
-
+ @if !instance.description.trim().is_empty() || contact.is_some() {
+
+ @if !instance.description.trim().is_empty() {
+
@instance.title's description:
+
+
+ @Html(instance.description.trim())
+
+
+ }
+ @if let Some(contact) = contact {
+
@instance.title's admin:
+ @:admin(contact, base)
+ }
- @if let Some(contact) = contact {
- @:admin(contact)
- }
-
+ }