sadem_app/app/views/public/m_odrs/show.html.haml
Nicolas Bally a77c20ac9c suite
2020-02-25 02:56:27 +01:00

66 lines
2.1 KiB
Plaintext

-@title = @m_odr.name
-@description = @m_odr.description
=render :partial => "public/shared/social_ressource", :locals => {:social_ressource => @m_odr}
%br
%br
-if @m_odr.logo_image_file
=image_tag @m_odr.logo_image_file.file.url, :class => "odr_logo", :style => (@m_odr.logo_image_file_width? ? "max-width:#{@m_odr.logo_image_file_width}px;margin:auto;": "")
-if @m_odr.logo_image_file
=image_tag @m_odr.banner_image_file.file.url, :class => "odr_banner", :style => (@m_odr.banner_image_file_width? ? "max-width:#{@m_odr.banner_image_file_width}px;margin:auto;": "")
-background = (@m_odr.background_image_file ? @m_odr.background_image_file.file.url : "")
:scss
body{
background:url('#{background}') fixed;
background-size:100%;
background-size: cover;
}
.odr_logo,.odr_banner{
width:90%;
display:block;
margin:auto;
}
-if @m_odr.start_at > Date.today
%div{:style => "font-weight:bold;font-weight:800;font-size:2em;text-transform:uppercase;font-family: 'Open Sans','Helvetica Neue', Helvetica, sans-serif;text-align:center;line-height:200px;position:relative;top:-35px"}
-count = ((@m_odr.start_at) - (Date.today))
Démarrage dans
.clock{:style => "margin:2em;display:inline-block;width:auto;margin:0 auto;position:relative;top:35px"}
-if count > 1
jours !
-else
jour !
<script type="text/javascript">
=raw "var clock_max = #{count};"
</script>
:javascript
var countup;
var clock = $('.clock').FlipClock(0, {
clockFace: 'Counter',
minimumDigits: 1,
callbacks:{
init:function (){
}
}
});
if(clock_max > 0){
countup = setInterval(function() {
clock.increment();
if(clock.getTime().time >= clock_max) {
clock.stop();
clearInterval(countup);
}
}, 0);}
-if false
%p{:style => "font-weight:bold;font-size:2em;text-transform:uppercase;font-family:'Helvetica Neue', Helvetica, sans-serif;"}
jours avant l'ouverture