]> BookStack Code Mirror - website/blob - themes/bookstack/layouts/hacks/single.html
fdc669e67e7c17798d9ec5f464194b6af363cdb5
[website] / themes / bookstack / layouts / hacks / single.html
1 {{ partial "header.html" . }}
2
3 <div class="shaded primary padded-vertical">
4   <div class="container">
5     <div class="docs-section-title">Hacks & Customizations</div>
6   </div>
7 </div>
8
9 <div class="container">
10
11   <div class="row">
12     <aside class="col-md-2 sidebar">
13       <div class="sidebar-inner">
14         <div>
15           <h4>Information</h4>
16         </div>
17         <ul>
18           <li><a href="/hacks">All Hacks</a></li>
19           <li><a href="/hacks/applying/">Applying Hacks</a></li>
20           <li><a href="https://github.com/BookStackApp/hacks">Hacks Source Repo</a></li>
21         </ul>
22       </div>
23       <div>
24         <h4>Other Hacking</h4>
25         <ul>
26           <li><a href="/docs/admin/hacking-bookstack/">All Hacking Methods</a></li>
27           <li><a href="https://github.com/BookStackApp/api-scripts">Example API Scripts</a></li>
28         </ul>
29       </div>
30       <div class="sidebar-inner mobile">
31         <ul>
32           <li><a href="/hacks">All Hacks</a></li>
33           <li><a href="/hacks/applying/">Applying Hacks</a></li>
34           <li><a href="https://github.com/BookStackApp/hacks">Hacks Source Repo</a></li>
35         </ul>
36       </div>
37     </aside>
38
39     <main class="col-md-8 col-md-offset-1 hacks-content">
40
41       {{ if .Params.Date }}
42       <div class="hack-warning">
43         <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"/></svg>
44         <div>
45           These hacks are unsupported customizations meant as unofficial workarounds. <br>
46           They can cause instability, introduce issues and may conflict with future updates.
47           Apply at your own risk!
48         </div>
49       </div>
50       {{ end }}
51
52       <h1>{{.Title}}</h1>
53
54       {{ if .Params.Tested }}
55       <ul class="hack-meta">
56         {{ $authors := strings.Split .Params.Author " " }}
57         <li><strong>Author{{ if gt (len $authors) 1 }}s{{end}}:</strong> {{ range $authors }}<a href="https://github.com/{{ strings.TrimLeft "@" . }}" target="_blank">{{ . }}</a> {{ end }}</li>
58         <li><strong>Created:</strong> {{ .Date.Format "2" | humanize }} {{ .Date.Format "Jan 2006" }}</li>
59         <li><strong>Updated:</strong> {{ .Params.Updated.Format "2" | humanize }} {{ .Params.Updated.Format "Jan 2006" }}</li>
60         <li><strong>Last Tested On:</strong> {{ .Params.Tested }}</li>
61       </ul>
62       {{ end }}
63
64       {{.Content}}
65
66
67       {{ if .Params.Tested }}
68       <hr>
69
70       <h4>Request an Update</h4>
71
72       <div class="row">
73         <div class="col col-md-8">
74           <p>
75             Hack not working on the latest version of BookStack? <br>
76             You can request this hack to be updated & tested for a small one-time fee. <br>
77             This helps keeps these hacks updated & maintained in a sustainable manner.
78           </p>
79         </div>
80         <div class="col col-md-4 text-center">
81           <a href="https://bookstack-hacks.httpfunctions.com?hack_id={{ .File.ContentBaseName }}&hack_name={{.Title}}" class="button" target="_blank">Request Update</a>
82         </div>
83       </div>
84
85       <hr>
86
87       <h4>Latest Hacks</h4>
88
89       <div class="hack-box-list">
90         {{ range first 4 ( where .Site.RegularPages "Section" "hacks") }}
91         {{ if .Params.Date }}
92           {{ partial "list-hack" .}}
93         {{ end }}
94       {{ end }}
95       </div>
96       {{ end }}
97
98     </main>
99   </div>
100
101 </div>
102
103 {{ partial "footer.html" . }}