From a52c2637334e3c69bad52eadd2d74f215391f4a2 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Mon, 10 Oct 2016 16:39:36 +0200 Subject: [PATCH] Homepage: Fix long comments --- src/styles/_homepage.sass | 28 +++++++++++----------------- src/templates/homepage.jade | 2 +- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/styles/_homepage.sass b/src/styles/_homepage.sass index cd237c70..62f8f4a8 100644 --- a/src/styles/_homepage.sass +++ b/src/styles/_homepage.sass @@ -168,13 +168,11 @@ $node-type-post: #647bce margin: 0 padding: 15px 0 list-style: none - +text-overflow-ellipsis - +clearfix li.activity-stream__list-item display: flex align-items: center - padding: 5px 15px + margin: 0 10px 10px +clearfix &:hover @@ -217,7 +215,6 @@ $node-type-post: #647bce .title color: $color-text-dark padding: 10px 15px 5px 15px - +text-overflow-ellipsis width: 100% li.where-parent:before @@ -239,7 +236,6 @@ $node-type-post: #647bce color: $color-text-dark-primary max-width: 80% padding-bottom: 5px - +text-overflow-ellipsis font: size: 1.2em weight: 500 @@ -267,18 +263,14 @@ $node-type-post: #647bce .activity-stream__list-thumbnail display: flex - font-size: 1.5em - color: $node-type-comment // #B6D1CD - position: relative - overflow: hidden align-self: flex-start - align-items: center justify-content: center - margin-top: 8px - width: 25px - height: 25px - min-width: 25px - min-height: 25px + font-size: 1.4em + width: 30px + height: 30px + min-width: 30px + min-height: 30px + color: $node-type-comment +media-xs display: none @@ -301,10 +293,12 @@ $node-type-post: #647bce +position-center-translate .activity-stream__list-details + flex: 1 position: relative - width: 100% - margin-left: 15px + max-width: 100% background-color: white + margin-left: 5px + margin-right: auto border-radius: 3px border-left: 2px solid $color-background box-shadow: 0 0 1px 1px rgba(black, .1), 0 2px 5px rgba(black, .05) diff --git a/src/templates/homepage.jade b/src/templates/homepage.jade index 9410eb9b..10c600f2 100644 --- a/src/templates/homepage.jade +++ b/src/templates/homepage.jade @@ -57,7 +57,7 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_ a.activity-stream__list-thumbnail(href="{{ url_for_node(node=n) }}") i.pi-comment .activity-stream__list-details - a.title(href="{{ url_for_node(node=n) }}") {{ n.properties.content }} + a.title(href="{{ url_for_node(node=n) }}") {{ n.properties.content | striptags | truncate(200) }} ul.meta li.who {{ n.user.full_name }} li.where-project