Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
eastonman committed Nov 16, 2018
2 parents 4d2e058 + 327cb63 commit 9dee0a3
Show file tree
Hide file tree
Showing 32 changed files with 60 additions and 65 deletions.
File renamed without changes.
Binary file removed img/icon/android-icon-144x144.png
Binary file not shown.
Binary file removed img/icon/android-icon-192x192.png
Binary file not shown.
Binary file removed img/icon/android-icon-36x36.png
Binary file not shown.
Binary file removed img/icon/android-icon-48x48.png
Binary file not shown.
Binary file removed img/icon/android-icon-72x72.png
Binary file not shown.
Binary file removed img/icon/android-icon-96x96.png
Binary file not shown.
Binary file removed img/icon/apple-icon-114x114.png
Binary file not shown.
Binary file removed img/icon/apple-icon-120x120.png
Binary file not shown.
Binary file removed img/icon/apple-icon-144x144.png
Binary file not shown.
Binary file removed img/icon/apple-icon-152x152.png
Binary file not shown.
Binary file removed img/icon/apple-icon-180x180.png
Binary file not shown.
Binary file removed img/icon/apple-icon-57x57.png
Binary file not shown.
Binary file removed img/icon/apple-icon-60x60.png
Binary file not shown.
Binary file removed img/icon/apple-icon-72x72.png
Binary file not shown.
Binary file removed img/icon/apple-icon-76x76.png
Binary file not shown.
Binary file removed img/icon/apple-icon-precomposed.png
Binary file not shown.
Binary file removed img/icon/apple-icon.png
Binary file not shown.
2 changes: 0 additions & 2 deletions img/icon/browserconfig.xml

This file was deleted.

Binary file removed img/icon/favicon-16x16.png
Binary file not shown.
Binary file removed img/icon/favicon-32x32.png
Binary file not shown.
Binary file removed img/icon/favicon-96x96.png
Binary file not shown.
Binary file removed img/icon/ms-icon-144x144.png
Binary file not shown.
Binary file removed img/icon/ms-icon-150x150.png
Binary file not shown.
Binary file removed img/icon/ms-icon-310x310.png
Binary file not shown.
Binary file removed img/icon/ms-icon-70x70.png
Binary file not shown.
23 changes: 19 additions & 4 deletions inc/footer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

</main>
<div class="mdui-container-fluid pjax-load bottom-mod">
<div class="mdui-container-fluid pjax-load bottom-mod" id="bottom">
<!--Footer-->
<footer class="mdui-row mdui-shadow-2 mdui-color-white bottom">

Expand Down Expand Up @@ -96,29 +96,42 @@

</div>

<a class="mdui-fab mdui-fab-mini mdui-fab-fixed mdui-color-theme-accent mdui-ripple mdui-fab-hide" id="scrolltop" href="#header" data-scroll>
<i class="mdui-icon material-icons">expand_less</i>
</a>







<script src="//cdn.jsdelivr.net/npm/[email protected]/dist/js/mdui.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected]/dist/js/mdui.min.js"></script>
<script type="text/javascript">
// Using MDUI JQ
var $$ = mdui.JQ;
</script>

<script src="<?php $this->options->themeUrl('js/search.js') ?>" type="text/javascript"></script>

<script type="text/javascript">
//Search JS
searchJQ();
</script>

<script src="<?php $this->options->themeUrl('js/scrolltop.js') ?>" type="text/javascript"></script>


<script src="https://cdn.jsdelivr.net/gh/cferdinandi/smooth-scroll@15/dist/smooth-scroll.polyfills.min.js"></script>
<script>
var scroll = new SmoothScroll('[data-scroll]');
</script>

<script src="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

<script src="//cdn.jsdelivr.net/npm/[email protected]/pjax.min.js"></script>
<?php if (in_array('PJAX', $this->options->FunctionSwitch)): ?>
<script src="//cdn.jsdelivr.net/npm/[email protected]/pjax.min.js"></script>
<?php endif; ?>

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/nprogress.min.css">
<script src="//cdn.jsdelivr.net/npm/[email protected]/nprogress.min.js"></script>
Expand All @@ -142,6 +155,7 @@
</script>
<?php endif; ?>

