# -*- 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.1938248 _enable_loop = True _template_filename = 'themes/bootblog/templates/base_helper.tmpl' _template_uri = 'base_helper.tmpl' _source_encoding = 'utf-8' _exports = ['html_headstart', 'late_load_js', 'html_stylesheets', 'html_navigation_links', 'html_feedlinks', 'html_translations'] def render_body(context,**pageargs): __M_caller = context.caller_stack._push_frame() try: __M_locals = __M_dict_builtin(pageargs=pageargs) __M_writer = context.writer() __M_writer('\n') __M_writer('\n\n') __M_writer('\n\n\n') __M_writer('\n\n') __M_writer('\n\n') __M_writer('\n\n') __M_writer('\n\n\n') return '' finally: context.caller_stack._pop_frame() def render_html_headstart(context): __M_caller = context.caller_stack._push_frame() try: url_replacer = context.get('url_replacer', UNDEFINED) striphtml = context.get('striphtml', UNDEFINED) abs_link = context.get('abs_link', UNDEFINED) lang = context.get('lang', UNDEFINED) use_cdn = context.get('use_cdn', UNDEFINED) twitter_card = context.get('twitter_card', UNDEFINED) favicons = context.get('favicons', UNDEFINED) comment_system_id = context.get('comment_system_id', UNDEFINED) title = context.get('title', UNDEFINED) permalink = context.get('permalink', UNDEFINED) blog_title = context.get('blog_title', UNDEFINED) def html_stylesheets(): return render_html_stylesheets(context) use_open_graph = context.get('use_open_graph', UNDEFINED) description = context.get('description', UNDEFINED) prevlink = context.get('prevlink', UNDEFINED) def html_feedlinks(): return render_html_feedlinks(context) nextlink = context.get('nextlink', UNDEFINED) comment_system = context.get('comment_system', UNDEFINED) is_rtl = context.get('is_rtl', UNDEFINED) extra_head_data = context.get('extra_head_data', UNDEFINED) __M_writer = context.writer() __M_writer('\n\n\n \n \n') if description: __M_writer(' \n') __M_writer(' \n ') __M_writer(striphtml(str(title))) __M_writer(' | ') __M_writer(striphtml(str(blog_title))) __M_writer('\n\n\n\n ') __M_writer(str(html_stylesheets())) __M_writer('\n ') __M_writer(str(html_feedlinks())) __M_writer('\n') if permalink: __M_writer(' \n') __M_writer('\n') if favicons: for name, file, size in favicons: __M_writer(' \n') __M_writer('\n') if comment_system == 'facebook': __M_writer(' \n') __M_writer('\n') if prevlink: __M_writer(' \n') if nextlink: __M_writer(' \n') __M_writer('\n') if use_cdn: __M_writer(' \n') else: __M_writer(' \n') __M_writer('\n ') __M_writer(str(extra_head_data)) __M_writer('\n') return '' finally: context.caller_stack._pop_frame() def render_late_load_js(context): __M_caller = context.caller_stack._push_frame() try: use_cdn = context.get('use_cdn', UNDEFINED) social_buttons_code = context.get('social_buttons_code', UNDEFINED) use_bundles = context.get('use_bundles', UNDEFINED) __M_writer = context.writer() __M_writer('\n') if use_bundles: if use_cdn: __M_writer(' \n \n \n \n') else: __M_writer(' \n') else: if use_cdn: __M_writer(' \n \n') else: __M_writer(' \n \n \n') __M_writer(' \n \t\n') __M_writer(' ') __M_writer(str(social_buttons_code)) __M_writer('\n') return '' finally: context.caller_stack._pop_frame() def render_html_stylesheets(context): __M_caller = context.caller_stack._push_frame() try: needs_ipython_css = context.get('needs_ipython_css', UNDEFINED) use_cdn = context.get('use_cdn', UNDEFINED) has_custom_css = context.get('has_custom_css', UNDEFINED) use_bundles = context.get('use_bundles', UNDEFINED) __M_writer = context.writer() __M_writer('\n') if use_bundles: if use_cdn: __M_writer(' \n \n \n') else: __M_writer(' \n') else: if use_cdn: __M_writer(' \n \n') else: __M_writer(' \n \n') __M_writer(' \n \n \n \n') if has_custom_css: __M_writer(' \n') if needs_ipython_css: __M_writer(' \n \n') return '' finally: context.caller_stack._pop_frame() def render_html_navigation_links(context): __M_caller = context.caller_stack._push_frame() try: permalink = context.get('permalink', UNDEFINED) rel_link = context.get('rel_link', UNDEFINED) lang = context.get('lang', UNDEFINED) navigation_links = context.get('navigation_links', UNDEFINED) messages = context.get('messages', UNDEFINED) __M_writer = context.writer() __M_writer('\n') for url, text in navigation_links[lang]: if rel_link(permalink, url) == "#": __M_writer(' ') __M_writer(str(text)) __M_writer(' ') __M_writer(str(messages("(active)", lang))) __M_writer('\n') else: __M_writer(' ') __M_writer(str(text)) __M_writer('\n') return '' finally: context.caller_stack._pop_frame() def render_html_feedlinks(context): __M_caller = context.caller_stack._push_frame() try: len = context.get('len', UNDEFINED) generate_atom = context.get('generate_atom', UNDEFINED) _link = context.get('_link', UNDEFINED) rss_link = context.get('rss_link', UNDEFINED) translations = context.get('translations', UNDEFINED) generate_rss = context.get('generate_rss', UNDEFINED) __M_writer = context.writer() __M_writer('\n') if rss_link: __M_writer(' ') __M_writer(str(rss_link)) __M_writer('\n') elif generate_rss: if len(translations) > 1: for language in translations: __M_writer(' \n') else: __M_writer(' \n') if generate_atom: if len(translations) > 1: for language in translations: __M_writer(' \n') else: __M_writer(' \n') return '' finally: context.caller_stack._pop_frame() def render_html_translations(context): __M_caller = context.caller_stack._push_frame() try: abs_link = context.get('abs_link', UNDEFINED) lang = context.get('lang', UNDEFINED) _link = context.get('_link', UNDEFINED) messages = context.get('messages', UNDEFINED) translations = context.get('translations', UNDEFINED) __M_writer = context.writer() __M_writer('\n') for langname in translations.keys(): if langname != lang: __M_writer(' ') __M_writer(str(messages("LANGUAGE", langname))) __M_writer('\n') return '' finally: context.caller_stack._pop_frame() """ __M_BEGIN_METADATA {"filename": "themes/bootblog/templates/base_helper.tmpl", "uri": "base_helper.tmpl", "source_encoding": "utf-8", "line_map": {"16": 0, "21": 2, "22": 66, "23": 91, "24": 123, "25": 133, "26": 156, "27": 164, "33": 3, "59": 3, "60": 7, "61": 8, "62": 9, "63": 10, "64": 12, "65": 13, "66": 15, "67": 16, "68": 18, "69": 21, "70": 22, "71": 25, "72": 25, "73": 25, "74": 28, "75": 29, "76": 29, "77": 29, "78": 31, "79": 32, "80": 32, "81": 32, "82": 32, "83": 36, "84": 36, "85": 37, "86": 37, "87": 38, "88": 39, "89": 39, "90": 39, "91": 41, "92": 42, "93": 43, "94": 44, "95": 44, "96": 44, "97": 44, "98": 44, "99": 44, "100": 44, "101": 47, "102": 48, "103": 49, "104": 49, "105": 49, "106": 51, "107": 52, "108": 53, "109": 53, "110": 53, "111": 55, "112": 56, "113": 56, "114": 56, "115": 58, "116": 59, "117": 60, "118": 61, "119": 62, "120": 62, "121": 62, "122": 64, "123": 65, "124": 65, "130": 68, "137": 68, "138": 69, "139": 70, "140": 71, "141": 75, "142": 76, "143": 78, "144": 79, "145": 80, "146": 82, "147": 83, "148": 87, "149": 90, "150": 90, "151": 90, "157": 94, "165": 94, "166": 95, "167": 96, "168": 97, "169": 100, "170": 101, "171": 103, "172": 104, "173": 105, "174": 107, "175": 108, "176": 111, "177": 115, "178": 116, "179": 119, "180": 120, "186": 125, "195": 125, "196": 126, "197": 127, "198": 128, "199": 128, "200": 128, "201": 128, "202": 128, "203": 128, "204": 128, "205": 129, "206": 130, "207": 130, "208": 130, "209": 130, "210": 130, "216": 135, "226": 135, "227": 136, "228": 137, "229": 137, "230": 137, "231": 138, "232": 139, "233": 140, "234": 141, "235": 141, "236": 141, "237": 141, "238": 141, "239": 143, "240": 144, "241": 144, "242": 144, "243": 147, "244": 148, "245": 149, "246": 150, "247": 150, "248": 150, "249": 150, "250": 150, "251": 152, "252": 153, "253": 153, "254": 153, "260": 158, "269": 158, "270": 159, "271": 160, "272": 161, "273": 161, "274": 161, "275": 161, "276": 161, "277": 161, "278": 161, "284": 278}} __M_END_METADATA """