About

Hey, this is DanLiu.
鱼跃此时海,花开彼岸天。
将夜拂尘去,归来仍少年。

关于本站

大家好,这里是曦秋的小屋。这个博客是基于Huxyizibi两位大佬的Jekyll模板上做出来的,在此对这两位大佬的工作表示感谢!同时非常感谢小歪网络提供的API以及梨花带雨提供的播放器!移动端可能会缺少一部分内容,但不影响主体结构。

在此基础上我增加了如下功能:

文章置顶功能

标签页的小彩蛋

动态显示站点的建立时间

之后可能会增加或者涉及的功能:

🔜博客模板改成hexo(但是目前这个用的很好,暂时没想法)

🔜增加返回顶部、夜间模式等花哨功能(返回顶部已实现)

🔜改善移动端的使用体验(目前没有头绪)

关于新功能

修改index.html中显示文章内容的部分修改为以下的部分:

如果有需要置顶的文章,在文章参数中添加top: true即可

效果大概是这样的:

gif

default.html中适当的地方插入如下代码:

其中hide是指在没选择标签页时的文本,show是指重新点击标签页时的文本,两者都需要在_config.yml中进行定义。

将以下代码放到合适的html文件位置;我在页面最下方使用,因此放在了footer.html中:

<span style="font-size:12px;"><script language=JavaScript> 
    function secondToDate(second) {
        if (!second) {
        return 0;
        }

    var time = new Array(0, 0, 0, 0, 0);

    if (second >= 365 * 24 * 3600) {
        time[0] = parseInt(second / (365 * 24 * 3600));
        second %= 365 * 24 * 3600;
    }  

    if (second >= 24 * 3600) {
        time[1] = parseInt(second / (24 * 3600));
        second %= 24 * 3600;
    }

    if (second >= 3600) {
        time[2] = parseInt(second / 3600);
        second %= 3600;
    }

    if (second >= 60) {
        time[3] = parseInt(second / 60);
        second %= 60;
    }

    if (second > 0) {
        time[4] = second;
    }
    return time;
}
</script>
<span id="htmer_time" style="color: #000000;"></span>
        
<script type="text/javascript" language="javascript">
    function setTime() {
        var create_time = Math.round(new Date(Date.UTC(2020, 05, 06, 06, 06, 06)).getTime() / 1000);
        var timestamp = Math.round((new Date().getTime() + 8 * 60 * 60 * 1000) / 1000);
        currentTime = secondToDate((timestamp - create_time));
        currentTimeHtml = '本站已安全运行' + currentTime[0] + '' + currentTime[1] + '' + currentTime[2] + '' + currentTime[3] + '' + currentTime[4] + '';
        document.getElementById("htmer_time").innerHTML = currentTimeHtml;
    }
    setInterval(setTime, 1000);
</script></span>

写在最后

(上面的那些东西最终还是会被我变成博文的)

我来自西安,西安交大产出的一名学术小乐色

本科期间感觉什么都没做,无所事事了5年

所以做这个博客更像是一种自我救赎,总算是有个能拿出手的东西了

其实最开始就有想写个在线的东西记录一些事情

但是传统的博客局限性太高了,有这样那样的限制

并不是说博客园或者CSDN这类的不好,只是我不是那种搞那类东西的人

我还是很希望在总结我做的东西的同时顺手还能写点随笔

QQ空间也不是那种可以随便写写的地方

有一次查资料,无意间发现了这个好东西

这才踏入了自创博客的大门(其中的一小步)

所以说,以前班主任有一句话我一直很喜欢:

相聚是缘。

Nothing can't be figured out. The past just can't be reached again.

About This Blog

Welcome! I’m DanLiu. This blog is based on Jekyll boilplates of Hux and yizibi. Sincere thanks to these two bigwigs! Same Thanks to LHDY Player and API provider iXiaoWai! I add several new fuctions to provide better and more joyful experience as shown below:

Functions that may be added or involved later:

🔜Change the blog template to hexo (but using one is very good for now, I’m hesitating)

🔜Add serveral fancy functions such as back to top, night mode, etc. (Back to top has been added)

🔜Improve the mobile experience (currently no clue)

About New Function

Change the article-catalog showing part in index.html to the code below:

Then add top: true to your header of MD files of stick-on-top article.

The effect is probably like this:

gif

Add this code below to a proper position in default.html

In this code, hide is the shown-text clicking to other tab, show is the shown-text clicking back to this blog tab, both need definate in _config.yml.

Add this code below to a proper position of html files; I use this part at the bottom of my blog, therefore put the code in footer.html:

<span style="font-size:12px;"><script language=JavaScript> 
    function secondToDate(second) {
        if (!second) {
        return 0;
        }

    var time = new Array(0, 0, 0, 0, 0);

    if (second >= 365 * 24 * 3600) {
        time[0] = parseInt(second / (365 * 24 * 3600));
        second %= 365 * 24 * 3600;
    }  

    if (second >= 24 * 3600) {
        time[1] = parseInt(second / (24 * 3600));
        second %= 24 * 3600;
    }

    if (second >= 3600) {
        time[2] = parseInt(second / 3600);
        second %= 3600;
    }

    if (second >= 60) {
        time[3] = parseInt(second / 60);
        second %= 60;
    }

    if (second > 0) {
        time[4] = second;
    }
    return time;
}
</script>
<span id="htmer_time" style="color: #000000;"></span>
        
<script type="text/javascript" language="javascript">
    function setTime() {
        var create_time = Math.round(new Date(Date.UTC(2020, 05, 06, 06, 06, 06)).getTime() / 1000);
        var timestamp = Math.round((new Date().getTime() + 8 * 60 * 60 * 1000) / 1000);
        currentTime = secondToDate((timestamp - create_time));
        currentTimeHtml = 'This Site has been routined' + currentTime[0] + 'years' + currentTime[1] + 'days' + currentTime[2] + 'hours' + currentTime[3] + 'min' + currentTime[4] + 'sec';
        document.getElementById("htmer_time").innerHTML = currentTimeHtml;
    }
    setInterval(setTime, 1000);
</script></span>