work on sections

This commit is contained in:
bkfox
2015-10-04 22:05:10 +02:00
parent 60478aaf88
commit cfdc9b6de0
12 changed files with 372 additions and 211 deletions

View File

@ -0,0 +1,9 @@
<{{ tag }} class="section {{ classes }}"
{% for key, value in attrs.items %}{{ key }} = "{{ value|addslashes }}"
{% endfor %} >
{% block content %}
{{ content|safe }}
{% endblock %}
</{{ tag }}>

View File

@ -8,22 +8,23 @@
<meta name="description" content="{{ website.description }}">
<meta name="keywords" content="{{ website.tags }}">
<link rel="stylesheet" href="{% static "aircox_aircox_cms/styles.css" %}" type="text/css">
<link rel="stylesheet" href="{% static "aircox_cms/styles.css" %}" type="text/css">
{% if website.styles %}
<link rel="stylesheet" href="{% static website.styles %}" type="text/css">
{% endif %}
<title>{{ website.name }} {% if title %}- {{ title }} {% endif %}</title>
</head>
<body>
{% block header %}
{% if menus.header %}
{{ menus.header|safe }}
{% endif %}
{% endblock %}
{% if menus.top %}
{{ menus.top|safe }}
{% endif %}
{% block header %}
{% if menus.header %}
<header>
{{ menus.header|safe }}
</header>
{% endif %}
{% endblock %}
<div class="page">
{% if menus.left %}
{{ menus.left|safe }}
@ -50,11 +51,13 @@
{% endif %}
</div>
{% if menus.page_bottom %}
{{ menus.page_bottom|safe }}
{% endif %}
{% block footer %}
{% if menus.footer %}
<footer>
{{ menus.footer|safe }}
</footer>
{{ menus.footer|safe }}
{% endif %}
{% endblock %}

View File

@ -1,10 +1,10 @@
<nav class="menu menu_{{ position }} {{ classes }}" {% if name %}
name="menu_{{ name }}"
id="menu_{{ name }}"
<{{ tag }} class="menu menu_{{ position }} {{ classes }}" {% if name %}
name="{{ name }}"
id="{{ name }}"
{% endif %}>
{% for section in sections %}
{{ section|safe }}
{% endfor %}
</nav>
</{{ tag }}>

View File

@ -1,33 +1,34 @@
<div class="section {{ classes }}">
{% if title %}
<h1>
{% block section_title %}
{{ title }}
{% endblock %}
</h1>
{% endif %}
{% extends "aircox_cms/base_section.html" %}
{% if header %}
<header class="section_header">
{% block section_header %}
{{ header }}
{% endblock %}
</header>
{% endif %}
{% block content %}
{% if title %}
<h1>
{% block section_title %}
{{ title }}
{% endblock %}
</h1>
{% endif %}
<div class="section_content">
{% block section_content %}
{{ content|safe }}
{% endblock %}
</div>
{% if header %}
<header class="section_header">
{% block section_header %}
{{ header }}
{% endblock %}
</header>
{% endif %}
{% if bottom %}
<div class="section_bottom">
{% block section_bottom %}
{{ bottom }}
{% endblock %}
</div>
{% endif %}
<div class="section_content">
{% block section_content %}
{{ content|safe }}
{% endblock %}
</div>
{% if bottom %}
<div class="section_bottom">
{% block section_bottom %}
{{ bottom }}
{% endblock %}
</div>
{% endif %}
{% endblock %}