summaryrefslogtreecommitdiff
path: root/source/_layouts
diff options
context:
space:
mode:
Diffstat (limited to 'source/_layouts')
-rw-r--r--source/_layouts/master.blade.php80
-rw-r--r--source/_layouts/post.blade.php50
2 files changed, 14 insertions, 116 deletions
diff --git a/source/_layouts/master.blade.php b/source/_layouts/master.blade.php
index 039fa82..33b32cc 100644
--- a/source/_layouts/master.blade.php
+++ b/source/_layouts/master.blade.php
@@ -1,74 +1,16 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <meta http-equiv="x-ua-compatible" content="ie=edge">
- <meta name="description" content="{{ $page->meta_description ?? $page->siteDescription }}">
-
- <meta property="og:title" content="{{ $page->title ? $page->title . ' | ' : '' }}{{ $page->siteName }}"/>
- <meta property="og:type" content="website" />
- <meta property="og:url" content="{{ $page->getUrl() }}"/>
- <meta property="og:description" content="{{ $page->siteDescription }}" />
-
- <title>{{ $page->title ? $page->title . ' | ' : '' }}{{ $page->siteName }}</title>
-
- <link rel="home" href="{{ $page->baseUrl }}">
- <link rel="icon" href="/favicon.ico">
- <link href="/blog/feed.atom" type="application/atom+xml" rel="alternate" title="{{ $page->siteName }} Atom Feed">
-
- @stack('meta')
-
- @if ($page->production)
- <!-- Insert analytics code here -->
- @endif
-
- <link href="https://fonts.googleapis.com/css?family=Nunito+Sans:300,300i,400,400i,700,700i,800,800i" rel="stylesheet">
<link rel="stylesheet" href="{{ mix('css/main.css', 'assets/build') }}">
</head>
-
- <body class="flex flex-col justify-between min-h-screen bg-gray-100 text-gray-800 leading-normal font-sans">
- <header class="flex items-center shadow bg-white border-b h-24 py-4" role="banner">
- <div class="container flex items-center max-w-8xl mx-auto px-4 lg:px-8">
- <div class="flex items-center">
- <a href="/" title="{{ $page->siteName }} home" class="inline-flex items-center">
- <img class="h-8 md:h-10 mr-3" src="/assets/img/logo.svg" alt="{{ $page->siteName }} logo" />
-
- <h1 class="text-lg md:text-2xl text-blue-800 font-semibold hover:text-blue-600 my-0">{{ $page->siteName }}</h1>
- </a>
- </div>
-
- <div id="vue-search" class="flex flex-1 justify-end items-center">
- <search></search>
-
- @include('_nav.menu')
-
- @include('_nav.menu-toggle')
- </div>
- </div>
- </header>
-
- @include('_nav.menu-responsive')
-
- <main role="main" class="flex-auto w-full container max-w-4xl mx-auto py-16 px-6">
- @yield('body')
- </main>
-
- <footer class="bg-white text-center text-sm mt-12 py-4" role="contentinfo">
- <ul class="flex flex-col md:flex-row justify-center list-none">
- <li class="md:mr-2">
- &copy; <a href="https://tighten.co" title="Tighten website">Tighten</a> {{ date('Y') }}.
- </li>
-
- <li>
- Built with <a href="http://jigsaw.tighten.co" title="Jigsaw by Tighten">Jigsaw</a>
- and <a href="https://tailwindcss.com" title="Tailwind CSS, a utility-first CSS framework">Tailwind CSS</a>.
- </li>
- </ul>
- </footer>
-
- <script src="{{ mix('js/main.js', 'assets/build') }}"></script>
-
- @stack('scripts')
- </body>
+ <body>
+ <article>@yield('article')</article>
+ <aside>
+ <ol>
+ @foreach ($page->allCategories($posts) as $category)
+ <li><a href="/blog/categories/{{ $category }}">{{ $category }}</a></li>
+ @endforeach
+ </ol>
+ </aside>
+ </body>
</html>
diff --git a/source/_layouts/post.blade.php b/source/_layouts/post.blade.php
index 97c73f8..fec0473 100644
--- a/source/_layouts/post.blade.php
+++ b/source/_layouts/post.blade.php
@@ -1,50 +1,6 @@
@extends('_layouts.master')
-@push('meta')
- <meta property="og:title" content="{{ $page->title }}" />
- <meta property="og:type" content="article" />
- <meta property="og:url" content="{{ $page->getUrl() }}"/>
- <meta property="og:description" content="{{ $page->description }}" />
-@endpush
-
-@section('body')
- @if ($page->cover_image)
- <img src="{{ $page->cover_image }}" alt="{{ $page->title }} cover image" class="mb-2">
- @endif
-
- <h1 class="leading-none mb-2">{{ $page->title }}</h1>
-
- <p class="text-gray-700 text-xl md:mt-0">{{ $page->author }} • {{ date('F j, Y', $page->date) }}</p>
-
- @if ($page->categories)
- @foreach ($page->categories as $i => $category)
- <a
- href="{{ '/blog/categories/' . $category }}"
- title="View posts in {{ $category }}"
- class="inline-block bg-gray-300 hover:bg-blue-200 leading-loose tracking-wide text-gray-800 uppercase text-xs font-semibold rounded mr-4 px-3 pt-px"
- >{{ $category }}</a>
- @endforeach
- @endif
-
- <div class="border-b border-blue-200 mb-10 pb-4" v-pre>
- @yield('content')
- </div>
-
- <nav class="flex justify-between text-sm md:text-base">
- <div>
- @if ($next = $page->getNext())
- <a href="{{ $next->getUrl() }}" title="Older Post: {{ $next->title }}">
- &LeftArrow; {{ $next->title }}
- </a>
- @endif
- </div>
-
- <div>
- @if ($previous = $page->getPrevious())
- <a href="{{ $previous->getUrl() }}" title="Newer Post: {{ $previous->title }}">
- {{ $previous->title }} &RightArrow;
- </a>
- @endif
- </div>
- </nav>
+@section('article')
+ <h1>{{ $page->title }}</h1>
+ @yield('content')
@endsection