Joe主题美化修改记录

  • 💡Typecho
  • 4275 阅读
  • 2021年02月05日
  • 0 条评论
  • 全文共411字, 阅读大约需要2分钟
  • 搜索引擎已收录

首页 / 💡Typecho / 正文

AI摘要
Gemini 1.5 Pro
此内容根据文章生成,并经过人工审核,仅用于文章内容的解释与总结
反馈

主题修改记录

添加页脚代码

1、直接在footer.php中插入

<div id="footer-widget-box" class="site-footer">
    <div class="footer-widget">
        <aside id="custom_html-2" class="widget_text widget widget_custom_html wow fadeInUp"
        data-wow-delay="0.3s">
            <h3 class="widget-title">
                <span class="s-icon">
                </span>
                了解我们
            </h3>
            <div class="textwidget custom-html-widget" style="text-align:center;padding-left:30px;">
                <table class="wp-block-table has-fixed-layout" style="text-align:center;border: 0;line-height: 180%;"
                width="100%">
                    <tbody>
                        <tr height="150%">
                            <td style="text-align:left;border: 0;line-height: 180%;">
                                <a href="https://nicepub.top/about">
                                    关于本站
                                </a>
                            </td>
                            <td style="text-align:left;border: 0;line-height: 180%;">
                                <a href="https://nicepub.top/feed-page">
                                    订阅本站
                                </a>
                            </td>
                            <td style="text-align:left;border: 0;line-height: 180%;">
                                <a href="https://nicepub.top/contribute-page">
                                    投稿本站
                                </a>
                            </td>
                        </tr>
                        <tr height="150%">
                            <td style="text-align:left;border: 0;line-height: 180%;">
                                <a href="https://nicepub.top/archives-page">
                                    年度归档
                                </a>
                            </td>
                            <td style="text-align:left;border: 0;line-height: 180%;">
                                <a href="https://nicepub.top/links-page">
                                    友情链接
                                </a>
                            </td>
                            <td style="text-align:left;border: 0;line-height: 180%;">
                                <a href="https://nicepub.top/tags-page">
                                    热门标签
                                </a>
                            </td>
                        </tr>
                        <tr height="150%">
                            <td style="text-align:left;border: 0;line-height: 180%;">
                                <a href="https://nicepub.top/links-page">
                                    友情链接
                                </a>
                            </td>
                            <td style="text-align:left;border: 0;line-height: 180%;">
                                <a href="https://nicepub.top/links-page">
                                    友情链接
                                </a>
                            </td>
                            <td style="text-align:left;border: 0;line-height: 180%;">
                                <a href="https://nicepub.top/links-page">
                                    友情链接
                                </a>
                            </td>
                        </tr>
                        <tr height="150%">
                            <td style="text-align:left;border: 0;line-height: 180%;">
                                <a href="https://nicepub.top/links-page">
                                    友情链接
                                </a>
                            </td>
                            <td style="text-align:left;border: 0;line-height: 180%;">
                                <a href="https://nicepub.top/links-page">
                                    友情链接
                                </a>
                            </td>
                            <td style="text-align:left;border: 0;line-height: 180%;">
                                <a href="https://nicepub.top/links-page">
                                    友情链接
                                </a>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="clear">
            </div>
        </aside>
        <aside id="custom_html-3" class="widget_text widget widget_custom_html wow fadeInUp"
        data-wow-delay="0.3s" style="padding-top:20px;padding-right:30px;">
            <!--<h3 class="widget-title">
                <span class="s-icon">
                </span>
                关注我们
            </h3>-->
            <div class="textwidget custom-html-widget">
                <table style="text-align:center;border: 0;padding: 0;margin:0;">
                    <tbody border:="" 0;="">
                        <tr>
                            <td style="text-align:center;border: 0;padding: 0 5px;">
                                <img src="https://cdn2.imgbed.top/images/2019/2019/11/weixin_big.png"
                                alt="我的微信" style="width:100px;">
                                <p style="text-align:center;">
                                    我的微信
                                </p>
                            </td>
                            <td style="text-align:center;border: 0;padding: 0 5px;">
                                <img src="https://cdn2.imgbed.top/images/2019/2019/11/gongzhonghao.png"
                                alt="我的公众号" style="width:100px;">
                                <p style="text-align:center;">
                                    我的公众号
                                </p>
                            </td>
                            <td style="text-align:center;border: 0;padding: 0 5px;">
                                <img src="https://cdn2.imgbed.top/images/2019/2019/11/M_weibo_big.png"
                                alt="官方微博" style="width:100px;">
                                <p style="text-align:center;">
                                    官方微博
                                </p>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="clear">
            </div>
        </aside>
        <aside id="text-4" class="widget widget_text wow fadeInUp" data-wow-delay="0.3s">
            <h3 class="widget-title">
                <span class="s-icon">
                </span>
                本站简介
            </h3>
            <div class="textwidget">
                <p style="margin-top:5px;text-align: justify;">
                    本站是一群志同道合的小伙们发起并成立的一个致力于EPUB电子书排版制作的平台,我们的宗旨是让每个人都能读到精致、美观的电子书,让阅读成为一种享受,欢迎广大书友加入我们。
                </p>
            </div>
            <div class="clear">
            </div>
        </aside>
        <div class="clear">
        </div>
    </div>
