Skip to content

Commit

Permalink
Update ALL
Browse files Browse the repository at this point in the history
  • Loading branch information
langonginc committed Jul 31, 2020
1 parent f88e666 commit cf621af
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 9 deletions.
52 changes: 50 additions & 2 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
})

$(document).on('pjax:send', function () {
NProgress.start();
$('html').animate({ scrollTop: 0 }, 500);
NProgress.start();
}).on('pjax:complete', function () {
NProgress.done();
<?php if (!empty($this->options->xuanran) && in_array('prism', $this->options->xuanran)){ ?>
Expand All @@ -41,9 +42,56 @@

</script>
<?php } ?>
<style>
.gtt{
position: fixed;
bottom:10%;
right:15%;
width:15%;
height:65px;
text-align: center;
filter:alpha(opacity=40);
-moz-opacity:0.4;
-khtml-opacity: 0.4;
opacity: 0.4;
}

.gtt:hover{
filter:alpha(opacity=90);
-moz-opacity: 0.9;
-khtml-opacity: 0.9;
opacity: 0.9;
}
</style>
<div id="go-to-top" class="gtt"><!--
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" >
<polyline points="20,40 40,20 60,40" style="fill:none;stroke:black;stroke-width:8" />
</svg>-->
<img src="<?php $this->options->themeUrl('img/top.png'); ?>" height="80%">
</div>


<script>
$(function () {
$(function () {
$(window).scroll(function () {
if ($(window).scrollTop() > 100) {
$("#go-to-top").fadeIn(1000);
}
else {
$("#go-to-top").fadeOut(1000);
}
});
$("#go-to-top").click(function () {
if ($('html').scrollTop()) {
$('html').animate({ scrollTop: 0 }, 1000);
return false;
}
$('body').animate({ scrollTop: 0 }, 1000);
return false;
});
});
});
</script>

<?php $this->footer(); ?>
</body>
Expand Down
49 changes: 49 additions & 0 deletions gototop.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

.right-bar {
position: fixed;
display: none;
bottom: 100px;
right: 0;
text-align: center;
}

.right-bar a {
text-align: center;
text-decoration: none;
color: #757575;
display: block;
width: 64px;
}

.right-bar .bar-img {
position: relative;
width: 30px;
height: 30px;
padding-top: 20px;
margin: 0 0 0 17px;
}

.right-bar .bar-s .bar-img img {
width: 20px;
height: 20px;
}

.right-bar .bar-img .hover-img {
display: none;
}

.right-bar a:hover .hover-img {
display: block;
}

.right-bar a:hover .original-img {
display: none;
}

.content {
margin: 10px 100px;
text-indent: 2em;
text-align: justify;
line-height: 1.6em;
}

12 changes: 7 additions & 5 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

<!-- 使用url函数转换相关路径 -->

<link rel="stylesheet" href="<?php $this->options->themeUrl('gototop.css'); ?>"/>
<script src="<?php $this->options->themeUrl('nprogress.js'); ?>"></script>
<link rel='stylesheet' href="<?php $this->options->themeUrl('nprogress.css'); ?>"/>
<link rel="stylesheet" href="<?php $this->options->themeUrl('normalize.css'); ?>">
Expand All @@ -27,17 +28,18 @@
<link rel="stylesheet" href="<?php $this->options->themeUrl('prism.css'); ?>">
<script src="<?php $this->options->themeUrl('prism.js'); ?>"></script>
<?php } ?>
<script src="<?php $this->options->themeUrl('jquery.js');?>"></script>
<script src="<?php //$this->options->themeUrl('jquery.js');?>https://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
<script src="<?php $this->options->themeUrl('pjax.js');?>"></script>
<?php if (!empty($this->options->xuanran) && in_array('katex', $this->options->xuanran)){ ?>
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
-->
<link rel="stylesheet" href="<?php $this->options->themeUrl('katex.min.css'); ?>" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">

<!--<link rel="stylesheet" href="<?php $this->options->themeUrl('katex.min.css'); ?>" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
<script defer src="<?php $this->options->themeUrl('katex.min.js'); ?>" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
<script defer src="<?php $this->options->themeUrl('auto-render.min.js'); ?>" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
<script>
-->
<script>
/*renderMathInElement(document.body,function (){
delimiters: [
{left: "$$", right: "$$", display: true},
Expand Down
Binary file added img/top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @package Easy
* @author LanGong Development Team
* @version 1.0.8
* @version 1.1.2
* @link github.com/langong-dev/Easy
*/

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typecho-easy",
"version": "1.1.1",
"version": "1.1.2",
"description": "一个简洁的Typecho主题,自带KaTeX、Prismjs,支持PJAX无刷新跳转",
"main": "jquery.js",
"scripts": {
Expand Down

0 comments on commit cf621af

Please sign in to comment.