This commit is contained in:
Nicolas Bally 2017-09-21 13:02:26 +02:00
parent a126202a1f
commit 6d18dfd710
4 changed files with 25 additions and 6 deletions

View File

@ -7,6 +7,11 @@
@resize = () -> @resize = () ->
$(".with_ratio").each ->
ratio = parseFloat($(this).data("ratio"))
height = $(this).width()*ratio
$(this).css("height",height+"px")
$("#logo").css('margin-top': (($(window).height()-($("#logo").outerHeight()+0))/ 2-10)+'px') $("#logo").css('margin-top': (($(window).height()-($("#logo").outerHeight()+0))/ 2-10)+'px')

View File

@ -81,21 +81,35 @@
%body{:style => "background-image:url('/background.jpg');"} %body{:style => "background-image:url('/backgroundold.jpg');"}
%div{:style => "background-image:url('/background.jpg');"}
:scss :scss
body{ body{
background:center center no-repeat;
}
div{
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
background:#888888 center center no-repeat;
background-size:100%;
background-size:cover; background-size:cover;
padding:0;
margin:0;
height:100%;
} }
#logo{ #logo{
width:230px; width:100%;
height:197px; max-width:230px;
margin:auto; margin:auto;
display:block; display:block;
opacity:0.8; opacity:0.8;
} }
=image_tag "/coming_logo.png", :id => "logo" =image_tag "/coming_logo.png", :id => "logo", :data => {:ratio => 0.85652174 }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 680 KiB

After

Width:  |  Height:  |  Size: 586 KiB

BIN
public/backgroundold.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 KiB