瀏覽代碼

Adds base, index and article templates from scratch

These templates do not inherit from other templates. They are ugly and very simple at this stage.
Talha Mansoor 11 年之前
父節點
當前提交
7e314fb174
共有 3 個文件被更改,包括 25 次插入4 次删除
  1. 7 0
      templates/article.html
  2. 16 3
      templates/base.html
  3. 2 1
      templates/index.html

+ 7 - 0
templates/article.html

@@ -0,0 +1,7 @@
+{% extends "base.html" %}
+
+{% block content %}
+{{ super() }}
+{{ article.title }}
+{{ article.content }}
+{% endblock content %}

+ 16 - 3
templates/base.html

@@ -1,6 +1,19 @@
-{% extends "!simple/base.html" %}
-
+<!DOCTYPE html>
+<html>
+<head>
 {% block head %}
-{{ super() }}
        <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/style.css" />
 {% endblock %}
+</head>
+<body>
+{% block body %}
+{% endblock %}
+
+{% block content %}
+<header id="banner" class="body">
+                <h1>hello <a href="{{ SITEURL }}">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a></h1>
+                </header><!-- /#banner -->
+                <p>ada ada </p>
+{% endblock %}
+</body>
+</html>

+ 2 - 1
templates/index.html

@@ -1,6 +1,7 @@
-{% extends "!simple/index.html" %}
+{% extends "base.html" %}
 
 {% block content %}
+{{ super() }}
 <h2>All articles</h2>
        {% for article in articles | sort(attribute='title') %}
         <li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>