<?php if (in_array('PJAX', $this->options->FunctionSwitch)): ?>
<!--PJAX Js Event-->
<script>
var pjax = new Pjax({
Expand Down Expand Up @@ -172,6 +186,7 @@ function() {
});
document.addEventListener('pjax:success', function() {NProgress.done(); } );
</script>
<?php endif; ?>


</body>
Expand Down
4 changes: 3 additions & 1 deletion inc/functions/themeOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ function themeConfig($form)
'LazyLoad' => _t('LazyLoad'),
'ViewCount' => _t('无插件访客统计'),
'ShowMainPic' => _t('显示主页的欢迎图'),
'DarkTheme' => _t('暗色主题')
'DarkTheme' => _t('暗色主题'),
'ScrollTop' => _t('回到顶部按钮'),
'PJAX' => _t('PJAX无刷新加载')
),

//Default choose
Expand Down
48 changes: 7 additions & 41 deletions inc/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,8 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" />
<meta name="description" content=" " />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="<?php $this->options->ChromeThemeColor(); ?>" />

<!-- All Icons On ios and browsers -->
<?php if (!empty($this->options->IconUrl)): ?>
<link rel="apple-touch-icon" sizes="57x57" href="<?php $this->options->IconUrl(); ?>/img/icon/apple-icon-57x57.png ">
<link rel="apple-touch-icon" sizes="60x60" href="<?php $this->options->IconUrl(); ?>/img/icon/apple-icon-60x60.png ">
<link rel="apple-touch-icon" sizes="72x72" href="<?php $this->options->IconUrl(); ?>/img/icon/apple-icon-72x72.png ">
<link rel="apple-touch-icon" sizes="76x76" href="<?php $this->options->IconUrl(); ?>/img/icon/apple-icon-76x76.png ">
<link rel="apple-touch-icon" sizes="114x114" href="<?php $this->options->IconUrl(); ?>/img/icon/apple-icon-114x114.png ">
<link rel="apple-touch-icon" sizes="120x120" href="<?php $this->options->IconUrl(); ?>/img/icon/apple-icon-120x120.png ">
<link rel="apple-touch-icon" sizes="144x144" href="<?php $this->options->IconUrl(); ?>/img/icon/apple-icon-144x144.png ">
<link rel="apple-touch-icon" sizes="152x152" href="<?php $this->options->IconUrl(); ?>/img/icon/apple-icon-152x152.png ">
<link rel="apple-touch-icon" sizes="180x180" href="<?php $this->options->IconUrl(); ?>/img/icon/apple-icon-180x180.png ">
<link rel="icon" type="image/png" sizes="192x192" href="<?php $this->options->IconUrl(); ?>/img/icon/android-icon-192x192.png ">
<link rel="icon" type="image/png" sizes="32x32" href="<?php $this->options->IconUrl(); ?>/img/icon/favicon-32x32.png ">
<link rel="icon" type="image/png" sizes="96x96" href="<?php $this->options->IconUrl(); ?>/img/icon/favicon-96x96.png ">
<link rel="icon" type="image/png" sizes="16x16" href="<?php $this->options->IconUrl(); ?>/img/icon/favicon-16x16.png ">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="<?php $this->options->IconUrl(); ?>/img/icon/ms-icon-144x144.png ">

<?php else: ?>

