jekyll-theme-mehdix-rtl 1.1.1 → 1.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be3ecf54b83ae4e034e5513538b527357c740ee5e96971d7201356df04c548df
4
- data.tar.gz: 33e49b993631a9c2e71a23e40586595bcc7651a84bca367ffdc0be1f3e19150d
3
+ metadata.gz: 444d2f8db5ebc254c6cc2fde845fcbe38846fb18e9c0aeaf2c847acc75c211f9
4
+ data.tar.gz: ba0227f705d6d5b5851a336b6694110c1f49da1cec6edc5deb7a33e16a5356cb
5
5
  SHA512:
6
- metadata.gz: 2d34fa60124a8a45268ff1bb242ed3d6a25f5fa70ed5e71ce93e749b00da495f10d7e7182648cc47b6f16bf3a0b0cb074ef17478a6c04baf33cb4d06eb310a79
7
- data.tar.gz: 5503624fd882c3fe06ab910696bff49df52c7c67fd22457b69abe58d79300fdf175cfd1b1b1f2d4703c1830c7b20184db6caafb4e6b0d57d24064a7e88a7bd59
6
+ metadata.gz: a6c38c05ecf53ec624fd7f72959dde75461cdbfd3c7c34e4c229ef9a5474426243b1af6509640ea0c708e1be78135fb6a9956c9498b905a97285448cc1020f47
7
+ data.tar.gz: 3c361ef733fde63f2c36b59f768362013111c957b49e977b8ce181a4204fad9c1286ffdec3b4306a3f753251d757d0e80aa30e998e4392cf7008e1f8123ab69d
@@ -4,10 +4,11 @@
4
4
  {% capture key %}{{ page.id | remove_first: "/" }}{% endcapture %}
5
5
  {% assign comments = site.data.comments[key] %}
6
6
  {% if comments %}
7
- <h4 id="comments-header">نظرات خوانندگان</h4>
7
+ <h4 id="comments-header">دیدگاه‌ها</h4>
8
8
  <div id="comments">
9
9
  {% for comment in comments %}
10
- <article>
10
+ <div class="comment-chain">
11
+ <article id="{{ comment.id }}">
11
12
  <div class="comment-image-wrapper">
12
13
  <img class="comment-avatar" src="https://www.gravatar.com/avatar/{{comment.email}}?s=200&d=robohash" />
13
14
  </div>
@@ -15,16 +16,48 @@
15
16
  <span class="comment-meta">
16
17
  <small>
17
18
  {% if comment.website != '' %}
18
- <a href={{comment.website}} target="_">{{ comment.name }}</a>
19
+ <a href={{comment.website}} target="_"><span commenter>{{ comment.name }}</span></a>
19
20
  {% else %}
20
- {{ comment.name }}
21
+ <span commenter>{{ comment.name }}</span>
21
22
  {% endif %}
22
23
  </small>
23
- <small> &nbsp; {{ comment.date | jdate: "%d %b %Y" | habify }}</small>
24
+ <small> &nbsp; <a href="#{{ comment.id }}">{{ comment.created_at | jdate: "%d %b %Y" | habify }}</a></small>
25
+ <small> &nbsp; <a href="#comment-form" onclick="replyTo('{{ comment.id }}')">پاسخ</a></small>
26
+ <span style="display:none" commentId>{{ comment.id }}</span>
24
27
  </span>
25
28
  {{ comment.message | replace: "<p>", '' | replace: "</p>", newLine | replace: "<br>", newLine | strip_html | markdownify }}
26
29
  </div>
27
30
  </article>
31
+
32
+ {% if comment.reply_to %}
33
+ {% for cmt in comments %}
34
+ {% if cmt.id == comment.reply_to %}
35
+ <article class="sub-comment">
36
+
37
+ <div class="comment-image-wrapper">
38
+ <img class="comment-avatar" src="https://www.gravatar.com/avatar/{{comment.email}}?s=200&d=robohash" />
39
+ </div>
40
+ <div class="comment-body-wrapper">
41
+ <span class="comment-meta">
42
+ <small>
43
+ {% if cmt.website != '' %}
44
+ <a href={{comment.website}} target="_"><span commenter>{{ cmt.name }}</span></a>
45
+ {% else %}
46
+ {{ cmt.name }}
47
+ {% endif %}
48
+ </small>
49
+ <small> &nbsp; <a href="#{{ cmt.id }}">{{ cmt.created_at | jdate: "%d %b %Y" | habify }}</a></small>
50
+ </span>
51
+ {{ cmt.message | replace: "<p>", '' | replace: "</p>", newLine | replace: "<br>", newLine | strip_html | markdownify }}
52
+ </div>
53
+
54
+ </article>
55
+ {% break %}
56
+ {% endif %}
57
+ {% endfor %}
58
+ {% endif %}
59
+
60
+ </div>
28
61
  {% endfor%}
