Parcourir la source

Some improvements to the project galleries.

Iñigo Valentin il y a 4 ans
Parent
commit
71c0dde044

+ 13 - 3
app/assets/stylesheets/project.css

@@ -246,21 +246,31 @@ section#gallery div#gallery_controls{
         width: 95%;
         width: 95%;
     }
     }
 }
 }
-
+section#gallery div#gallery_controls div.gallery_control{
+    display: inline-block;
+    vertical-align: top;
+}
+section#gallery div#gallery_controls div#gallery_control_left{
+    text-align: right;
+}
+section#gallery div#gallery_controls div#gallery_control_right{
+    text-align: left;
+}
 section#gallery div#gallery_controls input{
 section#gallery div#gallery_controls input{
     display: inline-block;
     display: inline-block;
     vertical-align: top;
     vertical-align: top;
     width: 3em;
     width: 3em;
     height: 3em;
     height: 3em;
+    margin: 0.2em 1em;
 }
 }
 
 
 section#gallery div#gallery_controls div#image_list{
 section#gallery div#gallery_controls div#image_list{
     display: inline-block;
     display: inline-block;
-    width: 70%;
+    max-width: 70%;
 }
 }
 @media screen and (max-width : 800px){
 @media screen and (max-width : 800px){
     section#gallery div#gallery_controls div#image_list{
     section#gallery div#gallery_controls div#image_list{
-        width: 60%;
+        max-width: 60%;
     }
     }
 }
 }
 
 

+ 7 - 3
app/views/projects/show.html.erb

@@ -105,7 +105,7 @@
 </div>
 </div>
 <section id='gallery'>
 <section id='gallery'>
     <h3>
     <h3>
-        <%= @project.i18n_title %>
+        <%= t("project.gallery_title", project: @project.i18n_title) %>
         <span id='gallery_close'>
         <span id='gallery_close'>
             <%=
             <%=
                 link_to(
                 link_to(
@@ -125,7 +125,9 @@
             <img id='gallery_image'/>
             <img id='gallery_image'/>
         </div>
         </div>
         <div id='gallery_controls'>
         <div id='gallery_controls'>
-            <input type='button' value='<' onClick='javascript:previousPhoto();'/>
+            <div class='gallery_control' id='gallery_control_left'>
+                <input type='button' value='<' onClick='javascript:previousPhoto();'/>
+            </div>
             <div id='image_list'>
             <div id='image_list'>
                 <% i = 0 %>
                 <% i = 0 %>
                 <% @project.images.each do |image| %>
                 <% @project.images.each do |image| %>
@@ -145,7 +147,9 @@
                     <% i = i + 1 %>
                     <% i = i + 1 %>
                 <% end %>
                 <% end %>
             </div>
             </div>
-            <input type='button' value='>' onClick='javascript:nextPhoto();'/>
+            <div class='gallery_control' id='gallery_control_right'>
+                <input type='button' value='>' onClick='javascript:nextPhoto();'/>
+            </div>
         </div>
         </div>
     </article>
     </article>
 </section>
 </section>

+ 1 - 0
config/locales/en.yml

@@ -152,6 +152,7 @@ en:
         search_advanced: "Advanced search"
         search_advanced: "Advanced search"
         comment: "%{name}'s notes"
         comment: "%{name}'s notes"
         images: "Image gallery"
         images: "Image gallery"
+        gallery_title: "%{project}: Images"
     share:
     share:
         google: "Google +"
         google: "Google +"
         twitter: "Twitter"
         twitter: "Twitter"

+ 1 - 0
config/locales/es.yml

@@ -152,6 +152,7 @@ es:
         search_advanced: "Búsqueda avanzada"
         search_advanced: "Búsqueda avanzada"
         comment: "Notas de %{name}"
         comment: "Notas de %{name}"
         images: "Galería"
         images: "Galería"
+        gallery_title: "%{project}: Imágenes"
     share:
     share:
         google: "Google +"
         google: "Google +"
         twitter: "Twitter"
         twitter: "Twitter"

+ 1 - 0
config/locales/eu.yml

@@ -152,6 +152,7 @@ eu:
         search_advanced: "Bilaketa aurreratua"
         search_advanced: "Bilaketa aurreratua"
         comment: "%{name}-ren oharrak"
         comment: "%{name}-ren oharrak"
         images: "Irudiak"
         images: "Irudiak"
+        gallery_title: "%{project}: Irudiak"
     share:
     share:
         google: "Google +"
         google: "Google +"
         twitter: "Twitter"
         twitter: "Twitter"