前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >美化Aria主题媲美收费主题Mirages

美化Aria主题媲美收费主题Mirages

作者头像
西柚dzh
发布2022-06-09 17:20:26
8490
发布2022-06-09 17:20:26
举报
文章被收录于专栏:dcmickey小站dcmickey小站

引言

心水别人的Mirages主题,可是收费啊,虽然50元并不贵,但是本着能不花钱就不花钱的原则,我决定升级(gao fang)一下样式。

效果对比图

原图

效果

是不是很简洁好看,那个丑丑的热门文章侧边栏请忽略,没高兴美化 已美化)

步骤

1.编写css样式文件,放到主题的/assets/css/dzhCustom.css下

代码语言:javascript
复制
.articalSite {
    transform: translate(-50%,-50%);
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    text-align: center;
    border-radius: .5rem;
    width: 100%;
    padding: 30px 10px;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

.articalTitle {
    color:#fff;
    text-shadow: 0 0 5px #c3c3c3;
    font-weight: 400;
    text-align: center;
    margin-top: 5px;
    margin-bottom: .75rem;
    font-size: 1.5625rem
}

.articalDescription {
    color:#eee;
    text-shadow: 0 0 5px #c3c3c3;
    font-weight: 400;
    text-align: center;
    margin-top: 5px;
    margin-bottom: .75rem;
    font-size:.875rem
}

2.再header.php中添加引用

代码语言:javascript
复制
<link href="<?php $this->options->themeUrl('assets/css/dzhCustom.css'); ?>" rel="stylesheet">

3.修改index.php和archive.php文件

替换掉整段article标签即可

代码语言:javascript
复制
<article itemscope itemtype="http://schema.org/BlogPosting" class="card animated wow fadeIn" data-wow-duration="1s" data-wow-offset="10" style='padding:0px ;margin:40px auto;'>
            <a href="<?php $this->permalink(); ?>">
                <div>
                    <?php $this->sticky(); ?>
                    <?php if (Utils::isEnabled('enableLazyload', 'AriaConfig')) : ?>
                        <div class="card-thumbnail lazyload" data-original=<?php if ($this->fields->thumbnail)
                                                                                $this->fields->thumbnail();
                                                                            else
                                                                                echo Utils::getThumbnail();
                                                                            ?> style="background:url(<?php $this->options->themeUrl('assets/img/loading.svg') ?>) center center no-repeat;background-size: 100% auto;border-radius :10px;">
                        </div>
                    <?php else : ?>
                        <div class="card-thumbnail" style="background:url(<?php if ($this->fields->thumbnail)
                                                                                $this->fields->thumbnail();
                                                                            else
                                                                                echo Utils::getThumbnail();
                                                                            ?>) center center no-repeat;background-size: 100% auto;border-radius :10px;">
                        </div>
                    <?php endif; ?>
                    <div class="articalSite">
                        <a class='articalTitle' href="<?php $this->permalink(); ?>"><?php $this->title(); ?></a>
                        <div class='articalDescription'>
                            <span> <?php $this->date(); ?>・</span><span><?php $this->category('・', false, '无');   ?>・</span>
                            <span><i class="iconfont icon-aria-comment"></i> <?php $this->commentsNum('%d'); ?> </span>
                        </div>
                    </div>
                </div>
            </a>
        </article>

版权属于:dingzhenhua

本文链接:https://cloud.tencent.com/developer/article/2019353

转载时须注明出处及本声明

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020-03-11,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 引言
  • 效果对比图
  • 原图
  • 效果
  • 步骤
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档