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] %>
|
||||
<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 %>
|
||||
<section class="hero is-medium is-primary is-bold">
|
||||
<% end %>
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<!--<a href="<%= @article.path %>" class="tile is-child box backgroundimg <%= @htmlclass %>"
|
||||
style="background-image:url('<%= @article[:banner] %>');">-->
|
||||
<% if @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"
|
||||
style="background-color:<%= @article[:color] %>;">
|
||||
<div class="content" >
|
||||
style="background-image: linear-gradient(to top right,rgba(255,255,255,0),rgba(0,0,0,.75)); background-color:<%= @article[:color] %>;">
|
||||
<% else %>
|
||||
<a href="<%= @article.path %>" class="tile is-child box backgroundimg">
|
||||
<% end %>
|
||||
<div class="content">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<h2>
|
||||
|
|
Loading…
Reference in a new issue