# -*- 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.301689 _enable_loop = True _template_filename = '/home/thomas/.local/lib/python3.9/site-packages/nikola/data/themes/base/templates/feeds_translations_helper.tmpl' _template_uri = 'feeds_translations_helper.tmpl' _source_encoding = 'utf-8' _exports = ['_head_feed_link', '_html_feed_link', '_html_translation_link', '_head_rss', '_head_atom', 'head', 'feed_link', 'translation_link'] 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') __M_writer('\n\n') __M_writer('\n\n') __M_writer('\n\n') __M_writer('\n\n') __M_writer('\n\n') __M_writer('\n') return '' finally: context.caller_stack._pop_frame() def render__head_feed_link(context,link_type,link_name,link_postfix,classification,kind,language): __M_caller = context.caller_stack._push_frame() try: translations = context.get('translations', UNDEFINED) len = context.get('len', UNDEFINED) _link = context.get('_link', UNDEFINED) __M_writer = context.writer() __M_writer('\n') if len(translations) > 1: __M_writer(' \n') else: __M_writer(' \n') return '' finally: context.caller_stack._pop_frame() def render__html_feed_link(context,link_type,link_name,link_postfix,classification,kind,language,name=None): __M_caller = context.caller_stack._push_frame() try: messages = context.get('messages', UNDEFINED) translations = context.get('translations', UNDEFINED) len = context.get('len', UNDEFINED) _link = context.get('_link', UNDEFINED) __M_writer = context.writer() __M_writer('\n') if len(translations) > 1: if name and kind != "archive" and kind != "author": __M_writer(' ') __M_writer(str(messages(link_name, language))) __M_writer(' (') __M_writer(filters.html_escape(str(name))) __M_writer(', ') __M_writer(str(language)) __M_writer(')\n') else: __M_writer(' ') __M_writer(str(messages(link_name, language))) __M_writer(' (') __M_writer(str(language)) __M_writer(')\n') else: if name and kind != "archive" and kind != "author": __M_writer(' ') __M_writer(str(messages(link_name, language))) __M_writer(' (') __M_writer(filters.html_escape(str(name))) __M_writer(')\n') else: __M_writer(' ') __M_writer(str(messages(link_name, language))) __M_writer('\n') return '' finally: context.caller_stack._pop_frame() def render__html_translation_link(context,classification,kind,language,name=None): __M_caller = context.caller_stack._push_frame() try: messages = context.get('messages', UNDEFINED) _link = context.get('_link', UNDEFINED) __M_writer = context.writer() __M_writer('\n') if name and kind != "archive" and kind != "author": __M_writer(' ') __M_writer(str(messages("LANGUAGE", language))) __M_writer(' (') __M_writer(filters.html_escape(str(name))) __M_writer(')\n') else: __M_writer(' ') __M_writer(str(messages("LANGUAGE", language))) __M_writer('\n') return '' finally: context.caller_stack._pop_frame() def render__head_rss(context,classification=None,kind='index',rss_override=True): __M_caller = context.caller_stack._push_frame() try: len = context.get('len', UNDEFINED) has_other_languages = context.get('has_other_languages', UNDEFINED) all_languages = context.get('all_languages', UNDEFINED) translations_feedorder = context.get('translations_feedorder', 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) def _head_feed_link(link_type,link_name,link_postfix,classification,kind,language): return render__head_feed_link(context,link_type,link_name,link_postfix,classification,kind,language) __M_writer = context.writer() __M_writer('\n') if rss_link and rss_override: __M_writer(' ') __M_writer(str(rss_link)) __M_writer('\n') if generate_rss and not (rss_link and rss_override) and kind != 'archive': if len(translations) > 1 and has_other_languages and classification and kind != 'index': for language, classification, name in all_languages: __M_writer(' \n') else: for language in translations_feedorder: if (classification or classification == '') and kind != 'index': __M_writer(' ') __M_writer(str(_head_feed_link('application/rss+xml', 'RSS for ' + kind + ' ' + classification, 'rss', classification, kind, language))) __M_writer('\n') else: __M_writer(' ') __M_writer(str(_head_feed_link('application/rss+xml', 'RSS', 'rss', classification, 'index', language))) __M_writer('\n') return '' finally: context.caller_stack._pop_frame() def render__head_atom(context,classification=None,kind='index'): __M_caller = context.caller_stack._push_frame() try: len = context.get('len', UNDEFINED) has_other_languages = context.get('has_other_languages', UNDEFINED) all_languages = context.get('all_languages', UNDEFINED) generate_atom = context.get('generate_atom', UNDEFINED) translations_feedorder = context.get('translations_feedorder', UNDEFINED) _link = context.get('_link', UNDEFINED) translations = context.get('translations', UNDEFINED) def _head_feed_link(link_type,link_name,link_postfix,classification,kind,language): return render__head_feed_link(context,link_type,link_name,link_postfix,classification,kind,language) __M_writer = context.writer() __M_writer('\n') if generate_atom: if len(translations) > 1 and has_other_languages and classification and kind != 'index': for language, classification, name in all_languages: __M_writer(' \n') else: for language in translations_feedorder: if (classification or classification == '') and kind != 'index': __M_writer(' ') __M_writer(str(_head_feed_link('application/atom+xml', 'Atom for ' + kind + ' ' + classification, 'atom', classification, kind, language))) __M_writer('\n') else: __M_writer(' ') __M_writer(str(_head_feed_link('application/atom+xml', 'Atom', 'atom', classification, 'index', language))) __M_writer('\n') return '' finally: context.caller_stack._pop_frame() def render_head(context,classification=None,kind='index',feeds=True,other=True,rss_override=True,has_no_feeds=False): __M_caller = context.caller_stack._push_frame() try: has_other_languages = context.get('has_other_languages', UNDEFINED) _link = context.get('_link', UNDEFINED) def _head_atom(classification=None,kind='index'): return render__head_atom(context,classification,kind) def _head_rss(classification=None,kind='index',rss_override=True): return render__head_rss(context,classification,kind,rss_override) other_languages = context.get('other_languages', UNDEFINED) __M_writer = context.writer() __M_writer('\n') if feeds and not has_no_feeds: __M_writer(' ') __M_writer(str(_head_rss(classification, 'index' if (kind == 'archive' and rss_override) else kind, rss_override))) __M_writer('\n ') __M_writer(str(_head_atom(classification, kind))) __M_writer('\n') if other and has_other_languages and other_languages: for language, classification, _ in other_languages: __M_writer(' \n') return '' finally: context.caller_stack._pop_frame() def render_feed_link(context,classification,kind): __M_caller = context.caller_stack._push_frame() try: len = context.get('len', UNDEFINED) has_other_languages = context.get('has_other_languages', UNDEFINED) all_languages = context.get('all_languages', UNDEFINED) generate_atom = context.get('generate_atom', UNDEFINED) translations_feedorder = context.get('translations_feedorder', UNDEFINED) translations = context.get('translations', UNDEFINED) def _html_feed_link(link_type,link_name,link_postfix,classification,kind,language,name=None): return render__html_feed_link(context,link_type,link_name,link_postfix,classification,kind,language,name) generate_rss = context.get('generate_rss', UNDEFINED) __M_writer = context.writer() __M_writer('\n') if generate_atom or generate_rss: if len(translations) > 1 and has_other_languages and kind != 'index': for language, classification, name in all_languages: __M_writer('
\n') if generate_atom: __M_writer(' ') __M_writer(str(_html_feed_link('application/atom+xml', 'Atom feed', 'atom', classification, kind, language, name))) __M_writer('\n') if generate_rss and kind != 'archive': __M_writer(' ') __M_writer(str(_html_feed_link('application/rss+xml', 'RSS feed', 'rss', classification, kind, language, name))) __M_writer('\n') __M_writer('
\n') else: for language in translations_feedorder: __M_writer('\n') if generate_atom: __M_writer(' ') __M_writer(str(_html_feed_link('application/atom+xml', 'Atom feed', 'atom', classification, kind, language))) __M_writer('\n') if generate_rss and kind != 'archive': __M_writer(' ') __M_writer(str(_html_feed_link('application/rss+xml', 'RSS feed', 'rss', classification, kind, language))) __M_writer('\n') __M_writer('
\n') return '' finally: context.caller_stack._pop_frame() def render_translation_link(context,kind): __M_caller = context.caller_stack._push_frame() try: messages = context.get('messages', UNDEFINED) has_other_languages = context.get('has_other_languages', UNDEFINED) def _html_translation_link(classification,kind,language,name=None): return render__html_translation_link(context,classification,kind,language,name) other_languages = context.get('other_languages', UNDEFINED) __M_writer = context.writer() __M_writer('\n') if has_other_languages and other_languages: __M_writer('') __M_writer(str(_html_translation_link(classification, kind, language, name))) __M_writer('
\n') __M_writer('