add sage theme

This commit is contained in:
2025-09-03 20:18:31 +01:00
parent 4251ccaac6
commit 495d5737cd
48 changed files with 9918 additions and 0 deletions

View 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

View File

@@ -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>

View 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 &hellip;', 'placeholder', 'sage') !!}"
value="{{ get_search_query() }}"
name="s"
>
</label>
<button>{{ _x('Search', 'submit button', 'sage') }}</button>
</form>

View 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

View 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>

View 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

View File

@@ -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

View File

@@ -0,0 +1,7 @@
@php(the_content())
@if ($pagination)
<nav class="page-nav" aria-label="Page">
{!! $pagination !!}
</nav>
@endif

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -0,0 +1,3 @@
<div class="page-header">
<h1>{!! $title !!}</h1>
</div>

View 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

View File

@@ -0,0 +1,3 @@
<footer class="content-info">
@php(dynamic_sidebar('sidebar-footer'))
</footer>

View File

@@ -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>

View File

@@ -0,0 +1 @@
@php(dynamic_sidebar('sidebar-primary'))

View 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

View 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