Skip to content

Commit

Permalink
添加详情页
Browse files Browse the repository at this point in the history
  • Loading branch information
owen0o0 committed Dec 6, 2019
1 parent 707c939 commit 4941d74
Show file tree
Hide file tree
Showing 13 changed files with 359 additions and 55 deletions.
57 changes: 57 additions & 0 deletions archive.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php
if ( ! defined( 'ABSPATH' ) ) { exit; }
get_header(); ?>


<?php
$categories= get_categories(array(
'taxonomy' => 'favorites',
'meta_key' => '_term_order',
'orderby' => 'meta_value_num',
'order' => 'desc',
'hide_empty' => 0,
)
);
include( 'templates/header-nav.php' );
?>
<div class="main-content">
<nav class="navbar user-info-navbar" role="navigation">
<div class="navbar-content">
<ul class="user-info-menu left-links list-inline list-unstyled">
<li class="hidden-xs">
<a href="#" data-toggle="sidebar">
<i class="fa fa-bars"></i>
</a>
</li>
<li>
<div id="he-plugin-simple"></div>
<script>WIDGET = {CONFIG: {"modules": "12034","background": 5,"tmpColor": "aaa","tmpSize": 16,"cityColor": "aaa","citySize": 16,"aqiSize": 16,"weatherIconSize": 24,"alertIconSize": 18,"padding": "30px 10px 30px 10px","shadow": "1","language": "auto","borderRadius": 5,"fixed": "false","vertical": "middle","horizontal": "left","key": "a922adf8928b4ac1ae7a31ae7375e191"}}</script>
<script src="https://widget.heweather.net/simple/static/js/he-simple-common.js?v=1.1"></script>
</li>
</ul>
</div>
<a href="https://github.com/owen0o0/WebStack" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
</nav>
<?php
if(io_get_option('is_search')){include('search-tool.php'); }
else{?>
<div class="no-search"></div>
<?php } ?>
<h4 class="text-gray"><i class="icon-io-tag" style="margin-right: 27px;" id="<?php single_cat_title() ?>"></i><?php single_cat_title() ?></h4>
<div class="row">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post();
$link_url = get_post_meta($post->ID, '_sites_link', true);
$default_ico = get_template_directory_uri() .'/images/favicon.png';
if(current_user_can('level_10') || get_post_meta($post->ID, '_visible', true)!="true"):
?>
<div class="xe-card <?php echo io_get_option('columns') ?> <?php echo get_post_meta($post->ID, '_wechat_qr', true)? 'wechat':''?>">
<?php include( 'templates/site-card.php' ); ?>
</div>
<?php endif; endwhile; endif;?>
</div>
<br />

分页功能

<?php get_footer(); ?>
57 changes: 46 additions & 11 deletions css/nav.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 2 additions & 18 deletions inc/fav-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,8 @@ function fav_con($mid) { ?>
$default_ico = get_template_directory_uri() .'/images/favicon.png';
if(current_user_can('level_10') || get_post_meta($post->ID, '_visible', true)!="true"):
?>
<div class="xe-card <?php echo io_get_option('columns') ?>">
<a href="<?php echo io_get_option('is_go')? '/go/?url='.base64_encode($link_url) : $link_url ?>" target="_blank" class="xe-widget xe-conversations box2 label-info" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="<?php echo $link_url ?>">
<div class="xe-comment-entry">
<div class="xe-user-img">
<?php if(io_get_option('lazyload')): ?>
<img class="img-circle lazy" src="<?php echo $default_ico; ?>" data-src="<?php echo get_post_meta($post->ID, '_thumbnail', true)? get_post_meta($post->ID, '_thumbnail', true): (io_get_option('ico_url') .format_url($link_url) . io_get_option('ico_png')) ?>" onerror="javascript:this.src='<?php echo $default_ico; ?>'" width="40">
<?php else: ?>
<img class="img-circle lazy" src="<?php echo get_post_meta($post->ID, '_thumbnail', true)? get_post_meta($post->ID, '_thumbnail', true): (io_get_option('ico_url') .format_url($link_url) . io_get_option('ico_png')) ?>" onerror="javascript:this.src='<?php echo $default_ico; ?>'" width="40">
<?php endif ?>
</div>
<div class="xe-comment">
<div class="xe-user-name overflowClip_1">
<strong><?php the_title() ?></strong>
</div>
<p class="overflowClip_2"><?php echo get_post_meta($post->ID, '_sites_sescribe', true) ?></p>
</div>
</div>
</a>
<div class="xe-card <?php echo io_get_option('columns') ?> <?php echo get_post_meta($post->ID, '_wechat_qr', true)? 'wechat':''?>">
<?php include( get_theme_file_path() .'/templates/site-card.php' ); ?>
</div>
<?php endif; endwhile; endif; wp_reset_postdata(); ?>
</div>
Expand Down
Loading

0 comments on commit 4941d74

Please sign in to comment.