feat: add rtl language support

This commit is contained in:
ppoffice 2017-01-30 10:53:18 +08:00
parent e459a63558
commit d961446f3f
2 changed files with 13 additions and 1 deletions

View File

@ -1,4 +1,4 @@
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %><%= (post.direction && post.direction.toLowerCase() === 'rtl' ? ' rtl' : '') %>" itemscope itemprop="blogPost">
<div class="article-inner">
<% if (post.banner) { %>
<%- partial('post/banner') %>

View File

@ -58,6 +58,8 @@
color: color-default
padding: 0 article-padding
line-height: line-height
p
text-align: justify
p, table
line-height: line-height
margin: line-height 0
@ -399,6 +401,16 @@ ol.toc
color color-theme
transition color .3s ease-out
/* right-to-left languages */
.article.rtl
.article-title,
.article-entry p
direction: rtl
.article-meta > div
float: right
margin-left: 10px
margin-right: 0
/* lightgallery */
.lg-outer
.lg-thumb-item