<link rel="apple-touch-icon" sizes="57x57" href="<?php $this->options->themeUrl('img/icon/apple-icon-57x57.png') ?>">
<link rel="apple-touch-icon" sizes="60x60" href="<?php $this->options->themeUrl('img/icon/apple-icon-60x60.png') ?>">
<link rel="apple-touch-icon" sizes="72x72" href="<?php $this->options->themeUrl('img/icon/apple-icon-72x72.png') ?>">
<link rel="apple-touch-icon" sizes="76x76" href="<?php $this->options->themeUrl('img/icon/apple-icon-76x76.png') ?>">
<link rel="apple-touch-icon" sizes="114x114" href="<?php $this->options->themeUrl('img/icon/apple-icon-114x114.png') ?>">
<link rel="apple-touch-icon" sizes="120x120" href="<?php $this->options->themeUrl('img/icon/apple-icon-120x120.png') ?>">
<link rel="apple-touch-icon" sizes="144x144" href="<?php $this->options->themeUrl('img/icon/apple-icon-144x144.png') ?>">
<link rel="apple-touch-icon" sizes="152x152" href="<?php $this->options->themeUrl('img/icon/apple-icon-152x152.png') ?>">
<link rel="apple-touch-icon" sizes="180x180" href="<?php $this->options->themeUrl('img/icon/apple-icon-180x180.png') ?>">
<link rel="icon" type="image/png" sizes="192x192" href="<?php $this->options->themeUrl('img/icon/android-icon-192x192.png') ?>">
<link rel="icon" type="image/png" sizes="32x32" href="<?php $this->options->themeUrl('img/icon/favicon-32x32.png') ?>">
<link rel="icon" type="image/png" sizes="96x96" href="<?php $this->options->themeUrl('img/icon/favicon-96x96.png') ?>">
<link rel="icon" type="image/png" sizes="16x16" href="<?php $this->options->themeUrl('img/icon/favicon-16x16.png') ?>">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="<?php $this->options->themeUrl('img/icon/ms-icon-144x144.png') ?>">
<?php endif; ?>
<!-- META END -->

<!--Website Title-->
Expand All @@ -60,8 +22,12 @@
</title>
<!--Website Title End-->

<!--Traditional Type of favicon Settings-->
<link rel="icon" type="image/ico" href="<?php $this->options->favicon(); ?>">
<!-- Favicon Settings -->
<?php if (empty($this->options->IconUrl)): ?>
<link rel="icon" href="<?php $this->options->themeUrl('img/favicon.ico'); ?>">
<?php else: ?>
<link rel="icon" type="image/ico" href="<?php $this->options->IconUrl(); ?>">
<?php endif; ?>
<!--Favicon Settings End-->

<!--Using Default SEO Info Output By Typecho Itself-->
Expand All @@ -80,7 +46,7 @@

<!-- MDUI css-->

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected].1/dist/css/mdui.min.css" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected].2/dist/css/mdui.min.css" />
<link href="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/gruvbox-dark.min.css" rel="stylesheet">

<!--EXTERNAL CSS END-->
Expand Down
26 changes: 11 additions & 15 deletions inc/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
<!-- Sidebar brand image -->
<div class="sidebar-image mdui-valign">
<?php if (!empty($this->options->avatarURL)): ?>
<img src="<?php $this->options->avatarURL() ?>">
<img alt="Avatar" src="<?php $this->options->avatarURL() ?>">
<?php else: ?>
<?php if (!empty($this->options->Logo)): ?>
<img src="<?php $this->options->Logo() ?>">
<img alt="Avatar" src="<?php $this->options->Logo() ?>">
<?php else: ?>
<?php if (!empty($this->options->CDNURL)): ?>
<img src="<?php $this->options->CDNURL() ?>/MaterialCDN/img/Avatar.jpg">
<img alt="Avatar" src="<?php $this->options->CDNURL() ?>/MaterialCDN/img/Avatar.jpg">
<?php else: ?>
<img src="<?php $this->options->themeUrl('img/Avatar.jpg') ?>">
<img alt="Avatar" src="<?php $this->options->themeUrl('img/Avatar.jpg') ?>">

