From 1870f5233268bc9e66b4f904e0f1647b157e494f Mon Sep 17 00:00:00 2001 From: Bat Date: Sun, 13 May 2018 21:33:21 +0100 Subject: [PATCH] Make the design less aggresive - Softer violet - Add borders to delimit cards - Bolder titles - Bigger inputs --- static/main.css | 69 ++++++++++++++++++++---------- templates/blogs/details.tera | 8 ++-- templates/instance/index.tera | 8 ++-- templates/macros.tera | 4 +- templates/notifications/index.tera | 4 +- templates/posts/details.tera | 16 ++++--- templates/users/details.tera | 8 ++-- templates/users/followers.tera | 6 ++- 8 files changed, 78 insertions(+), 45 deletions(-) diff --git a/static/main.css b/static/main.css index 68403226..c97f7464 100644 --- a/static/main.css +++ b/static/main.css @@ -6,11 +6,11 @@ html, body { } h1, h2, h3, h4, h5, h6 { - font-weight: 200; + font-weight: bolder; } a, a:visited { - color: #7a28cb; + color: #7765e3; text-decoration: none; } @@ -29,7 +29,7 @@ header nav a { margin: 0px 20px; } -main > * { +body > main > * { padding: 20px 20%; } @@ -45,42 +45,36 @@ main article { .button, input[type="submit"] { background: white; - color: #7a28cb; - border: 1px solid #7a28cb; + color: #7765e3; + border: 1px solid #7765e3; border-radius: 3px; padding: 5px 10px; margin: 0px 20px; + cursor: pointer; + transition: ease-in 0.2s all; +} + +.button:hover, input[type="submit"]:hover { + background: #7765e399; + color: white; } input[type="submit"] { - margin: 10px 0px; + margin: 40px 0px; } .article-meta { background: #F9F9F9; } -.comment { - background: white; - border-radius: 3px; - padding: 20px; - margin: 10px 0px; - box-shadow: 0px 0px 5px #7a28cb1a; - margin-bottom: 20px; -} - -.comment a { - margin-top: 10px; - display: block; -} - .inline-block { display: inline-block; - margin: 0px; + margin: 20px 0px; } label { display: block; + margin-top: 20px; } input { @@ -88,19 +82,23 @@ input { border-bottom: 1px solid #DADADA; display: block; margin: 10px 0px; + padding: 5px; + width: 50%; } textarea { width: 100%; min-height: 200px; resize: vertical; + font-family: 'Utopia'; + padding: 5px; } .badge { font-size: 12pt; background: white; - color: #7a28cb; - border: 1px solid #7a28cb; + color: #7765e3; + border: 1px solid #7765e3; border-radius: 3px; padding: 5px 10px; margin: 0px 10px; @@ -134,3 +132,28 @@ textarea { width: 100%; } } + +.cards { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-auto-rows: 1fr; + grid-gap: 20px; +} + +.card { + background: white; + border: 1px solid #d0ccd0; + border-radius: 3px; + padding: 20px; + display: flex; + flex-direction: column; +} + +.card main { + flex: 1; +} + +.list { + display: grid; + grid-gap: 20px; +} diff --git a/templates/blogs/details.tera b/templates/blogs/details.tera index 1f74d5f0..663c9d83 100644 --- a/templates/blogs/details.tera +++ b/templates/blogs/details.tera @@ -10,7 +10,9 @@

{{ blog.summary }}

Latest articles

- {% for article in recents %} - {{ macros::post_card(article=article) }} - {% endfor %} +
+ {% for article in recents %} + {{ macros::post_card(article=article) }} + {% endfor %} +
{% endblock content %} diff --git a/templates/instance/index.tera b/templates/instance/index.tera index ccb07fb3..480c758c 100644 --- a/templates/instance/index.tera +++ b/templates/instance/index.tera @@ -9,7 +9,9 @@

Welcome on {{ instance.name }}

Latest articles

- {% for article in recents %} - {{ macros::post_card(article=article) }} - {% endfor %} +
+ {% for article in recents %} + {{ macros::post_card(article=article) }} + {% endfor %} +
{% endblock content %} diff --git a/templates/macros.tera b/templates/macros.tera index a8278987..04860487 100644 --- a/templates/macros.tera +++ b/templates/macros.tera @@ -1,7 +1,7 @@ {% macro post_card(article) %} -
+

{{ article.post.title }}

-

{{ article.post.content | escape | truncate(length=200) }}…

+

{{ article.post.content | escape | truncate(length=200) }}…

By {{ article.author.display_name }} ⋅ {{ article.date | date(format="%B %e") }}

{% endmacro post_card %} diff --git a/templates/notifications/index.tera b/templates/notifications/index.tera index 3f0fc15d..3af0de19 100644 --- a/templates/notifications/index.tera +++ b/templates/notifications/index.tera @@ -6,9 +6,9 @@ Notifications {% block content %}

Notifications

-
+
{% for notification in notifications %} -
+

Comments

- {% for comment in comments %} -
- {% endfor %} +
+ {% for comment in comments %} +
+ {{ comment.author.display_name }} +
{{ comment.content | safe }}
+ Respond +
+ {% endfor %} +
Comment
{% endblock content %} diff --git a/templates/users/details.tera b/templates/users/details.tera index 8290bde5..c78fe935 100644 --- a/templates/users/details.tera +++ b/templates/users/details.tera @@ -32,7 +32,9 @@

Latest articles

- {% for article in recents %} - {{ macros::post_card(article=article) }} - {% endfor %} +
+ {% for article in recents %} + {{ macros::post_card(article=article) }} + {% endfor %} +
{% endblock content %} diff --git a/templates/users/followers.tera b/templates/users/followers.tera index 154c6306..932be28c 100644 --- a/templates/users/followers.tera +++ b/templates/users/followers.tera @@ -19,10 +19,12 @@

Followers

+
{% for follower in followers %} -
+

{{ follower.display_name }} — @{{ follower.fqn }}

-

{{ follower.summary }}

+

{{ follower.summary }}

{% endfor %} +
{% endblock content %}