Pārlūkot izejas kodu

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 12 gadi atpakaļ
vecāks
revīzija
7e314fb174
3 mainītis faili ar 25 papildinājumiem un 4 dzēšanām
  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>