add sage theme
This commit is contained in:
13
web/app/themes/badegg/resources/views/404.blade.php
Normal file
13
web/app/themes/badegg/resources/views/404.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@include('partials.page-header')
|
||||
|
||||
@if (! have_posts())
|
||||
<x-alert type="warning">
|
||||
{!! __('Sorry, but the page you are trying to view does not exist.', 'sage') !!}
|
||||
</x-alert>
|
||||
|
||||
{!! get_search_form(false) !!}
|
||||
@endif
|
||||
@endsection
|
||||
@@ -0,0 +1,15 @@
|
||||
@props([
|
||||
'type' => null,
|
||||
'message' => null,
|
||||
])
|
||||
|
||||
@php($class = match ($type) {
|
||||
'success' => 'text-green-50 bg-green-400',
|
||||
'caution' => 'text-yellow-50 bg-yellow-400',
|
||||
'warning' => 'text-red-50 bg-red-400',
|
||||
default => 'text-indigo-50 bg-indigo-400',
|
||||
})
|
||||
|
||||
<div {{ $attributes->merge(['class' => "px-2 py-1 {$class}"]) }}>
|
||||
{!! $message ?? $slot !!}
|
||||
</div>
|
||||
16
web/app/themes/badegg/resources/views/forms/search.blade.php
Normal file
16
web/app/themes/badegg/resources/views/forms/search.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<form role="search" method="get" class="search-form" action="{{ home_url('/') }}">
|
||||
<label>
|
||||
<span class="sr-only">
|
||||
{{ _x('Search for:', 'label', 'sage') }}
|
||||
</span>
|
||||
|
||||
<input
|
||||
type="search"
|
||||
placeholder="{!! esc_attr_x('Search …', 'placeholder', 'sage') !!}"
|
||||
value="{{ get_search_query() }}"
|
||||
name="s"
|
||||
>
|
||||
</label>
|
||||
|
||||
<button>{{ _x('Search', 'submit button', 'sage') }}</button>
|
||||
</form>
|
||||
23
web/app/themes/badegg/resources/views/index.blade.php
Normal file
23
web/app/themes/badegg/resources/views/index.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@include('partials.page-header')
|
||||
|
||||
@if (! have_posts())
|
||||
<x-alert type="warning">
|
||||
{!! __('Sorry, no results were found.', 'sage') !!}
|
||||
</x-alert>
|
||||
|
||||
{!! get_search_form(false) !!}
|
||||
@endif
|
||||
|
||||
@while(have_posts()) @php(the_post())
|
||||
@includeFirst(['partials.content-' . get_post_type(), 'partials.content'])
|
||||
@endwhile
|
||||
|
||||
{!! get_the_posts_navigation() !!}
|
||||
@endsection
|
||||
|
||||
@section('sidebar')
|
||||
@include('sections.sidebar')
|
||||
@endsection
|
||||
36
web/app/themes/badegg/resources/views/layouts/app.blade.php
Normal file
36
web/app/themes/badegg/resources/views/layouts/app.blade.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<!doctype html>
|
||||
<html @php(language_attributes())>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
@php(do_action('get_header'))
|
||||
@php(wp_head())
|
||||
</head>
|
||||
|
||||
<body @php(body_class())>
|
||||
@php(wp_body_open())
|
||||
|
||||
<div id="app">
|
||||
<a class="sr-only focus:not-sr-only" href="#main">
|
||||
{{ __('Skip to content') }}
|
||||
</a>
|
||||
|
||||
@include('sections.header')
|
||||
|
||||
<main id="main" class="main">
|
||||
@yield('content')
|
||||
</main>
|
||||
|
||||
@hasSection('sidebar')
|
||||
<aside class="sidebar">
|
||||
@yield('sidebar')
|
||||
</aside>
|
||||
@endif
|
||||
|
||||
@include('sections.footer')
|
||||
</div>
|
||||
|
||||
@php(do_action('get_footer'))
|
||||
@php(wp_footer())
|
||||
</body>
|
||||
</html>
|
||||
8
web/app/themes/badegg/resources/views/page.blade.php
Normal file
8
web/app/themes/badegg/resources/views/page.blade.php
Normal file
@@ -0,0 +1,8 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@while(have_posts()) @php(the_post())
|
||||
@include('partials.page-header')
|
||||
@includeFirst(['partials.content-page', 'partials.content'])
|
||||
@endwhile
|
||||
@endsection
|
||||
@@ -0,0 +1,39 @@
|
||||
@if (! post_password_required())
|
||||
<section id="comments" class="comments">
|
||||
@if ($responses)
|
||||
<h2>
|
||||
{!! $title !!}
|
||||
</h2>
|
||||
|
||||
<ol class="comment-list">
|
||||
{!! $responses !!}
|
||||
</ol>
|
||||
|
||||
@if ($paginated)
|
||||
<nav aria-label="Comment">
|
||||
<ul class="pager">
|
||||
@if ($previous)
|
||||
<li class="previous">
|
||||
{!! $previous !!}
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($next)
|
||||
<li class="next">
|
||||
{!! $next !!}
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($closed)
|
||||
<x-alert type="warning">
|
||||
{!! __('Comments are closed.', 'sage') !!}
|
||||
</x-alert>
|
||||
@endif
|
||||
|
||||
@php(comment_form())
|
||||
</section>
|
||||
@endif
|
||||
@@ -0,0 +1,7 @@
|
||||
@php(the_content())
|
||||
|
||||
@if ($pagination)
|
||||
<nav class="page-nav" aria-label="Page">
|
||||
{!! $pagination !!}
|
||||
</nav>
|
||||
@endif
|
||||
@@ -0,0 +1,15 @@
|
||||
<article @php(post_class())>
|
||||
<header>
|
||||
<h2 class="entry-title">
|
||||
<a href="{{ get_permalink() }}">
|
||||
{!! $title !!}
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
@includeWhen(get_post_type() === 'post', 'partials.entry-meta')
|
||||
</header>
|
||||
|
||||
<div class="entry-summary">
|
||||
@php(the_excerpt())
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,23 @@
|
||||
<article @php(post_class('h-entry'))>
|
||||
<header>
|
||||
<h1 class="p-name">
|
||||
{!! $title !!}
|
||||
</h1>
|
||||
|
||||
@include('partials.entry-meta')
|
||||
</header>
|
||||
|
||||
<div class="e-content">
|
||||
@php(the_content())
|
||||
</div>
|
||||
|
||||
@if ($pagination)
|
||||
<footer>
|
||||
<nav class="page-nav" aria-label="Page">
|
||||
{!! $pagination !!}
|
||||
</nav>
|
||||
</footer>
|
||||
@endif
|
||||
|
||||
@php(comments_template())
|
||||
</article>
|
||||
@@ -0,0 +1,15 @@
|
||||
<article @php(post_class())>
|
||||
<header>
|
||||
<h2 class="entry-title">
|
||||
<a href="{{ get_permalink() }}">
|
||||
{!! $title !!}
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
@include('partials.entry-meta')
|
||||
</header>
|
||||
|
||||
<div class="entry-summary">
|
||||
@php(the_excerpt())
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,10 @@
|
||||
<time class="dt-published" datetime="{{ get_post_time('c', true) }}">
|
||||
{{ get_the_date() }}
|
||||
</time>
|
||||
|
||||
<p>
|
||||
<span>{{ __('By', 'sage') }}</span>
|
||||
<a href="{{ get_author_posts_url(get_the_author_meta('ID')) }}" class="p-author h-card">
|
||||
{{ get_the_author() }}
|
||||
</a>
|
||||
</p>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div class="page-header">
|
||||
<h1>{!! $title !!}</h1>
|
||||
</div>
|
||||
19
web/app/themes/badegg/resources/views/search.blade.php
Normal file
19
web/app/themes/badegg/resources/views/search.blade.php
Normal file
@@ -0,0 +1,19 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@include('partials.page-header')
|
||||
|
||||
@if (! have_posts())
|
||||
<x-alert type="warning">
|
||||
{!! __('Sorry, no results were found.', 'sage') !!}
|
||||
</x-alert>
|
||||
|
||||
{!! get_search_form(false) !!}
|
||||
@endif
|
||||
|
||||
@while(have_posts()) @php(the_post())
|
||||
@include('partials.content-search')
|
||||
@endwhile
|
||||
|
||||
{!! get_the_posts_navigation() !!}
|
||||
@endsection
|
||||
@@ -0,0 +1,3 @@
|
||||
<footer class="content-info">
|
||||
@php(dynamic_sidebar('sidebar-footer'))
|
||||
</footer>
|
||||
@@ -0,0 +1,11 @@
|
||||
<header class="banner">
|
||||
<a class="brand" href="{{ home_url('/') }}">
|
||||
{!! $siteName !!}
|
||||
</a>
|
||||
|
||||
@if (has_nav_menu('primary_navigation'))
|
||||
<nav class="nav-primary" aria-label="{{ wp_get_nav_menu_name('primary_navigation') }}">
|
||||
{!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav', 'echo' => false]) !!}
|
||||
</nav>
|
||||
@endif
|
||||
</header>
|
||||
@@ -0,0 +1 @@
|
||||
@php(dynamic_sidebar('sidebar-primary'))
|
||||
7
web/app/themes/badegg/resources/views/single.blade.php
Normal file
7
web/app/themes/badegg/resources/views/single.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@while(have_posts()) @php(the_post())
|
||||
@includeFirst(['partials.content-single-' . get_post_type(), 'partials.content-single'])
|
||||
@endwhile
|
||||
@endsection
|
||||
@@ -0,0 +1,12 @@
|
||||
{{--
|
||||
Template Name: Custom Template
|
||||
--}}
|
||||
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@while(have_posts()) @php(the_post())
|
||||
@include('partials.page-header')
|
||||
@include('partials.content-page')
|
||||
@endwhile
|
||||
@endsection
|
||||
Reference in New Issue
Block a user