Typecho类似百度响应式主题Xaink


一、详细介绍

新闻类型博客主题,简洁好看,适合资讯类、快讯类、新闻类博客建站,响应式设计,支持明亮和黑暗模式

直接下载 zip 源码->解压后移动到 Typecho 主题目录->改名为xaink->启用。

二、效果展示

1.部分代码

代码如下(示例):

<!-- 统计和说明 -->
            <div class="xa-statistics flex items-center justify-between pb-2 mt-2 lg:pt-0">
                <div class="flex items-center">
                    <?php
                    if($this->is('category')){
                        $subCategorys = [];
                        $isListCategory = xaIsListCategory($this->pageRow['mid']);
                        if (!$isListCategory && $this->pageRow['parent'] > 0) {
                            $isListCategory = xaIsListCategory($this->pageRow['parent']);
                        }
                        if($isListCategory) {
                            $subCategorys = $this->widget('Widget_Metas_Category_List')->getAllChildren($this->pageRow['mid']);
                            if (isset($subCategorys) && count($subCategorys) > 0) {
                                echo "分类<span class='mx-2 font-bold'>".$this->pageRow['name'] ." </span>子分类(".count($subCategorys).")";
                            }
                            else {
                                //var_dump($this->pageRow);
                                ?>
                            <div class="flex flex-col items-center justify-start">
                                <div class="w-full mb-4"><h2><?php echo $this->pageRow['name']; ?></h2></div>
                                <div class="w-full mb-4"><?php echo $this->pageRow['description']; ?></div>
                                <div class="w-full mb-4">章节数:<?php echo $this->pageRow['count']; ?></div>
                            </div>
                    <?php
                            }
                        }
                        else {
                            echo "分类<span class='mx-2 font-bold'>" . $this->pageRow['name'] . " </span>下共有文章" . $this->pageRow['count'] . "篇";
                        }
                    }
                    elseif($this->is('tag')) {
                        echo "<span class='xa-theme xa-count-tip mr-2' title='标签'>". $this->pageRow['name'] ."</span>相关文章". $this->pageRow['count'] ."篇";
                    }
                    elseif ($this->is('search')) {
                        $count = xaGetSearchTotal($this->keywords);
                        echo "为您找到相关文章".$count."篇";
                    }
                    elseif($this->is('archive')) {
                        if($this->archiveType == 'date') {
                            echo "归档:<span class='mx-2 font-bold'>".$this->archiveTitle ." </span>";
                        }
                    }
                    ?>
                </div>

2.效果图展示

请添加图片描述


三、学习资料下载

蓝奏云:https://qumaw.lanzoul.com/iWU7R25oi1md

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值