New element .post-content

This commit is contained in:
Mimi 2020-09-27 01:50:22 +08:00
parent 9919fb5c49
commit 7c87d55d26
2 changed files with 16 additions and 14 deletions

View File

@ -1,7 +1,11 @@
{##################} {##################}
{### POST BLOCK ###} {### POST BLOCK ###}
{##################} {##################}
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="{{ post.lang or config.language }}"> <div class="post-block">
{# Gallery support #}
{{ post_gallery(post.photos) }}
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="{{ post.lang or config.language }}">
<link itemprop="mainEntityOfPage" href="{{ post.permalink }}"> <link itemprop="mainEntityOfPage" href="{{ post.permalink }}">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"> <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
@ -14,9 +18,6 @@
<meta itemprop="name" content="{{ title }}"> <meta itemprop="name" content="{{ title }}">
</span> </span>
{# Gallery support #}
{{ post_gallery(post.photos) }}
{%- if post.header !== false %} {%- if post.header !== false %}
<header class="post-header"> <header class="post-header">
<{%- if is_index %}h2{% else %}h1{%- endif %} class="post-title{%- if post.direction and post.direction.toLowerCase() === 'rtl' %} rtl{%- endif %}" itemprop="name headline"> <{%- if is_index %}h2{% else %}h1{%- endif %} class="post-title{%- if post.direction and post.direction.toLowerCase() === 'rtl' %} rtl{%- endif %}" itemprop="name headline">
@ -149,6 +150,7 @@
{%- endif %} {%- endif %}
</footer> </footer>
</article> </article>
{######################} </div>
{### END POST BLOCK ###} {######################}
{######################} {### END POST BLOCK ###}
{######################}

View File

@ -1,12 +1,12 @@
{%- set serverURLs = theme.valine.serverURLs or 'https://' + theme.valine.appId.slice(0, 8) | lower + '.api.lncldglobal.com' %}
<script> <script>
NexT.utils.loadComments('#valine-comments', () => { NexT.utils.loadComments('#valine-comments', () => {
NexT.utils.getScript('{{ theme.vendors.valine }}', () => { NexT.utils.getScript('{{ theme.vendors.valine }}', () => {
new Valine(Object.assign({ new Valine(Object.assign({{ theme.valine | safedump }}, {
el: '#valine-comments', el: '#valine-comments',
path: {{ url_for(page.path) | replace(r/index\.html$/, '') | safedump }}, path: {{ url_for(page.path) | replace(r/index\.html$/, '') | safedump }},
serverURLs: 'https://{{ theme.valine.appId.slice(0, 8) | lower }}.api.lncldglobal.com' serverURLs: {{ serverURLs | safedump }}
}, {{ theme.valine | safedump }} }));
));
}, window.Valine); }, window.Valine);
}); });
</script> </script>