summaryrefslogtreecommitdiff
path: root/source/_layouts
diff options
context:
space:
mode:
authorDavid T. Sadler <davidtsadler@googlemail.com>2020-02-17 19:59:15 +0000
committerDavid T. Sadler <davidtsadler@googlemail.com>2020-02-17 19:59:15 +0000
commit498913806182905cc0c14bd12a61f9af26fa16b4 (patch)
tree0c36a6df72900c184e900b274bad14aa5114fc5d /source/_layouts
parent12b052b1f480c5a95acd1477e28ce76f84ff7932 (diff)
Switch over to Jigsaw
Diffstat (limited to 'source/_layouts')
-rw-r--r--source/_layouts/category.blade.php26
-rw-r--r--source/_layouts/master.blade.php74
-rw-r--r--source/_layouts/post.blade.php50
-rw-r--r--source/_layouts/rss.blade.php12
4 files changed, 162 insertions, 0 deletions
diff --git a/source/_layouts/category.blade.php b/source/_layouts/category.blade.php
new file mode 100644
index 0000000..60ccede
--- /dev/null
+++ b/source/_layouts/category.blade.php
@@ -0,0 +1,26 @@
+@extends('_layouts.master')
+
+@push('meta')
+ <meta property="og:title" content="{{ $page->title }}" />
+ <meta property="og:type" content="website" />
+ <meta property="og:url" content="{{ $page->getUrl() }}"/>
+ <meta property="og:description" content="{{ $page->description }}" />
+@endpush
+
+@section('body')
+ <h1>{{ $page->title }}</h1>
+
+ <div class="text-2xl border-b border-blue-200 mb-6 pb-10">
+ @yield('content')
+ </div>
+
+ @foreach ($page->posts($posts) as $post)
+ @include('_components.post-preview-inline')
+
+ @if (! $loop->last)
+ <hr class="w-full border-b mt-2 mb-6">
+ @endif
+ @endforeach
+
+ @include('_components.newsletter-signup')
+@stop
diff --git a/source/_layouts/master.blade.php b/source/_layouts/master.blade.php
new file mode 100644
index 0000000..039fa82
--- /dev/null
+++ b/source/_layouts/master.blade.php
@@ -0,0 +1,74 @@
+<!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>
+</html>
diff --git a/source/_layouts/post.blade.php b/source/_layouts/post.blade.php
new file mode 100644
index 0000000..97c73f8
--- /dev/null
+++ b/source/_layouts/post.blade.php
@@ -0,0 +1,50 @@
+@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>
+@endsection
diff --git a/source/_layouts/rss.blade.php b/source/_layouts/rss.blade.php
new file mode 100644
index 0000000..191d3d7
--- /dev/null
+++ b/source/_layouts/rss.blade.php
@@ -0,0 +1,12 @@
+<?php echo "<?xml version=\"1.0\"?>\n"; ?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title>{{ $page->siteName }}</title>
+ <link href="{{ $page->baseUrl }}{{ $page->site_path }}" />
+ <link type="application/atom+xml" rel="self" href="{{ $page->getUrl() }}" />
+ <updated>{{ date(DATE_ATOM) }}</updated>
+ <id>{{ $page->getUrl() }}</id>
+ <author>
+ <name>{{ $page->siteAuthor }}</name>
+ </author>
+ @yield('entries')
+</feed>