Much progress on templates

This commit is contained in:
2023-04-01 17:28:12 -05:00
parent f876e949a9
commit 99093749bc
8 changed files with 102 additions and 41 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
App_Data
is-cache
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

View File

@@ -0,0 +1,13 @@
{% for item in Model.ContentItems %}
{{ item | shape_build_display: "Summary" | shape_render }}
{% endfor %}
{% assign previousText = "← Newer Posts" | t %}
{% assign nextText = "Older Posts →" | t %}
{% assign previousClass = "previous" | t %}
{% assign nextClass = "next" | t %}
{% shape_pager Model.Pager previous_text: previousText, next_text: nextText
, previous_class: previousClass, next_class: nextClass %}
{{ Model.Pager | shape_render }}

View File

@@ -0,0 +1,9 @@
<nav class="post-categories">
<span>{{ "posted in" | t }}:</span>
{% assign categoryTerms = Model.Field | taxonomy_terms %}
{% for categoryTerm in categoryTerms %}
{% a display_for: categoryTerm %}
{{ categoryTerm.DisplayText }}
{% enda %}
{% endfor %}
</nav>

View File

@@ -0,0 +1,8 @@
<nav class="post-tags">
{% assign tagTerms = Model.Field | taxonomy_terms %}
{% for tagTerm in tagTerms %}
{% a display_for: tagTerm %}
#{{ tagTerm }}
{% enda %}
{% endfor %}
</nav>

View File

@@ -0,0 +1,3 @@
<article>
{{ Model.Content | shape_render }}
</article>

View File

@@ -0,0 +1,20 @@
<article class="post">
<h1 class="post-title">{{ Model.ContentItem.DisplayText }}</h1>
<div class="post-info d-flex justify-content-start">
{% assign postDateTime = "DateTime" | shape_new: class: "post-date", utc: Model.ContentItem.CreatedUtc, format: "%a
%b %e, %Y" %}
{{ postDateTime | shape_render }}
{{ Model.Content.BlogPost-Tags | shape_render }}
{{ Model.Content.BlogPost-Category | shape_render }}
</div>
<div>
{{ Model.Content.MarkdownBodyPart | shape_render }}
</div>
</article>
<section class="comments">
<a id="comments-section">
<h2>Comments</h2>
</a>
</section>

View File

@@ -0,0 +1 @@
<time dateTime="{{ Model.Utc }}" class="{{ Model.Class }}">{{ Model.Utc | date: Model.Format }}</time>

View File

@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="{{ Culture.Name }}">
<head>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@@ -15,20 +16,15 @@
{% resources type: "HeadLink" %}
{% resources type: "Stylesheet" %}
{% resources type: "HeadScript" %}
</head>
<body dir="{{ Culture.Dir }}">
</head>
<body dir="{{ Culture.Dir }}">
<header>
<div class="container">
<div class="d-flex justify-content-between align-item-center">
<a
href="/"
class="d-flex justify-content-start align-items-center me-2 text-decoration-none"
title="Home">
<img
src="https://en.gravatar.com/userimage/738990/32d8e61848233a67f5e02dcc43be0ff8.jpeg"
alt="Gravatar"
width="40"
height="40" />
<a href="/" class="d-flex justify-content-start align-items-center me-2 text-decoration-none" title="Home">
<img src="https://en.gravatar.com/userimage/738990/32d8e61848233a67f5e02dcc43be0ff8.jpeg" alt="Gravatar"
width="40" height="40" />
<span class="ms-2">{{ Site.SiteName }}</span>
</a>
<div class="d-none d-sm-flex flex-column justify-content-around ms-2">
@@ -44,10 +40,20 @@
</div>
</main>
<footer>
{% render_section "Footer", required: false %}
<footer class="footer">
<div class="container">
<hr />
<small>
&copy;
{% assign year = "now" | date: "%Y" %}
<time dateTime="{{ year }}">{{ year }}</time>
All rights reserved.
</small>
</div>
</footer>
{% resources type: "FootScript" %}</body>
</head>
{% resources type: "FootScript" %}
</body>
</head>
</html>