suite
This commit is contained in:
parent
3053d1d93d
commit
0e7b226c86
@ -10,7 +10,12 @@ $beige:#F1F0EE;
|
|||||||
background-size:cover;
|
background-size:cover;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.credits{
|
||||||
|
text-align:center;
|
||||||
|
font-size:0.9em;
|
||||||
|
color:rgba(0,0,0,0.6);
|
||||||
|
padding:2px 0;
|
||||||
|
}
|
||||||
#bottom{
|
#bottom{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
bottom:0;
|
bottom:0;
|
||||||
@ -45,7 +50,9 @@ $beige:#F1F0EE;
|
|||||||
|
|
||||||
.page_inner{
|
.page_inner{
|
||||||
padding:25px 50px;
|
padding:25px 50px;
|
||||||
|
padding-bottom:0;
|
||||||
font-size:14px;
|
font-size:14px;
|
||||||
|
font-weight:300;
|
||||||
h1{
|
h1{
|
||||||
|
|
||||||
text-transform:uppercase;
|
text-transform:uppercase;
|
||||||
@ -60,7 +67,7 @@ $beige:#F1F0EE;
|
|||||||
|
|
||||||
body{
|
body{
|
||||||
-webkit-text-size-adjust: none;
|
-webkit-text-size-adjust: none;
|
||||||
font-weight:bold;
|
font-weight:normal;
|
||||||
height:100%;
|
height:100%;
|
||||||
width:102%;
|
width:102%;
|
||||||
padding:0;
|
padding:0;
|
||||||
@ -98,6 +105,7 @@ html{
|
|||||||
background:$beige;
|
background:$beige;
|
||||||
padding:10px 20px;
|
padding:10px 20px;
|
||||||
padding-top:20px;
|
padding-top:20px;
|
||||||
|
font-weight:700;
|
||||||
img{
|
img{
|
||||||
width:80px;
|
width:80px;
|
||||||
|
|
||||||
|
@ -9,7 +9,12 @@
|
|||||||
|
|
||||||
@import "qi_css/grid";
|
@import "qi_css/grid";
|
||||||
|
|
||||||
|
.credits{
|
||||||
|
text-align:center;
|
||||||
|
font-size:0.9em;
|
||||||
|
color:rgba(0,0,0,0.6);
|
||||||
|
padding:2px 0;
|
||||||
|
}
|
||||||
.observer-et-photographier-la-faune-sans-deranger{
|
.observer-et-photographier-la-faune-sans-deranger{
|
||||||
.couv{
|
.couv{
|
||||||
|
|
||||||
@ -35,8 +40,8 @@ a{
|
|||||||
}
|
}
|
||||||
|
|
||||||
body{
|
body{
|
||||||
font-family:"Museo sans";
|
font-family:"Lato", arial, sans-serif;
|
||||||
font-weight:300;
|
|
||||||
line-height:1.4em;
|
line-height:1.4em;
|
||||||
text-align:justify;
|
text-align:justify;
|
||||||
|
|
||||||
@ -318,7 +323,7 @@ text-align:center;
|
|||||||
|
|
||||||
h1,h2,h3,h4{
|
h1,h2,h3,h4{
|
||||||
text-align:left;
|
text-align:left;
|
||||||
font-weight: 400;
|
font-weight: 700;
|
||||||
font-family:$header_font, Arial, sans-serif;
|
font-family:$header_font, Arial, sans-serif;
|
||||||
color:#69952f;
|
color:#69952f;
|
||||||
text-transform:uppercase;
|
text-transform:uppercase;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
class BlockContent < ActiveRecord::Base
|
class BlockContent < ActiveRecord::Base
|
||||||
has_one :portlet, :as => :content, :dependent => :destroy
|
has_one :portlet, :as => :content, :dependent => :destroy
|
||||||
has_many :blocks, :as => :blockable, :dependent => :destroy
|
has_many :blocks, :as => :blockable, :dependent => :destroy
|
||||||
|
belongs_to :image_file
|
||||||
|
|
||||||
validates :nbr_columns, :presence => true
|
validates :nbr_columns, :presence => true
|
||||||
|
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
.qi_header
|
||||||
|
%h1
|
||||||
|
=link_to "Plumes", admin_plumes_path
|
||||||
|
%span
|
||||||
|
=link_to edit_admin_plume_path(@plume_article.plume) do
|
||||||
|
="Plume N° "+@plume_article.plume.number.to_s
|
||||||
|
="- "+@plume_article.plume.p_version
|
||||||
|
%span
|
||||||
|
=link_to edit_admin_plume_cat_path(@plume_article.plume_cat) do
|
||||||
|
=@plume_article.plume_cat.title
|
||||||
|
|
||||||
|
|
||||||
#toolbar-text
|
#toolbar-text
|
||||||
|
|
||||||
#menu_item_block_edit{:style => "margin-right:330px;margin-top:45px;"}
|
#menu_item_block_edit{:style => "margin-right:330px;margin-top:45px;"}
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
.qi_header
|
.qi_header
|
||||||
.right= link_to 'Ajouter un article', new_admin_plume_article_path(:plume_cat_id => @plume_cat.id), :class => "btn btn-primary", :remote => true
|
.right= link_to 'Ajouter un article', new_admin_plume_article_path(:plume_cat_id => @plume_cat.id), :class => "btn btn-primary", :remote => true
|
||||||
%h1
|
%h1
|
||||||
Plumes
|
=link_to "Plumes", admin_plumes_path
|
||||||
%span
|
%span
|
||||||
|
=link_to edit_admin_plume_path(@plume) do
|
||||||
="Plume N° "+@plume.number.to_s
|
="Plume N° "+@plume.number.to_s
|
||||||
="- "+@plume.p_version
|
="- "+@plume.p_version
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
%td=plume.title
|
%td=plume.title
|
||||||
%td
|
%td
|
||||||
=link_to "voir", public_plume_path(plume), :target => "plume_#{plume.id}"
|
=link_to "Voir", public_plume_path(plume), :target => "plume_#{plume.id}"
|
||||||
|
="-"
|
||||||
|
=link_to "Voir la plume (pdf)", print_public_plume_path(plume, :format => "pdf"), :target => "plume_pdf_#{plume.id}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
.qi_header
|
.qi_header
|
||||||
|
|
||||||
%h1
|
%h1
|
||||||
Plumes
|
=link_to "Plumes", admin_plumes_path
|
||||||
%span
|
%span
|
||||||
|
|
||||||
="Plume N° "+@plume.number.to_s
|
="Plume N° "+@plume.number.to_s
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
= stylesheet_link_tag '/fonts/Stylograph/stylesheet.css'
|
= stylesheet_link_tag '/fonts/Stylograph/stylesheet.css'
|
||||||
<script src="//use.typekit.net/ipv8wby.js"></script>
|
<script src="//use.typekit.net/ipv8wby.js"></script>
|
||||||
<script>try{Typekit.load();}catch(e){}</script>
|
<script>try{Typekit.load();}catch(e){}</script>
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
|
||||||
=javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false®ion=FR"
|
=javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false®ion=FR"
|
||||||
|
|
||||||
%body
|
%body
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
= stylesheet_link_tag '/fonts/Stylograph/stylesheet.css'
|
= stylesheet_link_tag '/fonts/Stylograph/stylesheet.css'
|
||||||
<script src="//use.typekit.net/ipv8wby.js"></script>
|
<script src="//use.typekit.net/ipv8wby.js"></script>
|
||||||
<script>try{Typekit.load();}catch(e){}</script>
|
<script>try{Typekit.load();}catch(e){}</script>
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
|
||||||
=javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false®ion=FR"
|
=javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false®ion=FR"
|
||||||
|
|
||||||
%body
|
%body
|
||||||
|
@ -81,4 +81,15 @@
|
|||||||
-if BlockContent::STYLES.size > 0
|
-if BlockContent::STYLES.size > 0
|
||||||
Style :
|
Style :
|
||||||
= f.select :style, BlockContent::STYLES
|
= f.select :style, BlockContent::STYLES
|
||||||
|
=f.inputs do
|
||||||
|
= f.input :center, :label => "Centrer le bloc au milieu de la page"
|
||||||
|
= f.input :image_file_id, :label => "Image de fond :" , :as => :qi_image_select
|
||||||
|
= f.input :background_color, :label => "couleur de fond :"
|
||||||
|
= f.input :margin_top, :label => "Marge haut :"
|
||||||
|
= f.input :margin_bottom, :label => "Marge bas :"
|
||||||
|
= f.input :margin_left, :label => "Marge gauche :"
|
||||||
|
= f.input :margin_right, :label => "Marge droite :"
|
||||||
|
= f.input :padding_top, :label => "Marge intérieure haut :"
|
||||||
|
= f.input :padding_bottom, :label => "Marge intérieure bas :"
|
||||||
|
= f.input :padding_left, :label => "Marge intérieure gauche :"
|
||||||
|
= f.input :padding_right, :label => "Marge intérieure droite :"
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
|
|
||||||
= form.input :alt, :label => "Texte alternatif :"
|
= form.input :alt, :label => "Texte alternatif :"
|
||||||
|
=# form.input :with_legend,:as => :boolean , :label => "Afficher la légende ?"
|
||||||
|
= form.input :credits, :label => "Crédit photo"
|
||||||
= form.input :alignement, :label => "Alignement :", :as => :select, :collection => ImageContent::ALIGNS, :include_blank => false
|
= form.input :alignement, :label => "Alignement :", :as => :select, :collection => ImageContent::ALIGNS, :include_blank => false
|
||||||
= form.input :style, :label => "Style :", :as => :select, :collection => ImageContent::STYLES, :include_blank => false
|
= form.input :style, :label => "Style :", :as => :select, :collection => ImageContent::STYLES, :include_blank => false
|
||||||
= form.input :width, :label => "Largeur :"
|
= form.input :width, :label => "Largeur :"
|
||||||
@ -27,3 +28,9 @@
|
|||||||
= form.input :popup, :label => "Ouvrir dans une popup ?", :as => :boolean
|
= form.input :popup, :label => "Ouvrir dans une popup ?", :as => :boolean
|
||||||
|
|
||||||
|
|
||||||
|
= form.input :margin_top, :label => "Marge haut :"
|
||||||
|
= form.input :margin_bottom, :label => "Marge bas :"
|
||||||
|
= form.input :margin_left, :label => "Marge gauche :"
|
||||||
|
= form.input :margin_right, :label => "Marge droite :"
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,12 +17,37 @@
|
|||||||
- css_class = "beton" if input.style == 7
|
- css_class = "beton" if input.style == 7
|
||||||
- css_class = "content_center" if input.style == 8
|
- css_class = "content_center" if input.style == 8
|
||||||
|
|
||||||
=raw "<div class='#{css_class}'>" if !admin
|
-css_style = ""
|
||||||
|
-css_columns = ""
|
||||||
|
|
||||||
|
|
||||||
|
-css_style += "background-color:#{input.background_color};" if input.background_color?
|
||||||
|
|
||||||
|
- if input.image_file
|
||||||
|
-url = input.image_file.file.large.url
|
||||||
|
-if input.image_file and input.image_file.photograph
|
||||||
|
-@page_images_credits << input.image_file.photograph
|
||||||
|
|
||||||
|
|
||||||
|
-css_style += "background-image:url('#{url}');background-size:100%;background-size:cover;background-position:center center;"
|
||||||
|
|
||||||
|
-css_columns += "padding-top:#{input.padding_top}px;" if input.padding_top?
|
||||||
|
-css_columns += "padding-bottom:#{input.padding_bottom}px;" if input.padding_bottom?
|
||||||
|
-css_columns += "padding-left:#{input.padding_left}px;" if input.padding_left?
|
||||||
|
-css_columns += "padding-right:#{input.padding_right}px;" if input.padding_right?
|
||||||
|
|
||||||
|
-css_style += "margin-top:#{input.margin_top}px;" if input.margin_top?
|
||||||
|
-css_style += "margin-bottom:#{input.margin_bottom}px;" if input.margin_bottom?
|
||||||
|
-css_style += "margin-left:#{input.margin_left}px;" if input.margin_left?
|
||||||
|
-css_style += "margin-right:#{input.margin_right}px;" if input.margin_right?
|
||||||
|
|
||||||
|
|
||||||
|
=raw "<div class='#{css_class}' style=\""+css_style+"\">" if !admin
|
||||||
|
|
||||||
=raw "<div class='main'>" if input.style > 1 or input.style < 10
|
=raw "<div class='main'>" if input.style > 1 or input.style < 10
|
||||||
.row
|
.row
|
||||||
-for i in 1..input.nbr_columns.to_i
|
-for i in 1..input.nbr_columns.to_i
|
||||||
%div{:class => "columns span_"+eval("input.row#{i}").to_s}
|
%div{:class => "columns span_"+eval("input.row#{i}").to_s, :style => css_columns}
|
||||||
-if admin
|
-if admin
|
||||||
=render :partial => "admin/blocks/block", :locals => {:admin => false,:block => input.blocks[i-1], :sortable => false}
|
=render :partial => "admin/blocks/block", :locals => {:admin => false,:block => input.blocks[i-1], :sortable => false}
|
||||||
-else
|
-else
|
||||||
|
@ -41,6 +41,10 @@
|
|||||||
-styleimg=""
|
-styleimg=""
|
||||||
-styleimg += "width:"+input.width.to_s+"px;" if input.width?
|
-styleimg += "width:"+input.width.to_s+"px;" if input.width?
|
||||||
-styleimg += "height:"+input.height.to_s+"px;" if input.height?
|
-styleimg += "height:"+input.height.to_s+"px;" if input.height?
|
||||||
|
-style += "margin-top:#{input.margin_top}px;" if input.margin_top?
|
||||||
|
-style += "margin-bottom:#{input.margin_bottom}px;" if input.margin_bottom?
|
||||||
|
-style += "margin-left:#{input.margin_left}px;" if input.margin_left?
|
||||||
|
-style += "margin-right:#{input.margin_right}px;" if input.margin_right?
|
||||||
|
|
||||||
=raw '<div class="img" style="'+style+'">' if style
|
=raw '<div class="img" style="'+style+'">' if style
|
||||||
|
|
||||||
@ -58,5 +62,8 @@
|
|||||||
|
|
||||||
-else
|
-else
|
||||||
=image_tag(url, :alt => input.alt.to_s, :style => styleimg )
|
=image_tag(url, :alt => input.alt.to_s, :style => styleimg )
|
||||||
|
-if input.credits?
|
||||||
|
.credits
|
||||||
|
©
|
||||||
|
=input.credits
|
||||||
=raw '</div>' if style
|
=raw '</div>' if style
|
@ -3,7 +3,7 @@
|
|||||||
%meta{:charset => "utf-8"}/
|
%meta{:charset => "utf-8"}/
|
||||||
%meta{:name=>"viewport", :content=>"width=device-width,initial-scale=1"}
|
%meta{:name=>"viewport", :content=>"width=device-width,initial-scale=1"}
|
||||||
=# wicked_pdf_javascript_include_tag "number_pages"
|
=# wicked_pdf_javascript_include_tag "number_pages"
|
||||||
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Lato:300,300i,400,400i,700,900" rel="stylesheet">
|
||||||
= wicked_pdf_stylesheet_link_tag 'plume_print'
|
= wicked_pdf_stylesheet_link_tag 'plume_print'
|
||||||
%body{:onload => "number_pages"}
|
%body{:onload => "number_pages"}
|
||||||
.page
|
.page
|
||||||
|
11
db/migrate/20180322135213_add_infos_to_image_contents.rb
Normal file
11
db/migrate/20180322135213_add_infos_to_image_contents.rb
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
class AddInfosToImageContents < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :image_contents, :with_legend, :boolean
|
||||||
|
add_column :image_contents, :credits, :string
|
||||||
|
add_column :image_contents, :margin_top, :integer
|
||||||
|
add_column :image_contents, :margin_bottom, :integer
|
||||||
|
add_column :image_contents, :margin_left, :integer
|
||||||
|
add_column :image_contents, :margin_right, :integer
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
22
db/migrate/20180322141536_add_infos_to_block_contents.rb
Normal file
22
db/migrate/20180322141536_add_infos_to_block_contents.rb
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
class AddInfosToBlockContents < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :block_contents, :image_file_id, :integer
|
||||||
|
add_column :block_contents, :margin_top, :integer
|
||||||
|
add_column :block_contents, :margin_bottom, :integer
|
||||||
|
add_column :block_contents, :margin_left, :integer
|
||||||
|
add_column :block_contents, :margin_right, :integer
|
||||||
|
add_column :block_contents, :padding_top, :integer
|
||||||
|
add_column :block_contents, :padding_bottom, :integer
|
||||||
|
add_column :block_contents, :padding_left, :integer
|
||||||
|
add_column :block_contents, :padding_right, :integer
|
||||||
|
add_column :block_contents, :parallax, :boolean
|
||||||
|
add_column :block_contents, :center, :boolean
|
||||||
|
add_column :block_contents, :center_width, :integer
|
||||||
|
add_column :block_contents, :background_color, :string
|
||||||
|
add_column :block_contents, :gradient_start, :string
|
||||||
|
add_column :block_contents, :gradient_stop, :string
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
23
db/schema.rb
23
db/schema.rb
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20180320123351) do
|
ActiveRecord::Schema.define(version: 20180322141536) do
|
||||||
|
|
||||||
create_table "admins", force: true do |t|
|
create_table "admins", force: true do |t|
|
||||||
t.string "email", default: "", null: false
|
t.string "email", default: "", null: false
|
||||||
@ -107,6 +107,21 @@ ActiveRecord::Schema.define(version: 20180320123351) do
|
|||||||
t.integer "row4"
|
t.integer "row4"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
t.integer "image_file_id"
|
||||||
|
t.integer "margin_top"
|
||||||
|
t.integer "margin_bottom"
|
||||||
|
t.integer "margin_left"
|
||||||
|
t.integer "margin_right"
|
||||||
|
t.integer "padding_top"
|
||||||
|
t.integer "padding_bottom"
|
||||||
|
t.integer "padding_left"
|
||||||
|
t.integer "padding_right"
|
||||||
|
t.boolean "parallax"
|
||||||
|
t.boolean "center"
|
||||||
|
t.integer "center_width"
|
||||||
|
t.string "background_color"
|
||||||
|
t.string "gradient_start"
|
||||||
|
t.string "gradient_stop"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "blocks", force: true do |t|
|
create_table "blocks", force: true do |t|
|
||||||
@ -397,6 +412,12 @@ ActiveRecord::Schema.define(version: 20180320123351) do
|
|||||||
t.boolean "popup"
|
t.boolean "popup"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
t.boolean "with_legend"
|
||||||
|
t.string "credits"
|
||||||
|
t.integer "margin_top"
|
||||||
|
t.integer "margin_bottom"
|
||||||
|
t.integer "margin_left"
|
||||||
|
t.integer "margin_right"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "image_files", force: true do |t|
|
create_table "image_files", force: true do |t|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user