-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
99 lines (90 loc) · 3.71 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
<?php get_header();?>
<div id="column1" class="grid_7">
<div class="column-head">
<b>最新发表</b><span style="font-size:13px;color:#b9b9b9;">|</span><a href="/archive/"><span style="font-size:13px;color:#b9b9b9;">阅读更多 »</span></a>
</div>
<?php
query_posts('numberposts=8' );
/* the loop */
if (have_posts()) :
// put the theme options here
global $cnpolitics_theme_dir;
require_once( $cnpolitics_dir.'/inc/article_inc.php' );
else:
// No posts found
endif;
?>
</div>
<div id="column2" class="prefix_8 grid_4.1">
<?php get_sidebar(); ?>
</div>
<div class="clear"></div>
<div id="display_bar">
<img src="<?php bloginfo('template_directory'); ?>/images/shadow_middle.png">
</div>
<div id="additional">
<div id="graphics" class="grid_6_1">
<div class="additional-text-graphics">
<div class="additional-head">
<?php
$category_obj = get_category_by_slug('infographic');
$category_id = $category_obj->term_id;
$category_link = get_category_link( $category_id );
echo '<b>读图识政治</b>';
echo '<a href="'.$category_link.'"><span style="font-size:13px;color:#b9b9b9;font-weight:500;">|更多信息图 »</span></a>';
?>
</div>
<p class="additional-abstract">政见的信息可视化基于对公开资料的搜集和分析,辨识蕴藏在单纯数据背后的事实。</p>
<p class="additional-abstract">政见力求将资讯以全新的视觉形式表达,展示我们对具体事件的观点。</p>
</div>
<div class="additional-img1">
<?php
/*
$postslist = get_posts( array( 'numberposts' => '3', 'category' => $category_id, 'orderby' => 'rand' ) );
foreach ($postslist as $post) {
setup_postdata($post);
$post_thumbnail_id = get_post_thumbnail_id();
echo '<a href="'.get_permalink().'"><img width="180" height="180" src="'.wp_get_attachment_thumb_url( $post_thumbnail_id ).'"></a>';
}
*/
for ($i=0; $i<=2; $i++){
$imgurl = esc_url( get_option("cnpolitics_graphics_imgurl_".$i) );
$linkurl = esc_url( get_option("cnpolitics_graphics_link_".$i) );
echo '<a href="'.$linkurl.'"><img width="180" height="180" src="'.$imgurl.'"></a>';
}
?>
</div>
</div>
<div id="collections" class="grid_5_1">
<div class="additional-text-collections">
<div class="additional-head">
<?php
$category_obj = get_category_by_slug('publish');
$category_id = $category_obj->term_id;
$category_link = get_category_link( $category_id );
echo '<b>政见合辑</b>';
echo '<a href="'.$category_link.'"><span style="font-size:13px;color:#b9b9b9;font-weight:500;">|更多合辑 »</span></a>';
?>
</div>
<p class="additional-abstract">合辑是由政见网站内容重新编辑并整合而成的电子出版物。每个季度合辑都会与你见面。</p>
<p class="additional-abstract">另与电子书城“字节社”合作发行 iOS/Android 版,阅读体验极佳。</p>
</div>
<div class="additional-img2">
<?php
/*$postslist = get_posts( array( 'numberposts' => '3', 'category' => $category_id, 'orderby' => 'rand' ) );
foreach ($postslist as $post) {
setup_postdata($post);
$post_thumbnail_id = get_post_thumbnail_id();
echo '<a href="'.get_permalink().'"><img width="120" height="180" src="'.wp_get_attachment_thumb_url( $post_thumbnail_id ).'"></a>';
}*/
for ($i=0; $i<=2; $i++){
$imgurl = esc_url( get_option("cnpolitics_collections_imgurl_".$i) );
$linkurl = esc_url( get_option("cnpolitics_collections_link_".$i) );
echo '<a href="'.$linkurl.'"><img width="120" height="180" src="'.$imgurl.'"></a>';
}
?>
</div>
</div>
</div>
<?php get_footer(); ?>
<script type="text/javascript" src="<?php bloginfo('template_directory');?>/js/abstract.js"></script>