</div>

2、footer.php引入模板文件foot.about.php(文件内容为上面的代码)

<?php $this->need('component/foot.about.php'); ?>

3、后台自定义CSS添加

//页尾三栏
.j-footer {
background: #ffffff;
    color:#222;
}
.j-footer .container a, .banquan-links a, .info  {
    color:#222;
}

#footer-widget-box {
    line-height: 180%;
    background: #555;
    position: relative;
    padding: 10px 10%;
    box-shadow: 0 -1px 1px rgba(0, 0, 0, 0.1);
}

.footer-widget, .footer-widget a {
    color: #ccc;
}
.footer-widget {
    width: 100%;
    margin: 0 auto;
}

.footer-widget h3 {
    font-size: 16px;
    color: #ccc;
    margin: 10px 0 0 0;
}

.footer-widget .widget {
    background: #555;
    float: left;
    width: 33.33333333333%;
    padding: 0 20px;
    border: none;
    box-shadow: none;
}

.footer-widget, .footer-widget a {
    color: #ccc;
}

.footer-widget a:hover {
    color: #fff;
}

.footer-widget .widget ul {
    padding: 8px 0 15px;
}

.footer-widget .menu li {
    float: left;
    width: 50%;
}

#footer-widget-box .add-widgets, #footer-widget-box .add-widgets a {
    color: #fff;
    text-align: center;
}
.widget .textwidget {
    padding: 18px;
}
.clear {
    clear: both;
    display: block;
}
.wp-block-table.has-fixed-layout {
    table-layout: fixed;
    width: 100%;
}

添加侧边栏社交图标

1、aside.php中查找

            <?php $this->widget('Widget_Contents_Post_Recent@aside565', 'pageSize=' . $this->options->JAuthorStatus)->to($hot); ?>

替换为

            <?php $this->need('component/post.social.php'); ?>
            <?php $this->widget('Widget_Contents_Post_Recent@aside565', 'pageSize=' . $this->options->JAuthorStatus)->to($hot); ?>

2、CSS

// 侧栏社交css
.sidebar-box-two{
min-height:unset;
}
.social{
display: flex;
    justify-content: space-around;
border-bottom: 1px solid var(--classC);}
.social img {
   width: 20px;
   height: auto;
   margin: 15px 0;
   border-radius: 50px;
}
.social svg {
   width: 28px;
   height: auto;
   margin: 15px 0;
   border-radius: 5px;
}
.texiao:hover{
transform: scale(1.4);
transition: all .5s;
}

侧边栏最新回复数量

修改pageSize=后面的值

            <h3>最新回复</h3>
            <?php $this->widget('Widget_Comments_Recent@ok88', 'ignoreAuthor=true&pageSize=3')->to($comments); ?>

修改赞赏图片

