templates/ -> resources/views/
This commit is contained in:
14
resources/views/404.blade.php
Normal file
14
resources/views/404.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@include('partials.page-header')
|
||||
|
||||
@if (!have_posts())
|
||||
<div class="alert alert-warning">
|
||||
{{ __('Sorry, but the page you were trying to view does not exist.', 'sage') }}
|
||||
</div>
|
||||
{!! get_search_form(false) !!}
|
||||
@endif
|
||||
|
||||
{!! get_the_posts_navigation() !!}
|
||||
@endsection
|
||||
18
resources/views/index.blade.php
Normal file
18
resources/views/index.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@include('partials.page-header')
|
||||
|
||||
@if (!have_posts())
|
||||
<div class="alert alert-warning">
|
||||
{{ __('Sorry, no results were found.', 'sage') }}
|
||||
</div>
|
||||
{!! get_search_form(false) !!}
|
||||
@endif
|
||||
|
||||
@while (have_posts()) @php(the_post())
|
||||
@include ('partials.content-'.(get_post_type() !== 'post' ? get_post_type() : get_post_format()))
|
||||
@endwhile
|
||||
|
||||
{!! get_the_posts_navigation() !!}
|
||||
@endsection
|
||||
23
resources/views/layouts/app.blade.php
Normal file
23
resources/views/layouts/app.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html @php(language_attributes())>
|
||||
@include('partials.head')
|
||||
<body @php(body_class())>
|
||||
@php(do_action('get_header'))
|
||||
@include('partials.header')
|
||||
<div class="wrap container" role="document">
|
||||
<div class="content">
|
||||
<main class="main">
|
||||
@yield('content')
|
||||
</main>
|
||||
@if (App\display_sidebar())
|
||||
<aside class="sidebar">
|
||||
@include('partials.sidebar')
|
||||
</aside>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@php(do_action('get_footer'))
|
||||
@include('partials.footer')
|
||||
@php(wp_footer())
|
||||
</body>
|
||||
</html>
|
||||
8
resources/views/page.blade.php
Normal file
8
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')
|
||||
@include('partials.content-page')
|
||||
@endwhile
|
||||
@endsection
|
||||
38
resources/views/partials/comments.blade.php
Normal file
38
resources/views/partials/comments.blade.php
Normal file
@@ -0,0 +1,38 @@
|
||||
@php
|
||||
if (post_password_required()) {
|
||||
return;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<section id="comments" class="comments">
|
||||
@if (have_comments())
|
||||
<h2>
|
||||
{!! sprintf(_nx('One response to “%2$s”', '%1$s responses to “%2$s”', get_comments_number(), 'comments title', 'sage'), number_format_i18n(get_comments_number()), '<span>' . get_the_title() . '</span>') !!}
|
||||
</h2>
|
||||
|
||||
<ol class="comment-list">
|
||||
{!! wp_list_comments(['style' => 'ol', 'short_ping' => true]) !!}
|
||||
</ol>
|
||||
|
||||
@if (get_comment_pages_count() > 1 && get_option('page_comments'))
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
@if (get_previous_comments_link())
|
||||
<li class="previous">@php(previous_comments_link(__('← Older comments', 'sage')))</li>
|
||||
@endif
|
||||
@if (get_next_comments_link())
|
||||
<li class="next">@php(next_comments_link(__('Newer comments →', 'sage')))</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (!comments_open() && get_comments_number() != '0' && post_type_supports(get_post_type(), 'comments'))
|
||||
<div class="alert alert-warning">
|
||||
{{ __('Comments are closed.', 'sage') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@php(comment_form())
|
||||
</section>
|
||||
2
resources/views/partials/content-page.blade.php
Normal file
2
resources/views/partials/content-page.blade.php
Normal file
@@ -0,0 +1,2 @@
|
||||
@php(the_content())
|
||||
{!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
|
||||
11
resources/views/partials/content-search.blade.php
Normal file
11
resources/views/partials/content-search.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<article @php(post_class())>
|
||||
<header>
|
||||
<h2 class="entry-title"><a href="{{ get_permalink() }}">{{ get_the_title() }}</a></h2>
|
||||
@if (get_post_type() === 'post')
|
||||
@include('partials/entry-meta')
|
||||
@endif
|
||||
</header>
|
||||
<div class="entry-summary">
|
||||
@php(the_excerpt())
|
||||
</div>
|
||||
</article>
|
||||
13
resources/views/partials/content-single.blade.php
Normal file
13
resources/views/partials/content-single.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<article @php(post_class())>
|
||||
<header>
|
||||
<h1 class="entry-title">{{ get_the_title() }}</h1>
|
||||
@include('partials/entry-meta')
|
||||
</header>
|
||||
<div class="entry-content">
|
||||
@php(the_content())
|
||||
</div>
|
||||
<footer>
|
||||
{!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
|
||||
</footer>
|
||||
@php(comments_template('/resources/views/partials/comments.blade.php'))
|
||||
</article>
|
||||
9
resources/views/partials/content.blade.php
Normal file
9
resources/views/partials/content.blade.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<article @php(post_class())>
|
||||
<header>
|
||||
<h2 class="entry-title"><a href="{{ get_permalink() }}">{{ get_the_title() }}</a></h2>
|
||||
@include('partials/entry-meta')
|
||||
</header>
|
||||
<div class="entry-summary">
|
||||
@php(the_excerpt())
|
||||
</div>
|
||||
</article>
|
||||
6
resources/views/partials/entry-meta.blade.php
Normal file
6
resources/views/partials/entry-meta.blade.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<time class="updated" datetime="{{ get_post_time('c', true) }}">{{ get_the_date() }}</time>
|
||||
<p class="byline author vcard">
|
||||
{{ __('By', 'sage') }} <a href="{{ get_author_posts_url(get_the_author_meta('ID')) }}" rel="author" class="fn">
|
||||
{{ get_the_author() }}
|
||||
</a>
|
||||
</p>
|
||||
5
resources/views/partials/footer.blade.php
Normal file
5
resources/views/partials/footer.blade.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<footer class="content-info">
|
||||
<div class="container">
|
||||
@php(dynamic_sidebar('sidebar-footer'))
|
||||
</div>
|
||||
</footer>
|
||||
6
resources/views/partials/head.blade.php
Normal file
6
resources/views/partials/head.blade.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
@php(wp_head())
|
||||
</head>
|
||||
10
resources/views/partials/header.blade.php
Normal file
10
resources/views/partials/header.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<header class="banner">
|
||||
<div class="container">
|
||||
<a class="brand" href="{{ home_url('/') }}">{{ get_bloginfo('name', 'display') }}</a>
|
||||
<nav class="nav-primary">
|
||||
@if (has_nav_menu('primary_navigation'))
|
||||
{!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav']) !!}
|
||||
@endif
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
3
resources/views/partials/page-header.blade.php
Normal file
3
resources/views/partials/page-header.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="page-header">
|
||||
<h1>{!! App\title() !!}</h1>
|
||||
</div>
|
||||
1
resources/views/partials/sidebar.blade.php
Normal file
1
resources/views/partials/sidebar.blade.php
Normal file
@@ -0,0 +1 @@
|
||||
@php(dynamic_sidebar('sidebar-primary'))
|
||||
18
resources/views/search.blade.php
Normal file
18
resources/views/search.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@include('partials.page-header')
|
||||
|
||||
@if (!have_posts())
|
||||
<div class="alert alert-warning">
|
||||
{{ __('Sorry, no results were found.', 'sage') }}
|
||||
</div>
|
||||
{!! get_search_form(false) !!}
|
||||
@endif
|
||||
|
||||
@while(have_posts()) @php(the_post())
|
||||
@include('partials.content-search')
|
||||
@endwhile
|
||||
|
||||
{!! get_the_posts_navigation() !!}
|
||||
@endsection
|
||||
7
resources/views/single.blade.php
Normal file
7
resources/views/single.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@while(have_posts()) @php(the_post())
|
||||
@include('partials/content-single-'.get_post_type())
|
||||
@endwhile
|
||||
@endsection
|
||||
12
resources/views/template-custom.blade.php
Normal file
12
resources/views/template-custom.blade.php
Normal file
@@ -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