jekyll-theme-mehdix-rtl 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +27 -1
- data/_includes/static_comments.html +42 -0
- data/_layouts/post.html +21 -19
- data/_sass/_post.scss +90 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b21cff9c7cc95a61d98eb7e2b54ebbb5aa9735c3
|
4
|
+
data.tar.gz: a2302a07e802a2cacbb7f84f0b77feb9500cd4f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 073cb0e4ed62a152bd60efd02076dc2e59480fcb1abab5a658a19d3a0c021ccfda2dbf47874aa061f69484767df13e29c13deade038f7111040ef39134428dbb
|
7
|
+
data.tar.gz: 4703727994ea7ecf65d3da3c776c196e0e1c1a7bedb20f1ac73fceddc96309264d191ce94fbcdf8142c8691ccbf7dbdac198e15bc2ae31a5b41b23da6311ac70
|
data/README.md
CHANGED
@@ -51,7 +51,33 @@ The following layouts are available for your homepage:
|
|
51
51
|
- minimal: only post titles
|
52
52
|
|
53
53
|
### Comments
|
54
|
-
|
54
|
+
This theme supports three comment systems. First one is disqus.
|
55
|
+
In order to enalbe disqus comments add `comment_system:disqus` and `disqus_shortname:DISQUS_USERNAME` to your `_config.yml` file.
|
56
|
+
|
57
|
+
The second approach is static comments. In order to enable static comments add `comment_system:static` to the config
|
58
|
+
file. This will load commends from `_data/comments` folder. There should be one YAML file per post. Name of the file
|
59
|
+
should be the `uuid` of the post (each post must have a `uuid` in its front matter). The following sample defines two
|
60
|
+
comments for post with `uuid` 0b64d07f-6c08-475b-a509-463df5458039:
|
61
|
+
|
62
|
+
```yaml
|
63
|
+
- date: 20171220
|
64
|
+
name: تقی
|
65
|
+
email: john@doe.com
|
66
|
+
url: https://johndoe.com
|
67
|
+
text: >
|
68
|
+
نوکرتم دادا!
|
69
|
+
کوجایی تو؟
|
70
|
+
|
71
|
+
- date: 20171221
|
72
|
+
name: تقی ۲
|
73
|
+
email: john@doe.com
|
74
|
+
url: https://johndoe.com
|
75
|
+
text: >
|
76
|
+
[۲] دادا خبری نیت ازت
|
77
|
+
```
|
78
|
+
|
79
|
+
For the time being I am using Netlify to handle custom comment forms on each post page and add them to the
|
80
|
+
comments using the [`netlify_comments.py`](./netlify_comments.py) script.
|
55
81
|
|
56
82
|
### Forcing RTL code blocks
|
57
83
|
If you put code blocks and they appear incorrectly, you can use _Markright gem. First add it to your Gemfile:
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<section id="static-comments">
|
2
|
+
|
3
|
+
{% assign comments = site.data.comments[page.uuid] %}
|
4
|
+
{% if comments %}
|
5
|
+
<div id="comments">
|
6
|
+
<h4>نظرات سایر خوانندگان</h4> {% for comment in comments %}
|
7
|
+
<article>
|
8
|
+
<div class="comment-image-wrapper"><img class="comment-avatar" src="https://www.gravatar.com/avatar/{{comment.email}}?s=200&d=robohash" /></div>
|
9
|
+
<div class="comment-body-wrapper">
|
10
|
+
<h5 style="display: inline"><a href={{comment.url}}>{{ comment.name }}</a></h5>
|
11
|
+
<p class="post-meta" style="display: inline"> •  {{ comment.date }}</p>
|
12
|
+
<p>{{ comment.text }}</p>
|
13
|
+
</div>
|
14
|
+
</article>
|
15
|
+
{% endfor%}
|
16
|
+
</div>
|
17
|
+
{% endif %}
|
18
|
+
|
19
|
+
<form id="comment-form" name="comment" netlify>
|
20
|
+
<input name="bot-field" style="display:none">
|
21
|
+
<input name="page_id" style="display:none" value="{{page.id}}">
|
22
|
+
<input name="page_uuid" style="display:none" value="{{page.uuid}}">
|
23
|
+
<input name="page_date" style="display:none" value="{{page.date}}">
|
24
|
+
<input name="page_title" style="display:none" value="{{page.title}}">
|
25
|
+
<label for="message">دیدگاه
|
26
|
+
<textarea id="message" name="message" required alt="no!!"></textarea>
|
27
|
+
</label>
|
28
|
+
<label for="name">نام
|
29
|
+
<input id="name" type="text" name="name" required>
|
30
|
+
</label>
|
31
|
+
<label for="email">ایمیل
|
32
|
+
<input id="email" type="email" name="email" required>
|
33
|
+
</label>
|
34
|
+
<label for="website">وبسایت
|
35
|
+
<input id="website" type="url" name="website">
|
36
|
+
</label>
|
37
|
+
<div style="text-align:left">
|
38
|
+
<button type="submit">برو به سلامت</button>
|
39
|
+
</div>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
</section>
|
data/_layouts/post.html
CHANGED
@@ -2,19 +2,16 @@
|
|
2
2
|
layout: default
|
3
3
|
---
|
4
4
|
<div class="post">
|
5
|
-
|
6
5
|
<header class="post-header">
|
7
6
|
<h1 class="post-title">{{ page.title }}</h1>
|
8
7
|
<p class="post-meta">
|
9
|
-
<span class="date">{{ page.date | jdate: "%A %d %b %Y" | habify}}</span>
|
10
|
-
{% if page.meta %} • {{ page.meta }}{% endif %}
|
8
|
+
<span class="date">{{ page.date | jdate: "%A %d %b %Y" | habify}}</span> {% if page.meta %} • {{ page.meta }}{% endif %}
|
11
9
|
</p>
|
12
10
|
</header>
|
13
|
-
|
14
11
|
<article class="post-content">
|
15
12
|
{{ content }}
|
16
13
|
</article>
|
17
|
-
|
14
|
+
{% if site.disqus_shortname %} {% include disqus.html %} {% endif %}
|
18
15
|
<small id="post-tags">
|
19
16
|
{% for tag in page.tags %}
|
20
17
|
<i class="icon-tags"></i>
|
@@ -22,19 +19,24 @@ layout: default
|
|
22
19
|
{% endfor %}
|
23
20
|
</small>
|
24
21
|
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
22
|
+
<nav class="pagination">
|
23
|
+
{% if page.previous %}
|
24
|
+
<a href="{{ page.previous.url | absolute_url }}" class="pagination--pager" title="{{ page.previous.title }}">قبلی </a>
|
25
|
+
{% else %}
|
26
|
+
<a href="#" class="pagination--pager disabled"">قبلی </a>
|
27
|
+
{% endif %}
|
28
|
+
|
29
|
+
{% if page.next %}
|
30
|
+
<a href="{{ page.next.url | absolute_url }}" class="pagination--pager" title="{{ page.next.title }}">بعدی</a>
|
31
|
+
{% else %}
|
32
|
+
<a href="#" class="pagination--pager disabled"">بعدی</a>
|
33
|
+
{% endif %}
|
34
|
+
</nav>
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
{% if site.comment_system == 'static' %}
|
37
|
+
{% include static_comments.html %}
|
38
|
+
{% elsif site.coment_system == 'disqus' %}
|
39
|
+
{% include disqus.html %}
|
40
|
+
{% endif %}
|
39
41
|
|
40
|
-
</div>
|
42
|
+
</div>
|
data/_sass/_post.scss
CHANGED
@@ -14,9 +14,11 @@
|
|
14
14
|
|
15
15
|
#post-list {
|
16
16
|
list-style: none;
|
17
|
+
|
17
18
|
a {
|
18
19
|
color: $text-color;
|
19
20
|
}
|
21
|
+
|
20
22
|
a:hover {
|
21
23
|
color: $brand-color;
|
22
24
|
}
|
@@ -24,6 +26,7 @@
|
|
24
26
|
|
25
27
|
.post-meta {
|
26
28
|
@extend .center;
|
29
|
+
|
27
30
|
font-size: $small-font-size;
|
28
31
|
color: $grey-color;
|
29
32
|
}
|
@@ -42,7 +45,6 @@
|
|
42
45
|
letter-spacing: -1px;
|
43
46
|
line-height: 1.25;
|
44
47
|
margin-bottom: 0;
|
45
|
-
|
46
48
|
text-align: center;
|
47
49
|
font-weight: bold;
|
48
50
|
font-size: 2em;
|
@@ -109,3 +111,90 @@
|
|
109
111
|
}
|
110
112
|
}
|
111
113
|
}
|
114
|
+
|
115
|
+
#comment-form {
|
116
|
+
background: rgba(242, 243, 243, 0.48) none repeat scroll 0% 0%;
|
117
|
+
padding: 15px;
|
118
|
+
|
119
|
+
label {
|
120
|
+
display: block;
|
121
|
+
margin-bottom: 1em;
|
122
|
+
}
|
123
|
+
|
124
|
+
input, textarea {
|
125
|
+
display: block;
|
126
|
+
width: 100%;
|
127
|
+
box-sizing: border-box;
|
128
|
+
font-family: $base-font-family;
|
129
|
+
}
|
130
|
+
|
131
|
+
input:focus, textarea:focus {
|
132
|
+
border-color: #f2f3f3;
|
133
|
+
}
|
134
|
+
|
135
|
+
button[type=submit] {
|
136
|
+
font-family: $alt-font-family;
|
137
|
+
}
|
138
|
+
|
139
|
+
textarea {
|
140
|
+
height: 85px;
|
141
|
+
resize: vertical;
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
#comments {
|
146
|
+
display: grid;
|
147
|
+
|
148
|
+
article {
|
149
|
+
display: grid;
|
150
|
+
grid-template-columns: 1fr 5fr;
|
151
|
+
margin-top: 1em;
|
152
|
+
width: 100%;
|
153
|
+
border-top: 1px solid #f2f3f3;
|
154
|
+
|
155
|
+
p {
|
156
|
+
white-space: pre-wrap;
|
157
|
+
}
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
161
|
+
.comment-image-wrapper {
|
162
|
+
width: 4em;
|
163
|
+
float: right;
|
164
|
+
}
|
165
|
+
|
166
|
+
.comment-body-wrapper {
|
167
|
+
float: right;
|
168
|
+
}
|
169
|
+
|
170
|
+
.pagination {
|
171
|
+
margin-top: 1em;
|
172
|
+
margin-bottom: 1em;
|
173
|
+
padding-top: 1em;
|
174
|
+
padding-bottom: 1em;
|
175
|
+
display: flex;
|
176
|
+
border-top: 1px solid #f2f3f3;
|
177
|
+
border-bottom: 1px solid #f2f3f3;
|
178
|
+
}
|
179
|
+
|
180
|
+
.pagination--pager.disabled {
|
181
|
+
color: rgba(137, 140, 143, 0.5);
|
182
|
+
pointer-events: none;
|
183
|
+
cursor: not-allowed;
|
184
|
+
}
|
185
|
+
|
186
|
+
.pagination--pager {
|
187
|
+
padding: 1em 2em;
|
188
|
+
width: 50%;
|
189
|
+
font-weight: bold;
|
190
|
+
text-align: center;
|
191
|
+
border: 1px solid #b6b6b6;
|
192
|
+
border-radius: 4px;
|
193
|
+
border-top-right-radius: 4px;
|
194
|
+
border-bottom-right-radius: 4px;
|
195
|
+
}
|
196
|
+
|
197
|
+
.pagination--pager:first-child {
|
198
|
+
border-top-right-radius: 0;
|
199
|
+
border-bottom-right-radius: 0;
|
200
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-mehdix-rtl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mehdi Sadeghi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -138,6 +138,7 @@ files:
|
|
138
138
|
- _includes/head.html
|
139
139
|
- _includes/license.html
|
140
140
|
- _includes/post-image.html
|
141
|
+
- _includes/static_comments.html
|
141
142
|
- _layouts/default.html
|
142
143
|
- _layouts/home.html
|
143
144
|
- _layouts/message.html
|