1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-25 03:34:29 +01:00

layouts: Set dir="auto" on some HTML elements

When a site is rendered in Arabic the root HTML element gets the
dir="rtl" attribute, but even Arabic sites might have an English
title or footer, etc so we should set dir="auto" on those elements.
This commit is contained in:
Alan Orth 2019-04-18 23:38:53 +03:00
parent 2db85d8ab6
commit 9934368215
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 4 additions and 4 deletions

View File

@ -55,8 +55,8 @@
{{ if (ne .Site.Params.header_visible false) }}
<header class="blog-header">
<div class="container">
<h1 class="blog-title"><a href="{{ .Site.BaseURL }}" rel="home">{{ .Site.Title | safeHTML }}</a></h1>
{{ if .Site.Params.description }}<p class="lead blog-description">{{ .Site.Params.description | markdownify }}</p>{{ end }}
<h1 class="blog-title" dir="auto"><a href="{{ .Site.BaseURL }}" rel="home">{{ .Site.Title | safeHTML }}</a></h1>
{{ if .Site.Params.description }}<p class="lead blog-description" dir="auto">{{ .Site.Params.description | markdownify }}</p>{{ end }}
</div>
</header>
{{ end }}
@ -81,7 +81,7 @@
{{ block "footer" . }}
<footer class="blog-footer">
<p>
<p dir="auto">
{{ if .Site.Copyright }}
{{ .Site.Copyright | markdownify }}
{{ else }}

View File

@ -2,7 +2,7 @@
{{ if and (.Site.Params.sidebar) (isset .Site.Params.sidebar "about") }}
<section class="sidebar-module sidebar-module-inset">
<h4>{{ i18n "about" }}</h4>
<p>{{ .Site.Params.sidebar.about | markdownify }}</p>
<p dir="auto">{{ .Site.Params.sidebar.about | markdownify }}</p>
</section>
{{ end }}