Skip to content

Commit

Permalink
Merge branch 'feature/enhance' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eastonman committed Apr 4, 2018
2 parents 5cda79c + af74ed4 commit dc1d19a
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 100 deletions.
2 changes: 1 addition & 1 deletion inc/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class="comment mdui-card comment-body mdui-p-b-1 mdui-m-y-2

<!-- 使用原生评论 -->

<div class="mdui-container ">
<div class="mdui-container pjax-load ">

<?php if ($this->allow('comment')): ?>

Expand Down
4 changes: 2 additions & 2 deletions inc/footer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


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

Expand Down Expand Up @@ -112,7 +112,7 @@
<script>
new Pjax({
elements: "a", // default is "a[href], form[action]"
selectors: ["main"]
selectors: ["title",".pjax-load"]
});

document.addEventListener('pjax:send', function() { NProgress.start(); });
Expand Down
158 changes: 78 additions & 80 deletions inc/sidebar.php
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
<!-- SideBar Using MDUI Begin-->

<div class="mdui-drawer mdui-drawer-full-height mdui-color-white drawer-mod sidebar" id="sidebar">

<!--SideBar Header Begin-->
<div class="sidebar-header header-cover" style="background-image: url(<?php $this->options->themeUrl() ?>img/sidebarheader.jpg );">

<!-- Sidebar brand image -->
<div class="sidebar-image">
<?php if (!empty($this->options->avatarURL)): ?>
<img src="<?php $this->options->avatarURL() ?>">
<?php else: ?>
<!-- Sidebar brand image -->
<div class="sidebar-image">
<?php if (!empty($this->options->avatarURL)): ?>
<img src="<?php $this->options->avatarURL() ?>">
<?php else: ?>
<?php if (!empty($this->options->logo)): ?>
<img src="<?php $this->options->logo() ?>">
<?php else: ?>
<?php if (!empty($this->options->CDNURL)): ?>
<img src="<?php $this->options->CDNURL() ?>/MaterialCDN/img/Avatar.jpg">
<img src="<?php $this->options->logo() ?>">
<?php else: ?>
<img src="<?php $this->options->themeUrl('img/Avatar.jpg') ?>">
<?php endif; ?>
<?php endif; ?>
<?php if (!empty($this->options->CDNURL)): ?>
<img src="<?php $this->options->CDNURL() ?>/MaterialCDN/img/Avatar.jpg">
<?php else: ?>
<img src="<?php $this->options->themeUrl('img/Avatar.jpg') ?>">
<?php endif; ?>
<?php endif; ?>
</div>



<?php endif; ?>
</div>

<i class="sidebar-brand mdui-collapse-item-arrow mdui-icon material-icons mdui-ripple mdui-text-color-white-icon" id="sidebar-header-collapse-controller" >arrow_drop_down</i>



</div>
<!--SideBar Header End-->

Expand All @@ -40,59 +36,62 @@
<!--Content Show When Clicking Arrow On the SideBar Header-->
<div class="mdui-collapse-item-body">
<ul class="mdui-list mdui-list-dense" >
<?php if ($this->user->hasLogin()): ?>
<li class="mdui-list-item mdui-ripple" >
<a href="<?php $this->options->adminUrl(); ?>" class="mdui-list-item-content" tabindex="-1">
<i class="mdui-icon material-icons">account_circle</i>
<?php if ($this->options->langis == '0'): ?> Profile
<?php elseif ($this->options->langis == '1'): ?> 用户概要
<?php elseif ($this->options->langis == '2'): ?> 使用者概要
<?php endif; ?>
</a>
</li>

<li class="mdui-list-item mdui-ripple" >
<a href="<?php $this->options->adminUrl('options-theme.php'); ?>" class="mdui-list-item-content" tabindex="-1">
<i class="mdui-icon material-icons">settings</i>
<?php if ($this->options->langis == '0'): ?> Settings
<?php elseif ($this->options->langis == '1'): ?> 设置外观
<?php elseif ($this->options->langis == '2'): ?> 設置外觀
<?php endif; ?>
</a>
</li>

<li class="mdui-list-item mdui-ripple" >
<a href="<?php $this->options->logoutUrl(); ?>" class="mdui-list-item-content" tabindex="-1">
<i class="mdui-icon material-icons">exit_to_app</i>
<?php if ($this->options->langis == '0'): ?> Exit
<?php elseif ($this->options->langis == '1'): ?> 退出登录
<?php elseif ($this->options->langis == '2'): ?> 退出登錄
<?php endif; ?>
</a>
</li>