component/post.fabulous.php文件

            <section class="right" id="j-admire">
            <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">                    <path d="M512 640c0-35.36 28.64-64 64-64s64 28.64 64 64c0 35.36-28.64 64-64 64s-64-28.64-64-64zM928.032 416c-0.032 0-0.032 0 0 0l-0.032-192 0-96c0-53.024-43.008-96-96-96l-656 0c-97.056 0-176 78.976-176 176l0 640c0 97.024 78.944 176 176 176l576 0c97.024 0 176-78.976 176-176l0-48c0 0 0 0 0.032 0 127.936-96.032 127.936-287.968 0-384zM176 96l656 0c17.632 0 32 14.336 32 32l0 197.888c-10.048-3.584-20.736-5.888-32-5.888l-0.032 0 0-160c0-17.696-14.336-32-32-32l-672 0c-17.664 0-32 14.304-32 32l0 126.176c-19.744-20.192-31.968-47.712-31.968-78.176 0-61.856 50.112-112 112-112zM799.968 192l-672 0 0-32 672 0 0 32zM799.968 224l0 32-672 0 0-32 672 0zM799.968 288l0 32-623.968 0c-17.28 0-33.408-4.224-48-11.2l0-20.8 671.968 0zM864 848c0 61.856-50.144 112-112 112l-576 0c-61.888 0-112-50.144-112-112l0-504.352c30.432 25.184 69.472 40.352 112 40.352l656 0c17.632 0 32 14.336 32 32l0 64-288 0c-88.384 0-160 71.616-160 160s71.648 160 160 160l288 0 0 48zM904.864 736l-328.864 0c-52.928 0-96-43.072-96-96s43.072-96 96-96l288 0c19.744-0.256 39.328-9.824 51.264-25.728 3.328-4.48 5.92-9.504 8-14.752 0.288-0.704 0.8-1.248 1.056-1.984 23.008 30.176 35.68 67.168 35.68 106.464 0 49.216-19.872 94.88-55.136 128z" p-id="4466"></path>
            </svg>
                <!--<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">
                    <path d="M960 512c0-246.5-200.6-446.4-448-446.4S64 265.5 64 512c0 246.6 200.6 446.4 448 446.4S960 758.6 960 512z m-269.5 78.3c21.2-0.3 37.3 14.3 37.3 40.4 0 26.1-14.9 41.3-37.3 40.4l-117.3-0.6v68c-0.6 36.3-21.7 54.5-59.9 54.5-37.7 0-59.5-17.7-61.1-54.5v-66.7H327.9c-23.2-1.7-38-16-38-43.6s14.8-36.1 38-37.8h124.2V550l-124.2-0.6c-23.2-1.7-38-15-38-39.8 0-24.8 14.8-36.1 38-37.8h92.7l-80-99c-16.9-28.8-19.3-62 5.7-79.1 25-17.1 56.7-7.2 73.5 20.7l91.6 126L594 317.1c14.9-26.4 40.3-44.5 72.9-27.7 27.9 14.4 25.6 47.4 10.2 77.1l-74.9 105.1h88.4c22.3 1.7 37.3 9.7 37.3 37.9 0 28.1-15.6 39.3-38 41l-116.7 0.6v39.1h117.3v0.1z" p-id="12711"></path>
                </svg>-->
                <span>赞 赏</span>

添加文章页编辑图标

post.classify.php

<div class="classify">

    <?php if ($this->is('post')) : ?>

        <div class="category">

            <?php $this->category(''); ?>

        </div>

    <?php endif; ?>



    <?php if ($this->user->uid == $this->authorId) : ?>

        <?php if ($this->is('post')) : ?>

            <a class="edit" target="_blank" href="<?php $this->options->adminUrl(); ?>write-post.php?cid=<?php echo $this->cid; ?>"><svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="22" height="22" style="vertical-align: bottom;"><path d="M822.677808 322.691423c-14.303774-23.668049-31.952736-46.818305-53.54859-68.290339-21.834284-21.686928-45.39591-39.464827-69.496817-53.731762l42.329061-42.34441c0 0 61.273529-0.017396 91.902106 30.625508 30.636764 30.640857 30.636764 91.917456 30.636764 91.917456L822.677808 322.691423 822.677808 322.691423zM445.400163 705.419198 317.40707 705.419198 317.40707 577.427128l15.371082-15.364943c26.022677 12.246929 51.862181 29.576619 75.130118 52.849672 23.279193 23.252587 40.590464 49.124837 52.859905 75.140351L445.400163 705.419198 445.400163 705.419198zM787.309276 358.077352 497.709529 653.118018c-14.939247-24.731264-33.376155-48.901757-55.933917-71.330582-22.802332-22.666232-47.412846-41.207517-72.584132-56.130392l295.577902-290.121634c24.918529 11.713786 49.649793 28.282137 71.932286 50.573839C758.994394 308.406069 775.564791 333.121983 787.309276 358.077352L787.309276 358.077352zM254.328429 222.11475 254.328429 768.482489l546.383088 0L800.711518 537.414833l63.773466-84.23345 0.01535 317.809229c0 33.849946-27.430746 61.273529-61.269435 61.273529L251.809049 832.264141c-33.834596 0-61.269435-27.423583-61.269435-61.273529L190.539614 219.591277c0-33.864272 27.430746-61.283762 61.269435-61.283762l317.830719 0.017396-84.244706 63.789838L254.328429 222.11475 254.328429 222.11475z" p-id="11016" fill="#909399"></path></svg>编辑文章</a>

        <?php else : ?>

            <a class="edit" target="_blank" href="<?php $this->options->adminUrl(); ?>write-page.php?cid=<?php echo $this->cid; ?>"><svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="22" height="22" style="vertical-align: bottom;"><path d="M822.677808 322.691423c-14.303774-23.668049-31.952736-46.818305-53.54859-68.290339-21.834284-21.686928-45.39591-39.464827-69.496817-53.731762l42.329061-42.34441c0 0 61.273529-0.017396 91.902106 30.625508 30.636764 30.640857 30.636764 91.917456 30.636764 91.917456L822.677808 322.691423 822.677808 322.691423zM445.400163 705.419198 317.40707 705.419198 317.40707 577.427128l15.371082-15.364943c26.022677 12.246929 51.862181 29.576619 75.130118 52.849672 23.279193 23.252587 40.590464 49.124837 52.859905 75.140351L445.400163 705.419198 445.400163 705.419198zM787.309276 358.077352 497.709529 653.118018c-14.939247-24.731264-33.376155-48.901757-55.933917-71.330582-22.802332-22.666232-47.412846-41.207517-72.584132-56.130392l295.577902-290.121634c24.918529 11.713786 49.649793 28.282137 71.932286 50.573839C758.994394 308.406069 775.564791 333.121983 787.309276 358.077352L787.309276 358.077352zM254.328429 222.11475 254.328429 768.482489l546.383088 0L800.711518 537.414833l63.773466-84.23345 0.01535 317.809229c0 33.849946-27.430746 61.273529-61.269435 61.273529L251.809049 832.264141c-33.834596 0-61.269435-27.423583-61.269435-61.273529L190.539614 219.591277c0-33.864272 27.430746-61.283762 61.269435-61.283762l317.830719 0.017396-84.244706 63.789838L254.328429 222.11475 254.328429 222.11475z" p-id="11016" fill="#909399"></path></svg>编辑页面</a>

        <?php endif; ?>

    <?php endif; ?>

