Commits

Guilherme Gondim committed 696f9a5

Add 2 column template

  • Participants
  • Parent commits fa666e3

Comments (0)

Files changed (4)

planeta/static/css/default.css

 }
 .entry-feed { color: #2A5880; }
 
-blockquote { margin: 20px 0 20px }
-blockquote p { margin: 0 0 10px; }
-
 /* Wrapper for page content to push down footer */
 #wrap {
   min-height: 100%;

planeta/templates/base.html

             <div class="page-body">
               {% block main %}{% endblock %}
             </div>
-
-            {% block pagination %}
-              {% if paginator %}{% include 'pagination.html' %}{% endif %}
-            {% endblock %}
+          {% endblock %}
+            
+          {% block pagination %}
+            {% if paginator %}{% include 'pagination.html' %}{% endif %}
           {% endblock %}
         </div>
       </div>

planeta/templates/base_2col.html

+{% extends 'base.html' %}
+
+{% block content %}
+  <div class="row">
+    <div class="col-md-8">
+      <div class="page-header">
+        {% block head %}
+          <h1>{% block heading %}{% endblock %}</h1>
+        {% endblock %}
+      </div>
+
+      <div class="page-body">
+        {% block main %}{% endblock %}
+      </div>
+    </div>
+
+    <div class="page-side col-md-4">
+      {% block side %}{% endblock %}
+    </div>
+  </div>
+{% endblock %}

planeta/templates/entry_detail.html

-{% extends 'base.html' %}
+{% extends 'base_2col.html' %}
 {% load sanitizer %}
 
-{% block title %}{{ object.title }} - {{ block.super }}{% endblock %}
-{% block heading %}{{ object.title }}{% endblock %}
+{% block title %}{{ entry.title }} - {{ block.super }}{% endblock %}
+
+{% block head %}
+  <h1>{{ entry.title }}</h1>
+{% endblock %}
 
 {% block breadcrumbs-items %}{{ block.super }}
   <li><a href="{% url 'feed-list' %}">Feeds</a></li>
-  <li><a href="{% url 'feed-detail' object.feed.pk %}">{{ object.feed.title|truncatechars:32 }}</a></li>
-  <li class="active">{{ object.title|truncatechars:32 }}</li>
+  <li><a href="{% url 'feed-detail' entry.feed.pk %}">{{ entry.feed.title|truncatechars:32 }}</a></li>
+  <li class="active">{{ entry.title|truncatechars:32 }}</li>
 {% endblock %}
 
 {% block main %}
-  <div class="row entry-detail">
-    <div class="col-md-8">
-      {% strip_html entry.summary "a, audio, abbr, b, br, blockquote, canvas, cite, code, dd, dl, dt, embed, dfm, del, ins, em, figure, figcaption, i, img, p, pre, ol, strong, ul, li, h1, h2, h3, h4, h5, h6, meter, mark, object, param, q, s, samp, sub, sup, table, tbody, td, tfoot, th, thead, tr, time, u, video, wbr" "href, src, value, min, max, data, name, datetime" %}
-    </div>
+  <p class="well well-sm entry-meta">from
+    <strong class="entry-feed">{{ entry.feed }}</strong><br />
+    {{ entry.date }}
+  </p>
+
+  {% strip_html entry.summary "a, audio, abbr, b, br, blockquote, canvas, cite, code, dd, dl, dt, embed, dfm, del, ins, em, figure, figcaption, i, img, p, pre, ol, strong, ul, li, h1, h2, h3, h4, h5, h6, meter, mark, object, param, q, s, samp, sub, sup, table, tbody, td, tfoot, th, thead, tr, time, u, video, wbr" "href, src, value, min, max, data, name, datetime" %}
+{% endblock %}
 
-    <div class="col-md-4">
-    </div>
-  </div>
+{% block side %}
 {% endblock %}