<?php else: ?>

<li class="mdui-list-item mdui-ripple" >
<a href="<?php $this->options->loginUrl(); ?>" class="mdui-list-item-content" tabindex="-1">
<i class="mdui-icon material-icons">fingerprint</i>
<?php if ($this->user->hasLogin()): ?>

<li class="mdui-list-item mdui-ripple" >
<a href="<?php $this->options->adminUrl(); ?>" class="mdui-list-item-content" tabindex="-1">
<i class="mdui-icon material-icons">account_circle</i>
<?php if ($this->options->langis == '0'): ?> Profile
<?php elseif ($this->options->langis == '1'): ?> 用户概要
<?php elseif ($this->options->langis == '2'): ?> 使用者概要
<?php endif; ?>
</a>
</li>

<li class="mdui-list-item mdui-ripple" >
<a href="<?php $this->options->adminUrl('options-theme.php'); ?>" class="mdui-list-item-content" tabindex="-1">
<i class="mdui-icon material-icons">settings</i>
<?php if ($this->options->langis == '0'): ?> Settings
<?php elseif ($this->options->langis == '1'): ?> 设置外观
<?php elseif ($this->options->langis == '2'): ?> 設置外觀
<?php endif; ?>
</a>
</li>

<li class="mdui-list-item mdui-ripple" >
<a href="<?php $this->options->logoutUrl(); ?>" class="mdui-list-item-content" tabindex="-1">
<i class="mdui-icon material-icons">exit_to_app</i>
<?php if ($this->options->langis == '0'): ?> Exit
<?php elseif ($this->options->langis == '1'): ?> 退出登录
<?php elseif ($this->options->langis == '2'): ?> 退出登錄
<?php endif; ?>
</a>
</li>

<?php else: ?>

<li class="mdui-list-item mdui-ripple" >
<a href="<?php $this->options->loginUrl(); ?>" class="mdui-list-item-content" tabindex="-1">
<i class="mdui-icon material-icons">fingerprint</i>

<?php if ($this->options->langis == '0'): ?> Login
<?php elseif ($this->options->langis == '1'): ?> 用户登录
<?php elseif ($this->options->langis == '2'): ?> 使用者登錄
<?php endif; ?>
</a>
</li>

<li class="mdui-list-item mdui-ripple" >
<a href="<?php $this->options->adminUrl('register.php'); ?>" class="mdui-list-item-content" tabindex="-1">
<i class="mdui-icon material-icons">person_add</i>
<?php if ($this->options->langis == '0'): ?> Register
<?php elseif ($this->options->langis == '1'): ?> 用户注册
<?php elseif ($this->options->langis == '2'): ?> 使用者註冊
<?php endif; ?>
</a>
</li>

<?php if ($this->options->langis == '0'): ?> Login
<?php elseif ($this->options->langis == '1'): ?> 用户登录
<?php elseif ($this->options->langis == '2'): ?> 使用者登錄
<?php endif; ?>
</a>
</li>

<li class="mdui-list-item mdui-ripple" >
<a href="<?php $this->options->adminUrl('register.php'); ?>" class="mdui-list-item-content" tabindex="-1">
<i class="mdui-icon material-icons">person_add</i>
<?php if ($this->options->langis == '0'): ?> Register
<?php elseif ($this->options->langis == '1'): ?> 用户注册
<?php elseif ($this->options->langis == '2'): ?> 使用者註冊
<?php endif; ?>
</a>
</li>
<?php endif; ?>

</ul>
Expand Down Expand Up @@ -224,19 +223,18 @@

</ul>

<!-- Sidebar bottom text -->


<a href="https://github.com/manyang901/material" target="_blank" class="mdui-list mdui-list-item">
<div class="mdui-list-item-content mdui-text-color-indigo">
<?php if ($this->options->langis == '0'): ?> Theme - Material
<?php elseif ($this->options->langis == '1'): ?> 主题 - Material
<?php endif; ?>
</div>
</a>
<!-- Sidebar bottom text -->
<a href="https://github.com/manyang901/material" target="_blank" class="mdui-list mdui-list-item">
<div class="mdui-list-item-content mdui-text-color-indigo">
<?php if ($this->options->langis == '0'): ?> Theme - Material
<?php elseif ($this->options->langis == '1'): ?> 主题 - Material
<?php endif; ?>
</div>
</a>


