summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorDavid T. Sadler <davidtsadler@googlemail.com>2020-02-26 21:54:33 +0000
committerDavid T. Sadler <davidtsadler@googlemail.com>2020-02-26 21:54:33 +0000
commit9ce9cf50af6b81c76b7acd9ef31dace11cee728b (patch)
treee6b697a4e865d655980fe12921189b1cc311dd9f /source
parent588aa1b58f49eb7eee453ffba6c7aa2d33171912 (diff)
Add post stub
Diffstat (limited to 'source')
-rw-r--r--source/_layouts/category.blade.php2
-rw-r--r--source/_partials/postStub.blade.php16
-rw-r--r--source/_posts/customizing-your-site.md2
-rw-r--r--source/index.blade.php2
4 files changed, 19 insertions, 3 deletions
diff --git a/source/_layouts/category.blade.php b/source/_layouts/category.blade.php
index bd62fd2..8232ad8 100644
--- a/source/_layouts/category.blade.php
+++ b/source/_layouts/category.blade.php
@@ -4,7 +4,7 @@
<h1>{{ $page->description }}</h1>
<ol>
@foreach ($page->posts($posts) as $post)
- <li><a href="{{ $post->getUrl() }}">{{$post->title }}</a></li>
+ @include('_partials.postStub')
@endforeach
</ol>
@endsection
diff --git a/source/_partials/postStub.blade.php b/source/_partials/postStub.blade.php
new file mode 100644
index 0000000..5f1af95
--- /dev/null
+++ b/source/_partials/postStub.blade.php
@@ -0,0 +1,16 @@
+<li class="lg:flex lg:flex-row lg:justify-between">
+ <a title="Go to post" href="{{ $post->getUrl() }}">
+ <h4>{{$post->title }}</h4>
+ <p>{{ $post->description }}</p>
+ </a>
+ <div class="text-right flex flex-row lg:flex-col">
+ <time class="order-2 lg:order-1 ml-2" datetime="{{ $post->getDate()->format('Y-m-d') }}">
+ {{ $post->getDate()->format('M d, Y') }}
+ </time>
+ <div class="order-1 lg:order-2">
+ @foreach ($post->categories as $category)
+ <a href="/categories/{{ $category }}">{{ $category }}</a>
+ @endforeach
+ </div>
+ </div>
+</li>
diff --git a/source/_posts/customizing-your-site.md b/source/_posts/customizing-your-site.md
index 894db6c..50b53a1 100644
--- a/source/_posts/customizing-your-site.md
+++ b/source/_posts/customizing-your-site.md
@@ -4,7 +4,7 @@ section: content
title: Customizing Your Site
date: 2018-12-24
description: Customize your site with CSS and JS
-categories: [configuration]
+categories: [configuration, feature]
featured: true
excerpt: This starter template comes pre-loaded with Tailwind CSS, a utility CSS framework that allows you to customize and build complex designs without touching a line of CSS.
---
diff --git a/source/index.blade.php b/source/index.blade.php
index 998f56a..bb919a4 100644
--- a/source/index.blade.php
+++ b/source/index.blade.php
@@ -7,7 +7,7 @@ pagination:
@section('article')
<ol>
@foreach ($pagination->items as $post)
- <li><a href="{{ $post->getUrl() }}">{{$post->title }}</a></li>
+ @include('_partials.postStub')
@endforeach
</ol>
<nav>