feat(persian): add persian language #1

Merged
dotamir merged 3 commits from support-persian into master 2018-04-27 18:14:46 +00:00
18 changed files with 60 additions and 3 deletions
Showing only changes of commit dd5be99c69 - Show all commits

View File

@ -1,7 +1,7 @@
mdibaiee commented 2018-04-27 13:17:18 +00:00 (Migrated from github.com)
Review

Thanks! I think a 'language: fa' property is more general since it can be expanded to support other languages as well. And let's add a 'lang-%s' to the post, so by default we have lang-en, and it can be replaced by lang-fa, etc.

Thanks! I think a 'language: fa' property is more general since it can be expanded to support other languages as well. And let's add a 'lang-%s' to the post, so by default we have lang-en, and it can be replaced by lang-fa, etc.
mdibaiee commented 2018-04-27 13:17:18 +00:00 (Migrated from github.com)
Review

Thanks! I think a 'language: fa' property is more general since it can be expanded to support other languages as well. And let's add a 'lang-%s' to the post, so by default we have lang-en, and it can be replaced by lang-fa, etc.

Thanks! I think a 'language: fa' property is more general since it can be expanded to support other languages as well. And let's add a 'lang-%s' to the post, so by default we have lang-en, and it can be replaced by lang-fa, etc.
--- ---
layout: default layout: default
--- ---
<div class="post"> <div class='post {% if page.fa %}fa-post{% endif %}'>
mdibaiee commented 2018-04-27 13:17:18 +00:00 (Migrated from github.com)
Review

Thanks! I think a 'language: fa' property is more general since it can be expanded to support other languages as well. And let's add a 'lang-%s' to the post, so by default we have lang-en, and it can be replaced by lang-fa, etc.

Thanks! I think a 'language: fa' property is more general since it can be expanded to support other languages as well. And let's add a 'lang-%s' to the post, so by default we have lang-en, and it can be replaced by lang-fa, etc.
mdibaiee commented 2018-04-27 13:17:18 +00:00 (Migrated from github.com)
Review

Thanks! I think a 'language: fa' property is more general since it can be expanded to support other languages as well. And let's add a 'lang-%s' to the post, so by default we have lang-en, and it can be replaced by lang-fa, etc.

Thanks! I think a 'language: fa' property is more general since it can be expanded to support other languages as well. And let's add a 'lang-%s' to the post, so by default we have lang-en, and it can be replaced by lang-fa, etc.
<div class="post-header"> <div class="post-header">
<h1 class="post-title">{{ page.title }}</h1> <h1 class="post-title">{{ page.title }}</h1>

mdibaiee commented 2018-04-27 13:17:18 +00:00 (Migrated from github.com)
Review

Thanks! I think a 'language: fa' property is more general since it can be expanded to support other languages as well. And let's add a 'lang-%s' to the post, so by default we have lang-en, and it can be replaced by lang-fa, etc.

Thanks! I think a 'language: fa' property is more general since it can be expanded to support other languages as well. And let's add a 'lang-%s' to the post, so by default we have lang-en, and it can be replaced by lang-fa, etc.
mdibaiee commented 2018-04-27 13:17:18 +00:00 (Migrated from github.com)
Review

Thanks! I think a 'language: fa' property is more general since it can be expanded to support other languages as well. And let's add a 'lang-%s' to the post, so by default we have lang-en, and it can be replaced by lang-fa, etc.

Thanks! I think a 'language: fa' property is more general since it can be expanded to support other languages as well. And let's add a 'lang-%s' to the post, so by default we have lang-en, and it can be replaced by lang-fa, etc.

View File

