remove sage 10
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
@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
|
||||
@@ -1,13 +0,0 @@
|
||||
@extends('layouts.block', [
|
||||
'block' => $block,
|
||||
'data' => $data,
|
||||
])
|
||||
|
||||
@section('block-content')
|
||||
@if(@$data['wysiwyg'])
|
||||
<div class="main-wysiwyg wysiwyg">
|
||||
{!! @$data['wysiwyg'] !!}
|
||||
</div>
|
||||
@endif
|
||||
@overwrite
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB |
@@ -1,4 +0,0 @@
|
||||
export default function WYSIWYG()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Blocks\WYSIWYG;
|
||||
use App\Utilities;
|
||||
use App\ACF;
|
||||
|
||||
class WYSIWYG
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
add_action('acf/init', [$this, 'init']);
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
acf_register_block_type([
|
||||
'name' => 'badegg/wysiwyg',
|
||||
'title' => __('Basic Content'),
|
||||
'description' => __('Basic text editor '),
|
||||
'render_callback' => [ $this, 'render'],
|
||||
'category' => 'badegg',
|
||||
'icon' => 'editor-paragraph',
|
||||
'supports' => [
|
||||
'align' => false,
|
||||
],
|
||||
'example' => [
|
||||
'attributes' => [
|
||||
'mode' => 'preview',
|
||||
'data' => [
|
||||
'inserter' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
public function render($block, $content = '', $is_preview = false)
|
||||
{
|
||||
$name = basename(__FILE__, '.php');
|
||||
$themeURL = get_template_directory_uri();
|
||||
|
||||
if($is_preview && @$block['data']['inserter']):
|
||||
echo '<img style="display: block; width: 100%" src="' . $themeURL . '/resources/views/blocks/' . $name . '/' . $name . '.jpg" />';
|
||||
return;
|
||||
endif;
|
||||
|
||||
$CssClasses = new Utilities\CssClasses;
|
||||
$Colour = new Utilities\Colour;
|
||||
$CloneGroup = new ACF\CloneGroup;
|
||||
|
||||
$data = [];
|
||||
|
||||
$fields = [
|
||||
'wysiwyg',
|
||||
];
|
||||
$fields = array_merge($fields, $CloneGroup->block_all());
|
||||
|
||||
foreach($fields as $field):
|
||||
$data[$field] = get_field($field);
|
||||
endforeach;
|
||||
|
||||
unset($block['data']);
|
||||
$block['name'] = str_replace('acf/', '', $block['name']);
|
||||
|
||||
$data = array_merge($data, $block);
|
||||
$data['section_classes'] = $CssClasses->section($data);
|
||||
$data['block'] = $block;
|
||||
|
||||
echo \Roots\view("blocks.$name.$name", [
|
||||
'data' => $data,
|
||||
'block' => $block,
|
||||
])->render();
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
.section-badegg-wysiwyg {
|
||||
container-name: WYSIWYG;
|
||||
container-type: inline-size;
|
||||
|
||||
.main-wysiwyg {
|
||||
@container WYSIWYG (min-width: #{$screen-lg}) {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
}
|
||||
|
||||
.section-intro { padding-bottom: $sectionSmall; }
|
||||
.section-footer { padding-top: $sectionSmall; }
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
@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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,23 +0,0 @@
|
||||
@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
|
||||
@@ -1,43 +0,0 @@
|
||||
<!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="visually-hidden" href="#main">
|
||||
{{ __('Skip to content', 'sage') }}
|
||||
</a>
|
||||
|
||||
<div class="wrapper section-has-angle section-has-angle-bottom">
|
||||
|
||||
@include('sections.header.header')
|
||||
|
||||
<main id="main" class="main">
|
||||
@yield('content')
|
||||
</main>
|
||||
|
||||
@hasSection('sidebar')
|
||||
<aside class="sidebar">
|
||||
@yield('sidebar')
|
||||
</aside>
|
||||
@endif
|
||||
|
||||
<div class="last-slice angle-slice-wrap bottom">
|
||||
<div class="angle-slice small bottom right"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('sections.footer.footer')
|
||||
</div>
|
||||
|
||||
@php(do_action('get_footer'))
|
||||
@php(wp_footer())
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,73 +0,0 @@
|
||||
@if(@$data['section_anchor_id'])
|
||||
<div id="{{ $data['section_anchor_id'] }}" class="section-anchor"></div>
|
||||
@endif
|
||||
|
||||
<section
|
||||
id="{{ $block['id'] }}"
|
||||
class="badegg-block
|
||||
@if(@$data['section_classes']) {{ implode(' ', $data['section_classes']) }} @endif
|
||||
{{ @$block['className'] }}
|
||||
">
|
||||
|
||||
<div class="section-{{ $block['name'] }}-inner">
|
||||
@if(@$data['heading'] || @$data['blurb'])
|
||||
<div class="section-intro section-medium section-zero-top container container-large bg-watermarked-content {{ @$data['knockout'] }} align-{{ @$data['intro_alignment'] ?: 'centre' }} ">
|
||||
<div class="section-intro-inner wysiwyg">
|
||||
@if(@$data['overline']) <p class="overline secondary"><strong>{{ $data['overline'] }}</strong></p> @endif
|
||||
<h2 class="section-title">{{ @$data['heading'] }}</h2>
|
||||
<p>{{ @$data['blurb'] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="container container-{{ @$data['container_width'] ?: 'large' }} block-content bg-watermarked-content">
|
||||
@yield('block-content')
|
||||
</div>
|
||||
|
||||
@if(@$data['links'] || @$data['blurb_footer'])
|
||||
<div class="section-footer section-medium section-zero-bottom container container-narrow align-{{ @$data['footer_alignment'] ?: 'centre' }} wysiwyg bg-watermarked-content {{ @$data['knockout'] }}">
|
||||
|
||||
<p>{{ @$data['blurb_footer'] }}</p>
|
||||
|
||||
@if(@$data['links'])
|
||||
<div class="btn-wrap">
|
||||
@foreach($data['links'] as $link)
|
||||
@include('components.button', $link)
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(@$data['bg_image'])
|
||||
<div class="bg-watermarked-image" style="opacity: {!! (@$data['bg_opacity'] ?: 30) * 0.01 !!}">
|
||||
{!! $ImageSrcset->render([
|
||||
'image' => $data['bg_image'],
|
||||
'name' => 'hero',
|
||||
'lazy' => true,
|
||||
]) !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if(@$data['angle_status'])
|
||||
@if(@$data['angle_position'] == 'both')
|
||||
@foreach(['top', 'bottom'] as $position)
|
||||
@include('partials.angle', [
|
||||
'position' => $position,
|
||||
'direction' => @$data['angle_direction'],
|
||||
'tint' => @$data['angle_tint'],
|
||||
'colour' => @$data['angle_colour'] ?: 'white',
|
||||
])
|
||||
@endforeach
|
||||
@else
|
||||
@include('partials.angle', [
|
||||
'position' => @$data['angle_position'],
|
||||
'direction' => @$data['angle_direction'],
|
||||
'tint' => @$data['angle_tint'],
|
||||
'colour' => @$data['angle_colour'] ?: 'white',
|
||||
])
|
||||
@endif
|
||||
@endif
|
||||
|
||||
</section>
|
||||
@@ -1,8 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@while(have_posts()) @php(the_post())
|
||||
@include('partials.page-header')
|
||||
@includeFirst(['partials.content-page', 'partials.content'])
|
||||
@endwhile
|
||||
@endsection
|
||||
@@ -1,39 +0,0 @@
|
||||
@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
|
||||
@@ -1,7 +0,0 @@
|
||||
@php(the_content())
|
||||
|
||||
@if ($pagination)
|
||||
<nav class="page-nav" aria-label="Page">
|
||||
{!! $pagination !!}
|
||||
</nav>
|
||||
@endif
|
||||
@@ -1,15 +0,0 @@
|
||||
<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>
|
||||
@@ -1,23 +0,0 @@
|
||||
<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>
|
||||
@@ -1,15 +0,0 @@
|
||||
<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>
|
||||
@@ -1,10 +0,0 @@
|
||||
<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>
|
||||
@@ -1,3 +0,0 @@
|
||||
<div class="page-header">
|
||||
<h1>{!! $title !!}</h1>
|
||||
</div>
|
||||
@@ -1,19 +0,0 @@
|
||||
@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
|
||||
@@ -1,3 +0,0 @@
|
||||
<footer class="content-info">
|
||||
@php(dynamic_sidebar('sidebar-footer'))
|
||||
</footer>
|
||||
@@ -1,21 +0,0 @@
|
||||
export default function Footer() {
|
||||
const body = document.querySelector("body");
|
||||
const footer = document.querySelector(".js-footer");
|
||||
|
||||
if(!footer) return;
|
||||
|
||||
const links = footer.querySelectorAll("a");
|
||||
const currentURL = location.protocol + '//' + location.host + location.pathname;
|
||||
|
||||
|
||||
links.forEach(link => {
|
||||
const hash = link.hash;
|
||||
const href = link.href;
|
||||
|
||||
link.addEventListener("click", () => {
|
||||
if(href.includes(currentURL)) {
|
||||
body.classList.remove("menu-open");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<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>
|
||||
@@ -1,57 +0,0 @@
|
||||
export default function Header() {
|
||||
const body = document.querySelector("body");
|
||||
const wrapper = document.querySelector(".wrapper");
|
||||
const menuToggle = document.querySelector(".js-menu-toggle");
|
||||
const menuClose = document.querySelector(".js-menu-close");
|
||||
|
||||
if(!menuToggle) return;
|
||||
|
||||
menuToggle.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
body.classList.toggle("menu-open");
|
||||
|
||||
if(menuToggle.ariaExpanded == 'true') {
|
||||
menuToggle.ariaExpanded = 'false';
|
||||
} else {
|
||||
menuToggle.ariaExpanded = 'true';
|
||||
}
|
||||
|
||||
console.log(menuToggle.ariaExpanded);
|
||||
|
||||
});
|
||||
|
||||
menuClose.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
body.classList.remove("menu-open");
|
||||
menuToggle.ariaExpanded = 'false';
|
||||
|
||||
console.log(menuToggle.ariaExpanded);
|
||||
});
|
||||
|
||||
document.addEventListener("keyup", function (event) {
|
||||
if (event.key === "Escape") {
|
||||
body.classList.remove("menu-open");
|
||||
menuToggle.ariaExpanded = 'false';
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener("scroll", () => {
|
||||
const scrolled = document.scrollingElement.scrollTop;
|
||||
const position = body.offsetTop;
|
||||
const header = document.querySelector(".site-header");
|
||||
|
||||
if (scrolled > position + header.offsetHeight) {
|
||||
body.classList.add("scrolled");
|
||||
} else {
|
||||
body.classList.remove("scrolled");
|
||||
}
|
||||
});
|
||||
|
||||
wrapper.addEventListener("click", (e) => {
|
||||
const target = e.target;
|
||||
|
||||
if(!menuToggle.contains(target) && body.classList.contains("menu-open")) {
|
||||
body.classList.remove("menu-open");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
@php(dynamic_sidebar('sidebar-primary'))
|
||||
@@ -1,7 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@while(have_posts()) @php(the_post())
|
||||
@includeFirst(['partials.content-single-' . get_post_type(), 'partials.content-single'])
|
||||
@endwhile
|
||||
@endsection
|
||||
@@ -1,12 +0,0 @@
|
||||
{{--
|
||||
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