This repository has been archived by the owner on Oct 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
404.php
61 lines (59 loc) · 2.37 KB
/
404.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
<?php
/**
* Castle 404 Page
* Last Update: 2020/02/09
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
if (@$_SERVER['HTTP_X_PJAX'] == true) {
header('HTTP/1.1 200 OK');
echo '<title>'.Castle_Header::title($this, '', ' - ', true, false).'</title>';
echo '<div id="moe-pjax-content"'.Castle_Header::cardTransparent().'>';
}else{
$this->need('core/inc/header.php');
}
?>
<style>header{display:none;}footer{display:none;}#moe-pjax-content{padding:0px;}</style>
<main class="moe-404-box">
<div class="mdui-card moe-404-card">
<div class="mdui-card-media">
<div class="moe-card-cover-image lazyload" data-src="<?php
$cover = $this->options->Cover404;
if (!empty($cover)) {
echo $cover;
}else{
Castle_Libs::resources('static/img/404.png', false, true);
}
?>" style="background-image:url('');"></div>
<div class="mdui-card-media-covered">
<div class="mdui-card-primary">
<div class="mdui-card-primary-title mdui-text-truncate"><?php $this->options->title() ?></div>
</div>
</div>
</div>
<div class="mdui-card-content">
<div class="mdui-typo-title"><?php echo $GLOBALS['CastleLang']['404']['title']; ?></div>
<div class="mdui-typo-subheading"><?php echo $GLOBALS['CastleLang']['404']['try']; ?></div>
<form id="search-404-form" onkeydown="if(event.keyCode == 13){CastleSearch.submit($$('#search-404-form #searchInput')); return false;}">
<div class="mdui-textfield">
<input class="mdui-textfield-input" type="text" id="searchInput" placeholder="<?php echo $GLOBALS['CastleLang']['404']['search']; ?>">
</div>
<button class="mdui-btn mdui-btn-icon mdui-color-theme-accent mdui-ripple moe-btn mdui-btn-raised" type="button" onclick="CastleSearch.submit($$('#search-404-form #searchInput'))"><i class="mdui-icon material-icons">search</i></button>
</form>
</div>
<div class="moe-404-btn">
<ul class="mdui-list">
<a href="<?php $this->options->index(); ?>" class="mdui-list-item mdui-ripple">
<i class="mdui-list-item-icon mdui-icon material-icons">home</i>
<div class="mdui-list-item-content"><?php echo $GLOBALS['CastleLang']['404']['home']; ?></div>
</a>
</ul>
</div>
</div>
</main>
<?php
if (@$_SERVER['HTTP_X_PJAX'] == true) {
echo '</div>';
}else{
$this->need('core/inc/footer.php');
}
?>