-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocs.blade.php
100 lines (91 loc) · 3 KB
/
docs.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html lang="{{ config('hyde.language', 'en') }}">
<head>
@include('hyde::layouts.head')
</head>
<body id="lagrafo-app" class="bg-white dark:bg-gray-900">
<a href="#content" id="skip-to-content">Skip to content</a>
<script>
document.body.classList.add('js-enabled');
</script>
<nav id="mobile-navigation">
<strong class="mr-auto">
@if(Hyde::docsIndexPath() !== false)
<a href="{{ Hyde::relativeLink(Hyde::docsIndexPath(), $currentPage) }}">
{{ config('docs.header_title', 'Documentation') }}
</a>
@else
{{ config('docs.header_title', 'Documentation') }}
@endif
</strong>
@include('hyde::components.navigation.theme-toggle-button')
<button id="sidebar-toggle" title="Toggle sidebar" aria-label="Toggle sidebar navigation menu">
<span class="icon-bar" role="presentation"></span>
<span class="icon-bar" role="presentation"></span>
<span class="icon-bar" role="presentation"></span>
<span class="icon-bar" role="presentation"></span>
</button>
</nav>
<aside id="sidebar">
<header id="sidebar-header">
<div id="sidebar-brand">
<strong>
@if(Hyde::docsIndexPath() !== false)
<a href="{{ Hyde::relativeLink(Hyde::docsIndexPath(), $currentPage) }}">
{{ config('docs.header_title', 'Documentation') }}
</a>
@else
{{ config('docs.header_title', 'Documentation') }}
@endif
</strong>
@include('hyde::components.navigation.theme-toggle-button')
</div>
</header>
<nav id="sidebar-navigation">
@php
$sidebar = Hyde\Framework\Services\DocumentationSidebarService::create();
@endphp
@if($sidebar->hasCategories())
@include('hyde::components.docs.labeled-sidebar-navigation-menu')
@else
@include('hyde::components.docs.sidebar-navigation-menu')
@endif
</nav>
<footer id="sidebar-footer">
<p>
<a href="{{ Hyde::relativeLink('index.html', $currentPage) }}">Back to home page</a>
</p>
</footer>
</aside>
<main id="content">
@php
$document = \Hyde\Framework\Services\HydeSmartDocs::create($page, $markdown);
@endphp
<article id="document" itemscope itemtype="http://schema.org/Article" @class(['mx-auto lg:ml-8 prose dark:prose-invert
max-w-3xl', 'torchlight-enabled'=> $document->hasTorchlight()])>
@yield('content')
<header id="document-header">
{!! $document->renderHeader() !!}
</header>
<section id="document-main-content" itemprop="articleBody">
{!! $document->renderBody() !!}
</section>
<footer id="document-footer">
{!! $document->renderFooter() !!}
</footer>
</article>
</main>
@if(Hyde\Framework\Helpers\Features::hasDocumentationSearch())
@include('hyde::components.docs.search')
<script src="https://cdn.jsdelivr.net/npm/hydesearch@0.2.1/dist/HydeSearch.min.js" defer></script>
<script>
window.addEventListener('load', function() {
const searchIndexLocation = 'search.json';
const Search = new HydeSearch(searchIndexLocation);
Search.init();
});
</script>
@endif
@include('hyde::layouts.scripts')
</body>
</html>