diff options
author | Bradley Taunt <bt@btxx.org> | 2024-05-26 08:33:15 -0400 |
---|---|---|
committer | Bradley Taunt <bt@btxx.org> | 2024-05-26 08:33:15 -0400 |
commit | 7bc33e9815001f96ef6b22c507cf9bf2194ec684 (patch) | |
tree | 222dd13a36f6ec18e766ba98744fc01cdea5eea7 /_layouts | |
parent | e417a818e207a6cca6e2f3c471611673ab836a62 (diff) |
Static placement of minima theme, minor customizations
Diffstat (limited to '_layouts')
-rw-r--r-- | _layouts/all_posts.html | 61 | ||||
-rw-r--r-- | _layouts/base.html | 20 | ||||
-rw-r--r-- | _layouts/home.html | 63 | ||||
-rw-r--r-- | _layouts/page.html | 14 | ||||
-rw-r--r-- | _layouts/post.html | 38 |
5 files changed, 196 insertions, 0 deletions
diff --git a/_layouts/all_posts.html b/_layouts/all_posts.html new file mode 100644 index 0000000..c81df2f --- /dev/null +++ b/_layouts/all_posts.html @@ -0,0 +1,61 @@ +--- +layout: base +--- + +<div class="home"> + {%- if page.title -%} + <h1 class="page-heading">{{ page.title }}</h1> + {%- endif -%} + + {{ content }} + + + {% if site.paginate %} + {% assign posts = paginator.posts %} + {% else %} + {% assign posts = site.posts %} + {% endif %} + + + {%- if posts.size > 0 -%} + {%- if page.list_title -%} + <h2 class="post-list-heading">{{ page.list_title }}</h2> + {%- endif -%} + <ul class="post-list"> + {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%} + {%- for post in posts -%} + <li> + <span class="post-meta">{{ post.date | date: date_format }}</span> + <h3> + <a class="post-link" href="{{ post.url | relative_url }}"> + {{ post.title | escape }} + </a> + </h3> + {%- if site.show_excerpts -%} + {{ post.excerpt }} + {%- endif -%} + </li> + {%- endfor -%} + </ul> + + {% if site.paginate %} + <div class="pager"> + <ul class="pagination"> + {%- if paginator.previous_page %} + <li><a href="{{ paginator.previous_page_path | relative_url }}" class="previous-page">{{ paginator.previous_page }}</a></li> + {%- else %} + <li><div class="pager-edge">•</div></li> + {%- endif %} + <li><div class="current-page">{{ paginator.page }}</div></li> + {%- if paginator.next_page %} + <li><a href="{{ paginator.next_page_path | relative_url }}" class="next-page">{{ paginator.next_page }}</a></li> + {%- else %} + <li><div class="pager-edge">•</div></li> + {%- endif %} + </ul> + </div> + {%- endif %} + + {%- endif -%} + +</div> diff --git a/_layouts/base.html b/_layouts/base.html new file mode 100644 index 0000000..58e141b --- /dev/null +++ b/_layouts/base.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html lang="{{ page.lang | default: site.lang | default: "en" }}"> + + {%- include head.html -%} + + <body> + + {%- include header.html -%} + + <main class="page-content" aria-label="Content"> + <div class="wrapper"> + {{ content }} + </div> + </main> + + {%- include footer.html -%} + + </body> + +</html> diff --git a/_layouts/home.html b/_layouts/home.html new file mode 100644 index 0000000..34dc79b --- /dev/null +++ b/_layouts/home.html @@ -0,0 +1,63 @@ +--- +layout: base +--- + +<div class="home"> + {%- if page.title -%} + <h1 class="page-heading">{{ page.title }}</h1> + {%- endif -%} + + {{ content }} + + + {% if site.paginate %} + {% assign posts = paginator.posts %} + {% else %} + {% assign posts = site.posts %} + {% endif %} + + + {%- if posts.size > 0 -%} + {%- if page.list_title -%} + <h2 class="post-list-heading">{{ page.list_title }}</h2> + {%- endif -%} + <ul class="post-list"> + {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%} + {%- for post in site.posts | limit: 5 -%} + <li> + <span class="post-meta">{{ post.date | date: date_format }}</span> + <h3> + <a class="post-link" href="{{ post.url | relative_url }}"> + {{ post.title | escape }} + </a> + </h3> + {%- if site.show_excerpts -%} + {{ post.excerpt }} + {%- endif -%} + </li> + {%- endfor -%} + </ul> + + {% if site.paginate %} + <div class="pager"> + <ul class="pagination"> + {%- if paginator.previous_page %} + <li><a href="{{ paginator.previous_page_path | relative_url }}" class="previous-page">{{ paginator.previous_page }}</a></li> + {%- else %} + <li><div class="pager-edge">•</div></li> + {%- endif %} + <li><div class="current-page">{{ paginator.page }}</div></li> + {%- if paginator.next_page %} + <li><a href="{{ paginator.next_page_path | relative_url }}" class="next-page">{{ paginator.next_page }}</a></li> + {%- else %} + <li><div class="pager-edge">•</div></li> + {%- endif %} + </ul> + </div> + {%- endif %} + + <a href="/posts">See All Posts →</a> + + {%- endif -%} + +</div> diff --git a/_layouts/page.html b/_layouts/page.html new file mode 100644 index 0000000..18544b4 --- /dev/null +++ b/_layouts/page.html @@ -0,0 +1,14 @@ +--- +layout: base +--- +<article class="post"> + + <header class="post-header"> + <h1 class="post-title">{{ page.title | escape }}</h1> + </header> + + <div class="post-content"> + {{ content }} + </div> + +</article> diff --git a/_layouts/post.html b/_layouts/post.html new file mode 100644 index 0000000..dc71866 --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,38 @@ +--- +layout: base +--- +<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting"> + + <header class="post-header"> + <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1> + <p class="post-meta"> + {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%} + <time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished"> + {{ page.date | date: date_format }} + </time> + {%- if page.modified_date -%} + ~ + {%- assign mdate = page.modified_date | date_to_xmlschema -%} + <time class="dt-modified" datetime="{{ mdate }}" itemprop="dateModified"> + {{ mdate | date: date_format }} + </time> + {%- endif -%} + {%- if page.author -%} + • {% for author in page.author %} + <span itemprop="author" itemscope itemtype="http://schema.org/Person"> + <span class="p-author h-card" itemprop="name">{{ author }}</span></span> + {%- if forloop.last == false %}, {% endif -%} + {% endfor %} + {%- endif -%}</p> + </header> + + <div class="post-content e-content" itemprop="articleBody"> + {{ content }} + </div> + + {%- if site.disqus.shortname -%} + {%- include disqus_comments.html -%} + {%- endif -%} + + <a class="u-url" href="{{ page.url | relative_url }}" hidden></a> +</article> |