-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathindex.php
151 lines (136 loc) · 4.79 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
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
<?php
function get_file($file){
$data=file_get_contents($file);
$linkList=array();
$lines=explode("\n",$data);
foreach ($lines as $line) {
if (strlen($line)==0) continue;
$detail = str_replace("\r", '', $line);
array_push($linkList, $detail);
}
return $linkList;
}
function echo_link($list){
for ($x = 0; $x <= count($list); $x++) {
if ($list[$x]=="box"){
$x++;
echo '<section class="item card-box" id="row-1">
<div class="container-fluid">
<div class="row">
<div class="item-tit">
<strong><i class="'.$list[$x+1].'"></i><a name="'.$list[$x].'"></a>'.$list[$x].'</strong>
</div>
<div class="clearfix two-list-box">
';
$x++;
}else if ($list[$x]=="endbox"){
echo '</div></div></div></section>';
}else if ($list[$x]!=""){
echo '<div class="col-md-3 col-sm-4 col-xs-6">
<a href="'.$list[$x+1].'" class="card-link" target="_blank">
<div class="card-tit">'.$list[$x].'</div>
<div class="card-desc">'.$list[$x+1].'</div>
</a>
</div>';
$x++;
}
}
}
function echo_nav($list){
for ($x = 0; $x <= count($list); $x++) {
if ($list[$x]!=""){
echo '<li><a href="'.$list[$x+1].'">'.$list[$x].'</a></li>';
$x++;
}
}
}
?>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<!-- Header -->
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>思维导图</title>
<meta name="keywords" content="思维,导图"/>
<meta name="description" content="这是一个简简单单的网址导航。"/>
<link rel="icon" href="/img/logo.png">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/dist/css/zui.lite.min.css">
<link rel="stylesheet" href=" css/style.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css">
</head>
<body id="nav_body">
<div id="content">
<!-- Left Bar -->
<div class="left-bar">
<div class="header">
<h2>思维导图</h2>
</div>
<div class="menu" id="menu">
<ul class="scrollcontent">
<!-- Left Nav -->
<li><a href="https://t.me/vpsqun">Telegram群</a></li>
<?php
$list_nav=get_file("nav.txt");
echo_nav($list_nav);
?>
</ul>
</div>
</div>
<!-- Content -->
<div class="main">
<div class="container content-box">
<!-- Search -->
<section class="sousuo">
<div class="search">
<div class="search-box">
<button class="search-engine-name" id="search-engine-name">Google</button>
<input type="text" id="txt" class="search-input" placeholder="Hello World !"/>
<button class="search-btn" id="search-btn"><i class="fa fa-search"></i></button>
</div>
<!-- Engine -->
<div class="search-engine">
<div class="search-engine-head">
<strong class="search-engine-tit">Select Search Engine:</strong>
</div>
<ul class="search-engine-list">
</ul>
</div>
</div>
</section>
<!-- Links -->
<?php
$list_link=get_file("links.txt");
echo_link($list_link);
// if ($is_internal){
// $list_link=get_file("internal-data.txt");
// echo_link($list_link);
// }
// $list_link=get_file("foot-data.txt");
// echo_link($list_link);
?>
<!-- Footer -->
<footer class="footer">
<div class="container">
<div class="rwo">
<div class="col-md-12">
<p>
自豪的采用 <a href="https://github.com/qu5/nav">简单导航</a> 构建
</p>
</div>
</div>
</div>
</footer>
</div>
<!-- Content -->
</div>
<div id="get-top" title="回到顶部">
☝
</div>
<!-- jQuery (ZUI Require jQuery) -->
<script src="//cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="js/main.js"></script>
</div>
</body>
</html>