<?php endif; ?>
<?php endif; ?>
Expand Down Expand Up @@ -118,15 +118,15 @@
<!--Archive Dropdown Begin-->
<div class="mdui-collapse" mdui-collapse="{ accordion: true}">
<div class="mdui-collapse-item">
<li class="mdui-collapse-item-header mdui-list-item">
<div class="mdui-collapse-item-header mdui-list-item">

<i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-theme-text">inbox</i>
<div class="mdui-list-item-content mdui-text-color-theme-text" >
<?php echo $MultiLang->get('Archive'); ?>
</div>
<i class="mdui-collapse-item-arrow mdui-list-item-icon mdui-icon material-icons mdui-ripple mdui-text-color-theme-text" >keyboard_arrow_down</i>

</li>
</div>

<div class="mdui-collapse-item-body">
<ul class="mdui-list mdui-list-dense">
Expand All @@ -148,15 +148,15 @@
<!--Category Dropdown Begin-->
<div class="mdui-collapse" mdui-collapse="{ accordion: true}">
<div class="mdui-collapse-item">
<li class="mdui-collapse-item-header mdui-list-item">
<div class="mdui-collapse-item-header mdui-list-item">

<i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-theme-text">apps</i>
<div class="mdui-list-item-content mdui-text-color-theme-text" >
<?php echo $MultiLang->get('Categories'); ?>
</div>
<i class="mdui-collapse-item-arrow mdui-list-item-icon mdui-icon material-icons mdui-text-color-theme-text mdui-ripple" >keyboard_arrow_down</i>

</li>
</div>

<div class="mdui-collapse-item-body">
<ul class="mdui-list mdui-list-dense" for="show-category-button">
Expand All @@ -174,7 +174,7 @@
</div>
<!--Category Dropdown End -->

<li class="mdui-divider"></li>
<div class="mdui-divider"></div>

<!-- Show Pages -->
<?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
Expand All @@ -186,10 +186,6 @@
</a>
<?php endwhile; ?>

<?php if (!defined('__TYPECHO_ROOT_DIR__')) {exit;}
Typecho_Widget::widget('Widget_Stat')->to($stat);
?>

<!-- Status Page -->
<?php if (!($this->options->Status == '')): ?>
<li class="mdui-list-item">
Expand All @@ -199,7 +195,7 @@
</li>
<?php endif; ?>

<li class="mdui-divider"></li>
<div class="mdui-divider"></div>
</div>

<!-- Article Numebr -->
Expand Down Expand Up @@ -239,4 +235,4 @@
<?php endif; ?>


</div>
</div>
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<main>

<!-- Auto Hiding Header & Appbar & Title BEGIN -->
<header class="mdui-appbar mdui-appbar-fixed mdui-appbar-scroll-hide header-responsive" >
<header class="mdui-appbar mdui-appbar-fixed mdui-appbar-scroll-hide header-responsive" id="header">
<div class="mdui-toolbar mdui-color-theme mdui-color-white" >

<!-- menu icon -->
Expand Down Expand Up @@ -297,7 +297,7 @@


<!--Right Part Of Md Card Header(Under) -->
<div class="mdui-typo mdui-float-right index-post-card-header-rightinfo" id="Post-category-comment" style="color:<?php $this->options->alinkcolor(); ?>">
<div class="mdui-typo mdui-float-right index-post-card-header-rightinfo" style="color:<?php $this->options->alinkcolor(); ?>">

<div class="mdui-text-color-pink-accent" >
<?php $this->category(', '); ?>
Expand Down
18 changes: 18 additions & 0 deletions js/scrolltop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
window.onload = function() {
var fab = document.getElementById('scrolltop');
var clientHeight = document.documentElement.clientHeight;
var timer = null;
var isTop = true;
window.onscroll = function () {
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
if ( scrollTop >= clientHeight) {
fab.classList.remove('mdui-fab-hide');
} else {
fab.classList.add('mdui-fab-hide');
}
if (!isTop) {
clearInterval(timer);
}
isTop = false;
}
}

0 comments on commit 9dee0a3

Please sign in to comment.