</div>

添加文章页相关图标

post.header.php

<div class="header">

    <h1 class="title j-typing"><?php $this->title() ?></h1>

    <?php if ($this->options->JPostCountingStatus === 'on') : ?>

        <div class="conting">

            <div class="info">

                <img src="<?php ParseAvatar($this->author->mail); ?>" />

                <div class="meta">

                    <div class="author">

                        <a href="<?php $this->author->permalink(); ?>"><?php $this->author(); ?></a>

                    </div>

                    <div class="item">

                        <svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M512 42.666667C252.789333 42.666667 42.666667 252.8 42.666667 512c0 259.210667 210.122667 469.333333 469.333333 469.333333s469.333333-210.122667 469.333333-469.333333C981.333333 252.8 771.210667 42.666667 512 42.666667z m0 853.333333c-212.074667 0-384-171.914667-384-384 0-212.074667 171.925333-384 384-384s384 171.925333 384 384c0 212.085333-171.925333 384-384 384z m158.165333-286.165333a42.666667 42.666667 0 0 1-60.330666 60.341333l-128-128A42.666667 42.666667 0 0 1 469.333333 512V256a42.666667 42.666667 0 0 1 85.333334 0v238.336l115.498666 115.498667z" p-id="17397" fill="#909399"></path></svg>&nbsp;&nbsp;<span><?php $this->date('Y-m-d'); ?></span>

                        <div class="line">/</div>

                        <svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M512 157.27104c104.35072 0 201.79968 31.89248 274.39616 89.8048 67.89632 54.16448 105.2928 124.75392 105.2928 198.75328s-37.39136 144.5888-105.2928 198.75328c-72.59648 57.91232-170.04544 89.8048-274.39616 89.8048-49.34656 0-98.85696 36.84352-156.18048 79.50848-9.53856 7.09632-21.55008 16.04096-33.5616 24.59136l0.04096-8.35072c0.384-63.60576 0.77824-129.37216-50.2016-161.19808-88.832-55.45472-139.78112-136.77568-139.78112-223.10912 0-74.00448 37.39136-144.5888 105.2928-198.75328 72.59136-57.9072 170.04032-89.8048 274.39104-89.8048m0-70.87104c-248.83712 0-450.56 160.92672-450.56 359.43424 0 115.03104 67.7376 217.44128 173.12768 283.23328 36.55168 22.81472-4.85376 194.55488 39.5008 207.55968 2.25792 0.66048 4.69504 0.97792 7.31136 0.97792 53.52448 0 178.53952-132.33152 230.62528-132.33152 248.83712 0 450.56-160.92672 450.56-359.43424C962.56 247.3216 760.83712 86.4 512 86.4z" fill="#666666" p-id="17004"></path><path d="M660.48 414.09024H363.52a35.84 35.84 0 1 1 0-71.68h296.96a35.84 35.84 0 1 1 0 71.68zM614.4 577.93024H409.6a35.84 35.84 0 1 1 0-71.68h204.8a35.84 35.84 0 1 1 0 71.68z" fill="#666666" p-id="17005"></path></svg>&nbsp;&nbsp;<span><?php $this->commentsNum('%d'); ?> 评论</span>

                        <div class="line">/</div>

                        <svg t="1607931368109" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19831" width="16" height="16"><path d="M512 283.456c-165.248 0-299.392 74.304-408.128 228.864 107.2 154.112 241.28 228.224 408.128 228.224 166.848 0 300.928-74.112 408.128-228.224C811.392 357.76 677.248 283.52 512 283.52zM512 832c-213.888 0-384.512-106.688-512-320 129.408-213.312 300.032-320 512-320 211.968 0 382.592 106.688 512 320-127.488 213.312-298.112 320-512 320z m0-137.152a182.848 182.848 0 1 0 0-365.696 182.848 182.848 0 0 0 0 365.696zM512 576a64 64 0 1 1 0-128 64 64 0 0 1 0 128z" fill="#909399" p-id="19832"></path></svg>&nbsp;&nbsp;<span><?php getPostViews($this) ?> 阅读</span>

                        <div class="line">/</div>

                        <svg t="1607932012518" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10103" width="16" height="16"><path d="M847.616 472.789333L744.746667 802.069333a42.666667 42.666667 0 0 1-30.72 28.736l-618.666667 149.333334c-31.018667 7.488-58.965333-20.48-51.477333-51.477334l149.333333-618.666666a42.666667 42.666667 0 0 1 28.736-30.72l329.28-102.890667 81.322667-98.133333 2.688-2.944a111.573333 111.573333 0 0 1 157.824 0.128l155.52 155.52a111.68 111.68 0 0 1 0.128 157.824l-2.944 2.688-98.133334 81.322666zM222.72 861.610667l447.786667-108.074667 91.733333-293.610667-198.165333-198.186666-293.610667 91.776L162.389333 801.28l224.490667-224.512A85.44 85.44 0 0 1 469.333333 469.333333a85.333333 85.333333 0 1 1-22.101333 167.786667L222.72 861.610667zM633.642667 210.645333l179.712 179.712 76.032-63.018666c9.109333-10.24 8.746667-26.133333-1.152-36.053334l-155.52-155.52a26.24 26.24 0 0 0-36.053334-1.173333l-63.018666 76.053333z" fill="#909399" p-id="10104"></path></svg>&nbsp;&nbsp;<span>全文共 <?php art_count($this->cid); ?> 字</span>
                        <div class="line">/</div>

                        <svg t="1607931422105" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20921" width="17" height="17"><path d="M322.730667 822.613333a413.44 413.44 0 0 0 106.496-9.258666 375.466667 375.466667 0 0 1 127.146666-5.589334c23.338667 2.858667 42.026667 7.04 54.954667 10.965334 45.994667 11.733333 111.36 9.514667 128.213333-17.493334 12.416-19.968 10.794667-33.578667-1.109333-51.157333a80.469333 80.469333 0 0 0-9.045333-11.093333 1066.922667 1066.922667 0 0 1-31.701334-26.368 1093.034667 1093.034667 0 0 1-74.794666-70.826667 689.109333 689.109333 0 0 1-67.285334-80.768l-1.536-2.261333c-31.658667-48.597333-66.474667-45.525333-85.418666-13.525334a409.770667 409.770667 0 0 1-40.746667 56.789334c-17.493333 20.565333-35.413333 37.973333-55.68 55.338666-5.248 4.48-21.461333 17.92-17.578667 14.677334-0.170667 0.128-0.725333 0.64 2.176-3.029334-4.181333 5.12-40.533333 37.418667-51.2 49.578667-21.973333 24.874667-30.848 46.08-27.52 63.146667 3.072 16.042667 9.344 25.045333 19.2 31.786666a61.098667 61.098667 0 0 0 20.48 8.789334l4.949334 0.298666z m302.848-310.442666c58.709333 84.053333 159.232 161.834667 159.232 161.834666s88.021333 74.581333 27.178666 172.288c-60.842667 97.706667-224.128 54.528-224.128 54.528s-64.853333-20.906667-140.202666-4.181333c-75.306667 16.853333-140.202667 10.453333-140.202667 10.453333S213.333333 896.64 194.304 797.909333c-19.029333-98.730667 87.893333-172.373333 96.341333-182.784 8.32-10.538667 64.512-45.781333 104.618667-113.408 40.106667-67.669333 152.874667-108.373333 230.314667 10.453334z m236.330666-60.586667c0 19.541333 8.106667 102.101333-66.261333 103.765333-74.325333 1.621333-77.482667-50.261333-77.482667-87.466666 0-38.954667 8.021333-94.08 67.84-94.08 59.733333 0 75.904 58.410667 75.904 77.824z m-231.68-118.485333c-50.346667-6.485333-61.738667-52.138667-56.874666-97.834667 4.096-37.333333 48.768-94.677333 84.522666-86.442667 35.712 8.106667 68.266667 55.466667 61.696 96.170667-6.442667 40.832-38.869333 94.634667-89.344 88.106667zM416.213333 317.44c-36.693333 0-66.56-42.368-66.56-94.72 0-52.352 29.824-94.72 66.56-94.72 36.821333 0 66.56 42.368 66.56 94.72 0 52.352-29.738667 94.72-66.56 94.72z m-161.834666 194.816c-72.32 15.573333-99.242667-68.138667-91.306667-107.306667 0 0 8.533333-84.778667 67.242667-90.026666 46.634667-4.053333 80.981333 46.976 84.522666 76.16 2.176 18.944 12.074667 105.6-60.458666 121.173333z" p-id="20922" fill="#909399"></path></svg>&nbsp;&nbsp;<span id="baiduIncluded">正在检测是否收录...</span>

                    </div>

                </div>

            </div>

            <div class="time"><?php $this->date('m/d'); ?></div>

        </div>

    <?php endif; ?>