29
62
  </div>
30
63
  {% endif %}
@@ -32,10 +65,8 @@
32
65
  <form id="comment-form" name="comment" netlify-honeypot="bot-field" netlify>
33
66
  <input name="bot-field" style="display:none">
34
67
  <input name="page_id" style="display:none" value="{{page.id}}">
35
- <input name="page_uuid" style="display:none" value="{{page.uuid}}">
36
- <input name="page_date" style="display:none" value="{{page.date}}">
37
- <input name="page_title" style="display:none" value="{{page.title}}">
38
- <label for="message">دیدگاه<sup class="required">*</sup> &nbsp;<small>می‌توانید با <a href="http://commonmark.org/help/" target="_">مارک‌داون</a> هم بنویسید.</small>
68
+ <input id="reply-to" name="reply-to" style="display:none">
69
+ <label for="message">دیدگاه<sup class="required">*</sup> &nbsp;<small>می‌توانید با <a href="http://commonmark.org/help/" target="_">مارک‌داون</a> هم بنویسید.</small><br><small id="replyToVisualClue"></small>
39
70
  <textarea id="message" name="message" required alt="no!!" onkeyup="preview()"></textarea>
40
71
  <div id="preview"></div>
41
72
  </label>
@@ -57,9 +88,15 @@
57
88
  <script src="{{ 'assets/js/showdown.min.js' | absolute_url }}" type="text/javascript">
58
89
  </script>
59
90
  <script type="text/javascript">
