appscms-tools-theme 4.2.7 → 4.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -54,16 +54,20 @@
54
54
  <p class="author_bio mb-0">{{featureAuthorBio}}</p>
55
55
  </div>
56
56
  </div>
57
- {%- endif %} {%- assign contributors = featureData.contributors |
57
+ {%- endif %}
58
+
59
+
60
+
61
+ {%- assign contributors = featureData.contributors |
58
62
  uniq: 'name' -%} {%- if contributors.size > 0 -%}
59
63
  <h3 class="mb-4 w-100 text-center authors-heading font-weight-bolder">
60
64
  Contributors
61
65
  </h3>
62
66
  <div class="d-flex justify-content-center w-100" style="gap: 10px">
63
67
  {%- for contributor in contributors -%} {%- assign
64
- featureContributorData = contributor.name | split: " " -%} {%-
65
- assign featureContributorData = featureContributorData.first |
66
- downcase -%} {%- assign collectionData = [featureContributorData]
68
+ featureContributorData = contributor.name | split: " " -%}
69
+ {%- assign featureContributorData = featureContributorData.first | downcase -%}
70
+ {%- assign collectionData = [featureContributorData]
67
71
  -%} {%- for item in collectionData -%} {%- if forloop.index == 1 -%}
68
72
  {%- assign featureContributorDataName = item -%} {%- endif -%} {%-
69
73
  if forloop.index == 2 -%} {%- assign featureContributorDataImage =
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
- {% include appscms/head/bloghead.html %}
3
+ {% include appscms/head/bloghead.html %}
4
4
 
5
5
  <style>
6
6
  .author-page {
@@ -60,7 +60,7 @@
60
60
 
61
61
  .bio-desc {
62
62
  margin: 0 0 34px;
63
- font-size:17px;
63
+ font-size: 17px;
64
64
  color: var(--mid-gray);
65
65
  }
66
66
 
@@ -151,21 +151,30 @@
151
151
 
152
152
  <body>
153
153
  {%- include appscms/navbars/navbar.html -%} {%- include
154
- appscms/navbars/toolbar.html -%}
154
+ appscms/navbars/toolbar.html -%}
155
155
  <section class="author-page">
156
156
  <div class="container-fluid">
157
157
  <div class="row">
158
158
  <div class="col-md-4 left-sidebar">
159
159
  <div class="author-bio-data">
160
160
  {% assign posts = site.posts | where_exp:"post","post.url != page.url" %}
161
- {% for post in posts %}
162
- {%- include /authors/authors.html -%}
163
- {% if authorName contains page.authorName %}
164
- {%- assign a = authorName -%}
165
- {%- assign authorPick = image -%}
166
- {%- assign authorAbout = bio -%}
161
+ {%- assign pageAuthorName = page.authorName | split: " " -%}
162
+ {%- assign pageAuthorNameFirst = pageAuthorName.first | downcase -%}
163
+ {%- assign collectionData = [pageAuthorNameFirst] -%}
164
+ {%- for item in collectionData -%}
165
+ {%- if forloop.index == 1 -%}
166
+ {%- assign a = item -%}
167
167
  {%- endif -%}
168
- {% endfor %}
168
+ {%- if forloop.index == 2 -%}
169
+ {%- assign authorPick = item -%}
170
+ {%- endif -%}
171
+ {%- if forloop.index == 3 -%}
172
+ {%- assign authorAbout = item -%}
173
+ {%- endif -%}
174
+ {%- if forloop.index == 4 -%}
175
+ {%- assign authorTwitter = item -%}
176
+ {%- endif -%}
177
+ {%- endfor -%}
169
178
 
170
179
  {%- if a -%}
171
180
  <div class="author-detials">
@@ -177,7 +186,7 @@
177
186
  {%- if site.name -%}
178
187
  <div class="websiteName mt-5 ml-5">
179
188
  <h3 class="website-label">Website</h3>
180
- <p class="website-name"><a href="{{site.name}}">{{site.name}}</a></p>
189
+ <p class="website-name"><a href="{{site.url}}">{{site.url}}</a></p>
181
190
  </div>
182
191
  {%- endif -%}
183
192
 
@@ -203,6 +212,14 @@
203
212
  {%- endif -%}
204
213
 
205
214
 
215
+ <div class="websiteName mt-5 ml-5">
216
+ <h3 class="website-label">List of All Authors</h3>
217
+ <br>
218
+ <p class="website-name"><a href="/authors">Our Authors</a></p>
219
+ </div>
220
+
221
+
222
+ <!-- Contributor Feature show -->
206
223
 
207
224
  {% assign already_run = false %}
208
225
  {% assign already_run2 = false %}
@@ -286,6 +303,8 @@
286
303
  {% endif %}
287
304
  {% endfor %}
288
305
  </ol>
306
+
307
+
289
308
  </div>
290
309
  </div>
291
310
  <div class="col-md-8 right-sidebar">
@@ -296,7 +315,11 @@
296
315
  </div>
297
316
  {%- endif -%}
298
317
 
318
+ {% assign author_posts = site.posts | where: 'author', page.label %}
319
+ {% if author_posts.size > 0 %}
299
320
  <h3 class="mb-4 articles-label">Authored Articles</h3>
321
+ {%- endif -%}
322
+
300
323
  <div class="row">
301
324
  {% assign posts = site.posts | where_exp:"post","post.url != page.url" %}
302
325
  {% for post in posts %}
@@ -325,7 +348,9 @@
325
348
  {% endif %}
326
349
  <div class="author-meta">
327
350
  <span class="post-name">
328
- <a target="_blank" href="/authors/{{authorName | downcase | replace: ' ' , '-' }}">{{authorName | capitalize }}</a>
351
+ <a target="_blank"
352
+ href="/authors/{{authorName | downcase | replace: ' ' , '-' }}">{{authorName | capitalize
353
+ }}</a>
329
354
  </span><br>
330
355
  <span class="post-date">{{post.date | date_to_string }}</span>
331
356
  </div>
@@ -385,7 +410,9 @@
385
410
  {% endif %}
386
411
  <div class="author-meta">
387
412
  <span class="post-name">
388
- <a target="_blank" href="/authors/{{authorName | downcase | replace: ' ' , '-' }}">{{authorName | capitalize }}</a>
413
+ <a target="_blank"
414
+ href="/authors/{{authorName | downcase | replace: ' ' , '-' }}">{{authorName | capitalize
415
+ }}</a>
389
416
  </span><br>
390
417
  <span class="post-date">{{post.date | date_to_string }}</span>
391
418
  </div>
@@ -402,8 +429,11 @@
402
429
  </div>
403
430
  </div>
404
431
  </section>
432
+
433
+
434
+
405
435
  {% include script.html %}
406
- {%- include appscms/footer/static-footer.html -%}
436
+ {%- include appscms/footer/static-footer.html -%}
407
437
  </body>
408
438
 
409
439
  </html>
@@ -1,132 +1,168 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
- {% include appscms/head/bloghead.html %}
4
- <style>
5
- .authors-heading {
6
- font-size: 50px;
7
- font-weight: 900;
8
- }
9
-
10
- .authors-info {
11
- padding: 32px;
12
- display: flex;
13
- flex-direction: column;
14
- justify-content: center;
15
- text-align: center;
16
- height: 100%;
17
- width: 100%;
18
- background: white;
19
- box-shadow: 2px 4px 8px #d0cdcd;
20
- border-radius: 15px;
21
- margin-bottom: 100px;
22
- }
23
-
24
- .authors-info .authors-image img {
25
- display: inline-block;
26
- width: 150px;
27
- height: 150px;
28
- padding: 8px;
29
- border-radius: 50%;
30
- object-fit: cover;
31
- user-select: none;
32
- }
33
-
34
- .authors-info .authors-name {
35
- margin: 1rem;
36
- font-size: 23px;
37
- color: #000;
38
- font-weight: 600;
39
- }
40
-
41
- .authors-info .authors-bio {
42
- color: #121315;
43
- font-size: 14px;
44
- }
45
-
46
- .authors-posts-count {
47
- font-size: 16px;
48
- font-weight: 400;
49
- color: #000 !important;
50
- text-decoration: underline !important;
51
- }
52
- </style>
53
-
54
- <body>
55
- {%- include appscms/navbars/navbar.html -%} {%- include
56
- appscms/navbars/toolbar.html -%}
57
- <section class="authors-list" style="margin-top: 50px">
58
- <div class="container">
59
- <div class="row">
60
- <div class="col-md-12">
61
- <h1 class="mb-5 text-center authors-heading">Our Authors</h1>
62
- <div class="row">
63
- {% assign minCommonAuthor = 1 %} {% assign sameAuthorCount = 0 %}
64
- {% assign posts = site.posts | where_exp:"post","post.url !=
65
- page.url" %} {% assign seen_authors = '' %} {% for post in
66
- site.posts %} {% unless seen_authors contains post.author %} {%
67
- assign seen_authors = seen_authors | append: post.author | append:
68
- ',' %}
69
- <!-- Render your author here -->
70
- {%- include /authors/authors.html -%} {%- if authorName contains
71
- authorName -%}
72
- <div class="col-md-4 mb-5">
73
- <div class="authors-info">
74
- <a
75
- class="authors-image"
76
- href="/authors/{{authorName | downcase | replace: ' ' , '-' }}"
77
- >
78
- <img
79
- loading="lazy"
80
- src="{{image}}"
81
- alt="{{ authorName }}"
82
- />
83
- </a>
84
- <a
85
- class="authors-name"
86
- href="/authors/{{authorName | downcase | replace: ' ' , '-' }}"
87
- >{{authorName | capitalize }}</a
88
- >
89
- <a href="/blog" class="authors-posts-count"
90
- >{{ site.posts | where: 'author', post.author | size }}
91
- Posts</a
92
- >
93
- <p class="authors-bio mt-3">{{bio}}</p>
94
- </div>
95
- </div>
96
- {%- endif -%} {% endunless %} {% endfor %} {% for post in posts %}
97
- {%- include /authors/authors.html -%} {%- if post.author contains
98
- authorName -%}
99
- <div class="d-none col-md-4 mb-4">
100
- <div class="authors-info">
101
- <a
102
- class="authors-image"
103
- href="/authors/{{authorName | downcase | replace: ' ' , '-' }}"
104
- >
105
- <img
106
- loading="lazy"
107
- src="{{image}}"
108
- alt="{{ authorName }}"
109
- />
110
- </a>
111
- <a
112
- class="authors-name"
113
- href="/authors/{{authorName | downcase | replace: ' ' , '-' }}"
114
- >{{authorName | capitalize }}</a
115
- >
116
- <a href="/blog" class="authors-posts-count"
117
- >{{ site.posts | where: 'author', post.author | size }}
118
- Posts</a
119
- >
120
- <p class="authors-bio mt-3">{{bio}}</p>
121
- </div>
3
+ {% include appscms/head/bloghead.html %}
4
+ <style>
5
+ .authors-heading {
6
+ font-size: 50px;
7
+ font-weight: 900;
8
+ }
9
+
10
+ .authors-info {
11
+ padding: 32px;
12
+ display: flex;
13
+ flex-direction: column;
14
+ justify-content: center;
15
+ text-align: center;
16
+ height: 100%;
17
+ width: 100%;
18
+ background: white;
19
+ box-shadow: 2px 4px 8px #d0cdcd;
20
+ border-radius: 15px;
21
+ margin-bottom: 100px;
22
+ }
23
+
24
+ .authors-info .authors-image img {
25
+ display: inline-block;
26
+ width: 150px;
27
+ height: 150px;
28
+ padding: 8px;
29
+ border-radius: 50%;
30
+ object-fit: cover;
31
+ user-select: none;
32
+ }
33
+
34
+ .authors-info .authors-name {
35
+ margin: 1rem;
36
+ font-size: 23px;
37
+ color: #000;
38
+ font-weight: 600;
39
+ }
40
+
41
+ .authors-info .authors-bio {
42
+ color: #121315;
43
+ font-size: 14px;
44
+ }
45
+
46
+ .authors-posts-count {
47
+ font-size: 16px;
48
+ font-weight: 400;
49
+ color: #000 !important;
50
+ text-decoration: underline !important;
51
+ }
52
+ </style>
53
+
54
+ <body>
55
+ {%- include appscms/navbars/navbar.html -%} {%- include
56
+ appscms/navbars/toolbar.html -%}
57
+ <section class="authors-list" style="margin-top: 50px">
58
+ <div class="container">
59
+ <div class="row">
60
+ <div class="col-md-12">
61
+ <h1 class="mb-5 text-center authors-heading">Our Authors</h1>
62
+ <div class="row">
63
+ {% assign authorsList = "" | split: "" %}
64
+ {% assign folder_path = '' %}
65
+ {% for file in site.pages %}
66
+ {% if file.path contains folder_path %}
67
+ {% assign pageData = file | parse_yaml %}
68
+ {% assign lang = pageData.lang %}
69
+ {% assign foldername = pageData.folderName %}
70
+ {% assign filename = pageData.fileName %}
71
+ {% assign permalink = pageData.permalink %}
72
+ {% assign json_data = site.data[foldername][lang][filename] | json %}
73
+
74
+ {% for author in json_data.author %}
75
+ {%- assign splitAuthor = author | split: " " -%}
76
+ {% assign featureAuthorFirst = splitAuthor.first | downcase %}
77
+
78
+ {%- assign collectionData = [featureAuthorFirst] -%}
79
+ {%- for item in collectionData -%}
80
+ {%- if forloop.index == 1 -%}
81
+ {%- assign seoTeamAuthorName = item -%}
82
+ {%- assign authorsList = authorsList | push: seoTeamAuthorName -%}
83
+ {%- endif -%}
84
+ {%- endfor -%}
85
+ {% endfor %}
86
+ {% endif %}
87
+ {%- endfor -%}
88
+
89
+ {% assign contributorAuthors = "" | split: "" %}
90
+ {% assign folder_path = '' %}
91
+ {% for file in site.pages %}
92
+ {% if file.path contains folder_path %}
93
+ {% assign pageData = file | parse_yaml %}
94
+ {% assign lang = pageData.lang %}
95
+ {% assign foldername = pageData.folderName %}
96
+ {% assign filename = pageData.fileName %}
97
+ {% assign permalink = pageData.permalink %}
98
+ {% assign json_data = site.data[foldername][lang][filename] | json %}
99
+
100
+ {% for contributor in json_data.contributors %}
101
+ {%- assign splitAuthor = contributor.name | split: " " -%}
102
+ {% assign contributorAuthor = splitAuthor.first | downcase %}
103
+ {%- assign collectionData = [contributorAuthor] -%}
104
+ {%- for item in collectionData -%}
105
+ {%- if forloop.index == 1 -%}
106
+ {%- assign contributorAuthor = item -%}
107
+ {%- assign contributorAuthors = contributorAuthors | push: contributorAuthor -%}
108
+ {% assign mergedArray = authorsList | concat: contributorAuthors %}
109
+ {% endif %}
110
+ {%- endfor -%}
111
+ {% endfor %}
112
+ {% endif %}
113
+ {% endfor %}
114
+
115
+ {% assign postAuthors = "" | split: "" %}
116
+ {%- for post in site.posts -%}
117
+ {%- assign postAuthors = postAuthors | push: post.author -%}
118
+ {% assign final_array = mergedArray | concat: postAuthors %}
119
+ {%- endfor -%}
120
+
121
+
122
+ {% assign uniqueArray = final_array | uniq %}
123
+ {% for author in uniqueArray %}
124
+ {%- assign splitAuthor = author | split: " " -%}
125
+ {%- assign authorFirst = splitAuthor.first | downcase -%}
126
+ {%- assign collectionData = [authorFirst] -%}
127
+ {%- for item in collectionData -%}
128
+ {%- if forloop.index == 1 -%}
129
+ {%- assign authorName = item -%}
130
+ {%- elsif forloop.index == 2 -%}
131
+ {%- assign image = item -%}
132
+ {%- elsif forloop.index == 3 -%}
133
+ {%- assign bio = item -%}
134
+ {%- endif -%}
135
+ {%- endfor -%}
136
+ <div class="col-md-4 mb-5">
137
+ <div class="authors-info">
138
+ <a class="authors-image" href="/authors/{{authorName | downcase | replace: ' ', '-' }}">
139
+ <img loading="lazy" src="{{image}}" alt="{{ authorName }}" />
140
+ </a>
141
+ <a class="authors-name" href="/authors/{{authorName | downcase | replace: ' ', '-' }}">{{authorName |
142
+ capitalize }}</a>
143
+
144
+ {% assign authorPosts = site.posts | where: 'author', author %}
145
+ {% assign postCount = authorPosts | size %}
146
+
147
+ {% if postCount > 0 %}
148
+ <a href="/blog" class="authors-posts-count">{{ postCount }} Posts</a>
149
+ {% endif %}
150
+
151
+ <p class="authors-bio mt-3">{{bio}}</p>
122
152
  </div>
123
- {%- endif -%} {% endfor %}
124
153
  </div>
154
+ {% endfor %}
125
155
  </div>
126
156
  </div>
127
157
  </div>
128
- {% include section/count.html %}
129
- </section>
130
- {%- include appscms/footer/static-footer.html -%} {% include script.html %}
131
- </body>
158
+ </div>
159
+ {% include section/count.html %}
160
+ </section>
161
+ {%- include appscms/footer/static-footer.html -%} {% include script.html %}
162
+ </body>
163
+
132
164
  </html>
165
+
166
+
167
+
168
+ <!-- author name should be same in feature json or blog posts json -->
data/_layouts/author.html CHANGED
@@ -199,6 +199,12 @@
199
199
  {%- endif -%}
200
200
 
201
201
 
202
+ <div class="websiteName mt-5 ml-5">
203
+ <h3 class="website-label">List of All Authors</h3>
204
+ <br>
205
+ <p class="website-name"><a href="/authors">Our Authors</a></p>
206
+ </div>
207
+
202
208
 
203
209
  {% assign already_run = false %}
204
210
  {% assign already_run2 = false %}
@@ -305,9 +305,13 @@
305
305
  {%- else -%} {%- include section/recent_posts.html -%} {%- endif -%} {%-
306
306
  endif -%} {%- if site.customblogdata -%} {%- if categories.size> 0 or
307
307
  tags.size>0-%} {%- include customblog/relatedposts.html -%} {%- else -%} {%-
308
- include customblog/recentposts.html -%} {% endif %} {%- endif -%} {%- if
309
- featureData.author.size > 0 -%} {% include
310
- featurePageAuthors/featurePageAuthors.html %} {%- endif -%} {% include
308
+ include customblog/recentposts.html -%} {% endif %} {%- endif -%}
309
+
310
+ {%- if featureData.author.size > 0 -%}
311
+ {% include featurePageAuthors/featurePageAuthors.html %}
312
+ {%- endif -%}
313
+
314
+ {% include
311
315
  footer/index.html %} {%- if site.customCode -%} {%- include customCode.html
312
316
  -%} {%- endif -%} {% include script.html %}
313
317