add post footer

This commit is contained in:
Simon Vieille 2022-09-11 18:50:04 +02:00
parent ab32373d34
commit 832b4b5fda
Signed by: deblan
GPG key ID: 579388D585F70417
3 changed files with 30 additions and 3 deletions

View file

@ -509,6 +509,10 @@ pre[class*="language-"] {
margin-right: 10px;
}
& .review-content p {
margin-top: 0;
}
.review-content {
display: inline-block;
width: calc(100% - 75px);

View file

@ -37,6 +37,8 @@ class SettingEventSubscriber extends EventSubscriber
$this->manager->init('stats_umami_url', '📊 Statistiques', 'Adresse tableau de bord Umami', '');
$this->manager->init('stats_umami_tag', '📊 Statistiques', 'Script Umami', '');
$this->manager->init('post_author_description', 'Article', 'Description auteur', '');
// $this->manager->init('giphy_api_key', '🌐 API', 'Clé d\'API Giphy', '');
}
@ -91,7 +93,7 @@ class SettingEventSubscriber extends EventSubscriber
);
}
if (in_array($entity->getCode(), ['blog_footer'])) {
if (in_array($entity->getCode(), ['blog_footer', 'post_author_description'])) {
$event->setOption('view', 'large');
$builder->add(

View file

@ -104,7 +104,28 @@
</div>
{% if full %}
{% if similarPosts is defined and similarPosts|length > 0 %}
{% set description = setting('post_author_description') %}
{%- if description -%}
<div class="body">
<div class="review review--post">
<ul class="list--unstyled grid">
{%- set avatar = setting('avatar_image') -%}
{%- if avatar -%}
<li class="review-avatar">
<img src="{{ asset(avatar)|imagine_filter('site_avatar') }}" alt="Simon Vieille" title="Simon Vieille" class="border round">
</li>
{%- endif -%}
<li class="review-content">
{{- description|markdown('post') -}}
</li>
</ul>
</div>
</div>
{%- endif -%}
{%- if similarPosts is defined and similarPosts|length > 0 -%}
<div class="body body--posts">
<div class="col-12 cards cards--posts">
<div class="row">
@ -133,7 +154,7 @@
</div>
</div>
</div>
{% endif %}
{%- endif -%}
<div class="col-12">
<div class="reviews">