sadem_app/app/views/public/m_odrs/show.html.haml
Nicolas Bally f5b030b522 suite
2020-02-25 22:33:47 +01:00

79 lines
2.9 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 => "margin-top:30px;font-weight:bold;font-weight:800;font-size:2em;text-transform:uppercase;font-family: 'Open Sans','Helvetica Neue', Helvetica, sans-serif;text-align:center;"}
-count = ((@m_odr.start_at) - (Date.today))
-if @m_odr.landing_text?
=@m_odr.landing_text
-else
Démarrage
%div{:style => "font-weight:bold;font-weight:800;text-transform:uppercase;font-family: 'Open Sans','Helvetica Neue', Helvetica, sans-serif;text-align:center;line-height:200px;position:relative;top:-40px"}
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
-if @m_odr.footer_image_file
-if @m_odr.footer_image_link?
=link_to image_tag(@m_odr.footer_image_file.file.url, :class => "odr_banner", :style => (@m_odr.footer_image_width? ? "max-width:#{@m_odr.footer_image_width}px;margin:auto;": "")), @m_odr.footer_image_link, :target => "_blank"
-else
=image_tag(@m_odr.footer_image_file.file.url, :class => "odr_banner", :style => (@m_odr.footer_image_width? ? "max-width:#{@m_odr.footer_image_width}px;margin:auto;": ""))