소스 검색

small changes to gallery page

Arnar Tumi Þorsteinsson 8 년 전
부모
커밋
ccad5ed974
2개의 변경된 파일28개의 추가작업 그리고 9개의 파일을 삭제
  1. 19 7
      bakerydemo/templates/base/gallery_page.html
  2. 9 2
      bakerydemo/templates/tags/gallery.html

+ 19 - 7
bakerydemo/templates/base/gallery_page.html

@@ -2,14 +2,26 @@
 {% load wagtailimages_tags gallery_tags %}
 
 {% block content-header %}
-    {{ page.title }}
-
-    <div class="image">
-        {% image page.image width-500 as photo %}
-              <img src="{{ photo.url }}" width="{{ photo.width }}" height="{{ photo.height }}" alt="{{ photo.alt }}" />
+{% image self.image fill-1920x600 as hero_img %}
+<div class="container-fluid hero" style="background-image:url('{{ hero_img.url }}')">
+<div class="hero-gradient-mask"></div>
+    <div class="container">
+        <div class="row">
+            <div class="col-md-7 col-md-offset-2">
+                <h1>{{ page.title }}</h1>
+                <p class="stand-first">{{ page.subtitle }}</p>
+            </div>
+        </div>
     </div>
+</div>
 {% endblock content-header %}
 
 {% block content-body %}
-    {% gallery page.choices %}
-{% endblock content %}
+<div class="container">
+    <div class="row">
+        <div class="col-xs-12">
+            {% gallery page.choices %}
+        </div>
+    </div>
+</div>
+{% endblock content-body %}

+ 9 - 2
bakerydemo/templates/tags/gallery.html

@@ -1,7 +1,14 @@
 {% load wagtailimages_tags %}
 
 {% for img in images %}
-{% image img max-285x200 as img_obj %}
-<div class="col-sm-6"><img src="{{img_obj.url}}" class="img-responsive" /></div>
+{% image img fill-285x200-c100 as img_obj %}
+<div class="col-sm-6">
+	<a href="">
+		<figure class="gallery-figure">
+			<img src="{{img_obj.url}}" class="img-responsive" />
+			<figcaption>{{ img.title }}</figcaption>
+		</figure>
+	</a>
+</div>
 {{ image.title }}
 {% endfor %}