main.css修改
1、屏蔽文章页「海报分享」
2、屏蔽「字体放大、缩小」、「评论」
1-1
/* #post-action文章页海报分享 #font-adjust字体缩小*/
#post-action,#font-adjust {
display: none;
}
2-2
/*评论 在移动设备上不显示 */
@media screen and (max-width: 600px) {
.pingbi {
display: none;
}
}
评论在手机不显示:
打开echo_log.php,将:
<?php if(_cz('post-log_top_show_com_count', true)):?>
<div class="post-header-com flex align-items-center">
<a onclick="scrollToId('comment-form',-100)" class="tooltipstered" title="精彩文章,去评论!">
<i class="ri-message-3-line ri-1x mr3"></i><?= chr_count_format($comnum); ?>
</a>
</div>
<?php endif; ?>
修改为:
<div class="pingbi">
<?php if(_cz('post-log_top_show_com_count', true)):?>
<div class="post-header-com flex align-items-center">
<a onclick="scrollToId('comment-form',-100)" class="tooltipstered" title="精彩文章,去评论!">
<i class="ri-message-3-line ri-1x mr3"></i><?= chr_count_format($comnum); ?>
</a>
</div>
<?php endif; ?>
</div>
「分类聚合模块」
1、手机端屏蔽「分类聚合模块」
2、打开inc/component/module/cat_set.php
3、添加以下代码,自行调用。
在if (!defined('EMLOG_ROOT')) exit('error!');以下添加
function isMobile() {
$userAgent = strtolower($_SERVER['HTTP_USER_AGENT']);
$mobileAgents = array("android", "blackberry", "iphone", "ipad", "ipod", "iemobile", "opera mini", "webos", "googlebot-mobile");
$isMobile = false;
foreach ($mobileAgents as $agent) {
if (strpos($userAgent, strtolower($agent)) !== false) {
$isMobile = true;
break;
}
}
return $isMobile;
}
if (!isMobile()) {
<?php } ?>中添加},修改为:<?php }} ?>
「新文发布」
1、屏蔽首页「新文发布」
2、打开inc/component/chr_sort_logs.php
屏蔽:
<li class="index-sort-nav-item active" role="tab" id="post_sort_0_tab" data-bs-toggle="tab" data-bs-target="#post_sort_0"
aria-controls="post_sort_0" aria-selected="true">新文发布</li>
「顶部封面」、「文章数量」
1、屏蔽分类「顶部封面」、「文章数量」
2、打开inc/component/page/sort_html.php
屏蔽:
<div class="log-top-cover <?= $snow_class ?>">
<img <?= chr_get_lazy_attr('lazy_cover', $sort_bg_img, 'fit-cover') ?> alt="<?= $s_name ?>">
<div class="log-top-info">
<div class="log-top-title">
<span><?= $s_name ?></span>
</div>
</div>
<div class="abs-center left-bottom single-cover-con">
<div class="title-h-left">
<b><i class="ri-archive-stack-line em12 mr10 ml6"></i><?= $s_name ?><span class="icon-spot">共<?= $lognum ?>篇</span></b>
</div>
<?php if(_cz('pages-show_new_sort_desc', true)):?>
<div class="page-desc em09 mt10">
<?= $sort_des ?>
</div>
<?php endif;?>
</div>
</div>
「卡片底部」
1、首页、分类,卡片底部新增文章所属「分类」
1-1、打开inc/component/chr_log_list.php
2、卡片文章底部,「发布时间」修改
2-2、打开inc/component/chr_log_list.php
1-1
卡片底部只显示「文章发布日期」时,显示分类。
238行左右,在<div class="item-meta muted-2-color flex jsb ac">后面添加:
<!-- 只显示卡片发布时间时,使用自定义分类 -->
<?= '#'.$sort_name; ?>
2-2
进度条拉到底部,在最后的代码中,将:
<i class="ri-time-line"></i>
<?= $is_mobile && chr_compare_sz('post-card_date_style', 'new') ? chr_smartDate($value["date"]) : $log_date; ?>
修改为:
<i class="ri-time-line"></i>
<?= chr_compare_sz('post-card_date_style', 'new') ? chr_smartDate($value["date"]) : $log_date; ?>
右上角「文章」图标
1、在文章页右上角添加「文章」图标
2、打开echo_log.php
.originalImg { background: url(../img/original.png); background-position: 0 0; background-size: 64px; width: 64px; height: 64px; position: absolute; right: 0; top: 0;}
.narlis { margin-bottom: 20px; }
在echo_log.php中,<div class="chr_divider"></div>上面新增:
<div class="originalImg"></div>
「评论底部」
1、屏蔽「no-comment.svg」图片
2、打开inc/functions/article/comments.php
屏蔽:echo chr_empty_content('no-comment.svg');
更换「代码样式」
1、打开inc/functions/chr-header.php
2、开启prism代码高亮插件插件
屏蔽:
echo "<link rel='stylesheet' id='highlight-code-css' href='" . chr_cdn(TEMPLATE_URL) . "assets/css/highlight/" . _cz('post-new_highlight_style', false, 'atelier-cave.min') . ".css' type='text/css' media='all'/>";
请登录后发表评论
注册