Skip to content

Commit

Permalink
Merge pull request #1567 from hydephp/add-new-head-stack-to-match-scr…
Browse files Browse the repository at this point in the history
…ipts-stack

Add a `@head` stack to the `head.blade.php` component
  • Loading branch information
caendesilva committed Feb 13, 2024
2 parents 53d6aea + 51e0ed8 commit 7901a69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Expand Up @@ -10,7 +10,7 @@ This serves two purposes:
2. At release time, you can move the Unreleased section changes into a new release version section.

### Added
- for new features.
- Added a `@head` stack to the `head.blade.php` component in https://github.com/hydephp/develop/pull/1567

### Changed
- for changes in existing functionality.
Expand Down
3 changes: 3 additions & 0 deletions packages/framework/resources/views/layouts/head.blade.php
Expand Up @@ -18,6 +18,9 @@
<script>if (localStorage.getItem('color-theme') === 'dark' || (!('color-theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) { document.documentElement.classList.add('dark'); document.getElementById('meta-color-scheme').setAttribute('content', 'dark');} else { document.documentElement.classList.remove('dark') } </script>
@endif

{{-- Add any extra code to include before the closing <head> tag --}}
@stack('head')

{{-- If the user has defined any custom head tags, render them here --}}
{!! config('hyde.head') !!}
{!! Includes::html('head') !!}

0 comments on commit 7901a69

Please sign in to comment.