Skip to content

Commit

Permalink
🎨 Move default theme markup to the app layout (#3167)
Browse files Browse the repository at this point in the history
  • Loading branch information
Log1x authored Jan 5, 2024
2 parents 5cd2c43 + 94a1787 commit 6f46605
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
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

0 comments on commit 6f46605

Please sign in to comment.