标签集合

燃烧的冰2019-12-28  4.8K+

标签集合,为全站所有标签集合,此页根据自己的需求,可改成标签云的形式。


对应的文件为 view/htm/tag_list.htm

<div class="row">
   <div class="col-lg-12">
      <div class="content mr-3">
         <!-- 当前所在位置 -->
         <div class="d-flex justify-content-between">
            <ol class="breadcrumb col">
               <li class="breadcrumb-item">
                  <!-- 返回主页 -->
                  <a href="<?php echo $conf['path'];?>">
                  <i class="icon-home" aria-hidden="true"></i>
                  </a>
               </li>
               <li class="breadcrumb-item">
                  <!-- 标签集合页链接 -->
                  <a href="<?php echo $header['mobile_link'];?>">
                     <?php echo lang('well_tag');?>
                  </a>
               </li>
               <li class="breadcrumb-item">
                  <?php echo lang('list');?>
               </li>
            </ol>
         </div>

         <ul class="row list-unstyled mb-0">
         <!-- 循环输出当前页标签 -->
            <?php if($taglist){foreach ($taglist as &$_tag){ ?>
            <!-- tap为移动端整行跳转class / data-href为跳转链接 -->
            <li class="col-md-3 tap" data-href="<?php echo url('tag-' . $_tag['tagid']);?>">
               <div class="card">
                  <div class="card-body">
                     <ul class="list-unstyled d-flex justify-content-between">
                        <li>
                        <h2 class="mb-0 size1">
                           <!-- 标签链接 -->
                           <a href="<?php echo url('tag-' . $_tag['tagid']);?>">
                           <strong><?php echo $_tag['name'];?></strong>
                           </a>
                        </h2>
                        </li>
                        <li>
                           <!-- 标签下主题数量 -->
                           <?php echo lang('threads');?>:<?php echo $_tag['count'];?>
                        </li>
                     </ul>
                  </div>
               </div>
            </li
            <?php }}else{ ?
            <li class="col-md-12">
             <?php echo lang('none');?>
            </li>
            <?php } ?>
         </ul
         <!-- 分页 / start -->
         <?php if ($pagination) { ?>
         <nav class="my-3">
            <ul class="pagination justify-content-center flex-wrap">
            <?php echo $pagination; ?>
            </ul>
         </nav>
         <?php } ?>
         <!-- 分页 / end -->
      </div>
   </div>
</div>

加载公用页头和页脚,此页完毕。

1