From 0d39367ded8d2fd4afcd1f0c464f70b9ea2815cd Mon Sep 17 00:00:00 2001 From: Raghav Jajodia Date: Tue, 6 Jun 2017 11:41:01 +0530 Subject: [PATCH] Improve design of activity panel --- website/static/css/style.css | 32 +++++++++++++ website/templates/_activity.html | 82 ++++++++++++++++---------------- 2 files changed, 74 insertions(+), 40 deletions(-) diff --git a/website/static/css/style.css b/website/static/css/style.css index 18174ef71a..a0bb1ba569 100644 --- a/website/static/css/style.css +++ b/website/static/css/style.css @@ -227,4 +227,36 @@ a:hover{ height: auto; } +.activity-strip { + height:120px; + overflow:hidden; +} + +.activity-strip .activity-strip-section { + overflow:hidden; + float:left; + width:80%; + display:inline-flex; +} +.activity-strip-section > div { + margin-left: 20px; + font-size: 20px; + font-weight: bold; +} +.activity-strip-section > div a { + text-decoration: none; +} +.activity-strip-section > div > .small { + font-size: initial; + font-weight: initial; +} +.activity-screenshot { + float:right; + display:block; + overflow:hidden; +} +.activity-screenshot img { + width: 100px; + height: 95%; +} \ No newline at end of file diff --git a/website/templates/_activity.html b/website/templates/_activity.html index 94da8aa3ae..9a797827ba 100644 --- a/website/templates/_activity.html +++ b/website/templates/_activity.html @@ -1,51 +1,53 @@ {% load gravatar %} -
-
-
- {% if activity.actor.socialaccount_set.all.0.get_avatar_url %} - - {% else %} - {% gravatar activity.actor.email 50 %} - {% endif %} -
- {% if activity.verb == "logged in" %} - - {% elif activity.verb == "found a bug on website" %} - +
+
+ + {% if activity.actor.socialaccount_set.all.0.get_avatar_url %} + + {% else %} + {% endif %} - {% if activity.action_object %} - {% if activity.action_object.get_absolute_url %} - {{ activity.action_object }} - {% else %} - {{ activity.action_object }} +
+ {% if activity.action_object %} + {% if activity.action_object.get_absolute_url %} + {{ activity.action_object }} + {% else %} + {{ activity.action_object }} + {% endif %} {% endif %} - {% endif %} - {% if activity.action_object and activity.target %}to{% endif %} - {% if activity.target %} - {% if activity.target.get_absolute_url %} - - - - {{ activity.target }} - {% else %} - - {{ activity.target }} + + {% if activity.action_object and activity.target %}to{% endif %} + + {% if activity.target %} + {% if activity.target.get_absolute_url %} + + + + {{ activity.target }} + {% else %} + - {{ activity.target }} + {% endif %} {% endif %} - {% endif %} -
-
- {% if activity.actor.get_absolute_url %} - {{ activity.actor }} - {% else %} - {{ activity.actor }} - {% endif %} - {{ activity.verb }} {{ activity.target.domain_title }} {{ activity.timestamp|timesince }} ago | - {{ activity.target.domain_name }} + +
+ {% if activity.actor.get_absolute_url %} + + {{ activity.actor }} + + {% else %} + {{ activity.actor }} + {% endif %} + {{ activity.verb }} {{ activity.target.domain_title }} {{ activity.timestamp|timesince }} ago | + {{ activity.target.domain_name }} +
+
-
+ +
{% if activity.target.screenshot %} - + {% endif %}