forked from rc/aircox
Previous diffusions; website styles; small templates change; VerboseFrequency
This commit is contained in:
@ -9,7 +9,7 @@ body {
|
||||
}
|
||||
|
||||
.page .menu {
|
||||
width: 15em;
|
||||
width: 20em;
|
||||
}
|
||||
|
||||
.page .menu_left { margin-right: 0.5em; }
|
||||
|
@ -21,40 +21,42 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% if menus.top %}
|
||||
{{ menus.top|safe }}
|
||||
{% endif %}
|
||||
|
||||
<div class="page">
|
||||
{% if menus.left %}
|
||||
{{ menus.left|safe }}
|
||||
<div class="page-container">
|
||||
{% if menus.top %}
|
||||
{{ menus.top|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 class="page">
|
||||
{% if menus.left %}
|
||||
{{ menus.left|safe }}
|
||||
{% endif %}
|
||||
|
||||
{% if menus.right %}
|
||||
{{ menus.right|safe }}
|
||||
<main>
|
||||
{% block pre_title %}
|
||||
{% endblock %}
|
||||
<h1>
|
||||
{% block title %}
|
||||
{{ title }}
|
||||
{% endblock %}
|
||||
</h1>
|
||||
{% block post_title %}
|
||||
{% endblock %}
|
||||
<div class="content">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{% if menus.right %}
|
||||
{{ menus.right|safe }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if menus.page_bottom %}
|
||||
{{ menus.page_bottom|safe }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if menus.page_bottom %}
|
||||
{{ menus.page_bottom|safe }}
|
||||
{% endif %}
|
||||
|
||||
{% block footer %}
|
||||
{% if menus.footer %}
|
||||
{{ menus.footer|safe }}
|
||||
|
@ -8,7 +8,7 @@
|
||||
{% for post in object_list %}
|
||||
<a class="post_item"
|
||||
href="{{ post.detail_url }}">
|
||||
{% if 'date' in view.fields or 'time' in list.fields %}
|
||||
{% if 'date' in view.fields or 'time' in view.fields %}
|
||||
<time datetime="{{ post.date }}" class="post_datetime">
|
||||
{% if 'date' in view.fields %}
|
||||
<span class="post_date">
|
||||
|
@ -320,6 +320,7 @@ class Sections:
|
||||
|
||||
hide_empty = False # hides the section if the list is empty
|
||||
use_icons = True # print icons
|
||||
paginate_by = 0 # number of items
|
||||
icon_size = '32x32' # icons size
|
||||
template_name = 'aircox_cms/section_list.html'
|
||||
|
||||
@ -337,6 +338,7 @@ class Sections:
|
||||
'classes': context.get('classes') + ' section_list',
|
||||
'icon_size': self.icon_size,
|
||||
'object_list': object_list,
|
||||
'paginate_by': self.paginate_by,
|
||||
})
|
||||
return context
|
||||
|
||||
@ -363,6 +365,7 @@ class Sections:
|
||||
Render a list using PostListView's template.
|
||||
"""
|
||||
embed = True
|
||||
paginate_by = 5
|
||||
icon_size = '64x64'
|
||||
fields = [ 'date', 'time', 'image', 'title', 'content' ]
|
||||
|
||||
@ -375,8 +378,8 @@ class Sections:
|
||||
context.update({
|
||||
'object_list': self.get_object_list(),
|
||||
'embed': True,
|
||||
'paginate_by': self.paginate_by,
|
||||
})
|
||||
print(context['object_list'][0].image)
|
||||
return render_to_string(PostListView.template_name, context)
|
||||
|
||||
def get_context_data (self, **kwargs):
|
||||
|
Reference in New Issue
Block a user