forked from rc/aircox
		
	work on views and templates
This commit is contained in:
		
							
								
								
									
										8
									
								
								cms/templates/cms/base_content.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								cms/templates/cms/base_content.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,8 @@
 | 
			
		||||
{% block pre_title %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
{% block title %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										49
									
								
								cms/templates/cms/base_site.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								cms/templates/cms/base_site.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,49 @@
 | 
			
		||||
<html>
 | 
			
		||||
    <head>
 | 
			
		||||
        <title>{{ website.name }} {% if title %}- {{ title }} {% endif %}</title>
 | 
			
		||||
    </head>
 | 
			
		||||
    <body>
 | 
			
		||||
        {% 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 }}
 | 
			
		||||
            {% endif %}
 | 
			
		||||
 | 
			
		||||
            <main>
 | 
			
		||||
                {% block pre_title %}
 | 
			
		||||
                {% endblock %}
 | 
			
		||||
                <h1>
 | 
			
		||||
                    {% block title %}
 | 
			
		||||
                    {{ title }}
 | 
			
		||||
                    {% endblock %}
 | 
			
		||||
                </h1>
 | 
			
		||||
                {% block post_title %}
 | 
			
		||||
                {% endblock %}
 | 
			
		||||
                <div class="content">
 | 
			
		||||
                    {% block content %}
 | 
			
		||||
                    {% endblock %}
 | 
			
		||||
                </div>
 | 
			
		||||
            </main>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        {% block footer %}
 | 
			
		||||
            {% if menus.footer %}
 | 
			
		||||
            <footer>
 | 
			
		||||
                {{ menus.footer|safe }}
 | 
			
		||||
            </footer>
 | 
			
		||||
            {% endif %}
 | 
			
		||||
        {% endblock %}
 | 
			
		||||
    </body>
 | 
			
		||||
</html>
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
{# {% extends "website/base.html" %} #}
 | 
			
		||||
{% extends embed|yesno:"cms/base_content.html,cms/base_site.html" %}
 | 
			
		||||
 | 
			
		||||
{% block title %}
 | 
			
		||||
{{ object.title }}
 | 
			
		||||
 | 
			
		||||
@ -1,23 +1,21 @@
 | 
			
		||||
{# {% extends embed|yesno:"website/single.html,website/base.html" %} #}
 | 
			
		||||
{% extends embed|yesno:"cms/base_content.html,cms/base_site.html" %}
 | 
			
		||||
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
{% load thumbnail %}
 | 
			
		||||
{# {% load website_views %} #}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
<div class="post_list {{ classes }}">
 | 
			
		||||
{% for post in object_list %}
 | 
			
		||||
    <a class="post_item"
 | 
			
		||||
       href="{{ post.detail_url }}">
 | 
			
		||||
        {% if 'date' in list.fields or 'time' in list.fields %}
 | 
			
		||||
        {% if 'date' in view.fields or 'time' in list.fields %}
 | 
			
		||||
        <time datetime="{{ post.date }}" class="post_datetime">
 | 
			
		||||
            {% if 'date' in list.fields %}
 | 
			
		||||
            {% if 'date' in view.fields %}
 | 
			
		||||
            <span class="post_date">
 | 
			
		||||
                {{ post.date|date:'D. d F' }},
 | 
			
		||||
            </span>
 | 
			
		||||
            {% endif %}
 | 
			
		||||
            {% if 'time' in list.fields %}
 | 
			
		||||
            {% if 'time' in view.fields %}
 | 
			
		||||
            <span class="post_time">
 | 
			
		||||
                {{ post.date|date:'H:i' }},
 | 
			
		||||
            </span>
 | 
			
		||||
@ -25,15 +23,15 @@
 | 
			
		||||
        </time>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
 | 
			
		||||
        {% if 'image' in list.fields %}
 | 
			
		||||
        {% if 'image' in view.fields %}
 | 
			
		||||
        <img src="{% thumbnail post.image "64x64" crop %}" class="post_image">
 | 
			
		||||
        {% endif %}
 | 
			
		||||
 | 
			
		||||
        {% if 'title' in list.fields %}
 | 
			
		||||
        {% if 'title' in view.fields %}
 | 
			
		||||
        <h4 class="post_title">{{ post.title }}</h4>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
 | 
			
		||||
        {% if 'content' in list.fields %}
 | 
			
		||||
        {% if 'content' in view.fields %}
 | 
			
		||||
        <div class="post_content">
 | 
			
		||||
        {{ post.content|safe|striptags|truncatechars:"64" }}
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,10 @@
 | 
			
		||||
 | 
			
		||||
<div class="menu menu_{{ position }} {{ classes }}"
 | 
			
		||||
    {% if name %}
 | 
			
		||||
<nav class="menu menu_{{ position }} {{ classes }}" {% if name %}
 | 
			
		||||
        name="menu_{{ name }}"
 | 
			
		||||
        id="menu_{{ name }}"
 | 
			
		||||
    {% endif %}>
 | 
			
		||||
    {% for section in sections %}
 | 
			
		||||
    {{ section|safe }}
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
</div>
 | 
			
		||||
</nav>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1 +0,0 @@
 | 
			
		||||
{# #}
 | 
			
		||||
		Reference in New Issue
	
	Block a user