pic_vert_app/app/views/public/plumes/print.html.haml
Nicolas Bally e4f635d68c suite
2018-03-21 16:06:04 +01:00

91 lines
2.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!!!
%html
%head
%meta{:charset => "utf-8"}/
%meta{:name=>"viewport", :content=>"width=device-width,initial-scale=1"}
=# wicked_pdf_javascript_include_tag "number_pages"
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
= wicked_pdf_stylesheet_link_tag 'plume_print'
%body{:onload => "number_pages"}
.page
#plume_header
=image_tag "http://lepicvert.org/plume-logo.png", :class => "plume_logo"
.baseline
Bulletin indépendant des lobbies, dun électorat, consacré à lintérêt général et super intéressant !
.hr
.page
-i = 0
-@plume.plume_cats.order(:position).each do |plume_cat|
-if plume_cat.title != "Brèves"
-plume_cat.plume_articles.each do |plume_article|
-if plume_article.article_type == "page" or (plume_article.article_type == "demi" and i ==0) and plume_article.plume_cat
.page_header
.right
=image_tag "http://lepicvert.org/plume-header.png"
%span
La Plume
="N°#{@plume.number}"
.left= plume_article.plume_cat.title
.clear
-if plume_article.article_type == "page" and i == 1
-i = 0
=raw "</div><div class='page'>"
%h1=plume_article.title
.render_block
=render plume_article.block
-if plume_article.article_type == "page"
-i = 0
=raw "</div><div class='page'>"
-else
-i += 1
-if i == 2
-i = 0
=raw "</div><div class='page'>"
.page
.page_header
.right
=image_tag "http://lepicvert.org/plume-header.png"
%span
La Plume
="N°#{@plume.number}"
.left Agenda
.clear
-@plume.plume_events.each do |plume_event|
.plume_event
%h2=plume_event.title
.date
=raw event_human_date(plume_event)
.desc
=plume_event.description
.page
.page_header
.right
=image_tag "http://lepicvert.org/plume-header.png"
%span
La Plume
="N°#{@plume.number}"
.left Brèves
.clear
-@breve_cat = @plume.plume_cats.where(:title => "Brèves").first
-if @breve_cat
-@breve_cat.plume_articles.each do |plume_article|
.plume_breve
%h2=plume_article.title
.render_block
=render plume_article.block
%div{:style => "width:100px;height:100px;background:red;position:fixed;top:0;right:0;"}