Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 Move default theme markup to the app layout #3167

Merged
merged 5 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,20 +1 @@
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php do_action('get_header'); ?>

<div id="app">
<?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
</div>

<?php do_action('get_footer'); ?>
<?php wp_footer(); ?>
</body>
</html>
<?php echo view(app('sage.view'), app('sage.data'))->render();
45 changes: 32 additions & 13 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,36 @@
<a class="sr-only focus:not-sr-only" href="#main">
{{ __('Skip to content') }}
</a>
<!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>

@include('sections.header')
<body @php(body_class())>
@php(wp_body_open())

<main id="main" class="main">
@yield('content')
</main>
<div id="app">
<a class="sr-only focus:not-sr-only" href="#main">
{{ __('Skip to content') }}
</a>

@hasSection('sidebar')
<aside class="sidebar">
@yield('sidebar')
</aside>
@endif
@include('sections.header')

@include('sections.footer')
<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>
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('tailwindcss').Config} config */
const config = {
content: ['./index.php', './app/**/*.php', './resources/**/*.{php,vue,js}'],
content: ['./app/**/*.php', './resources/**/*.{php,vue,js}'],
theme: {
extend: {
colors: {}, // Extend Tailwind's default colors
Expand Down
Loading