-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.php
executable file
·125 lines (121 loc) · 6.7 KB
/
index.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
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
<?php
/**
* 移植自<a href="https://limxw.com/" target="_blank">WingLim</a>的<a href="https://github.com/WingLim/hugo-tania" target="_blank">hugo-tania</a>主题,在其基础上进行了深度修改的 TinaTheme 或许是你在Typecho上最好的选择
* <hr><div style="width:fit-content" id="TinaTheme">版本检测中... </div>
* <script>var simversion="2.1.3";var buildversion = "40201";function update_detec(){var container=document.getElementById("TinaTheme");if(!container){return}var ajax=new XMLHttpRequest();container.style.display="block";ajax.open("get","https://assets.fmcf.cc/Theme/tina_update.json");ajax.send();ajax.onreadystatechange=function(){if(ajax.readyState===4&&ajax.status===200){var obj=JSON.parse(ajax.responseText);var newest=obj.Build;if(newest>buildversion){container.innerHTML="发现新主题版本:"+obj.name+'。下载地址:<a href="'+obj.zipball_url+'">点击下载</a>'+"<br>您目前的版本:"+String(simversion)+"。"+'<a target="_blank" href="'+obj.html_url+'">👉查看新版亮点</a>'}else{container.innerHTML="您目前的版本:"+String(simversion)+"。"+"您目前使用的是最新版。"}}}};update_detec();</script>
*
* @package Tina Theme
* @author Magneto
* @version 2.1.3
* @link https://www.fmcf.cc
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');
?>
<main>
<div class="container">
<section class="my">
<div class="content">
<p>
<?php if ($this->options->Notice): ?>
<?php $this->options->Notice() ?>
<?php else: ?>
<?php $this->options->description() ?>
<?php endif; ?>
</p>
</div>
<?php if ($this->options->Icons): ?>
<div class="bio-social">
<a href="<?php if ($this->options->icon_1_URL): ?><?php $this->options->icon_1_URL() ?><?php endif; ?>" target="_blank"><?php if ($this->options->icon_1): ?><?php $this->options->icon_1() ?><?php endif; ?></a>
<a href="<?php if ($this->options->icon_2_URL): ?><?php $this->options->icon_2_URL() ?><?php endif; ?>" target="_blank"><?php if ($this->options->icon_2): ?><?php $this->options->icon_2() ?><?php endif; ?></a>
<a href="<?php if ($this->options->icon_3_URL): ?><?php $this->options->icon_3_URL() ?><?php endif; ?>" target="_blank"><?php if ($this->options->icon_2): ?><?php $this->options->icon_3() ?><?php endif; ?></a>
</div>
<?php endif; ?>
</section>
</div>
<div class="container">
<section>
<h2>Latest Articles</h2>
<div class="post">
<?php while($this->next()): ?>
<div class="post">
<a href="<?php $this->permalink() ?>">
<div class="post-row">
<time><?php $this->date('M j'); ?></time>
<h3><?php $this->title() ?></h3>
</div>
</a>
</div>
<?php endwhile; ?>
</div>
</section>
<?php if ($this->options->Projects): ?>
<section>
<h2>Projects</h2>
<div class="projects">
<?php if ($this->options->Project_1): ?>
<div class="project">
<div>
<?php if ($this->options->Project_1_URL): ?>
<a href="<?php $this->options->Project_1_URL() ?>" target="_blank" rel="noreferrer">
<?php else: ?>
<a href="#" target="_blank" rel="noreferrer">
<?php endif; ?>
<?php if ($this->options->Project_1_Icon): ?>
<div class="icon"><img src="<?php $this->options->Project_1_Icon() ?>" height="30px" width="30px"></div>
<?php else: ?>
<div class="icon"></div>
<?php endif; ?>
<?php if ($this->options->Project_1_Name): ?>
<h3><?php $this->options->Project_1_Name() ?></h3>
<?php else: ?>
<h3>Project</h3>
<?php endif; ?>
</a>
<?php if ($this->options->Project_1_Describe): ?>
<div class="description"><?php $this->options->Project_1_Describe() ?></div>
<?php else: ?>
<div class="description"></div>
<?php endif; ?>
</div>
<div class="flex">
<a href="<?php if ($this->options->Project_1_URL): ?><?php $this->options->Project_1_URL() ?><?php endif; ?>" class="button" target="_blank" rel="noreferrer">Source</a>
</div>
</div>
<?php endif; ?>
<?php if ($this->options->Project_2): ?>
<div class="project">
<div>
<?php if ($this->options->Project_2_URL): ?>
<a href="<?php $this->options->Project_2_URL() ?>" target="_blank" rel="noreferrer">
<?php else: ?>
<a href="#" target="_blank" rel="noreferrer">
<?php endif; ?>
<?php if ($this->options->Project_2_Icon): ?>
<div class="icon"><img src="<?php $this->options->Project_2_Icon() ?>" height="30px" width="30px"></div>
<?php else: ?>
<div class="icon"></div>
<?php endif; ?>
<?php if ($this->options->Project_2_Name): ?>
<h3><?php $this->options->Project_2_Name() ?></h3>
<?php else: ?>
<h3>Project</h3>
<?php endif; ?>
</a>
<?php if ($this->options->Project_2_Describe): ?>
<div class="description"><?php $this->options->Project_2_Describe() ?></div>
<?php else: ?>
<div class="description"></div>
<?php endif; ?>
</div>
<div class="flex">
<a href="<?php if ($this->options->Project_2_URL): ?><?php $this->options->Project_2_URL() ?><?php endif; ?>" class="button" target="_blank" rel="noreferrer">Source</a>
</div>
</div>
<?php endif; ?>
</div>
</section>
<?php endif; ?>
</div>
</main>
<?php $this->need('footer.php'); ?>