generated from hydephp/plugin-skeleton
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from hydephp/update-tests
Add more tests
- Loading branch information
Showing
4 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: Custom Layout | ||
extends: layouts.my-custom-layout # Todo we could try to prepend the layouts directory if that's standard and the file is not find in the view root | ||
background: cornflowerblue | ||
name: World | ||
--- | ||
|
||
# Hello, {{ $name }}! | ||
|
||
This uses the custom layout `layouts.my-custom-layout` and sets the background to `cornflowerblue`. | ||
|
||
[Back to index](/) |
24 changes: 24 additions & 0 deletions
24
tests/runner/resources/views/layouts/my-custom-layout.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Custom Layout</title> | ||
<script> | ||
if (localStorage.getItem('color-theme') === 'dark' || !('color-theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches) { | ||
document.documentElement.style.background = '#111827'; | ||
document.documentElement.style.color = 'white'; | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<article style="border: 4px solid {{ $background }}; padding: 0 1rem; margin: 2rem auto; max-width: 800px;"> | ||
{{ $content }} | ||
</article> | ||
|
||
<footer style="text-align: center; margin-top: 2rem;"> | ||
This is the custom layout. | ||
</footer> | ||
</body> | ||
</html> |