-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathheader.php
More file actions
53 lines (46 loc) · 1.86 KB
/
header.php
File metadata and controls
53 lines (46 loc) · 1.86 KB
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
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<!DOCTYPE html>
<html lang="zh-Hans">
<head>
<meta charset="<?php $this->options->charset(); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php $this->archiveTitle('', '', ' | '); ?><?php $this->options->title(); ?><?php if ($this->is('index')): ?> | <?php $this->options->description() ?><?php endif; ?></title>
<?php $this->header(); ?>
<?php if (!empty($this->options->siteFavicon)): ?>
<link rel="shortcut icon" href="<?php $this->options->siteFavicon(); ?>">
<?php endif; ?>
<?php $this->need('style.min.php'); ?>
<?php if ($this->options->customLink):
// 自定义Link
?>
<?php $this->options->customLink(); ?>
<?php endif; ?>
</head>
<body>
<?php if (!empty($this->options->topHeight)): ?>
<div class="navbar bg">
<div class="navbar-content">
<?php if ($this->options->logoUrl): ?>
<a class="site-logo"
href="<?php if (!empty($this->options->logoLink)): ?><?php $this->options->logoLink(); ?><?php else: ?><?php $this->options->siteurl(); ?><?php endif; ?>">
<img alt="<?php $this->options->title(); ?>"
src="<?php $this->options->logoUrl(); ?>">
</a>
<?php endif; ?>
<?php if (!empty($this->options->topTitle)): ?>
<div class="site-name">
<?php $this->options->topTitle(); ?>
</div>
<?php else: ?>
<?php endif; ?>
</div>
</div>
<div class="navbar">
<div class="site-description">
<?php if (!empty($this->options->topDescription)): ?>
<?php $this->options->topDescription(); ?>
<?php else: ?>
<?php endif; ?>
</div>
</div>
<?php endif; ?>