galeries
This commit is contained in:
parent
cdd5a4cb1d
commit
6a93b336e3
@ -236,10 +236,7 @@ $("document").ready ->
|
||||
|
||||
|
||||
|
||||
|
||||
$(".rea-gal").each ->
|
||||
|
||||
$(this).find("img").css "width", Math.floor(((100) )/ 5)+"%"
|
||||
|
||||
|
||||
|
||||
$("#large").css "min-height", ($(window).height()-30)+"px"
|
||||
|
@ -61,21 +61,40 @@
|
||||
|
||||
|
||||
|
||||
.rea-gal{
|
||||
.gallery{
|
||||
padding-left:0px;
|
||||
|
||||
margin-right:-25px;
|
||||
margin-bottom:-25px;
|
||||
img{
|
||||
a{
|
||||
text-align:center;
|
||||
padding-right:25px;
|
||||
display:block;
|
||||
padding-bottom:25px;
|
||||
width:200px;
|
||||
border-radius:50%;
|
||||
text-decoration:none;
|
||||
float:left;
|
||||
box-sizing: border-box;
|
||||
&:hover{
|
||||
.title{
|
||||
color:#9d9d9d;
|
||||
|
||||
}
|
||||
|
||||
.desc{
|
||||
color:#E5E5E5;
|
||||
|
||||
|
||||
}
|
||||
img{
|
||||
border-radius:50%;
|
||||
|
||||
}
|
||||
img:hover{
|
||||
opacity:0.8;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
img{
|
||||
max-width:100%;
|
||||
}
|
@ -5,6 +5,9 @@
|
||||
Style :
|
||||
= form.select :style, GalleryContent::STYLES
|
||||
|
||||
=form.input :show_title, :label => "Afficher les titres sous les vignettes ?"
|
||||
|
||||
=form.input :show_description, :label => "Afficher les descriptions sous les vignettes ?"
|
||||
|
||||
|
||||
|
||||
|
@ -70,9 +70,15 @@
|
||||
|
||||
|
||||
|
||||
.rea-gal
|
||||
.rea-gal.gallery
|
||||
-input.gallery_images.each do |gallery_images|
|
||||
=link_to image_tag(gallery_images.image_file.file.square.url, :alt => "#{gallery_images.title}"), gallery_images.image_file.file.large.url, :title => gallery_images.title
|
||||
=link_to gallery_images.image_file.file.large.url, :title => gallery_images.title do
|
||||
=image_tag(gallery_images.image_file.file.square.url, :alt => "#{gallery_images.title}")
|
||||
-if input.show_title
|
||||
.title=gallery_images.title
|
||||
-if input.show_description
|
||||
.desc=gallery_images.description
|
||||
|
||||
.clear
|
||||
-if input.style == 4
|
||||
.portlet.input
|
||||
|
@ -2,7 +2,7 @@
|
||||
%h1=@realisation.title
|
||||
=simple_format @realisation.description
|
||||
|
||||
.rea-gal
|
||||
.rea-gal.gallery
|
||||
-@realisation.realisation_images.each do |realisation_images|
|
||||
=link_to image_tag(realisation_images.image_file.file.square.url, :alt => "#{realisation_images.title}"), realisation_images.image_file.file.large.url, :title => realisation_images.title
|
||||
.clear
|
||||
|
@ -0,0 +1,6 @@
|
||||
class AddShowTitleToGalleryContents < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :gallery_contents, :show_title, :boolean
|
||||
add_column :gallery_contents, :show_description, :boolean
|
||||
end
|
||||
end
|
12
db/schema.rb
12
db/schema.rb
@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20160216085123) do
|
||||
ActiveRecord::Schema.define(version: 20160217161702) do
|
||||
|
||||
create_table "admins", force: :cascade do |t|
|
||||
t.string "name", limit: 255
|
||||
@ -223,12 +223,14 @@ ActiveRecord::Schema.define(version: 20160216085123) do
|
||||
end
|
||||
|
||||
create_table "gallery_contents", force: :cascade do |t|
|
||||
t.string "name", limit: 255
|
||||
t.text "description", limit: 65535
|
||||
t.integer "style", limit: 4
|
||||
t.integer "nbr_img", limit: 4
|
||||
t.string "name", limit: 255
|
||||
t.text "description", limit: 65535
|
||||
t.integer "style", limit: 4
|
||||
t.integer "nbr_img", limit: 4
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "show_title", limit: 1
|
||||
t.boolean "show_description", limit: 1
|
||||
end
|
||||
|
||||
create_table "gallery_images", force: :cascade do |t|
|
||||
|
Loading…
x
Reference in New Issue
Block a user