summaryrefslogtreecommitdiff
path: root/source/_layouts/post.blade.php
blob: adecd6aeae5280af94f986ecd503dee0c284bdf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php use \Illuminate\Support\Str; ?>
@extends('_layouts.master')

@section('article')
    <header class="sm:flex sm:flex-row sm:justify-between p-4 pb-8 border-b border-green-100 border-dashed mb-8">
        <div>
            <h1 class="text-green-300 text-3xl font-bold">{{$page->title }}</h1>
            <p class="text-2xl text-gray-300">{{ $page->description }}</p>
        </div>
        <div class="mt-8 sm:mt-0 text-right flex flex-row sm:flex-col">
            <time class="inline-block p-2 order-2 sm:order-1 ml-2" datetime="{{ $page->getDate()->format('Y-m-d') }}">
                {{ $page->getDate()->format('M d, Y') }}
            </time> 
            <div class="order-1 sm:order-2">
                @foreach ($page->tags as $tag)
                    <a class="inline-block rounded py-2 px-4 {{Str::slug($tag) }}" href="/tags/{{ Str::slug($tag) }}">{{ $tag }}</a>
                @endforeach
            </div>
        </div>
    </header> 
    @yield('content')
    <nav class="mt-12 pt-8 flex justify-between text-2xl border-t border-green-700">
        @if ($page->getPrevious())
            <a href="{{ $page->getPrevious()->getPath() }}">&lt;&lt; {{ $page->getPrevious()->title }}</a>
        @endif
        @if ($page->getNext())
            <a href="{{ $page->getNext()->getPath() }}">{{ $page->getNext()->title }} &gt;&gt;</a>
        @endif
    </nav>
@endsection