_layouts/allAuthors.html in word-games-theme-1.9.5 vs _layouts/allAuthors.html in word-games-theme-1.9.6

- old
+ new

@@ -57,59 +57,78 @@ <div class="container"> <div class="row"> <div class="col-md-12"> <h1 class="mb-4 text-center authors-heading">Our Authors</h1> <div class="row"> - {% assign minCommonAuthor = 1 %} - {% assign sameAuthorCount = 0 %} + {%- if site.ezoicAds -%} + {%- assign column = "col-md-6" -%} + {%- else -%} + {%- assign column = "col-md-4" -%} + {%- endif -%} - {% assign posts = site.posts | where_exp:"post","post.url != page.url" %} + {%- if site.ezoicAds -%} + <div class="col-md-9 mx-auto"> + <div class="row"> + {%- endif -%} + {% assign minCommonAuthor = 1 %} + {% assign sameAuthorCount = 0 %} - {% assign seen_authors = '' %} - {% for post in site.posts %} - {% unless seen_authors contains post.author %} - {% assign seen_authors = seen_authors | append: post.author | append: ',' %} - <!-- Render your author here --> - {%- include /authors/authors.html -%} - {%- if authorName contains authorName -%} - <div class=" col-md-4 mb-4"> - <div class="authors-info"> - <a class="authors-image" - href="/authors/{{authorName | downcase | replace: ' ' , '-' }}"> - <img loading="lazy" src="{{image}}" alt="{{ authorName }}"> - </a> - <a class="authors-name" - href="/authors/{{authorName | downcase | replace: ' ' , '-' }}">{{authorName | - capitalize }}</a> - <a href="/blog" class="authors-posts-count">{{ site.posts | where: 'author', post.author - | size }} Posts</a> - <p class="authors-bio mt-3">{{bio}}</p> - </div> - </div> - {%- endif -%} - {% endunless %} - {% endfor %} + {% assign posts = site.posts | where_exp:"post","post.url != page.url" %} + {% assign seen_authors = '' %} + {% for post in site.posts %} + {% unless seen_authors contains post.author %} + {% assign seen_authors = seen_authors | append: post.author | append: ',' %} + <!-- Render your author here --> + {%- include /authors/authors.html -%} + {%- if authorName contains authorName -%} + <div class="{{column}} mb-4"> + <div class="authors-info"> + <a class="authors-image" + href="/authors/{{authorName | downcase | replace: ' ' , '-' }}"> + <img loading="lazy" src="{{image}}" alt="{{ authorName }}"> + </a> + <a class="authors-name" + href="/authors/{{authorName | downcase | replace: ' ' , '-' }}">{{authorName + | + capitalize }}</a> + <a href="/blog" class="authors-posts-count">{{ site.posts | where: 'author', + post.author + | size }} Posts</a> + <p class="authors-bio mt-3">{{bio}}</p> + </div> + </div> + {%- endif -%} + {% endunless %} + {% endfor %} - {% for post in posts %} - {%- include /authors/authors.html -%} - {%- if post.author contains authorName -%} - <div class="d-none col-md-4 mb-4"> - <div class="authors-info"> - <a class="authors-image" - href="/authors/{{authorName | downcase | replace: ' ' , '-' }}"> - <img loading="lazy" src="{{image}}" alt="{{ authorName }}"> - </a> - <a class="authors-name" - href="/authors/{{authorName | downcase | replace: ' ' , '-' }}">{{authorName | - capitalize }}</a> - <a href="/blog" class="authors-posts-count">{{ site.posts | where: 'author', post.author - | size }} Posts</a> - <p class="authors-bio mt-3">{{bio}}</p> + + {% for post in posts %} + {%- include /authors/authors.html -%} + {%- if post.author contains authorName -%} + <div class="d-none col-md-4 mb-4"> + <div class="authors-info"> + <a class="authors-image" + href="/authors/{{authorName | downcase | replace: ' ' , '-' }}"> + <img loading="lazy" src="{{image}}" alt="{{ authorName }}"> + </a> + <a class="authors-name" + href="/authors/{{authorName | downcase | replace: ' ' , '-' }}">{{authorName + | + capitalize }}</a> + <a href="/blog" class="authors-posts-count">{{ site.posts | where: 'author', + post.author + | size }} Posts</a> + <p class="authors-bio mt-3">{{bio}}</p> + </div> + </div> + {%- endif -%} + {% endfor %} + + {%- if site.ezoicAds -%} </div> </div> {%- endif -%} - {% endfor %} </div> </div> </div> </div> {% include section/count.html %} \ No newline at end of file