Преглед на файлове

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 преди 13 години
родител
ревизия
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 %}
 {% block head %}
-{{ super() }}
        <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/style.css" />
        <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/style.css" />
 {% endblock %}
 {% 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 %}
 {% block content %}
+{{ super() }}
 <h2>All articles</h2>
 <h2>All articles</h2>
        {% for article in articles | sort(attribute='title') %}
        {% for article in articles | sort(attribute='title') %}
         <li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
         <li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>