Get index page to render basic info

The structure is not even close to being finished, and only looks decent on desktop.
This commit is contained in:
2023-01-10 00:36:16 +01:00
parent 9e86bbec3e
commit 1c4edf415c
3 changed files with 93 additions and 30 deletions

View File

@@ -1,48 +1,56 @@
{{!< default}}
<div class="ptheme-index-header_main unselectable" id="vantajs">
<div class="ptheme-index-header_main unselectable">
<h1>{{@site.title}}</h1>
</div>
<main>
<nav id="ptheme-global-navbar_primary" class="ptheme-global-navbar_primary unselectable">
{{navigation}}
</nav>
<div class="ptheme-content_main">
{{!-- Looping through every post --}}
{{#foreach posts}}
<article class="ptheme-index-post_article">
<a class="ptheme-index-post_article_link" href="{{url}}">
<div>
<div class="ptheme-index-post_feature-image-container">
{{#if feature_image}}
<img class="ptheme-index-post_feature-image" src="{{img_url feature_image size="m"}}" alt="{{title}}"/>
<a href="{{url}}">
<img class="ptheme-index-post_feature-image" src="{{img_url feature_image size="m"}}" alt="{{title}}"/>
</a>
{{/if}}
</div>
<div>
<header>
<p><span>{{primary_tag.name}}</span>
<time datetime="{{date published_at format='YYYY-MM-DD'}}">{{date published_at format="DD MMMM YYYY"}}</time>
</p>
<h3>{{title}}</h3>
</header>
<div class="ptheme-index-post_excerpt">
<p>
{{#foreach tags}}
<a href="{{url}}" title="{{name}}" class="tag tag-{{id}} {{slug}}"><b>{{name}}</b></a>{{#unless @last}}, {{/unless}}
{{/foreach}}
<time datetime="{{date published_at format='YYYY-MM-DD'}}">{{date published_at format="DD MMMM YYYY"}}</time>
</p>
<a href="{{url}}">
<header>
<h3>{{title}}</h3>
</header>
<section>
<p>{{excerpt words="26"}}</p>
</section>
</div>
<div>
<footer>
{{primary_author.name}}
<section>
<p>{{excerpt words="60"}}</p>
</section>
</a>
{{!-- author info disabled because i'm the only one posting here
<footer class="ptheme-index-post_footer">
{{#if primary_author.profile_image}}
<img src="{{img_url primary_author.profile_image size="xxs"}}"
<img class="ptheme-index-post_author-image" src="{{img_url primary_author.profile_image size="xxs"}}"
alt="{{title}}"/>{{/if}}
{{primary_author.name}}
</footer>
--}}
</div>
</a>
</article>
{{/foreach}}