Răsfoiți Sursa

Some improvements to the project galleries.

Iñigo Valentin 4 ani în urmă
părinte
comite
71c0dde044

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

@@ -246,21 +246,31 @@ section#gallery div#gallery_controls{
         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{
     display: inline-block;
     vertical-align: top;
     width: 3em;
     height: 3em;
+    margin: 0.2em 1em;
 }
 
 section#gallery div#gallery_controls div#image_list{
     display: inline-block;
-    width: 70%;
+    max-width: 70%;
 }
 @media screen and (max-width : 800px){
     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>
 <section id='gallery'>
     <h3>
-        <%= @project.i18n_title %>
+        <%= t("project.gallery_title", project: @project.i18n_title) %>
         <span id='gallery_close'>
             <%=
                 link_to(
@@ -125,7 +125,9 @@
             <img id='gallery_image'/>
         </div>
         <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'>
                 <% i = 0 %>
                 <% @project.images.each do |image| %>
@@ -145,7 +147,9 @@
                     <% i = i + 1 %>
                 <% end %>
             </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>
     </article>
 </section>

+ 1 - 0
config/locales/en.yml

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

+ 1 - 0
config/locales/es.yml

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

+ 1 - 0
config/locales/eu.yml

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