-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,152 +1,27 @@ | ||
{{! Author page; this file renders a tag page containing a list of the latest posts }} | ||
{{! Author page }} | ||
|
||
{{> head}} | ||
{{> navbar}} | ||
<main> | ||
|
||
{{! indicates the author's context }} | ||
{{#author}} | ||
|
||
{{! author featured image }} | ||
{{#featuredImage}} | ||
{{! checks if an image exists }} | ||
{{#if url}} | ||
<figure> | ||
<img | ||
src="{{url}}" | ||
{{! checks if the Responsive Images option (located in Site Settings -> Website Speed) is enabled }} | ||
{{#if @config.site.responsiveImages}} | ||
{{responsiveImageAttributes 'authorImage' srcset sizes}} | ||
{{/if}} | ||
{{! generates a native loading attribute; if the Media Lazy Load option (located in Site Settings -> Website Speed) is disabled, the loading attribute is not generated }} | ||
{{lazyload "lazy"}} | ||
height="{{height}}" | ||
width="{{width}}" | ||
alt="{{alt}}"> | ||
|
||
{{! checks if a caption and credits exist }} | ||
{{#checkIfAny caption credits}} | ||
<figcaption> | ||
{{caption}} | ||
{{credits}} | ||
</figcaption> | ||
{{/checkIfAny}} | ||
{{! /checks if a caption and credits exist }} | ||
|
||
</figure> | ||
{{/if}} | ||
{{! /checks if an image exists }} | ||
{{/featuredImage}} | ||
{{! /author featured image }} | ||
|
||
{{! check if an author avatar exists }} | ||
{{#if avatar}} | ||
<img | ||
src="{{avatarImage.url}}" | ||
{{ lazyload "eager" }} | ||
alt="{{avatarImage.alt}}" | ||
height="{{avatarImage.height}}" | ||
width="{{avatarImage.width}}"> | ||
{{/if}} | ||
{{! /check if an author avatar exists }} | ||
|
||
<h1> | ||
{{name}} | ||
<sup>({{postsNumber}})</sup> | ||
</h1> | ||
|
||
{{! check if an author description exists }} | ||
{{#if description}} | ||
<p>{{description}}</p> | ||
{{/if}} | ||
{{! /check if a author description exists }} | ||
|
||
{{! check if an author email address exists }} | ||
{{#if email}} | ||
<p>{{email}}</p> | ||
{{/if}} | ||
{{! /check if a author email address exists }} | ||
|
||
{{! check if an author website URL exists }} | ||
{{#if website}} | ||
<p>{{website}}</p> | ||
{{/if}} | ||
{{! /check if a author website URL exists }} | ||
|
||
{{/author}} | ||
{{! /indicates the author's context }} | ||
|
||
|
||
{{! loop that generates a list of posts }} | ||
{{#each posts}} | ||
<article> | ||
|
||
{{! featured image }} | ||
{{#featuredImage}} | ||
{{! checks if an image exists }} | ||
{{#if url}} | ||
<img | ||
src="{{url}}" | ||
{{! checks if the Responsive Images option (located in Site Settings -> Website Speed) is enabled }} | ||
{{#if @config.site.responsiveImages}} | ||
{{responsiveImageAttributes 'featuredImage' srcset sizes}} | ||
{{/if}} | ||
{{! generates a native loading attribute; if the Media Lazy Load option (located in Site Settings -> Website Speed) is disabled, the loading attribute is not generated }} | ||
{{lazyload "lazy"}} | ||
height="{{height}}" | ||
width="{{width}}" | ||
alt="{{alt}}"> | ||
{{/if}} | ||
{{! /checks if an image exists }} | ||
{{/featuredImage}} | ||
{{! /featured image }} | ||
|
||
{{! post title }} | ||
<h2> | ||
<a href="{{url}}">{{title}}</a> | ||
</h2> | ||
{{! /post title }} | ||
|
||
{{! post creation date }} | ||
<time datetime="{{date createdAt 'YYYY-MM-DDTHH:mm'}}"> | ||
{{date createdAt}} | ||
</time> | ||
{{! /post creation date }} | ||
|
||
{{! post author }} | ||
{{#author}} | ||
<img | ||
src="{{avatarImage.url}}" | ||
{{lazyload "lazy"}} | ||
alt="{{avatarImage.alt}}" | ||
height="{{avatarImage.height}}" | ||
width="{{avatarImage.width}}"> | ||
<a href="{{url}}">{{name}}</a> | ||
{{/author}} | ||
{{! /post author }} | ||
|
||
{{! main tag - if not selected, the first tag in the list of all tags | ||
will be displayed }} | ||
{{#if mainTag}} | ||
<a href="{{mainTag.url}}">{{mainTag.name}}</a> | ||
{{/if}} | ||
{{! /main tag }} | ||
|
||
{{! post excerpt - the Custom excerpt is generated when the Read More button is used when editing a post }} | ||
{{#if hasCustomExcerpt}} | ||
{{{ excerpt }}} | ||
{{else}} | ||
<p>{{{ excerpt }}}</p> | ||
{{/if}} | ||
{{! /post excerpt }} | ||
|
||
</article> | ||
{{/each}} | ||
{{! /loop that generates a list of posts }} | ||
|
||
</main> | ||
<aside> | ||
{{> sidebar}} | ||
</aside> | ||
|
||
{{> pagination}} | ||
{{> footer}} | ||
{{#author}} | ||
<div class="uk-section uk-background-cover uk-background-top-right" style="background-image: url({{asset "images/about-me-image.png"}})" uk-scrollspy="cls: uk-animation-fade"> | ||
<a id="about-me"></a> | ||
|
||
<div | ||
class="uk-container uk-container-expand" | ||
uk-height-match=".uk-overlay-primary > div"> | ||
<div class="uk-grid-large uk-child-width-1-2@m" uk-grid> | ||
<div> | ||
<div class="uk-padding uk-overlay-primary" uk-scrollspy="cls: uk-animation-slide-left; delay: 500"> | ||
<h2 class="uk-heading-divider">{{name}}</h2> | ||
|
||
<div class="uk-hidden@m">{{{description}}}</div> | ||
<div class="uk-visible@m uk-text-large">{{{description}}}</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{/author}} | ||
|
||
{{> footer}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters