ClickHouse/website/templates/blog/content.html
Ivan Blinkov 9a26d48ad0
Basic blog similar to docs (#11609)
* Basic blog similar to docs

* rename post

* no post content in post_meta

* update readme and template

* more "en" content

* complete "en" content

* build blog redirects

* redirects for migration

* link sitemaps

* update po

* add "ru" content

* ru redirects

* remove old domain mentions

* adjust styles

* content improvements

* +1 alt

* use main images from CDN

* use re-hosted in-content images

* extra vertical margin around embedded youtube

* minor improvements

* adjust post page

* adjust html meta

* adjust post page

* improve blog rendering
2020-06-16 09:31:00 +03:00

44 lines
1.7 KiB
HTML

<div id="content-wrapper" class="col">
{% if not page.meta.is_index %}
<div id="content">
<header class="text-center">
{% if page.meta.image %}
<img class="img-fluid mb-3" src="{{ page.meta.image }}" alt="{{ title }}" title="{{ title }}" />
{% endif %}
<h1 class="display-4 mb-3">{{ title }}</h1>
</header>
<article class="col-md-10 offset-md-1">
{{ page.content|adjust_markdown_html }}
</article>
<section class="col-md-10 offset-md-1 my-5">
<span title="{{ _('Published date') }}" class="d-inline-block bg-dark text-white p-2 mr-2">{{ page.meta.date }}</span>
{% if page.meta.tags %}
{% for tag in page.meta.tags %}
<div class="d-inline-block bg-light p-2 mr-2">
{{ tag }}
</div>
{% endfor %}
{% endif %}
</section>
{% include "templates/blog/footer.html" %}
</div>
{% else %}
{% for post in config.extra.post_meta.values() %}
<a href="{{ post['url'] }}" class="d-block text-reset text-decoration-none mt-3 mb-5">
{% set post_image = post.get('image') or '/images/index/intro.svg' %}
<div class="row">
<div class="col-12 col-md-6">
<img class="img-fluid" src="{{ post_image }}" alt="{{ post['title'] }}" title="{{ post['title'] }}" />
</div>
<div class="col-12 col-md-6 p-3">
<h2>{{ post['title'] }}</h2>
<span class="text-muted">{{ post['date'] }}</span>
</div>
</div>
</a>
{% endfor %}
{% endif %}
</div>