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 App_Data
is-cache
## Ignore Visual Studio temporary files, build results, and ## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons. ## 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,53 +1,59 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ Culture.Name }}"> <html lang="{{ Culture.Name }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{% page_title Site.SiteName, position: "before", separator: " - " %}</title> <head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% resources type: "Meta" %} <title>{% page_title Site.SiteName, position: "before", separator: " - " %}</title>
{% link type: "image/x-icon", rel: "shortcut icon", href: "~/BenRameyTheme/assets/favicon.ico" %} {% resources type: "Meta" %}
{% style name: "benrameytheme" %} {% link type: "image/x-icon", rel: "shortcut icon", href: "~/BenRameyTheme/assets/favicon.ico" %}
{% resources type: "HeadLink" %} {% style name: "benrameytheme" %}
{% resources type: "Stylesheet" %}
{% resources type: "HeadScript" %} {% resources type: "HeadLink" %}
</head> {% resources type: "Stylesheet" %}
<body dir="{{ Culture.Dir }}"> {% resources type: "HeadScript" %}
<header> </head>
<div class="container">
<div class="d-flex justify-content-between align-item-center"> <body dir="{{ Culture.Dir }}">
<a <header>
href="/" <div class="container">
class="d-flex justify-content-start align-items-center me-2 text-decoration-none" <div class="d-flex justify-content-between align-item-center">
title="Home"> <a href="/" class="d-flex justify-content-start align-items-center me-2 text-decoration-none" title="Home">
<img <img src="https://en.gravatar.com/userimage/738990/32d8e61848233a67f5e02dcc43be0ff8.jpeg" alt="Gravatar"
src="https://en.gravatar.com/userimage/738990/32d8e61848233a67f5e02dcc43be0ff8.jpeg" width="40" height="40" />
alt="Gravatar" <span class="ms-2">{{ Site.SiteName }}</span>
width="40" </a>
height="40" /> <div class="d-none d-sm-flex flex-column justify-content-around ms-2">
<span class="ms-2">{{ Site.SiteName }}</span> <small>{{ Site.Tagline }}</small>
</a>
<div class="d-none d-sm-flex flex-column justify-content-around ms-2">
<small>{{ Site.Tagline }}</small>
</div>
</div>
</div> </div>
</header> </div>
</div>
</header>
<main> <main>
<div class="container"> <div class="container">
{% render_body %} {% render_body %}
</div> </div>
</main> </main>
<footer> <footer class="footer">
{% render_section "Footer", required: false %} <div class="container">
</footer> <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> </html>