]> BookStack Code Mirror - bookstack/commitdiff
Extracted not found text into its own simple blade file
authorDan Brown <redacted>
Sun, 13 Jun 2021 12:53:59 +0000 (13:53 +0100)
committerDan Brown <redacted>
Sun, 13 Jun 2021 12:53:59 +0000 (13:53 +0100)
Related/intended for #2796

resources/views/errors/404.blade.php
resources/views/errors/parts/not-found-text.blade.php [new file with mode: 0644]

index d4d8ed76ba50bd47b83832ea8f04e17ebadca98a..c4a5dc78276b27be5f6ac1470b73caeb1e8fa624 100644 (file)
@@ -6,9 +6,11 @@
     <div class="card mb-xl px-l pb-l pt-l">
         <div class="grid half v-center">
             <div>
-                <h1 class="list-heading">{{ $message ?? trans('errors.404_page_not_found') }}</h1>
-                <h5>{{ $subtitle ?? trans('errors.sorry_page_not_found') }}</h5>
-                <p>{{ $details ?? trans('errors.sorry_page_not_found_permission_warning') }}</p>
+                @include('errors.parts.not-found-text', [
+                    'title' => $message ?? trans('errors.404_page_not_found'),
+                    'subtitle' => $subtitle ?? trans('errors.sorry_page_not_found'),
+                    'details' => $details ?? trans('errors.sorry_page_not_found_permission_warning'),
+                ])
             </div>
             <div class="text-right">
                 @if(!signedInUser())
diff --git a/resources/views/errors/parts/not-found-text.blade.php b/resources/views/errors/parts/not-found-text.blade.php
new file mode 100644 (file)
index 0000000..5b107b2
--- /dev/null
@@ -0,0 +1,5 @@
+{{--The below text may be dynamic based upon language and scenario.--}}
+{{--It's safer to add new text sections here rather than altering existing ones.--}}
+<h1 class="list-heading">{{ $title }}</h1>
+<h5>{{ $subtitle }}</h5>
+<p>{{ $details }}</p>
\ No newline at end of file