184 lines
8.3 KiB
Python
184 lines
8.3 KiB
Python
# -*- coding:utf-8 -*-
|
|
from mako import runtime, filters, cache
|
|
UNDEFINED = runtime.UNDEFINED
|
|
__M_dict_builtin = dict
|
|
__M_locals_builtin = locals
|
|
_magic_number = 10
|
|
_modified_time = 1433908608.2580645
|
|
_enable_loop = True
|
|
_template_filename = '/usr/lib/python3.4/site-packages/nikola/data/themes/base/templates/tag.tmpl'
|
|
_template_uri = 'tag.tmpl'
|
|
_source_encoding = 'utf-8'
|
|
_exports = ['content', 'extra_head']
|
|
|
|
|
|
def _mako_get_namespace(context, name):
|
|
try:
|
|
return context.namespaces[(__name__, name)]
|
|
except KeyError:
|
|
_mako_generate_namespaces(context)
|
|
return context.namespaces[(__name__, name)]
|
|
def _mako_generate_namespaces(context):
|
|
pass
|
|
def _mako_inherit(template, context):
|
|
_mako_generate_namespaces(context)
|
|
return runtime._inherit_from(context, 'list_post.tmpl', _template_uri)
|
|
def render_body(context,**pageargs):
|
|
__M_caller = context.caller_stack._push_frame()
|
|
try:
|
|
__M_locals = __M_dict_builtin(pageargs=pageargs)
|
|
def content():
|
|
return render_content(context._locals(__M_locals))
|
|
description = context.get('description', UNDEFINED)
|
|
title = context.get('title', UNDEFINED)
|
|
kind = context.get('kind', UNDEFINED)
|
|
parent = context.get('parent', UNDEFINED)
|
|
tag = context.get('tag', UNDEFINED)
|
|
_link = context.get('_link', UNDEFINED)
|
|
generate_rss = context.get('generate_rss', UNDEFINED)
|
|
subcategories = context.get('subcategories', UNDEFINED)
|
|
def extra_head():
|
|
return render_extra_head(context._locals(__M_locals))
|
|
date_format = context.get('date_format', UNDEFINED)
|
|
posts = context.get('posts', UNDEFINED)
|
|
len = context.get('len', UNDEFINED)
|
|
messages = context.get('messages', UNDEFINED)
|
|
translations = context.get('translations', UNDEFINED)
|
|
__M_writer = context.writer()
|
|
__M_writer('\n\n')
|
|
if 'parent' not in context._data or not hasattr(context._data['parent'], 'extra_head'):
|
|
context['self'].extra_head(**pageargs)
|
|
|
|
|
|
__M_writer('\n\n\n')
|
|
if 'parent' not in context._data or not hasattr(context._data['parent'], 'content'):
|
|
context['self'].content(**pageargs)
|
|
|
|
|
|
__M_writer('\n')
|
|
return ''
|
|
finally:
|
|
context.caller_stack._pop_frame()
|
|
|
|
|
|
def render_content(context,**pageargs):
|
|
__M_caller = context.caller_stack._push_frame()
|
|
try:
|
|
def content():
|
|
return render_content(context)
|
|
description = context.get('description', UNDEFINED)
|
|
title = context.get('title', UNDEFINED)
|
|
kind = context.get('kind', UNDEFINED)
|
|
tag = context.get('tag', UNDEFINED)
|
|
_link = context.get('_link', UNDEFINED)
|
|
generate_rss = context.get('generate_rss', UNDEFINED)
|
|
subcategories = context.get('subcategories', UNDEFINED)
|
|
date_format = context.get('date_format', UNDEFINED)
|
|
posts = context.get('posts', UNDEFINED)
|
|
messages = context.get('messages', UNDEFINED)
|
|
len = context.get('len', UNDEFINED)
|
|
translations = context.get('translations', UNDEFINED)
|
|
__M_writer = context.writer()
|
|
__M_writer('\n<article class="tagpage">\n <header>\n <h1>')
|
|
__M_writer(filters.html_escape(str(title)))
|
|
__M_writer('</h1>\n')
|
|
if description:
|
|
__M_writer(' <p>')
|
|
__M_writer(str(description))
|
|
__M_writer('</p>\n')
|
|
if subcategories:
|
|
__M_writer(' ')
|
|
__M_writer(str(messages('Subcategories:')))
|
|
__M_writer('\n <ul>\n')
|
|
for name, link in subcategories:
|
|
__M_writer(' <li><a href="')
|
|
__M_writer(str(link))
|
|
__M_writer('">')
|
|
__M_writer(str(name))
|
|
__M_writer('</a></li>\n')
|
|
__M_writer(' </ul>\n')
|
|
__M_writer(' <div class="metadata">\n')
|
|
if len(translations) > 1 and generate_rss:
|
|
for language in translations:
|
|
__M_writer(' <p class="feedlink">\n <a href="')
|
|
__M_writer(str(_link(kind + "_rss", tag, language)))
|
|
__M_writer('" hreflang="')
|
|
__M_writer(str(language))
|
|
__M_writer('" type="application/rss+xml">')
|
|
__M_writer(str(messages('RSS feed', language)))
|
|
__M_writer(' (')
|
|
__M_writer(str(language))
|
|
__M_writer(')</a> \n </p>\n')
|
|
elif generate_rss:
|
|
__M_writer(' <p class="feedlink"><a href="')
|
|
__M_writer(str(_link(kind + "_rss", tag)))
|
|
__M_writer('" type="application/rss+xml">')
|
|
__M_writer(str(messages('RSS feed')))
|
|
__M_writer('</a></p>\n')
|
|
__M_writer(' </div>\n </header>\n')
|
|
if posts:
|
|
__M_writer(' <ul class="postlist">\n')
|
|
for post in posts:
|
|
__M_writer(' <li><a href="')
|
|
__M_writer(str(post.permalink()))
|
|
__M_writer('" class="listtitle">')
|
|
__M_writer(filters.html_escape(str(post.title())))
|
|
__M_writer('</a> <time class="listdate" datetime="')
|
|
__M_writer(str(post.date.isoformat()))
|
|
__M_writer('" title="')
|
|
__M_writer(str(post.formatted_date(date_format)))
|
|
__M_writer('">')
|
|
__M_writer(str(post.formatted_date(date_format)))
|
|
__M_writer('</time></li>\n')
|
|
__M_writer(' </ul>\n')
|
|
__M_writer('</article>\n')
|
|
return ''
|
|
finally:
|
|
context.caller_stack._pop_frame()
|
|
|
|
|
|
def render_extra_head(context,**pageargs):
|
|
__M_caller = context.caller_stack._push_frame()
|
|
try:
|
|
kind = context.get('kind', UNDEFINED)
|
|
parent = context.get('parent', UNDEFINED)
|
|
tag = context.get('tag', UNDEFINED)
|
|
_link = context.get('_link', UNDEFINED)
|
|
generate_rss = context.get('generate_rss', UNDEFINED)
|
|
def extra_head():
|
|
return render_extra_head(context)
|
|
len = context.get('len', UNDEFINED)
|
|
translations = context.get('translations', UNDEFINED)
|
|
__M_writer = context.writer()
|
|
__M_writer('\n ')
|
|
__M_writer(str(parent.extra_head()))
|
|
__M_writer('\n')
|
|
if len(translations) > 1 and generate_rss:
|
|
for language in translations:
|
|
__M_writer(' <link rel="alternate" type="application/rss+xml" type="application/rss+xml" title="RSS for ')
|
|
__M_writer(str(kind))
|
|
__M_writer(' ')
|
|
__M_writer(str(tag))
|
|
__M_writer(' (')
|
|
__M_writer(str(language))
|
|
__M_writer(')" href="')
|
|
__M_writer(str(_link(kind + "_rss", tag, language)))
|
|
__M_writer('">\n')
|
|
elif generate_rss:
|
|
__M_writer(' <link rel="alternate" type="application/rss+xml" type="application/rss+xml" title="RSS for ')
|
|
__M_writer(str(kind))
|
|
__M_writer(' ')
|
|
__M_writer(str(tag))
|
|
__M_writer('" href="')
|
|
__M_writer(str(_link(kind + "_rss", tag)))
|
|
__M_writer('">\n')
|
|
return ''
|
|
finally:
|
|
context.caller_stack._pop_frame()
|
|
|
|
|
|
"""
|
|
__M_BEGIN_METADATA
|
|
{"source_encoding": "utf-8", "filename": "/usr/lib/python3.4/site-packages/nikola/data/themes/base/templates/tag.tmpl", "line_map": {"128": 46, "129": 46, "130": 46, "131": 46, "132": 46, "133": 48, "134": 50, "140": 4, "153": 4, "26": 0, "155": 5, "156": 6, "154": 5, "158": 8, "159": 8, "160": 8, "161": 8, "162": 8, "163": 8, "164": 8, "165": 8, "166": 8, "167": 10, "168": 11, "169": 11, "170": 11, "171": 11, "172": 11, "173": 11, "174": 11, "157": 7, "48": 2, "180": 174, "53": 13, "58": 51, "64": 16, "82": 16, "83": 19, "84": 19, "85": 20, "86": 21, "87": 21, "88": 21, "89": 23, "90": 24, "91": 24, "92": 24, "93": 26, "94": 27, "95": 27, "96": 27, "97": 27, "98": 27, "99": 29, "100": 31, "101": 32, "102": 33, "103": 34, "104": 35, "105": 35, "106": 35, "107": 35, "108": 35, "109": 35, "110": 35, "111": 35, "112": 38, "113": 39, "114": 39, "115": 39, "116": 39, "117": 39, "118": 41, "119": 43, "120": 44, "121": 45, "122": 46, "123": 46, "124": 46, "125": 46, "126": 46, "127": 46}, "uri": "tag.tmpl"}
|
|
__M_END_METADATA
|
|
"""
|