</div>

添加文章页字数查询

function.php加入

/**
* 文章字数统计
*调用<?php art_count($this->cid); ?>
*/
function  art_count ($cid){
    $db=Typecho_Db::get ();
    $rs=$db->fetchRow ($db->select ('table.contents.text')->from ('table.contents')->where ('table.contents.cid=?',$cid)->order ('table.contents.cid',Typecho_Db::SORT_ASC)->limit (1));
    $text = preg_replace("/[^\x{4e00}-\x{9fa5}]/u", "", $rs['text']);
    echo mb_strlen($text,'UTF-8');
}
/**     * 访问总量     
*调用<?php theAllViews(); ?>
*/
function theAllViews(){    $db = Typecho_Db::get();
    $row = $db->fetchAll('SELECT SUM(VIEWS) FROM `typecho_contents`');
    echo number_format($row[0]['SUM(VIEWS)']);
    }

添加站点信息

aside.php最后一个</div>前添加

        <!-- 站点信息 -->
<?php $this->need('component/site.info.php'); ?>

新版JOE修改

1/ 页脚

footer.php

最上面添加

<?php $this->need('./foot.about.php'); ?>

2/ 侧边栏

aside.php

20行<?php if ($this->options->JAside_Author_Nav !== "off") : ?>上面添加

        <?php $this->need('./post.social.php'); ?>

