From 01e79f85651e666b91b4dd0de5931f77ca9f2e16 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Thu, 24 Nov 2016 19:42:12 +0100 Subject: [PATCH] Show icons on project homepage list --- src/styles/_project.sass | 41 +++++++++++++++++--------- src/styles/base.sass | 12 ++++---- src/templates/projects/view_embed.jade | 8 ++--- 3 files changed, 37 insertions(+), 24 deletions(-) diff --git a/src/styles/_project.sass b/src/styles/_project.sass index c570535b..8b640150 100644 --- a/src/styles/_project.sass +++ b/src/styles/_project.sass @@ -1552,7 +1552,7 @@ a.learn-more display: flex flex-direction: column list-style: none - padding: 10px 5px + padding: 5px border-top: thin solid $color-background cursor: pointer width: 33.3333% @@ -1572,17 +1572,17 @@ a.learn-more color: $node-type-post a.image border-color: $node-type-post - background-color: $node-type-post + background-color: hsl(hue($node-type-post), 20%, 55%) &.asset.image a.image border-color: $node-type-asset_image - background-color: $node-type-asset_image + background-color: hsl(hue($node-type-asset_image), 20%, 55%) &.asset.file a.image border-color: $node-type-asset_file - background-color: $node-type-asset_file + background-color: hsl(hue($node-type-asset_file), 20%, 55%) &.asset.video a.image border-color: $node-type-asset_video - background-color: $node-type-asset_video + background-color: hsl(hue($node-type-asset_video), 20%, 55%) $node-latest-thumbnail-size: 160px .image @@ -1604,9 +1604,19 @@ a.learn-more +position-center-translate i - color: $color-text-dark-hint - font-size: 3em - +position-center-translate + color: rgba(white, .9) + font-size: 1.8em + position: absolute + bottom: 3px + left: 5px + text-shadow: 1px 1px 0 rgba(black, .2) + + &.pi-file-archive + font-size: 1.5em + bottom: 5px + &.pi-newspaper + font-size: 1.6em + left: 7px .info width: 100% @@ -1614,17 +1624,19 @@ a.learn-more display: flex flex-direction: column justify-content: space-between + word-break: break-word .description font-size: .9em padding-top: 5px + color: $color-text-dark-primary .title display: block - word-break: break-word - font-size: 1.1em - color: $color-text-dark-primary + font-size: 1em + color: $color-text-dark +clearfix + +text-overflow-ellipsis span.details width: 100% @@ -2145,7 +2157,7 @@ section.node-children .item-info position: relative - padding: 15px 20px 25px 20px + padding: 15px 20px 30px 20px a.item-title display: inline-block @@ -2164,11 +2176,12 @@ section.node-children a.learn-more position: absolute - padding: 15px 20px + padding: 3px 20px bottom: 0 right: 0 visibility: hidden - font-size: .9em + font-size: .8em + margin: 10px &:hover a.learn-more visibility: visible diff --git a/src/styles/base.sass b/src/styles/base.sass index b849668c..7ba55442 100644 --- a/src/styles/base.sass +++ b/src/styles/base.sass @@ -679,25 +679,25 @@ footer .tooltip - transition: none + transition: opacity 50ms ease-in-out &.in opacity: 1 .tooltip-inner max-width: auto white-space: nowrap - background-color: $color-background-nav + background-color: $color-background-nav-light color: $color-text-light-primary border-radius: 3px &.top .tooltip-arrow - border-top-color: $color-background-nav + border-top-color: $color-background-nav-light &.bottom .tooltip-arrow - border-bottom-color: $color-background-nav + border-bottom-color: $color-background-nav-light &.left .tooltip-arrow - border-left-color: $color-background-nav + border-left-color: $color-background-nav-light &.right .tooltip-arrow - border-right-color: $color-background-nav + border-right-color: $color-background-nav-light .popover background-color: lighten($color-background-nav, 5%) diff --git a/src/templates/projects/view_embed.jade b/src/templates/projects/view_embed.jade index c1c9546a..ddab9d08 100644 --- a/src/templates/projects/view_embed.jade +++ b/src/templates/projects/view_embed.jade @@ -79,7 +79,7 @@ script. a.image(href="{{ url_for_node(node=n) }}") | {% if n.picture %} img(src="{{ n.picture.thumbnail('l', api=api) }}") - | {% else %} + | {% endif %} | {% if n.node_type == 'post' %} i.pi-newspaper @@ -94,14 +94,14 @@ script. | {% else %} i.pi-folder | {% endif %} - | {% endif %} + .info a.title(href="{{ url_for_node(node=n) }}") {{ n.name }} p.description(href="{{ url_for_node(node=n) }}") | {% if n.node_type == 'post' %} - | {{ n.properties.content | striptags | truncate(125, end="... read more") | safe | hide_none }} + | {{ n.properties.content | striptags | truncate(140, end="... read more") | safe | hide_none }} | {% else %} - | {{ n.description | striptags | truncate(125, end="... read more") | hide_none }} + | {{ n.description | striptags | truncate(140, end="... read more") | safe | hide_none }} | {% endif %} span.details span.what {% if n.properties.content_type %}{{ n.properties.content_type | undertitle }}{% else %}{{ n.node_type | undertitle }}{% endif %} ยท