From cfa8f004eb1b0f3ad4d07236c62bd676ea179a32 Mon Sep 17 00:00:00 2001 From: Michael Hall Date: Sun, 15 Jul 2018 15:22:14 -0400 Subject: [PATCH] Improve team page design to add visual contrast between sections --- get_together/static/css/get_together.css | 16 ++++++++++++++++ .../templates/get_together/teams/about_team.html | 2 +- .../templates/get_together/teams/show_team.html | 16 ++++++++-------- .../get_together/teams/team_events.html | 12 ++++++------ .../get_together/teams/team_page_base.html | 6 +++--- get_together/views/teams.py | 2 +- 6 files changed, 35 insertions(+), 19 deletions(-) diff --git a/get_together/static/css/get_together.css b/get_together/static/css/get_together.css index b7e3a5e..41d5fde 100644 --- a/get_together/static/css/get_together.css +++ b/get_together/static/css/get_together.css @@ -100,6 +100,7 @@ ul.errorlist li { position: relative; margin-bottom: 3px; overflow: hidden; + border-radius: 0.25em; } .team-banner .team-title { @@ -142,3 +143,18 @@ ul.errorlist li { background-image: none; border-color: #adadad; } + + +.container-primary { + background: #f5f5f5; + padding: 10px; + border-radius: .5rem; + border: #efefef 1px solid; +} + +.container-secondary { + background: #fff; + border-radius: 0.5em; + border: #efefef 1px solid; + padding: 10px; +} \ No newline at end of file diff --git a/get_together/templates/get_together/teams/about_team.html b/get_together/templates/get_together/teams/about_team.html index 666962b..e04a3bf 100644 --- a/get_together/templates/get_together/teams/about_team.html +++ b/get_together/templates/get_together/teams/about_team.html @@ -4,7 +4,7 @@ {% block about-button %}btn-default{% endblock %} {% block page_content %} -
+
{{ team.about_page|markdown }}

diff --git a/get_together/templates/get_together/teams/show_team.html b/get_together/templates/get_together/teams/show_team.html index f0eed4b..f72d922 100644 --- a/get_together/templates/get_together/teams/show_team.html +++ b/get_together/templates/get_together/teams/show_team.html @@ -4,6 +4,7 @@ {% block summary-button %}btn-default{% endblock %} {% block page_content %} +
{% if team.description %}

{{ team.description|markdown }}

@@ -20,12 +21,12 @@
{% endif %} -
+
-

Upcoming Events - -

-
+
+

Upcoming Events + +

{% for event in upcoming_events %}
{% if event.status == event.CANCELED %}{% endif %}{{event.name}}{% if event.status == event.CANCELED %} (Canceled){% endif %}
@@ -41,11 +42,10 @@
{% endif %}
-
{% if recent_events %} -

Recent Events

-
+
+

Recent Events

{% for event in recent_events %}
diff --git a/get_together/templates/get_together/teams/team_events.html b/get_together/templates/get_together/teams/team_events.html index e341cc1..0cc0a43 100644 --- a/get_together/templates/get_together/teams/team_events.html +++ b/get_together/templates/get_together/teams/team_events.html @@ -12,10 +12,10 @@
{% endif %} -

Upcoming Events - -

-
+
+

Upcoming Events + +

{% for event in upcoming_events %}
{% if event.status == event.CANCELED %}{% endif %}{{event.name}}{% if event.status == event.CANCELED %} (Canceled){% endif %}
@@ -27,8 +27,8 @@
{% if recent_events %} -

Past Events

-
+
+

Past Events

{% for event in recent_events %}
diff --git a/get_together/templates/get_together/teams/team_page_base.html b/get_together/templates/get_together/teams/team_page_base.html index 56e95f3..39745fa 100644 --- a/get_together/templates/get_together/teams/team_page_base.html +++ b/get_together/templates/get_together/teams/team_page_base.html @@ -18,7 +18,7 @@ {% endblock %} {% block content %} -
+
{% if can_edit_team %} @@ -57,8 +57,8 @@
-
-
+
+

Members


{% for member in member_list %}
diff --git a/get_together/views/teams.py b/get_together/views/teams.py index 9ebb415..b4a7160 100644 --- a/get_together/views/teams.py +++ b/get_together/views/teams.py @@ -55,7 +55,7 @@ def show_team_by_id(request, team_id): def show_team(request, team): upcoming_events = Event.objects.filter(team=team, end_time__gt=datetime.datetime.now()).order_by('start_time') - recent_events = Event.objects.filter(team=team, end_time__lte=datetime.datetime.now()).order_by('-start_time')[:5] + recent_events = Event.objects.filter(team=team, end_time__lte=datetime.datetime.now()).order_by('-start_time')[:3] context = { 'team': team, 'upcoming_events': upcoming_events,