Browse Source

base archive on base template

Oz N Tiram 9 năm trước cách đây
mục cha
commit
83c7317cc9
3 tập tin đã thay đổi với 19 bổ sung33 xóa
  1. 8 0
      media/css/site.css
  2. 11 32
      templates/archive_index.html
  3. 0 1
      templates/entry.html

+ 8 - 0
media/css/site.css

@@ -335,3 +335,11 @@ div.popup .content .image img {
 	font-size: 0.85em;
 	margin-top: 120px;
 }
+
+.archive h2 {
+	margin-bottom: 25px;
+}
+.archive p {
+	margin-top:-20px;
+}
+

+ 11 - 32
templates/archive_index.html

@@ -1,35 +1,14 @@
-<html>
-<head>
-  <title> Archive &raquo; oz123.github.com</title>
-  <link rel="stylesheet" type="text/css" href="../media/css/pygments_style.css" media="screen" />
-  <link rel="stylesheet" type="text/css" href="../media/css/site.css" media="screen" />
-<style>
-body.loc
-{
-margin-top:50px;
-}
-p.margin
-{
-margin-left:150px;
-margin-top:-20px;
-}
-h2.loc
-{
-margin-left:150px;
-margin-right:800px;
-}
-</style>
-<body class=loc>
-<h2 class=loc> This is an archive of everything posted here ...</h2>
+{% extends "base.html" %}
+{% block title %} Archive &raquo; oz123.github.com {% endblock %}
 {% block content %}
+<div class="archive index">
+<h2>This is an archive of everything posted here ...</h2>
   {% for entry in entries %}
-    <p class="margin">{{ entry.published_html }} <a title="{{ entry.permalink }}" href="{{entry.permalink}}"> {{ entry.title }}</a> </p>
+    <p>{{ entry.published_html }}<a title="{{ entry.permalink }}" href="{{entry.permalink}}"> {{ entry.title }}</a></p>
   {% endfor %}
-{% endblock %}
-{% include 'sidebar.html' %}
-
-{{google_analytics}}
-
-
-</body>
-</html>
+</div>
+{% endblock content %}
+{% block body %}
+{{ super() }}
+{% set static_prefix = "../../" %}
+{% endblock body %}

+ 0 - 1
templates/entry.html

@@ -5,7 +5,6 @@
 <div id="header" class="published"><a href="{{site_url}}">{{ entry.author }}</a> &ndash; {{ entry.published_html }}</div>
 <h1>{{ entry.title }}</h1>
   {{ entry.body_html }}
-
 <div class="tags">
   <p>This entry was tagged
   {% for tag in entry.tags %}