Переглянути джерело

Merge pull request #53 from wagtail/51-location-styling-missing-styles

Amend location page to include styling
Scot Hacker 8 роки тому
батько
коміт
68180bf3c6
1 змінених файлів з 10 додано та 20 видалено
  1. 10 20
      bakerydemo/templates/locations/location_page.html

+ 10 - 20
bakerydemo/templates/locations/location_page.html

@@ -7,11 +7,6 @@
         #map {
           height: 100%;
         }
-        html, body {
-          height: 100%;
-          margin: 0;
-          padding: 0;
-        }
     </style>
 {% endblock head-extra %}
 
@@ -25,7 +20,13 @@
         <div class="row">
             <div class="col-md-7">
                 <h1>{{ page.title }}</h1>
-                <p class="stand-first">{{ page.subtitle }}</p>
+                <p class="stand-first">
+                {% if page.is_open %}
+                  This location is currently open
+                {% else %}
+                  Sorry, this location is currently closed
+                {% endif %}
+                </p>
             </div>
         </div>
     </div>
@@ -41,10 +42,10 @@
                 <div class="intro col-md-7"><p>{{ page.introduction }}</p></div>
             {% endif %}
 
-            {% if page.opening_hours %}
+            {% if page.operating_hours %}
                 <div class="col-md-4 col-md-offset-1 location-opening">
                 <h3>Opening hours</h3>
-                {% for hours in page.opening_hours %}
+                {% for hours in page.operating_hours %}
                   <time itemprop="openingHours" datetime="{{ hours }}" class="location-time">
                     <span class="day">{{ hours.day }}</span>:
                     <span class="hours">
@@ -72,7 +73,6 @@
       <h3>Address</h3>
         <address>{{ page.address|linebreaks }}</address>
     </div>
-    {# @TODO align address to opening hours? #}
   </div>
 
   <div class="map-container">
@@ -80,16 +80,6 @@
   </div>
 </div>
 
-    {% if page.is_open %}
-      Open Now!
-    {% else %}
-      Currently Closed
-    {% endif %}
-
-    {% for hours in page.operating_hours %}
-        <li>{{ hours }}</li>
-    {% endfor %}
-
 <div class="container">
   <div class="row">
     <div class="col-md-7 location-body">
@@ -107,7 +97,7 @@
               lng: {{long}}
           },
           zoom: 15,
-          scrollwheel:  false
+          scrollwheel: false
         });
         var marker = new google.maps.Marker({
           position: {