From de7a6036d1ea7fc87c0d95778beed7588aceb74d Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Tue, 17 Dec 2019 01:32:16 -0800 Subject: [PATCH] Tweak the top heading if there is a image --- app/views/conferences/_header.haml | 6 ++--- app/views/conferences/show.html.haml | 36 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/views/conferences/_header.haml b/app/views/conferences/_header.haml index c3a75bbc..85c430e1 100644 --- a/app/views/conferences/_header.haml +++ b/app/views/conferences/_header.haml @@ -1,11 +1,11 @@ - cache [conference, venue, '#splash#header'] do - #banner + #banner(style: "background_image: url('#{conference.picture_url})'") .container .row .col-md-8.col-md-offset-2#header .row - .col-md-4 - - if conference.picture? + - if conference.picture? + .col-md-4 = image_tag(conference.picture_url, class: 'img-responsive img-center', id: 'splash-logo') diff --git a/app/views/conferences/show.html.haml b/app/views/conferences/show.html.haml index e8f64db3..001794de 100644 --- a/app/views/conferences/show.html.haml +++ b/app/views/conferences/show.html.haml @@ -64,21 +64,21 @@ = render 'social_media', contact: @conference.contact = render 'footer' -- content_for :script_head do - :javascript - var triangle_tcs = tinycolor("#{h(@conference.color)}").monochromatic(); - var triangle_colors = triangle_tcs.map(function(t) { - return t.toHexString(); - }); - $(function () { - $(document).ready(function() { - var triangle_width = document.body.clientWidth; - var triangle_height = ($( "#banner" ).height() + 200 ); - var pattern = Trianglify({ width: triangle_width, - height: triangle_height, - cell_size: 100, - x_colors: triangle_colors - }); - $('#banner').css('background-image', 'url("' + pattern.png() + '")'); - }); - }); +-# - content_for :script_head do +-# :javascript +-# var triangle_tcs = tinycolor("#{h(@conference.color)}").monochromatic(); +-# var triangle_colors = triangle_tcs.map(function(t) { +-# return t.toHexString(); +-# }); +-# $(function () { +-# $(document).ready(function() { +-# var triangle_width = document.body.clientWidth; +-# var triangle_height = ($( "#banner" ).height() + 200 ); +-# var pattern = Trianglify({ width: triangle_width, +-# height: triangle_height, +-# cell_size: 100, +-# x_colors: triangle_colors +-# }); +-# $('#banner').css('background-image', 'url("' + pattern.png() + '")'); +-# }); +-# });