forked from NamelessMC/Nameless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.tpl
199 lines (150 loc) · 5.47 KB
/
error.tpl
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html>
<html lang="{$LANG}" {$RTL}>
<head>
<meta charset="{$LANG_CHARSET}">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{$TITLE}">
<!-- Page Title -->
<title>{$TITLE}</title>
<meta name="author" content="{$SITE_NAME}">
<link rel="stylesheet" href="{$BOOTSTRAP}">
<link rel="stylesheet" href="{$CUSTOM}">
<link rel="stylesheet" href="{$FONT_AWESOME}">
<link rel="stylesheet" href="{$PRISM_CSS}">
<script src="{$JQUERY}"></script>
<script src="{$PRISM_JS}"></script>
</head>
<body>
<br /><br />
<div class="container">
<div class="row">
<div class="col-md-{if $DETAILED_ERROR}12{else}6 offset-md-3{/if}">
<div class="jumbotron">
<div style="text-align:{if $DETAILED_ERROR} left {else} center {/if};">
{if $DETAILED_ERROR}
<h4>Uncaught <i>{$ERROR_TYPE}</i></h4>
<h2><kbd>{$ERROR_STRING}</kbd></h2>
<h3>(File: {$ERROR_FILE})</h3>
<a href="{$CURRENT_URL}">{$CURRENT_URL}</a>
{else}
<h2>{$FATAL_ERROR_TITLE}</h2>
<h4>{$FATAL_ERROR_MESSAGE_USER}</h4>
<div class="btn-group" role="group" aria-label="...">
<button href="#" class="btn btn-primary btn-lg" onclick="javascript:history.go(-1)">
{$BACK}
</button>
<a href="{$HOME_URL}" class="btn btn-success btn-lg">
{$HOME}
</a>
</div>
{/if}
</div>
</div>
</div>
</div>
{if $DETAILED_ERROR}
<br />
<div class="row">
<div class="col-md-12">
<div class="jumbotron">
<div style="text-align:center">
<div class="card">
<div class="card-body">
<div class="tab">
{foreach from=$FRAMES item=frame}
<button class="tablinks" id="button-{$frame['number']}" onclick="openFrame({$frame['number']})">
<h5>Frame #{$frame['number']}</h5>
<sub>{$frame['file']}:{$frame['line']}</sub>
</button>
{/foreach}
</div>
<div class="code">
{foreach from=$FRAMES item=frame}
<div id="frame-{$frame['number']}" class="tabcontent">
<h5>File: <strong>{$frame['file']}</strong></h5>
<hr>
{if $frame['code'] != ''}
<pre data-line="{$frame['highlight_line']}" data-start="{($frame['start_line'])}">
<code class="language-php line-numbers">{$frame['code']}</code>
</pre>
{else}
<pre>Cannot read file.</pre>
{/if}
</div>
{/foreach}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{/if}
</div>
</body>
<style>
{literal}
* {
box-sizing: border-box
}
/* Style the tab */
.tab {
float: left;
border: 1px solid #ccc;
background-color: #f1f1f1;
width: 30%;
max-height: inherit;
}
/* Style the buttons that are used to open the tab content */
.tab button {
display: block;
background-color: inherit;
color: black;
padding: 15px 16px;
width: 100%;
border: none;
outline: none;
text-align: left;
cursor: pointer;
transition: 0.3s;
}
/* Change background color of buttons on hover */
.tab button:hover {
background-color: #ddd;
}
/* Create an active/current "tab button" class */
.tab button.active {
background-color: #ccc;
}
/* Style the tab content */
.tabcontent {
float: left;
padding: 0px 12px;
width: 70%;
}
{/literal}
</style>
<script>
hideAllFrames();
function hideAllFrames() {
$('.tabcontent').each(function() {
$(this).css('display', 'none');
});
}
function removeAllActive() {
$('.tablinks').each(function() {
$(this).removeClass('active');
});
}
$(document).ready(function() {
openFrame({$FRAMES|count + $SKIP_FRAMES})
});
function openFrame(id) {
hideAllFrames();
removeAllActive();
$('#frame-' + id).css('display', 'block');
$('#button-' + id).addClass('active');
}
</script>
</html>