@ -0,0 +1,17 @@
---
layout: post
title: "پست فارسی"
date: 2018-04-27
permalink: persian-post/
categories: life
excerpt_separator: <!--more-->
fa: true
author: Amir
---
همیشه وقتی به زندگی نگاه می‌کنی متوجه یه سری چیزایی میشی که دوست داری باشن. اما همیشه زندگی بودن‌ها نیست. خیلی وقت‌ها خیلی چیزا رو نداری و همیشه به این فکر میکنی که چی میشد اگه داشتمش و یا چطوری میتونم داشته باشمش.
<!--more-->
خب زندگی همیشه اون چیزی که ما میخوایم نیست و حتی این دنیا هم دنیایی نیست که ما انتظارش رو داریم. همیشه اتفاقای جدید و خاطرات جدیی برامون ثبت میشن.

View File

@ -232,3 +232,30 @@ pre {
font-family: Mononoki; font-family: Mononoki;
src: url(fonts/mononoki-Regular.woff); src: url(fonts/mononoki-Regular.woff);
} }
@font-face {
font-family: Sahel;
src: url(fonts/Sahel.eot);
src: url(fonts/Sahel.eot?#iefix) format('embedded-opentype'),
url(fonts/Sahel.woff) format('woff'),
url(fonts/Sahel.ttf) format('truetype');
font-weight: normal;
}
@font-face {
font-family: Sahel;
src: url(fonts/Sahel-Bold.eot);
src: url(fonts/Sahel-Bold.eot?#iefix) format('embedded-opentype'),
url(fonts/Sahel-Bold.woff) format('woff'),
url(fonts/Sahel-Bold.ttf) format('truetype');
font-weight: bold;
}
@font-face {
font-family: Sahel;
src: url(fonts/Sahel-Black.eot);
src: url(fonts/Sahel-Black.eot?#iefix) format('embedded-opentype'),
url(fonts/Sahel-Black.woff) format('woff'),
url(fonts/Sahel-Black.ttf) format('truetype');
font-weight: 900;
}

View File

@ -127,6 +127,19 @@ strong {
} }
} }
.fa-post {
font-family: $base-font-family;
direction: rtl !important;
.post-content {
text-align: right;
font-size: 1.05em;
line-height: 1.718em;
}
.share-page {
direction: ltr;
}
}
.post-content .heading-link { .post-content .heading-link {
display: block; display: block;
position: absolute; position: absolute;

BIN
css/fonts/Sahel-Black.eot Normal file

Binary file not shown.

BIN
css/fonts/Sahel-Black.ttf Normal file

Binary file not shown.

BIN
css/fonts/Sahel-Black.woff Normal file

Binary file not shown.

BIN
css/fonts/Sahel-Black.woff2 Normal file

Binary file not shown.

BIN
css/fonts/Sahel-Bold.eot Normal file

Binary file not shown.

BIN
css/fonts/Sahel-Bold.ttf Normal file

Binary file not shown.

BIN
css/fonts/Sahel-Bold.woff Normal file

Binary file not shown.

BIN
css/fonts/Sahel-Bold.woff2 Normal file

Binary file not shown.

BIN
css/fonts/Sahel.eot Normal file

Binary file not shown.

BIN
css/fonts/Sahel.ttf Normal file

Binary file not shown.

BIN
css/fonts/Sahel.woff Normal file

Binary file not shown.

BIN
css/fonts/Sahel.woff2 Normal file

Binary file not shown.

View File

@ -4,7 +4,7 @@
@charset "utf-8"; @charset "utf-8";
// Our variables // Our variables
$base-font-family: 'Nunito', Open Sans, sans-serif; $base-font-family: 'Nunito', 'Sahel', Open Sans, sans-serif;
$head-font-family: 'Secular One', sans-serif; $head-font-family: 'Secular One', sans-serif;
$base-font-size: 12pt; $base-font-size: 12pt;
$small-font-size: $base-font-size * 0.875; $small-font-size: $base-font-size * 0.875;

View File

@ -6,7 +6,7 @@ layout: default
<ul class="post-list"> <ul class="post-list">
{% for post in site.posts %} {% for post in site.posts %}
<li> <li class='{% if post.fa %}fa-post{% endif %}'>
<h2> <h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a> <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>