<?php if (!empty($this->options->switch) && in_array('ShowUpyun', $this->options->switch)) : ?>
<?php if (!empty($this->options->switch) && in_array('ShowUpyun', $this->options->switch)) : ?>
<div id="upyun-logo">
<a href="https://www.upyun.com/" target="_blank">
<?php if (!empty($this->options->CDNURL)): ?>
Expand All @@ -246,7 +244,7 @@
<?php endif; ?>
</a>
</div>
<?php endif; ?>
<?php endif; ?>


</div>
16 changes: 5 additions & 11 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@

<body class="mdui-drawer-body-left mdui-theme-primary-<?php $this->options->ThemeColor(); ?>" >

<div>


<!--Conten Of Index Page Begin-->
<!--Content Of Index Page Begin-->

<main>

Expand All @@ -49,7 +46,7 @@
<a href="<?php $this->options->siteUrl(); ?>" class="mdui-typo-headline mdui-center" >
<?php $this->options->title(); ?>
</a>

</div>

</header>
Expand All @@ -59,7 +56,7 @@


<!-- Blog Header(picture&avatar&slogan) Began -->
<div class="mdui-container mdui-appbar-with-toolbar" >
<div class="mdui-container mdui-appbar-with-toolbar pjax-load" >

<!--First Row Of Content-->
<div class="mdui-row">
Expand Down Expand Up @@ -107,7 +104,7 @@


<!--Blog Posts Output Begin-->
<div class="mdui-container" >
<div class="mdui-container pjax-load" >

<?php while ($this->next()): ?>

Expand Down Expand Up @@ -288,15 +285,12 @@
</nav>

</div>
<!-- Echo Navigation Icon End-->
<!-- Echo Navigation Icon End-->


</div>
<!-- Posts Output MD Container End-->

</div>
<!--Blog Post Output End-->




Expand Down
1 change: 1 addition & 0 deletions lib/pjax.min.js

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions post.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

<!-- Standalone CSS Calling For Index -->
<?php if (!empty($this->options->CDNUrl)): ?>
<link rel="stylesheet" type="text/css" media="all" href="<?php $this->options->CDNUrl(); ?>/MaterialCDN/css/material.min.css" />
<link rel="stylesheet" type="text/css" media="all" href="<?php $this->options->CDNUrl(); ?>/MaterialCDN/css/style.min.css" />
<link rel="stylesheet" type="text/css" media="all" href="<?php $this->options->CDNUrl(); ?>/MaterialCDN/css/shared.css" />
<link rel="stylesheet" type="text/css" media="all" href="<?php $this->options->CDNUrl(); ?>//MaterialCDN/css/post.css" />
<?php else: ?>
<link rel="stylesheet" type="text/css" media="all" href="<?php $this->options->themeUrl('css/header.css'); ?>" />
<link rel="stylesheet" type="text/css" media="all" href="<?php $this->options->themeUrl('css/style.css'); ?>" />
<link rel="stylesheet" type="text/css" media="all" href="<?php $this->options->themeUrl('css/shared.css'); ?>" />
<link rel="stylesheet" type="text/css" media="all" href="<?php $this->options->themeUrl('css/post.css'); ?>" />
<?php endif; ?>
<!-- Standalone CSS END-->
Expand Down Expand Up @@ -36,7 +35,7 @@
<!-- Header & Appbar & Title End -->


<div class="mdui-container-fluid mdui-appbar-with-toolbar" >
<div class="mdui-container-fluid mdui-appbar-with-toolbar pjax-load" >
<div class="mdui-row" >
<div class="mdui-col-xs-12 mdui-col-md-10 mdui-col-offset-md-1">
<!--Post Content Md Card Begin-->
Expand Down Expand Up @@ -73,7 +72,7 @@
<?php $this->need('inc/comments.php'); ?>

<!-- theNext thePrev button -->
<div class="mdui-container mdui-m-b-2">
<div class="mdui-container mdui-m-b-2 pjax-load">
<nav class="mdui-row">
<?php $this->theNext('%s', null, array('title' => '
<div class="mdui-col-xs-4">
Expand Down

0 comments on commit dc1d19a

Please sign in to comment.