mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Adding Right-to-Left support for template (#875)
This commit is contained in:
@@ -445,3 +445,11 @@ h5 {
|
|||||||
a strong {
|
a strong {
|
||||||
color: #268bd2;
|
color: #268bd2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.right-to-left {
|
||||||
|
direction: rtl;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-to-right, .right-to-left pre {
|
||||||
|
direction: ltr;
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,11 +33,13 @@
|
|||||||
{% endblock toc_aside %}
|
{% endblock toc_aside %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
|
<div class="{% if page.extra.rtl %}right-to-left{% endif %}">
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
<time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date">
|
<time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date">
|
||||||
{{ page.date | date(format="%b %d, %Y") }}
|
{{ page.date | date(format="%b %d, %Y") }}
|
||||||
{% if page.extra.updated %} (updated on {{ page.extra.updated | date(format="%b %d, %Y") }}) {% endif %}
|
{% if page.extra.updated %} (updated on {{ page.extra.updated | date(format="%b %d, %Y") }}) {% endif %}
|
||||||
</time>
|
</time>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% if page.extra.warning %}
|
{% if page.extra.warning %}
|
||||||
<div class="warning">
|
<div class="warning">
|
||||||
@@ -67,7 +69,9 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="{% if page.extra.rtl %}right-to-left{% endif %}">
|
||||||
{{ page.content | replace(from="<!-- toc -->", to=macros::toc(toc=page.toc)) | safe }}
|
{{ page.content | replace(from="<!-- toc -->", to=macros::toc(toc=page.toc)) | safe }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="post-footer-support">
|
<div class="post-footer-support">
|
||||||
<h2>Support Me</h2>
|
<h2>Support Me</h2>
|
||||||
|
|||||||
Reference in New Issue
Block a user