-
Notifications
You must be signed in to change notification settings - Fork 160
/
search.php
113 lines (111 loc) · 3.96 KB
/
search.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
<!doctype html>
<html lang="zh">
<head>
<?php get_header(); ?>
</head>
<body>
<div id="app">
<header>
<div class="header-main-plane">
<div class="header-main container">
<?php
get_template_part('component/nav-header');
?>
</div>
</div>
</header>
<div class="top-divider"></div>
<main class="container">
<div class="html-main">
<?php
global $set;
if ($set['theme']['sidebar']['other']) {
?>
<style>
body .post-info-right {
display: none;
}
.post-item-thumbnail img {
max-width: 336px;
}
.post-item-content,.post-item-info {
font-size: 16px;
}
.post-item h2 {
font-size: 22px;
}
</style>
<div class="post-main post-main-closesidebar" style="flex-basis: 100%;">
<?php
get_template_part('component/post-main-index');
?>
</div>
<?php
} else
if ($set['theme']['sidebar_position'] == 1) {
?>
<div class="post-main">
<div class="post-list-page-plane">
<div class="list-plane-title">
<p>搜索内容:<?php echo get_search_query(); ?></p>
</div>
<ul class="post-list">
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
get_template_part('component/post-list-item');
}
}
?>
</ul>
<div class="pages">
<?php
get_template_part('component/pageobj');
?>
</div>
</div>
</div>
<div class="sidebar">
<?php dynamic_sidebar('index_sidebar'); ?>
</div>
<?php
}else{
?>
<div class="sidebar">
<?php dynamic_sidebar('index_sidebar'); ?>
</div>
<div class="post-main">
<div class="post-list-page-plane">
<div class="list-plane-title">
<p>搜索内容:<?php echo get_search_query(); ?></p>
</div>
<ul class="post-list">
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
get_template_part('component/post-list-item');
}
}
?>
</ul>
<div class="pages">
<?php
get_template_part('component/pageobj');
?>
</div>
</div>
</div>
<?php
}
?>
</div>
</main>
<footer>
<?php get_footer(); ?>
</footer>
</div>
</body>
</html>
<?php