Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,28 @@ languages:
list:
- v1.0.0

ar:
fa:
weight: 24
languageName: "فارسی (Persian)"
title: کامیت‌های قراردادی
description: یک استاندارد برای نوشتن پیام‌های کامیت که هم برای انسان‌ها و هم برای ماشین‌ها قابل فهم باشد
actions:
- label: خلاصه
url: '#خلاصه'
- label: توضیحات کامل
url: '#توضیحات-کامل'
- label: سوالات متداول
url: '#سوالات-متداول'
- label: مشارکت کنید
url: 'https://github.com/conventional-commits/conventionalcommits.org'
versions:
current: v1.0.0
list:
- v1.0.0
rtl: true

ar:
weight: 25
languageName: "العربية"
title: Conventional Commits
description: إضافة معنى قابل للقراءة من قبل الإنسان والآلة إلى رسائل الـ commit.
Expand Down
175 changes: 175 additions & 0 deletions content/v1.0.0/index.fa.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/conventional-commits/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="{{ if .Site.Language.Params.rtl }}rtl{{ end }}">
<html lang="{{ .Site.Language.Lang }}" {{ if .Site.Language.Params.rtl }}dir="rtl"{{ end }}>
{{- partial "head.html" . -}}
<body class="conventional-commits--loading">
{{- partial "header.html" . -}}
Expand Down
9 changes: 9 additions & 0 deletions themes/conventional-commits/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,13 @@
<meta property="og:url" content="{{ .Permalink }}"/>
<meta property="og:description" content="{{ .Param "Description" }}"/>
<meta property="og:site_name" content="{{ .Param "Title" }}"/>

<!-- Fonts -->
{{ if eq .Site.Language.Lang "en" }}
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
{{ end }}

{{ if eq .Site.Language.Lang "fa" }}
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn&display=swap" rel="stylesheet">
{{ end }}
</head>
2 changes: 1 addition & 1 deletion themes/conventional-commits/layouts/partials/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1 class="welcome__title">{{.Param "Title"}}</h1>
{{ end }}
</div>
{{ end }}
<figure class="welcome__image {{ if .Site.Language.Params.rtl }}rtl__image{{ end }}">
<figure class="welcome__image">
<img src='{{default "/img/git-flow--welcome.png"}}'>
</figure>
</div>
Expand Down
27 changes: 23 additions & 4 deletions themes/conventional-commits/static/css/scss/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,29 @@ body {
font: 16px Helvetica, sans-serif;
}

// Apply RTL direction only if 'rtl' class is present
html.rtl body, html.rtl .content {
direction: rtl;
text-align: right;
html[lang="en"] body :not(code, .anchorjs-link) {
font-family: "Poppins", sans-serif !important;
}

html[lang="fa"] body :not(code, .anchorjs-link) {
font-family: "Vazirmatn", sans-serif !important;
line-height: 1.75;
}

a.anchorjs-link {
font-family: 'anchorjs-icons' !important;
margin-inline-start: -1em;
padding-right: 0 !important;
}

// Apply RTL direction only if 'rtl' dir attribute is present
[dir="rtl"] {
text-align: right;
}

pre {
text-align: left;
direction: ltr;
}

.container {
Expand Down
22 changes: 9 additions & 13 deletions themes/conventional-commits/static/css/scss/layout/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,24 @@

.footer {
margin: ($article-offset-top + ($gap-md*3)) 0 ($gap-md*3);
direction: ltr;
text-align: left;

.container {
display: flex;
align-items: center;
justify-content: space-between;
}

&__license {
margin-right: auto;
a {
font-size: .7em;
text-decoration: none;
color: inherit;
&:hover {
text-decoration: underline;
}
&__license a {
font-size: .7em;
text-decoration: none;
color: inherit;
&:hover {
text-decoration: underline;
}
}

&__logos {
margin-left: auto;
}

&__logo {
display: flex;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
z-index: -1;
position: absolute;
top: 50%;
right: 0;
inset-inline-end: 0;
height: 70%;
width: 24%;
overflow: hidden;
Expand All @@ -106,11 +106,4 @@
max-height: 100%;
}
}

// Override for RTL layout if RTL is enabled
.rtl__image {
right: auto !important;
left: 0;
}
}