qmsk.pages: separate pages.css and .page styles
authorTero Marttila <terom@qmsk.net>
Sat, 04 Oct 2014 15:53:33 +0300
changeset 239 cf7a46725ce5
parent 238 2c62e4d70619
child 240 21a38c59ce78
qmsk.pages: separate pages.css and .page styles
qmsk/pages/templates/qmsk.pages/error.html
qmsk/pages/templates/qmsk.pages/page.html
static/style.css
templates/site.html
--- a/qmsk/pages/templates/qmsk.pages/error.html	Sat Oct 04 15:14:22 2014 +0300
+++ b/qmsk/pages/templates/qmsk.pages/error.html	Sat Oct 04 15:53:33 2014 +0300
@@ -1,7 +1,12 @@
 {% extends "site.html" %}
+{% load staticfiles %}
 
 {% block title %}{{ site_name }} :: {{ error_title }}{%endblock %}
 
+{% block head %}
+    <link rel="stylesheet" href="{% static "qmsk.pages/pages.css" %}">
+{% endblock %}
+
 {% block header %}
     <h1 class="page-header-title">
         <a href="{% url 'page' '' %}">{{ site_name }}</a>
@@ -29,13 +34,15 @@
 {% endblock %}
 
 {% block content %}
-    <h1>{{ error_title }}</h1>
-    <div class="alert alert-warning" role="alert">
-    {% if error_message %}
-        {{ error_message }}
-    {% endif %}
-    {% if error_output %}
-        <pre>{{ error_output }}</pre>
-    {% endif %}
-    </div>
+    <div id="page">
+        <h1>{{ error_title }}</h1>
+        <div class="alert alert-warning" role="alert">
+        {% if error_message %}
+            {{ error_message }}
+        {% endif %}
+        {% if error_output %}
+            <pre>{{ error_output }}</pre>
+        {% endif %}
+        </div>
+</div>
 {% endblock %}
--- a/qmsk/pages/templates/qmsk.pages/page.html	Sat Oct 04 15:14:22 2014 +0300
+++ b/qmsk/pages/templates/qmsk.pages/page.html	Sat Oct 04 15:53:33 2014 +0300
@@ -1,7 +1,12 @@
 {% extends "site.html" %}
+{% load staticfiles %}
 
 {% block title %}{{ site_name }} :: {{ page_title }}{% endblock %}
 
+{% block head %}
+    <link rel="stylesheet" href="{% static "qmsk.pages/pages.css" %}">
+{% endblock %}
+
 {% block header %}
     <h1 class="page-header-title">
         <a href="{% url 'page' '' %}">{{ site_name }}</a>
@@ -37,9 +42,11 @@
 {% endblock %}
 
 {% block content %}
-    <h1>{{ page_title }}</h1>
-
-    {{ page_html|safe }}
+    <div id="page">
+        <h1>{{ page_title }}</h1>
+    
+        {{ page_html|safe }}
+    </div>
 {% endblock %}
 
 {% block footer %}
--- a/static/style.css	Sat Oct 04 15:14:22 2014 +0300
+++ b/static/style.css	Sat Oct 04 15:53:33 2014 +0300
@@ -22,6 +22,7 @@
 div#header h1 {
     font-size: 48pt;
     font-weight: bold;
+    text-align: center;
 }
 
 div#header a:hover {
@@ -106,13 +107,14 @@
     text-decoration: underline;
 }
 
-h1 {
+/* Page styles */
+#page h1 {
     font-size: xx-large;
 
     text-align: center;
 }
 
-h2 {
+#page h2 {
     font-size: large;
     
     margin-left: 0px;
@@ -124,37 +126,35 @@
     border: 1px dashed #c5c5c5;
 }
 
-h3 {
+#page h3 {
     font-size: medium;
     font-style: italic;
 }
 
-#content p {
+#page p {
     margin-left: 0.5em;
 }
 
-#content li {
+#page li {
     padding: 2px;
 }
 
-#content a {
+#page a {
     padding-right: 13px;
     
     background: transparent url(/static/link.png) no-repeat center right;
 }
 
-dt {
+#page dt {
     font-size: large;
 }
 
-dd {
+#page dd {
     margin: 1em auto 1em 5em;
 }
 
-/* Inline code */
-
 /* Code block */
-pre {
+#page pre {
     display: block;
     margin: 8px;
     padding: 8px;
--- a/templates/site.html	Sat Oct 04 15:14:22 2014 +0300
+++ b/templates/site.html	Sat Oct 04 15:53:33 2014 +0300
@@ -11,7 +11,6 @@
 
         <!-- qmsk.www.pages -->
         <link rel="stylesheet" href="{% static "style.css" %}">
-        <link rel="stylesheet" href="{% static "qmsk.pages/pages.css" %}">
         
         {% block head %}