Commit 01d2c6ea authored by Martin Schoeler's avatar Martin Schoeler Committed by Gabriel Engel

[FIX] Improve blog item images (#573)

* improve blog item images

* fix cards on chrome and improve logic

* improve var names and css
parent 334cbed5
......@@ -3,7 +3,7 @@
url: https://opensourceunderdogs.com/episode-9-rocket-chat-open-source-enterprise-team-chat-with-gabriel-engel/
date: 2018-11-05 10:00:00
cover: OS-podcast-logo.jpg
isLogo: true
bgSize: logo
bgColor: "fe0000"
- publisher: SiliconIndia Magazine
......@@ -11,7 +11,7 @@
url: https://www.siliconindiamagazine.com/magazine/live-chat-special-october-2018/#page=31
date: 2018-11-16 10:00:00
cover: SI-logo.jpg
isLogo: true
bgSize: logo
bgColor: "ffffff"
- publisher: SiliconIndia Magazine
......@@ -19,7 +19,7 @@
url: https://enterprise-services.siliconindiamagazine.com/ranking/10-most-promising-live-chat-support-service-provider-%E2%80%93-2018-rid-482.html
date: 2018-11-16 10:00:00
cover: SI-LiveChat-logo.jpg
isLogo: true
bgSize: logo
bgColor: "ffffff"
- publisher: Softex
......@@ -27,7 +27,7 @@
url: https://www.softex.br/softex-projeta-us-10-milhoes-em-negocios-para-a-delegacao-brasileira-no-gartner-symposium-itxpo/
date: 2018-10-09 10:00:00
cover: softex-logo.jpg
isLogo: true
bgSize: logo
bgColor: "ffffff"
- publisher: Pro-Linux.de
......@@ -35,7 +35,7 @@
url: https://www.pro-linux.de/news/1/26309/rocketchat-und-nextcloud-kooperieren.html
date: 2018-09-18 10:00:00
cover: pl-logo.jpg
isLogo: true
bgSize: logo
bgColor: "ffffff"
- publisher: University of Cape Town News
......@@ -43,7 +43,7 @@
url: https://www.news.uct.ac.za/article/-2018-09-04-connecting-the-ocean-view-community
date: 2018-09-04 10:00:00
cover: cape-town-uni-logo.jpg
isLogo: true
bgSize: logo
bgColor: "ffffff"
- publisher: Timecamp
......@@ -51,7 +51,7 @@
url: https://www.timecamp.com/blog/2018/08/top-10-chat-software-for-teams/
date: 2018-08-24 10:00:00
cover: timecamp-logo.jpg
isLogo: true
bgSize: logo
bgColor: "ffffff"
- publisher: Business2Community
......@@ -59,7 +59,7 @@
url: https://www.business2community.com/small-business/the-top-10-slack-alternatives-for-small-businesses-02087348
date: 2018-07-10 10:00:00
cover: B2C-logo.jpg
isLogo: true
bgSize: logo
bgColor: "f0f0f0"
- publisher: BlockchainNews
......@@ -67,7 +67,7 @@
url: https://www.the-blockchain.com/2017/09/22/slack-rocket-chat-blockchain-community-leaders-aragon-lead-industry-exodus-amid-marked-increase-phishing-scams/
date: 2017-09-22 10:00:00
cover: blockchain-news-logo.jpg
isLogo: true
bgSize: logo
bgColor: "ffffff"
- publisher: WIRED Magazine
......@@ -75,7 +75,7 @@
url: http://www.wired.com/2016/03/open-source-devs-racing-build-better-versions-slack/
date: 2016-03-16 10:00:00
cover: wiredlogo.jpg
isLogo: true
bgSize: logo
bgColor: "ffffff"
- publisher: The Register
......@@ -83,15 +83,15 @@
url: http://www.theregister.co.uk/2016/03/17/no_slack_for_open_sourcers/
date: 2016-03-17 10:00:00
cover: theregisterlogo.jpg
isLogo: true
bgSize: logo
bgColor: "fe0000"
- publisher: Black Duck Software
title: Black Duck Announces Open Source “Rookies of the Year
url: https://www2.blackducksoftware.com/news/releases/black-duck-announces-open-source-rookies-of-the-year
date: 2016-03-14 10:00:00
cover: Black-Duck-Logo.jpg
isLogo: true
cover: Black-Duck-Logo.png
bgSize: logo
bgColor: "ffffff"
- publisher: Venture Beat
......@@ -99,5 +99,5 @@
url: http://venturebeat.com/2015/11/27/5-open-source-alternatives-to-slack/
date: 2015-11-27 10:00:00
cover: VentureBeat-Logo.jpg
isLogo: true
bgSize: logo
bgColor: "ffffff"
......@@ -3,17 +3,24 @@ href='{% if include.post.extUrl %} {{include.post.extUrl}} {% else %} {{ include
>
<div
class="card--blog__cover"
{% if include.post.cover and include.post.isLogo%}
style="
{% if include.post.bgColor %}
style="background-image: url('{{ include.post.cover }}'); background-size: contain; background-color: #{{include.post.bgColor}};"
background-color: #{{include.post.bgColor}}
{% endif %}
style="background-image: url('{{ include.post.cover }}'); background-size: cover;"
{% elsif include.post.cover %}
style="background-image: url('{{ include.post.cover }}');"
{% else %}
style="background-image: url('/images/blog/post.jpg')"
{% unless include.post.bgSize == 'logo' %}
{% if include.post.cover and include.post.bgSize == 'cover'%}
background-image: url('{{ include.post.cover }}'); background-size: cover;
{% else if include.post.cover%}
background-image: url('{{ include.post.cover }}');
{% else %}
background-image: url('/images/blog/post.jpg');
{% endif %}
{% endunless %}"
>
{% if include.post.cover and include.post.bgSize == 'logo'%}
<img class="card--blog__img-cover" src="{{include.post.cover}}" alt="go to post">
{% endif %}
></div>
</div>
<div class="card--blog__wrap">
<!-- If post has a dateEvent attribute, it is a event post -->
{% if include.post.dateEvent %}
......
......@@ -6,7 +6,7 @@ hidden: true
author: Venture Beat
cover: /images/posts/2015/11/2015-11-27-5-open-source-alternatives-to-slack/VentureBeat-Logo.jpg
extUrl: http://venturebeat.com/2015/11/27/5-open-source-alternatives-to-slack/
isLogo: true
bgSize: logo
bgColor: "ffffff"
categories:
- Press
......
......@@ -6,7 +6,7 @@ hidden: true
author: Black Duck Software
cover: /images/posts/2016/03/2016-03-14-black-duck-rookies-of-the-year/Black-Duck-Logo.jpg
extUrl: https://www2.blackducksoftware.com/news/releases/black-duck-announces-open-source-rookies-of-the-year
isLogo: true
bgSize: logo
bgColor: "ffffff"
categories:
- Press
......
......@@ -6,7 +6,7 @@ hidden: true
author: WIRED Magazine
cover: /images/posts/2016/03/2016-03-16-wired-open-sourcers-race-to-build-better-version-of-slack/wiredlogo.jpg
extUrl: http://www.wired.com/2016/03/open-source-devs-racing-build-better-versions-slack/
isLogo: true
bgSize: logo
bgColor: "ffffff"
categories:
- Press
......
......@@ -6,7 +6,7 @@ hidden: true
author: The Register
cover: /images/posts/2016/03/2016-03-17-slack-smackback/theregisterlogo.jpg
extUrl: http://www.theregister.co.uk/2016/03/17/no_slack_for_open_sourcers/
isLogo: true
bgSize: logo
bgColor: "fe0000"
categories:
- Press
......
......@@ -6,7 +6,7 @@ hidden: true
author: BlockchainNews
cover: /images/posts/2017/09/2017-09-22-slack-out-rocket-chat-in/blockchain-news-logo.jpg
extUrl: https://www.the-blockchain.com/2017/09/22/slack-rocket-chat-blockchain-community-leaders-aragon-lead-industry-exodus-amid-marked-increase-phishing-scams/
isLogo: true
bgSize: logo
bgColor: "ffffff"
categories:
- Press
......
......@@ -5,6 +5,8 @@ location: Berlin, Germany
dateEvent: 2018-05-15 10:00:00
dateEventEnd: 2018-05-16 10:00:00
extUrl: //cube-global.com/cube_tech_fair/
bgSize: logo
bgColor: ffffff
author: Isabella Russell
hidden: true
cover: /images/posts/2018/05/2018-05-11-cube-tech-fair/cube-test.png
......
......@@ -5,6 +5,8 @@ location: Porto Alegre, Brazil
dateEvent: 2018-12-05 10:00:00
dateEventEnd: 2018-12-08 10:00:00
extUrl: //www.thedevelopersconference.com.br/tdc/2018/index.html
bgSize: logo
bgColor: ffffff
author: Isabella Russell
cover: /images/posts/2018/05/2018-05-11-the-developer-s-conference-tdc-poa/tdc-cover-general-logo.jpg
hidden: true
......
......@@ -5,6 +5,8 @@ location: São Paulo, Brazil
dateEvent: 2018-07-17 10:00:00
dateEventEnd: 2018-07-21 10:00:00
extUrl: //www.thedevelopersconference.com.br/tdc/2018/index.html
bgSize: logo
bgColor: ffffff
author: Isabella Russell
hidden: true
cover: /images/posts/2018/05/2018-05-11-the-developer-s-conference-tdc-poa/tdc-cover-general-logo.jpg
......
......@@ -5,6 +5,7 @@ location: San Jose, USA
dateEvent: 2018-06-04 10:00:00
dateEventEnd: 2018-06-07 10:00:00
extUrl: //http://altconf.com/
bgSize: cover
author: Isabella Russell
hidden: true
cover: /images/posts/2018/05/2018-05-24-altconf/altconf-cover.png
......
......@@ -6,7 +6,7 @@ hidden: true
author: Business2Community
cover: /images/posts/2018/07/2018-07-10-rc-in-top-10-slack-alts-for-small-businesses/B2C-logo.jpg
extUrl: https://www.business2community.com/small-business/the-top-10-slack-alternatives-for-small-businesses-02087348
isLogo: true
bgSize: logo
bgColor: "f0f0f0"
categories:
- Press
......
......@@ -6,7 +6,7 @@ hidden: true
author: Timecamp
cover: /images/posts/2018/08/2018-08-24-rc-in-top-10-for-team-chat-software/timecamp-logo.jpg
extUrl: https://www.timecamp.com/blog/2018/08/top-10-chat-software-for-teams/
isLogo: true
bgSize: logo
bgColor: "ffffff"
categories:
- Press
......
......@@ -6,7 +6,7 @@ hidden: true
author: University of Cape Town News
cover: /images/posts/2018/09/2018-09-04-ocean-view-community-using-rocket-chat/cape-town-uni-logo.jpg
extUrl: https://www.news.uct.ac.za/article/-2018-09-04-connecting-the-ocean-view-community
isLogo: true
bgSize: logo
bgColor: "ffffff"
categories:
- Press
......
......@@ -6,7 +6,7 @@ hidden: true
author: Pro-Linux.de
cover: /images/posts/2018/09/2018-09-18-pro-linux/pl-logo.jpg
extUrl: https://www.pro-linux.de/news/1/26309/rocketchat-und-nextcloud-kooperieren.html
isLogo: true
bgSize: logo
bgColor: "ffffff"
categories:
- Press
......
......@@ -6,7 +6,7 @@ hidden: true
author: Softex
cover: /images/posts/2018/10/2018-10-09-softex-article/softex-logo.jpg
extUrl: https://www.softex.br/softex-projeta-us-10-milhoes-em-negocios-para-a-delegacao-brasileira-no-gartner-symposium-itxpo/
isLogo: true
bgSize: logo
bgColor: "ffffff"
categories:
- Press
......
......@@ -4,6 +4,7 @@ location: Orlando, Florida
dateEvent: 2018-10-14 10:00:00
dateEventEnd: 2018-10-18 10:00:00
extUrl: //www.gartner.com/en/conferences/na/symposium-us/why-attend
bgSize: cover
author: Isabella Russell
hidden: true
categories:
......
......@@ -6,7 +6,7 @@ hidden: true
author: Open Source Underdogs
cover: /images/posts/2018/11/2018-11-05-gabriel-engel-guest-OS-underdogs-podcast/rocket-chat-gabe-engel-OSU-podcast.jpg
extUrl: https://opensourceunderdogs.com/episode-9-rocket-chat-open-source-enterprise-team-chat-with-gabriel-engel/
isLogo: true
bgSize: logo
bgColor: "ffffff"
categories:
- Press
......
......@@ -6,7 +6,7 @@ hidden: true
author: SiliconIndia Magazine
cover: /images/posts/2018/11/2018-11-16-rocket.chat-featured-in-silicon-india-magazine/SI-logo.jpg
extUrl: https://www.siliconindiamagazine.com/magazine/live-chat-special-october-2018/#page=31
isLogo: true
bgSize: logo
bgColor: "ffffff"
categories:
- Press
......
......@@ -6,7 +6,7 @@ hidden: true
author: SiliconIndia Magazine
cover: /images/posts/2018/11/2018-11-16-silicon-india-magazine-livechat/SI-LiveChat.jpg
extUrl: https://enterprise-services.siliconindiamagazine.com/ranking/10-most-promising-live-chat-support-service-provider-%E2%80%93-2018-rid-482.html
isLogo: true
bgSize: logo
bgColor: "ffffff"
categories:
- Press
......
......@@ -118,6 +118,7 @@
height: 100%;
min-width: 6em;
height: 313px;
&.event {
height: 355px;
}
......@@ -125,12 +126,21 @@
.card--blog__cover {
width: 100%;
min-height: 193px;
height: 193px;
background-size: 100%;
background-repeat: no-repeat;
background-position: center center;
transition: background-size 1s;
border-radius: 2px;
display: flex;
padding: 20px;
img {
max-height: 100%;
max-width: 100%;
width: auto;
margin: auto;
}
}
.card--blog__wrap {
......
......@@ -54,16 +54,20 @@ theme: dark
>
<div
class="card--blog__cover"
{% if post.isLogo == true %}
{% if post.bgColor %}
style="background-image: url('/images/press/{{ post.cover }}'); background-size: contain; background-color: #{{post.bgColor}};"
{% endif %}
style="background-image: url('/images/press/{{ post.cover }}'); background-size: contain"
{% elsif post.cover %}
style="background-image: url('/images/press/{{ post.cover }}');"
{% else %}
style="background-image: url('/images/blog/post.jpg')"
{% endif %}
style="
{% if include.post.bgColor %}
background-color: #{{include.post.bgColor}}
{% endif %}
{% unless include.post.isLogo %}
{% if include.post.cover and include.post.bgSize == 'cover'%}
background-image: url('{{ include.post.cover }}'); background-size: cover;
{% else if include.post.cover%}
background-image: url('{{ include.post.cover }}');
{% else %}
background-image: url('/images/blog/post.jpg');
{% endif %}
{% endunless %}"
>
></div>
<div class="card--blog__wrap">
<p class="card--blog__meta label--small theme_type--grey">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment