added gradient color if no banner defined
This commit is contained in:
parent
018c6d9928
commit
fa7bdde3e9
2 changed files with 11 additions and 4 deletions
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
<% if item[:banner] %>
|
<% if item[:banner] %>
|
||||||
<section class="hero is-medium is-primary is-bold" style="background-image:url('<%= item[:banner] %>');background-position:center;">
|
<section class="hero is-medium is-primary is-bold" style="background-image:url('<%= item[:banner] %>');background-position:center;">
|
||||||
|
<% elsif item[:color] %>
|
||||||
|
<section class="hero is-medium is-primary is-bold" style="background-image: linear-gradient(to top right,rgba(255,255,255,0),rgba(0,0,0,.75)); background-color:<%= item[:color] %>;">
|
||||||
<% else %>
|
<% else %>
|
||||||
<section class="hero is-medium is-primary is-bold">
|
<section class="hero is-medium is-primary is-bold">
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
<!--<a href="<%= @article.path %>" class="tile is-child box backgroundimg <%= @htmlclass %>"
|
<% if @article[:banner] %>
|
||||||
style="background-image:url('<%= @article[:banner] %>');">-->
|
<a href="<%= @article.path %>" class="tile is-child box backgroundimg <%= @htmlclass %>"
|
||||||
|
style="background-image:url('<%= @article[:banner] %>');">
|
||||||
|
<% elsif @article[:color] %>
|
||||||
<a href="<%= @article.path %>" class="tile is-child box backgroundimg highlighted"
|
<a href="<%= @article.path %>" class="tile is-child box backgroundimg highlighted"
|
||||||
style="background-color:<%= @article[:color] %>;">
|
style="background-image: linear-gradient(to top right,rgba(255,255,255,0),rgba(0,0,0,.75)); background-color:<%= @article[:color] %>;">
|
||||||
<div class="content" >
|
<% else %>
|
||||||
|
<a href="<%= @article.path %>" class="tile is-child box backgroundimg">
|
||||||
|
<% end %>
|
||||||
|
<div class="content">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2>
|
<h2>
|
||||||
|
|
Loading…
Reference in a new issue