diff options
author | Rami Sabbagh <ramilego4game@gmail.com> | 2022-01-26 05:15:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-26 05:15:02 +0300 |
commit | 086f1e98c193943010f7e3b7889b8f2d0ac4e57b (patch) | |
tree | 34525ef019f6766be206c1bf48c5883f1ace1bbb /layouts/partials/components/post-metadata.html | |
parent | 9c3d6160dbf9ce9a4556d2746df4e105403e3d20 (diff) |
feat: add RTL layout support and Arabic localization (#159)
* Add direction attribute to the <html> tag
So rtl layout can be activated
* Add `tailwindcss-rtl`
Which brings very handy RTL support to Tailwind CSS
* Load the `tailwindcss-rtl` plugin
* Find and replace many classes into RTL capable ones
* Find and replace many classes into RTL capable ones
* Update the prebuilt css
* Add Arabic localization
* Fix code blocks, force their layout to LTR
* Update the prebuilt css
* Minor improvement to the Arabic localization
* Add singular/plural support for `readingTime`
By following [hugo docs](https://gohugo.io/content-management/multilingual/#query-a-singularplural-translation)
* Add a singular form of `readingTime` for Arabic
* Add a singular form of `readingTime` for English
* Add an additional variant for `readingTime` in the Arabic localization
In Arabic we have a plural for dual, and a plural for 3+.
* Fix left and right arrows not being flipped in RTL
I had to manually flip them in each place
* Revert "Add a singular form of `readingTime` for English"
This reverts commit 73482b600ed7da5fb37b2b5f7d88384a32de18b1.
* Add singular variant for `readingTime` in EN localization
Diffstat (limited to 'layouts/partials/components/post-metadata.html')
-rw-r--r-- | layouts/partials/components/post-metadata.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/layouts/partials/components/post-metadata.html b/layouts/partials/components/post-metadata.html index 9fa9a40..2d108d5 100644 --- a/layouts/partials/components/post-metadata.html +++ b/layouts/partials/components/post-metadata.html @@ -1,16 +1,16 @@ <div class="flex flex-wrap flex-row items-center mt-2 text-tertiary-text"> - <div class="mr-6 my-2"> - <i class="fas fa-calendar mr-1"></i> + <div class="me-6 my-2"> + <i class="fas fa-calendar me-1"></i> <span>{{ .Date.Format (.Site.Params.dateFormat | default "2006-01-02") }}</span> </div> - <div class="mr-6 my-2"> - <i class="fas fa-clock mr-1"></i> - <span>{{ i18n "readingTime" . }}</span> + <div class="me-6 my-2"> + <i class="fas fa-clock me-1"></i> + <span>{{ i18n "readingTime" .ReadingTime }}</span> </div> {{ with .GetTerms "categories" }} - <div class="mr-6 my-2"> - <i class="fas fa-folder mr-1"></i> + <div class="me-6 my-2"> + <i class="fas fa-folder me-1"></i> {{ range $index, $value := . }} {{ if gt $index 0 }} <span>, </span> @@ -21,8 +21,8 @@ {{ end }} {{ with .GetTerms "series" }} - <div class="mr-6 my-2"> - <i class="fas fa-th-list mr-1"></i> + <div class="me-6 my-2"> + <i class="fas fa-th-list me-1"></i> {{ range $index, $value := . }} {{ if gt $index 0 }} <span>, </span> |