一、详细介绍
新闻类型博客主题,简洁好看,适合资讯类、快讯类、新闻类博客建站,响应式设计,支持明亮和黑暗模式
直接下载 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>