123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- # -*- coding:utf-8 -*-
- from mako import runtime, filters, cache
- UNDEFINED = runtime.UNDEFINED
- STOP_RENDERING = runtime.STOP_RENDERING
- __M_dict_builtin = dict
- __M_locals_builtin = locals
- _magic_number = 10
- _modified_time = 1676236796.3963673
- _enable_loop = True
- _template_filename = 'themes/bootblog/templates/index.tmpl'
- _template_uri = 'index.tmpl'
- _source_encoding = 'utf-8'
- _exports = ['extra_head', 'content', 'content_header']
-
-
- 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):
- ns = runtime.TemplateNamespace('helper', context._clean_inheritance_tokens(), templateuri='index_helper.tmpl', callables=None, calling_uri=_template_uri)
- context.namespaces[(__name__, 'helper')] = ns
-
- ns = runtime.TemplateNamespace('comments', context._clean_inheritance_tokens(), templateuri='comments_helper.tmpl', callables=None, calling_uri=_template_uri)
- context.namespaces[(__name__, 'comments')] = ns
-
- ns = runtime.TemplateNamespace('math', context._clean_inheritance_tokens(), templateuri='math_helper.tmpl', callables=None, calling_uri=_template_uri)
- context.namespaces[(__name__, 'math')] = ns
-
- def _mako_inherit(template, context):
- _mako_generate_namespaces(context)
- return runtime._inherit_from(context, 'base.tmpl', _template_uri)
- def render_body(context,**pageargs):
- __M_caller = context.caller_stack._push_frame()
- try:
- __M_locals = __M_dict_builtin(pageargs=pageargs)
- permalink = context.get('permalink', UNDEFINED)
- math = _mako_get_namespace(context, 'math')
- index_file = context.get('index_file', UNDEFINED)
- date_format = context.get('date_format', UNDEFINED)
- parent = context.get('parent', UNDEFINED)
- posts = context.get('posts', UNDEFINED)
- def extra_head():
- return render_extra_head(context._locals(__M_locals))
- comments = _mako_get_namespace(context, 'comments')
- index_teasers = context.get('index_teasers', UNDEFINED)
- def content_header():
- return render_content_header(context._locals(__M_locals))
- site_has_comments = context.get('site_has_comments', UNDEFINED)
- helper = _mako_get_namespace(context, 'helper')
- def content():
- return render_content(context._locals(__M_locals))
- __M_writer = context.writer()
- __M_writer('\n')
- __M_writer('\n')
- __M_writer('\n')
- __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')
- 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_extra_head(context,**pageargs):
- __M_caller = context.caller_stack._push_frame()
- try:
- permalink = context.get('permalink', UNDEFINED)
- math = _mako_get_namespace(context, 'math')
- index_file = context.get('index_file', UNDEFINED)
- parent = context.get('parent', UNDEFINED)
- posts = context.get('posts', UNDEFINED)
- def extra_head():
- return render_extra_head(context)
- __M_writer = context.writer()
- __M_writer('\n ')
- __M_writer(str(parent.extra_head()))
- __M_writer('\n')
- if posts and (permalink == '/' or permalink == '/' + index_file):
- __M_writer(' <link rel="prefetch" href="')
- __M_writer(str(posts[0].permalink()))
- __M_writer('" type="text/html">\n')
- __M_writer(' ')
- __M_writer(str(math.math_styles_ifposts(posts)))
- __M_writer('\n')
- return ''
- finally:
- context.caller_stack._pop_frame()
-
-
- def render_content(context,**pageargs):
- __M_caller = context.caller_stack._push_frame()
- try:
- date_format = context.get('date_format', UNDEFINED)
- math = _mako_get_namespace(context, 'math')
- posts = context.get('posts', UNDEFINED)
- comments = _mako_get_namespace(context, 'comments')
- index_teasers = context.get('index_teasers', UNDEFINED)
- def content_header():
- return render_content_header(context)
- site_has_comments = context.get('site_has_comments', UNDEFINED)
- helper = _mako_get_namespace(context, 'helper')
- def content():
- return render_content(context)
- __M_writer = context.writer()
- __M_writer('\n')
- if 'parent' not in context._data or not hasattr(context._data['parent'], 'content_header'):
- context['self'].content_header(**pageargs)
-
-
- __M_writer('\n<div class="postindex">\n')
- for post in posts:
- __M_writer(' <article class="blog-post h-entry post-')
- __M_writer(str(post.meta('type')))
- __M_writer('">\n <header>\n <h2 class="p-name entry-title blog-post-title"><a href="')
- __M_writer(str(post.permalink()))
- __M_writer('" class="u-url">')
- __M_writer(filters.html_escape(str(post.title())))
- __M_writer('</a></h2>\n <div class="metadata blog-post-meta text-justify">\n <p class="byline author vcard"><span class="byline-name fn">')
- __M_writer(str(post.author()))
- __M_writer('</span></p>\n <p class="dateline"><a href="')
- __M_writer(str(post.permalink()))
- __M_writer('" rel="bookmark"><time class="published dt-published" 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></a></p>\n')
- if not post.meta('nocomments') and site_has_comments:
- __M_writer(' <p class="commentline">')
- __M_writer(str(comments.comment_link(post.permalink(), post._base_path)))
- __M_writer('\n')
- __M_writer(' </div>\n </header>\n')
- if index_teasers:
- __M_writer(' <div class="p-summary entry-summary">\n ')
- __M_writer(str(post.text(teaser_only=True)))
- __M_writer('\n')
- else:
- __M_writer(' <div class="e-content entry-content">\n ')
- __M_writer(str(post.text(teaser_only=False)))
- __M_writer('\n')
- __M_writer(' </div>\n </article>\n')
- __M_writer('</div>\n')
- __M_writer(str(helper.html_pager()))
- __M_writer('\n')
- __M_writer(str(comments.comment_link_script()))
- __M_writer('\n')
- __M_writer(str(math.math_scripts_ifposts(posts)))
- __M_writer('\n')
- return ''
- finally:
- context.caller_stack._pop_frame()
-
-
- def render_content_header(context,**pageargs):
- __M_caller = context.caller_stack._push_frame()
- try:
- def content_header():
- return render_content_header(context)
- __M_writer = context.writer()
- return ''
- finally:
- context.caller_stack._pop_frame()
-
-
- """
- __M_BEGIN_METADATA
- {"filename": "themes/bootblog/templates/index.tmpl", "uri": "index.tmpl", "source_encoding": "utf-8", "line_map": {"23": 2, "26": 3, "29": 4, "35": 0, "56": 2, "57": 3, "58": 4, "59": 5, "64": 13, "69": 44, "75": 7, "86": 7, "87": 8, "88": 8, "89": 9, "90": 10, "91": 10, "92": 10, "93": 12, "94": 12, "95": 12, "101": 15, "116": 15, "121": 16, "122": 18, "123": 19, "124": 19, "125": 19, "126": 21, "127": 21, "128": 21, "129": 21, "130": 23, "131": 23, "132": 24, "133": 24, "134": 24, "135": 24, "136": 24, "137": 24, "138": 24, "139": 24, "140": 25, "141": 26, "142": 26, "143": 26, "144": 28, "145": 30, "146": 31, "147": 32, "148": 32, "149": 33, "150": 34, "151": 35, "152": 35, "153": 37, "154": 40, "155": 41, "156": 41, "157": 42, "158": 42, "159": 43, "160": 43, "166": 16, "177": 166}}
- __M_END_METADATA
- """
|