summaryrefslogtreecommitdiff
path: root/themes/ccc/templates/post.tmpl
blob: 7abffb9d711afd859919d6d58a02f5752c0e1c27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
## -*- coding: utf-8 -*-
<%namespace name="helper" file="post_helper.tmpl"/>
<%namespace name="pheader" file="post_header.tmpl"/>
<%namespace name="comments" file="comments_helper.tmpl"/>
<%namespace name="math" file="math_helper.tmpl"/>
<%namespace name="statnav" file="static_navigation.tmpl"/>
<%inherit file="base.tmpl"/>

<%block name="extra_head">
    ${parent.extra_head()}
    % if post.meta('keywords'):
    <meta name="keywords" content="${smartjoin(', ', post.meta('keywords'))|h}">
    % endif
    <meta name="author" content="${post.author()|h}">
    %if post.prev_post:
        <link rel="prev" href="${post.prev_post.permalink()}" title="${post.prev_post.title()|h}" type="text/html">
    %endif
    %if post.next_post:
        <link rel="next" href="${post.next_post.permalink()}" title="${post.next_post.title()|h}" type="text/html">
    %endif
    % if post.is_draft:
        <meta name="robots" content="noindex">
    % endif
    ${helper.open_graph_metadata(post)}
    ${helper.twitter_card_information(post)}
    ${helper.meta_translations(post)}
    ${math.math_styles_ifpost(post)}
</%block>

<%block name="content">
<div class="row frontend-content mt-3">
    <div class="col-lg-9 blog-main">
        % if post.meta('previewimage'):
        <img class="col-12 p-0 mb-3 post-preview img-responsive" src="${post.meta('previewimage')}" alt="preview-img" style="object-fit: cover; object-position: ${post.meta('previewimage-position') or '50% 50%' }" />
        % endif
        <article class="post-${post.meta('type')} h-entry hentry postpage" itemscope="itemscope" itemtype="http://schema.org/Article">
            ${pheader.html_post_header()}
            <div class="e-content entry-content" itemprop="articleBody text">
            ${post.text()}
            </div>
            ${math.math_scripts_ifpost(post)}
        </article>
    </div>
    <aside class="col-12 col-lg-3 sidebar">
        ${statnav.static_navigation()}
        %if post.tags:
            <ul itemprop="keywords" class="nav flex-column bg-light mt-4 shadow-sm">
            <h4 class="pull-left">Tagged as:</h4>
            %for tag in post.tags:
                % if tag not in hidden_tags:
                <li class="nav-item"><a class="nav-link" href="${_link('tag', tag)}" rel="tag">${tag|h}</a></li>
                % endif
            %endfor
            </ul>
        %endif
    </aside>
</div>
</%block>