3/ 文章页

post.php

61行<?php $this->need('public/operate.php'); ?>上方添加

                    <?php $this->need('/post.shang.php'); ?>

删除点赞

                    <?php //$this->need('public/handle.php'); ?>

4/ 文章版权

copyright.php

        <div class="item">
            <svg class="icon" width="20" height="20" viewBox="0 0 1024 1024">
                <path d="M614.72 554.538c-49.086-6.399-100.27-2.1-149.256-2.1-119.465 0-209.04 95.972-206.84 215.437 0 17.095 8.498 31.99 23.493 40.488 14.896 10.697 34.09 14.896 53.285 17.095 61.882 6.398 123.664 6.398 198.342 6.398 40.488 0 93.872-2.1 142.858-4.298 27.692 0 53.284-4.3 78.877-14.896 19.194-8.498 29.89-19.194 31.99-40.488 8.498-104.57-72.478-204.84-172.75-217.636zM680.8 375.39c0-87.474-74.678-162.053-164.251-162.053-89.574 0-162.053 74.679-162.053 162.053-2.1 87.474 74.678 164.252 162.053 164.252 89.673 0 164.252-74.678 164.252-164.252z" fill="#FFF" />
                <path d="M512.35 0C228.733 0 .5 228.233.5 511.85s228.233 511.85 511.85 511.85 511.85-228.233 511.85-511.85S795.967 0 512.35 0zm275.12 772.074c-2.1 21.294-12.797 31.99-31.991 40.488-25.593 10.697-51.185 14.896-78.877 14.896-49.086 2.099-102.37 4.298-142.858 4.298-74.678 0-136.46 0-198.342-6.398-19.195-2.1-38.389-6.398-53.285-17.095-14.895-8.497-23.493-23.493-23.493-40.488-2.1-119.465 87.475-215.437 206.84-215.437 49.085 0 100.27-4.299 149.256 2.1 100.27 12.896 181.247 113.166 172.75 217.636zM354.495 375.39c0-87.474 72.479-162.053 162.053-162.053S680.8 288.016 680.8 375.39c0 89.574-74.679 164.252-164.252 164.252-87.375 0-164.152-76.778-162.053-164.252z" fill="#249FF8" />
            </svg>
            <span>版权属于:</span>
            <span class="text"><?php $this->author(); ?></span>
        </div>