60
- function preview(){
91
+ function preview() {
61
92
  var converter = new showdown.Converter();
62
93
  var markdown = document.getElementById("message").value;
63
94
  document.getElementById("preview").innerHTML = converter.makeHtml(markdown);
64
95
  }
96
+
97
+ function replyTo(commentID) {
98
+ var comment = document.getElementById(commentID);
99
+ document.getElementById("reply-to").value = comment.querySelector("span[commentId]").innerText;
100
+ document.getElementById("replyToVisualClue").innerText = "[در جواب " + comment.querySelector("span[commenter]").innerText + "]";
101
+ }
65
102
  </script>
data/_sass/_layout.scss CHANGED
@@ -24,10 +24,7 @@ header {
24
24
  font-size: 26px;
25
25
  line-height: 56px;
26
26
  letter-spacing: -1px;
27
-
28
- &:visited {
29
- color: white;
30
- }
27
+ color: $anti-color;
31
28
  }
32
29
 
33
30
  .post-list {
@@ -35,9 +32,6 @@ header {
35
32
 
36
33
  h2 {
37
34
  font-weight: bold;
38
- a {
39
- //color: darken($header-color, 30%);
40
- }
41
35
  }
42
36
 
43
37
  .post-list-item {
@@ -68,7 +62,7 @@ header {
68
62
 
69
63
  .meta {
70
64
  font-size: $small-font-size;
71
- color: lighten($text-color, 10%);
65
+ color: $grey-color;
72
66
  }
73
67
 
74
68
  .list-meta-col {
@@ -86,7 +80,7 @@ header {
86
80
  }
87
81
 
88
82
  #motto {
89
- color: white;
83
+ color: $anti-color;
90
84
  vertical-align: calc(40%);
91
85
  }
92
86
 
@@ -123,7 +117,7 @@ header {
123
117
  padding: 5px 32px;
124
118
  background-color: lighten($brand-color, 25%);
125
119
  border-radius: 2px;
126
- color: white;
120
+ color: $anti-color;
127
121
  }
128
122
 
129
123
  @include media-query($on-palm) {
data/_sass/_post.scss CHANGED
@@ -9,7 +9,7 @@
9
9
  text-align: center;
10
10
  font-weight: bold;
11
11
  font-size: 4em;
12
- color: $header-color;//a friendly dark color. darken($header-color, 10%);
12
+ color: $header-color;
13
13
 
14
14
  @include media-query($on-laptop) {
15
15
  font-size: 4em;
@@ -69,12 +69,10 @@
69
69
  padding-top: 1em;
70
70
  padding-bottom: 1em;
71
71
  display: flex;
72
- /*border-top: 1px solid #f2f3f3;
73
- border-bottom: 1px solid #f2f3f3;*/
74
72
  }
75
73
 
76
74
  .pagination--pager.disabled {
77
- color: rgba(137, 140, 143, 0.5);
75
+ color: lighten($brand-color, 50%);
78
76
  pointer-events: none;
79
77
  cursor: not-allowed;
80
78
  }
@@ -97,13 +95,12 @@
97
95
 
98
96
  #comments, #comments-form {
99
97
  font-size: .9rem;
100
- color: darken($grey-color, 30%);
98
+ color: $grey-color-dark;
101
99
  }
102
100
 
103
101
  #comments article {
104
102
  display: flex;
105
103
  margin-top: 1em;
106
- border-bottom: 1px solid #f2f3f3;
107
104
 
108
105
  p {
109
106
  white-space: pre-wrap;
@@ -115,9 +112,41 @@
115
112
  }
116
113
  }
117
114
 
115
+ .comment-chain {
116
+ border-bottom: 1px solid #f2f3f3;
117
+ background-color: lighten($brand-color, 55%);//lighten($grey-color-light, 20%);
118
+
119
+ .sub-comment {
120
+ margin: 5%;
121
+ padding: 3%;
122
+ font-size: smaller;
123
+ background-color: $anti-color;
124
+
125
+ p {
126
+ margin-bottom: 0;
127
+ }
128
+
129
+ blockquote > p {
130
+ padding: 10px;
131
+ }
132
+
133
+ @include media-query($on-palm) {
134
+ .comment-image-wrapper {
135
+ display: none;
136
+ }
137
+ }
138
+ }
139
+ }
140
+
118
141
  #comments-header {
119
142
  color: darken($brand-color, 20%);
120
143
  border-bottom: 1px solid lighten($brand-color, 50%);
144
+ text-align: center;
145
+ font-size: 3em;
146
+
147
+ @include media-query($on-palm) {
148
+ font-size: 2em;
149
+ }
121
150
  }
122
151
 
123
152
  .comment-image-wrapper {
@@ -139,11 +168,16 @@
139
168
  .comment-meta {
140
169
  display: flex;
141
170
  color: $grey-color;
171
+
172
+ a {
173
+ color: $grey-color;
174
+ }
142
175
  }
143
176
 
144
177
  #comment-form {
145
178
  background: lighten($brand-color, 55%);
146
179
  color: darken($brand-color, 30%);
180
+ margin-top: 15px;
147
181
  font-size: .9rem;
148
182
  padding: 15px;
149
183
 
@@ -158,7 +192,7 @@
158
192
  box-sizing: border-box;
159
193
  font-family: $base-font-family;
160
194
  font-size: small;
161
- color: darken($grey-color, 25%);
195
+ color: $grey-color-dark;
162
196
  border: 1px solid lighten($brand-color, 50%);
163
197
  }
164
198
 
@@ -173,6 +207,7 @@
173
207
  textarea {
174
208
  height: 10rem;
175
209
  resize: vertical;
210
+ padding: 10px;
176
211
  }
177
212
 
178
213
  sup.required {
@@ -181,11 +216,10 @@
181
216
 
182
217
  #preview {
183
218
  font-size: small;
184
- color: darken($grey-color, 10%);
185
- background-color: white;
186
- margin-top: 1em;
219
+ color: $grey-color-dark;
220
+ padding: 10px;
187
221
  h1, h2, h3, h4, h5, h6 {
188
- color: darken($grey-color, 10%);
222
+ color: $grey-color-dark;
189
223
  margin: initial;
190
224
  }
191
225
  p {
data/_sass/_print.scss CHANGED
@@ -1,9 +1,12 @@
1
1
  @media print {
2
- /* your print styles go here */
3
- .site-header, .site-footer { display: none; }
4
- #disqus_thread { display: none; }
5
2
 
6
- body { background-image: none; }
7
- h1 { font-size: 18pt; }
3
+ .site-header,
4
+ .site-footer,
5
+ #disqus_thread,
6
+ #static-comments {
7
+ display: none;
8
+ }
9
+
10
+ h1 { font-size: 18pt; }
8
11
  h2 { font-size: 16pt; color: #000; }
9
12
  }
data/assets/css/main.scss CHANGED
@@ -39,10 +39,10 @@ $header-color: #14213d;
39
39
  /* Palett source:
40
40
  https://coolors.co/app/2b2d42-8d99ae-edf2f4-ef233c-d90429 */
41
41
  $brand-color: #d90429;
42
- $anti-color: #8d99ae;
42
+ $anti-color: white;
43
43
  $text-color: #2b2d42;
44
- $background-color: #ffffff; /* original one was edf2f4 */
45
- $header-color: #343434;//#343434;//#ef233c;
44
+ $background-color: #ffffff;
45
+ $header-color: #343434;
46
46
 
47
47
  $grey-color: gray;
48
48
  $grey-color-light: lighten($grey-color, 25%);
Binary file
Binary file
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: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mehdi Sadeghi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-19 00:00:00.000000000 Z
11
+ date: 2018-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -207,6 +207,8 @@ files:
207
207
  - assets/js/disqus.js
208
208
  - assets/js/main.js
209
209
  - assets/js/showdown.min.js
210
+ - assets/pimg/saaghiabout.jpg
211
+ - assets/pimg/saaghiquery.jpg
210
212
  - assets/uploads/dirtybike.jpg
211
213
  - assets/webfonts/fa-brands-400.eot
212
214
  - assets/webfonts/fa-brands-400.svg