This commit is contained in:
m
2026-03-26 16:07:05 +01:00
parent 2df2f5f3a8
commit a47ad949bd
13 changed files with 63 additions and 188 deletions

View File

@@ -31,10 +31,6 @@
href="{{ url_for('static', filename='css/blog.css') }}"
rel="stylesheet"
/>
<link
href="{{ url_for('static', filename='css/components/timeline.css') }}"
rel="stylesheet"
/>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {

View File

@@ -1,5 +0,0 @@
<div class="background-svg">
<img src="{{ url_for('static', filename='animation.svg') }}" alt="" />
<br />
<p>tree source: codepen @uchardon</p>
</div>

View File

@@ -1,3 +0,0 @@
<pre class="code-block">
{{value | safe}}
</pre>

View File

@@ -1,3 +0,0 @@
<div class="image-container">
<img src="{{ src }}" alt="{{ alt or 'image' }}" />
</div>

View File

@@ -1,20 +1,12 @@
{% macro render_post(post, expanded=False) %} {% if expanded %} {% set ns =
namespace(found=false, preview='') %} {% if post.content is iterable and
post.content is not string %} {% for block in post.content %} {% if block.type
== "text" and not ns.found %} {% set ns.preview = block.value | safe%} {% set
ns.found = true %} {% endif %} {% endfor %} {% set preview = ns.preview %} {%
else %} {% set preview = post.content | safe%} {% endif %}
<div class="blog-content">{{ preview }}</div>
{% macro render_post(post, expanded=False) %} {% if expanded %}
<div class="blog-content">{{ post.content | safe }}</div>
<hr class="post-divider post-divider-expanded" />
{% else %} {% set ns = namespace(found=false, preview='') %} {% if post.content
is iterable and post.content is not string %} {% for block in post.content %} {%
if block.type == "text" and not ns.found %} {% set ns.preview = block.value |
striptags | truncate(200) %} {% set ns.found = true %} {% endif %} {% endfor %}
{% set preview = ns.preview %} {% else %} {% set preview = post.content |
striptags | truncate(200) %} {% endif %}
{% else %}
<div class="blog-preview">{{ preview }}</div>
<div class="blog-preview">{{ post.preview }}</div>
<a class="btn-read-more" href="{{ url_for('post_detail', post_id=post.id) }}">
Read More

View File

@@ -1,11 +0,0 @@
{% macro render_post(post) %}
<article class="blog-content">
{% if post.content is iterable and post.content is not string %} {% for block
in post.content %} {% if block.type == "image" %} {% with
src=url_for('content_image_files', filename=block.src) %} {% include
"components/image.html" %} {% endwith %} {% elif block.type == "text" %} {{
block.value | safe }} {% elif block.type == "code" %} {% with
value=block.value %} {% include "components/code.html" %} {% endwith %} {%
endif %} {% endfor %} {% else %} {{ post.content | safe }} {% endif %}
</article>
{% if post.template %} {% include post.template %} {% endif %} {% endmacro %}

View File

@@ -1,9 +0,0 @@
<div class="tw-w-full tw-mx-auto tw-px-0 tw-py-12">
<ol
class="tw-relative tw-border-l-2 tw-border-gray-300 tw-list-none tw-p-0 tw-m-0 tw-ml-4"
>
{{ post.timeline | safe }}
</ol>
</div>
<li class="tw-mb-12 tw-ml-6 tw-list-none tw-relative"></li>