下面添加

        <div class="item">
            <svg class="icon" width="20" height="20" viewBox="0 0 1024 1024">
            <path d="M512.35,0A511.85,511.85,0,1,0,1024.2,511.85,510.66,510.66,0,0,0,512.35,0Z" transform="translate(-0.5)" fill="#ff7058"></path><rect x="464.73" y="206.43" width="82.14" height="305.42" fill="#fff"></rect><rect x="558.43" y="418.64" width="121" height="307.41" transform="translate(1190.78 -46.58) rotate(90)" fill="#fff"></rect>
            </svg>
            <span>最后修改:</span>
            <span class="text"><?php echo date('Y年m月d日H时i分s秒', $this->modified); ?></span>
        </div>

5/ 文章副标题

batten.php

27-34行改为

<div class="item">
                <span class="text"><svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M512 42.666667C252.789333 42.666667 42.666667 252.8 42.666667 512c0 259.210667 210.122667 469.333333 469.333333 469.333333s469.333333-210.122667 469.333333-469.333333C981.333333 252.8 771.210667 42.666667 512 42.666667z m0 853.333333c-212.074667 0-384-171.914667-384-384 0-212.074667 171.925333-384 384-384s384 171.925333 384 384c0 212.085333-171.925333 384-384 384z m158.165333-286.165333a42.666667 42.666667 0 0 1-60.330666 60.341333l-128-128A42.666667 42.666667 0 0 1 469.333333 512V256a42.666667 42.666667 0 0 1 85.333334 0v238.336l115.498666 115.498667z" p-id="17397" fill="#909399"></path></svg>&nbsp;<?php $this->date('Y-m-d'); ?></span>
                <span class="line">/</span>
                <span class="text"><svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M512 157.27104c104.35072 0 201.79968 31.89248 274.39616 89.8048 67.89632 54.16448 105.2928 124.75392 105.2928 198.75328s-37.39136 144.5888-105.2928 198.75328c-72.59648 57.91232-170.04544 89.8048-274.39616 89.8048-49.34656 0-98.85696 36.84352-156.18048 79.50848-9.53856 7.09632-21.55008 16.04096-33.5616 24.59136l0.04096-8.35072c0.384-63.60576 0.77824-129.37216-50.2016-161.19808-88.832-55.45472-139.78112-136.77568-139.78112-223.10912 0-74.00448 37.39136-144.5888 105.2928-198.75328 72.59136-57.9072 170.04032-89.8048 274.39104-89.8048m0-70.87104c-248.83712 0-450.56 160.92672-450.56 359.43424 0 115.03104 67.7376 217.44128 173.12768 283.23328 36.55168 22.81472-4.85376 194.55488 39.5008 207.55968 2.25792 0.66048 4.69504 0.97792 7.31136 0.97792 53.52448 0 178.53952-132.33152 230.62528-132.33152 248.83712 0 450.56-160.92672 450.56-359.43424C962.56 247.3216 760.83712 86.4 512 86.4z" fill="#666666" p-id="17004"></path><path d="M660.48 414.09024H363.52a35.84 35.84 0 1 1 0-71.68h296.96a35.84 35.84 0 1 1 0 71.68zM614.4 577.93024H409.6a35.84 35.84 0 1 1 0-71.68h204.8a35.84 35.84 0 1 1 0 71.68z" fill="#666666" p-id="17005"></path></svg>&nbsp;<?php $this->commentsNum('%d'); ?> 评论</span>
                <span class="line">/</span>
                <span class="text" id="Joe_Article_Views"><svg t="1607931368109" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19831" width="16" height="16"><path d="M512 283.456c-165.248 0-299.392 74.304-408.128 228.864 107.2 154.112 241.28 228.224 408.128 228.224 166.848 0 300.928-74.112 408.128-228.224C811.392 357.76 677.248 283.52 512 283.52zM512 832c-213.888 0-384.512-106.688-512-320 129.408-213.312 300.032-320 512-320 211.968 0 382.592 106.688 512 320-127.488 213.312-298.112 320-512 320z m0-137.152a182.848 182.848 0 1 0 0-365.696 182.848 182.848 0 0 0 0 365.696zM512 576a64 64 0 1 1 0-128 64 64 0 0 1 0 128z" fill="#909399" p-id="19832"></path></svg>&nbsp;<?php _getViews($this); ?> 阅读</span>
                <span class="line">/</span>
                <svg t="1607931422105" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20921" width="17" height="17"><path d="M322.730667 822.613333a413.44 413.44 0 0 0 106.496-9.258666 375.466667 375.466667 0 0 1 127.146666-5.589334c23.338667 2.858667 42.026667 7.04 54.954667 10.965334 45.994667 11.733333 111.36 9.514667 128.213333-17.493334 12.416-19.968 10.794667-33.578667-1.109333-51.157333a80.469333 80.469333 0 0 0-9.045333-11.093333 1066.922667 1066.922667 0 0 1-31.701334-26.368 1093.034667 1093.034667 0 0 1-74.794666-70.826667 689.109333 689.109333 0 0 1-67.285334-80.768l-1.536-2.261333c-31.658667-48.597333-66.474667-45.525333-85.418666-13.525334a409.770667 409.770667 0 0 1-40.746667 56.789334c-17.493333 20.565333-35.413333 37.973333-55.68 55.338666-5.248 4.48-21.461333 17.92-17.578667 14.677334-0.170667 0.128-0.725333 0.64 2.176-3.029334-4.181333 5.12-40.533333 37.418667-51.2 49.578667-21.973333 24.874667-30.848 46.08-27.52 63.146667 3.072 16.042667 9.344 25.045333 19.2 31.786666a61.098667 61.098667 0 0 0 20.48 8.789334l4.949334 0.298666z m302.848-310.442666c58.709333 84.053333 159.232 161.834667 159.232 161.834666s88.021333 74.581333 27.178666 172.288c-60.842667 97.706667-224.128 54.528-224.128 54.528s-64.853333-20.906667-140.202666-4.181333c-75.306667 16.853333-140.202667 10.453333-140.202667 10.453333S213.333333 896.64 194.304 797.909333c-19.029333-98.730667 87.893333-172.373333 96.341333-182.784 8.32-10.538667 64.512-45.781333 104.618667-113.408 40.106667-67.669333 152.874667-108.373333 230.314667 10.453334z m236.330666-60.586667c0 19.541333 8.106667 102.101333-66.261333 103.765333-74.325333 1.621333-77.482667-50.261333-77.482667-87.466666 0-38.954667 8.021333-94.08 67.84-94.08 59.733333 0 75.904 58.410667 75.904 77.824z m-231.68-118.485333c-50.346667-6.485333-61.738667-52.138667-56.874666-97.834667 4.096-37.333333 48.768-94.677333 84.522666-86.442667 35.712 8.106667 68.266667 55.466667 61.696 96.170667-6.442667 40.832-38.869333 94.634667-89.344 88.106667zM416.213333 317.44c-36.693333 0-66.56-42.368-66.56-94.72 0-52.352 29.824-94.72 66.56-94.72 36.821333 0 66.56 42.368 66.56 94.72 0 52.352-29.738667 94.72-66.56 94.72z m-161.834666 194.816c-72.32 15.573333-99.242667-68.138667-91.306667-107.306667 0 0 8.533333-84.778667 67.242667-90.026666 46.634667-4.053333 80.981333 46.976 84.522666 76.16 2.176 18.944 12.074667 105.6-60.458666 121.173333z" p-id="20922" fill="#909399"></path></svg>&nbsp;<span class="text" id="Joe_Baidu_Record">正在检测是否收录...</span>
            </div>

 赞  赏

如果觉得我的文章对你有用,请随意打赏

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开  或者  扫一扫,即可进行扫码赞赏哦

原创文章,版权属于:涅槃博客 - love2wind
本文最后更新于2021年09月07日17时08分30秒,已超过1187天没有更新,若内容或图片失效,请留言反馈
本文链接:https://niepan.org/archives/2183.html(转载时请注明本文出处及文章链接)
作品采用:《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权

发表评论

博主 - <?php $this->author->screenName(); ?>

love2wind

记录生活,分享世界