preview
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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>
|
||||
@@ -1,3 +0,0 @@
|
||||
<pre class="code-block">
|
||||
{{value | safe}}
|
||||
</pre>
|
||||
@@ -1,3 +0,0 @@
|
||||
<div class="image-container">
|
||||
<img src="{{ src }}" alt="{{ alt or 'image' }}" />
|
||||
</div>
|
||||
@@ -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
|
||||
|
||||
@@ -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 %}
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user