Tweak the top heading if there is a image
This commit is contained in:
parent
5441f83271
commit
de7a6036d1
2 changed files with 21 additions and 21 deletions
|
|
@ -1,11 +1,11 @@
|
||||||
- cache [conference, venue, '#splash#header'] do
|
- cache [conference, venue, '#splash#header'] do
|
||||||
#banner
|
#banner(style: "background_image: url('#{conference.picture_url})'")
|
||||||
.container
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-8.col-md-offset-2#header
|
.col-md-8.col-md-offset-2#header
|
||||||
.row
|
.row
|
||||||
.col-md-4
|
- if conference.picture?
|
||||||
- if conference.picture?
|
.col-md-4
|
||||||
= image_tag(conference.picture_url,
|
= image_tag(conference.picture_url,
|
||||||
class: 'img-responsive img-center',
|
class: 'img-responsive img-center',
|
||||||
id: 'splash-logo')
|
id: 'splash-logo')
|
||||||
|
|
|
||||||
|
|
@ -64,21 +64,21 @@
|
||||||
= render 'social_media', contact: @conference.contact
|
= render 'social_media', contact: @conference.contact
|
||||||
= render 'footer'
|
= render 'footer'
|
||||||
|
|
||||||
- content_for :script_head do
|
-# - content_for :script_head do
|
||||||
:javascript
|
-# :javascript
|
||||||
var triangle_tcs = tinycolor("#{h(@conference.color)}").monochromatic();
|
-# var triangle_tcs = tinycolor("#{h(@conference.color)}").monochromatic();
|
||||||
var triangle_colors = triangle_tcs.map(function(t) {
|
-# var triangle_colors = triangle_tcs.map(function(t) {
|
||||||
return t.toHexString();
|
-# return t.toHexString();
|
||||||
});
|
-# });
|
||||||
$(function () {
|
-# $(function () {
|
||||||
$(document).ready(function() {
|
-# $(document).ready(function() {
|
||||||
var triangle_width = document.body.clientWidth;
|
-# var triangle_width = document.body.clientWidth;
|
||||||
var triangle_height = ($( "#banner" ).height() + 200 );
|
-# var triangle_height = ($( "#banner" ).height() + 200 );
|
||||||
var pattern = Trianglify({ width: triangle_width,
|
-# var pattern = Trianglify({ width: triangle_width,
|
||||||
height: triangle_height,
|
-# height: triangle_height,
|
||||||
cell_size: 100,
|
-# cell_size: 100,
|
||||||
x_colors: triangle_colors
|
-# x_colors: triangle_colors
|
||||||
});
|
-# });
|
||||||
$('#banner').css('background-image', 'url("' + pattern.png() + '")');
|
-# $('#banner').css('background-image', 'url("' + pattern.png() + '")');
|
||||||
});
|
-# });
|
||||||
});
|
-# });
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue