23 |
24 |
tags(', ', true, 'none'); ?>
25 |
26 |
27 |
28 |
29 | need('footer.php'); ?>
30 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 | need('header.php');
13 | ?>
14 |
15 | next()): ?>
16 |
17 |
18 |
title() ?>
19 |
20 | date('F j, Y'); ?> on
21 | category(','); ?>
22 | permalink);?>
23 | options->disqusShortName) > 0):?>
24 |
25 | options->duoshuoShortName) > 0):?>
26 |
27 |
28 |
29 |
30 |
31 |
32 |
content("Continue Reading..."); ?>
33 |
34 |
35 |
36 |
37 |
38 | pageNav('«', '»'); ?>
39 |
40 | need('footer.php'); ?>
41 |
42 |
--------------------------------------------------------------------------------
/side_menu.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
15 |
16 |
32 |
33 |
--------------------------------------------------------------------------------
/404.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
45 |
PAGE NOT FOUND
46 |
49 |
50 |
51 |
52 |
57 |
58 |
--------------------------------------------------------------------------------
/js/skin.js:
--------------------------------------------------------------------------------
1 | (function($){
2 | "use strict";
3 | $('#feedback').click(function(){
4 | $('html, body').animate(
5 | {scrollTop: $("#comments").offset().top}
6 | );
7 | });
8 |
9 | // 返回顶部
10 | var backtop = $("span#backtop");
11 | backtop.click(function(){
12 | $('html, body').animate(
13 | {scrollTop: 0},600
14 | );
15 | });
16 |
17 | // 显示返回顶部按钮
18 | if($(window).scrollTop() > 100){
19 | backtop.addClass('show')
20 | }
21 | $(window).scroll(function(){
22 | if($(window).scrollTop() > 100){
23 | backtop.addClass('show')
24 | }else{
25 | backtop.removeClass('show')
26 | }
27 | });
28 |
29 | var mouseAtX = 0;
30 | $(document).ready(function(){
31 | if('undefined' == typeof (IS_MOBILE)){
32 | return false;
33 | }
34 | if(window.innerWidth < 888){
35 | makeMenuHeadroom();
36 | }
37 |
38 | $('#toggle-nav').click(function(e){
39 | $("#wrap").removeClass("scale-up");
40 | $('#wrap').toggleClass('display-nav');
41 | $('#footer').toggleClass('display-nav');
42 | $('#toggle-nav').removeClass('hide');
43 | $('#wrap #body').off('click');
44 | var body = $('#wrap.display-nav #body');
45 | body.off('click');
46 | body.on('click', function(e){
47 | body.off('click');
48 | $('#wrap').removeClass('display-nav');
49 | $('#footer').removeClass('display-nav');
50 | e.preventDefault();
51 | });
52 | $('#body').off('touchmove').on('touchmove', function(e){
53 | body.off('click');
54 | $('#wrap').removeClass('display-nav');
55 | $('#footer').removeClass('display-nav');
56 | });
57 | });
58 | $(window).bind("scroll", function(e){
59 | scalePage(e);
60 | });
61 | $(window).bind("mousemove", function(e){
62 | mouseAtX = e.clientX;
63 | });
64 | $('.slide-toggle').click(function(e){
65 | $('.category-list').each(function(){
66 | $(this).toggleClass('hide');
67 | });
68 | });
69 |
70 | });
71 | var hasTouchMove = false;
72 | if ("touchmove" in document.createElement("div")){
73 | hasTouchMove = true;
74 | }
75 |
76 | var makeMenuHeadroom = function(){
77 | var header = new Headroom(document.querySelector("#toggle-nav"), {
78 | tolerance: 5,
79 | offset : 5,
80 | classes: {
81 | initial: "show",
82 | pinned: "show",
83 | unpinned: "hide"
84 | }
85 | });
86 | header.init();
87 | };
88 |
89 | var scalePage = function(e){
90 | var wrap = $("#wrap");
91 | var nav = $("#wrap #nav");
92 | if (nav.width() < mouseAtX) {
93 | if ((IS_MOBILE && hasTouchMove) || !IS_MOBILE){
94 | $('#wrap.display-nav #body').unbind('click');
95 | wrap.removeClass('display-nav');
96 | $('#footer').removeClass('display-nav');
97 | }
98 | }
99 | };
100 | })(jQuery);
--------------------------------------------------------------------------------
/js/zoom.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * zoom.js - It's the best way to zoom an image
3 | * @version v0.0.1
4 | * @link https://github.com/fat/zoom.js
5 | * @license MIT
6 | */
7 | +function(t){"use strict";function o(){this._activeZoom=this._initialScrollPosition=this._initialTouchPosition=this._touchMoveListener=null,this._$document=t(document),this._$window=t(window),this._$body=t(document.body)}function i(o){this._fullHeight=this._fullWidth=this._overlay=this._targetImageWrap=null,this._targetImage=o,this._$body=t(document.body)}o.prototype.listen=function(){this._$body.on("click",'[data-action="zoom"]',t.proxy(this._zoom,this))},o.prototype._zoom=function(o){var e=o.target;!e||"IMG"!=e.tagName||e.width>=window.innerWidth-i.OFFSET||(this._activeZoomClose(!0),this._activeZoom=new i(e),this._activeZoom.zoomImage(),this._$window.on("scroll.zoom",t.proxy(this._scrollHandler,this)),this._$document.on("click.zoom",t.proxy(this._clickHandler,this)),this._$document.on("keyup.zoom",t.proxy(this._keyHandler,this)),this._$document.on("touchstart.zoom",t.proxy(this._touchStart,this)),o.stopPropagation())},o.prototype._activeZoomClose=function(t){this._activeZoom&&(t?this._activeZoom.dispose():this._activeZoom.close(),this._$window.off(".zoom"),this._$document.off(".zoom"),this._activeZoom=null)},o.prototype._scrollHandler=function(t){null===this._initialScrollPosition&&(this._initialScrollPosition=window.scrollY);var o=this._initialScrollPosition-window.scrollY;Math.abs(o)>=40&&this._activeZoomClose()},o.prototype._keyHandler=function(t){27==t.keyCode&&this._activeZoomClose()},o.prototype._clickHandler=function(t){t.stopPropagation(),t.preventDefault(),this._activeZoomClose()},o.prototype._touchStart=function(o){this._initialTouchPosition=o.touches[0].pageY,t(o.target).on("touchmove.zoom",t.proxy(this._touchMove,this))},o.prototype._touchMove=function(o){Math.abs(o.touches[0].pageY-this._initialTouchPosition)>10&&(this._activeZoomClose(),t(o.target).off("touchmove.zoom"))},i.OFFSET=80,i._MAX_WIDTH=2560,i._MAX_HEIGHT=4096,i.prototype.zoomImage=function(){var o=document.createElement("img");o.onload=t.proxy(function(){this._fullHeight=Number(o.height),this._fullWidth=Number(o.width),this._zoomOriginal()},this),o.src=this._targetImage.src},i.prototype._zoomOriginal=function(){this._targetImageWrap=document.createElement("div"),this._targetImageWrap.className="zoom-img-wrap",this._targetImage.parentNode.insertBefore(this._targetImageWrap,this._targetImage),this._targetImageWrap.appendChild(this._targetImage),t(this._targetImage).addClass("zoom-img").attr("data-action","zoom-out"),this._overlay=document.createElement("div"),this._overlay.className="zoom-overlay",document.body.appendChild(this._overlay),this._calculateZoom(),this._triggerAnimation()},i.prototype._calculateZoom=function(){this._targetImage.offsetWidth;var t=this._fullWidth,o=this._fullHeight,e=(window.scrollY,t/this._targetImage.width),a=window.innerHeight-i.OFFSET,s=window.innerWidth-i.OFFSET,r=t/o,n=s/a;this._imgScaleFactor=s>t&&a>o?e:n>r?a/o*e:s/t*e},i.prototype._triggerAnimation=function(){this._targetImage.offsetWidth;var o=t(this._targetImage).offset(),i=window.scrollY,e=i+window.innerHeight/2,a=window.innerWidth/2,s=o.top+this._targetImage.height/2,r=o.left+this._targetImage.width/2;this._translateY=e-s,this._translateX=a-r,t(this._targetImage).css("transform","scale("+this._imgScaleFactor+")"),t(this._targetImageWrap).css("transform","translate("+this._translateX+"px, "+this._translateY+"px) translateZ(0)"),this._$body.addClass("zoom-overlay-open")},i.prototype.close=function(){this._$body.removeClass("zoom-overlay-open").addClass("zoom-overlay-transitioning"),t(this._targetImage).css("transform",""),t(this._targetImageWrap).css("transform",""),t(this._targetImage).one(t.support.transition.end,t.proxy(this.dispose,this)).emulateTransitionEnd(300)},i.prototype.dispose=function(){this._targetImageWrap&&this._targetImageWrap.parentNode&&(t(this._targetImage).removeClass("zoom-img").attr("data-action","zoom"),this._targetImageWrap.parentNode.replaceChild(this._targetImage,this._targetImageWrap),this._overlay.parentNode.removeChild(this._overlay),this._$body.removeClass("zoom-overlay-transitioning"))},(new o).listen()}(jQuery);
--------------------------------------------------------------------------------
/js/waves.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Waves v0.6.5
3 | * http://fian.my.id/Waves
4 | *
5 | * Copyright 2014 Alfiana E. Sibuea and other contributors
6 | * Released under the MIT license
7 | * https://github.com/fians/Waves/blob/master/LICENSE
8 | */
9 | !function(a,b){"use strict";"function"==typeof define&&define.amd?define([],function(){return b.apply(a)}):"object"==typeof exports?module.exports=b.call(a):a.Waves=b.call(a)}("object"==typeof global?global:this,function(){"use strict";function a(a){return null!==a&&a===a.window}function b(b){return a(b)?b:9===b.nodeType&&b.defaultView}function c(a){var c,d,e={top:0,left:0},f=a&&a.ownerDocument;return c=f.documentElement,"undefined"!=typeof a.getBoundingClientRect&&(e=a.getBoundingClientRect()),d=b(f),{top:e.top+d.pageYOffset-c.clientTop,left:e.left+d.pageXOffset-c.clientLeft}}function d(a){var b="";for(var c in a)a.hasOwnProperty(c)&&(b+=c+":"+a[c]+";");return b}function e(a){if(j.allowEvent(a)===!1)return null;for(var b=null,c=a.target||a.srcElement;null!==c.parentElement;){if(!(c instanceof SVGElement||-1===c.className.indexOf("waves-effect"))){b=c;break}if(c.classList.contains("waves-effect")){b=c;break}c=c.parentElement}return b}function f(a){var b=e(a);null!==b&&(i.show(a,b),"ontouchstart"in window&&(b.addEventListener("touchend",i.hide,!1),b.addEventListener("touchcancel",i.hide,!1)),b.addEventListener("mouseup",i.hide,!1),b.addEventListener("mouseleave",i.hide,!1))}var g=g||{},h=document.querySelectorAll.bind(document),i={duration:750,show:function(a,b){if(2===a.button)return!1;var e=b||this,f=document.createElement("div");f.className="waves-ripple",e.appendChild(f);var g=c(e),h=a.pageY-g.top,j=a.pageX-g.left,k="scale("+e.clientWidth/100*3+")";"touches"in a&&(h=a.touches[0].pageY-g.top,j=a.touches[0].pageX-g.left),f.setAttribute("data-hold",Date.now()),f.setAttribute("data-scale",k),f.setAttribute("data-x",j),f.setAttribute("data-y",h);var l={top:h+"px",left:j+"px"};f.className=f.className+" waves-notransition",f.setAttribute("style",d(l)),f.className=f.className.replace("waves-notransition",""),l["-webkit-transform"]=k,l["-moz-transform"]=k,l["-ms-transform"]=k,l["-o-transform"]=k,l.transform=k,l.opacity="1",l["-webkit-transition-duration"]=i.duration+"ms",l["-moz-transition-duration"]=i.duration+"ms",l["-o-transition-duration"]=i.duration+"ms",l["transition-duration"]=i.duration+"ms",f.setAttribute("style",d(l))},hide:function(a){j.touchup(a);var b=this,c=(1.4*b.clientWidth,null),e=b.getElementsByClassName("waves-ripple");if(!(e.length>0))return!1;c=e[e.length-1];var f=c.getAttribute("data-x"),g=c.getAttribute("data-y"),h=c.getAttribute("data-scale"),k=Date.now()-Number(c.getAttribute("data-hold")),l=350-k;0>l&&(l=0),setTimeout(function(){var a={top:g+"px",left:f+"px",opacity:"0","-webkit-transition-duration":i.duration+"ms","-moz-transition-duration":i.duration+"ms","-o-transition-duration":i.duration+"ms","transition-duration":i.duration+"ms","-webkit-transform":h,"-moz-transform":h,"-ms-transform":h,"-o-transform":h,transform:h};c.setAttribute("style",d(a)),setTimeout(function(){try{b.removeChild(c)}catch(a){return!1}},i.duration)},l)},wrapInput:function(a){for(var b=0;b
0&&(j.touches-=1)},500):"mousedown"===a.type&&j.touches>0&&(b=!1),b},touchup:function(a){j.allowEvent(a)}};return g.displayEffect=function(a){a=a||{},"duration"in a&&(i.duration=a.duration),i.wrapInput(h(".waves-effect")),"ontouchstart"in window&&document.body.addEventListener("touchstart",f,!1),document.body.addEventListener("mousedown",f,!1)},g.attach=function(a){"input"===a.tagName.toLowerCase()&&(i.wrapInput([a]),a=a.parentElement),"ontouchstart"in window&&a.addEventListener("touchstart",f,!1),a.addEventListener("mousedown",f,!1)},g});
10 | //# sourceMappingURL=waves.min.js.map
--------------------------------------------------------------------------------
/css/base.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Waves v0.6.5
3 | * http://fian.my.id/Waves
4 | *
5 | * Copyright 2014 Alfiana E. Sibuea and other contributors
6 | * Released under the MIT license
7 | * https://github.com/fians/Waves/blob/master/LICENSE
8 | */.waves-effect{position:relative;cursor:pointer;display:inline-block;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.waves-effect .waves-ripple{position:absolute;border-radius:50%;width:100px;height:100px;margin-top:-50px;margin-left:-50px;opacity:0;background:rgba(0,0,0,.2);background:-webkit-radial-gradient(rgba(0,0,0,.2) 0,rgba(0,0,0,.3) 40%,rgba(0,0,0,.4) 50%,rgba(0,0,0,.5) 60%,rgba(255,255,255,0) 70%);background:-o-radial-gradient(rgba(0,0,0,.2) 0,rgba(0,0,0,.3) 40%,rgba(0,0,0,.4) 50%,rgba(0,0,0,.5) 60%,rgba(255,255,255,0) 70%);background:-moz-radial-gradient(rgba(0,0,0,.2) 0,rgba(0,0,0,.3) 40%,rgba(0,0,0,.4) 50%,rgba(0,0,0,.5) 60%,rgba(255,255,255,0) 70%);background:radial-gradient(rgba(0,0,0,.2) 0,rgba(0,0,0,.3) 40%,rgba(0,0,0,.4) 50%,rgba(0,0,0,.5) 60%,rgba(255,255,255,0) 70%);-webkit-transition:all .5s ease-out;-moz-transition:all .5s ease-out;-o-transition:all .5s ease-out;transition:all .5s ease-out;-webkit-transition-property:-webkit-transform,opacity;-moz-transition-property:-moz-transform,opacity;-o-transition-property:-o-transform,opacity;transition-property:transform,opacity;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0);pointer-events:none}.waves-effect.waves-light .waves-ripple{background:rgba(255,255,255,.4);background:-webkit-radial-gradient(rgba(255,255,255,.2) 0,rgba(255,255,255,.3) 40%,rgba(255,255,255,.4) 50%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 70%);background:-o-radial-gradient(rgba(255,255,255,.2) 0,rgba(255,255,255,.3) 40%,rgba(255,255,255,.4) 50%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 70%);background:-moz-radial-gradient(rgba(255,255,255,.2) 0,rgba(255,255,255,.3) 40%,rgba(255,255,255,.4) 50%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 70%);background:radial-gradient(rgba(255,255,255,.2) 0,rgba(255,255,255,.3) 40%,rgba(255,255,255,.4) 50%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 70%)}.waves-effect.waves-classic .waves-ripple{background:rgba(0,0,0,.2)}.waves-effect.waves-classic.waves-light .waves-ripple{background:rgba(255,255,255,.4)}.waves-notransition{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.waves-button,.waves-circle{-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0);transform:translateZ(0);-webkit-mask-image:-webkit-radial-gradient(circle,#fff 100%,#000 100%)}.waves-button,.waves-button:hover,.waves-button:visited,.waves-button-input{white-space:nowrap;vertical-align:middle;cursor:pointer;border:none;outline:0;color:inherit;background-color:transparent;font-size:1em;line-height:1em;text-align:center;text-decoration:none;z-index:1}.waves-button{padding:.85em 1.1em;border-radius:.2em}.waves-button-input{margin:0;padding:.85em 1.1em}.waves-input-wrapper{border-radius:.2em;vertical-align:bottom}.waves-input-wrapper.waves-button{padding:0}.waves-input-wrapper .waves-button-input{position:relative;top:0;left:0;z-index:1}.waves-circle{text-align:center;width:2.5em;height:2.5em;line-height:2.5em;border-radius:50%}.waves-float{-webkit-mask-image:none;-webkit-box-shadow:0 1px 1.5px 1px rgba(0,0,0,.12);box-shadow:0 1px 1.5px 1px rgba(0,0,0,.12)}.waves-float:active{-webkit-box-shadow:0 8px 20px 1px rgba(0,0,0,.3);box-shadow:0 8px 20px 1px rgba(0,0,0,.3)}.waves-block{display:block}a.waves-effect .waves-ripple{z-index:-1}
9 |
10 |
11 | /*
12 | * Zoom.js
13 | */
14 | img[data-action="zoom"] {
15 | cursor: pointer;
16 | cursor: -webkit-zoom-in;
17 | cursor: -moz-zoom-in;
18 | }
19 | .zoom-img,
20 | .zoom-img-wrap {
21 | position: relative;
22 | z-index: 666;
23 | -webkit-transition: all 300ms;
24 | -o-transition: all 300ms;
25 | transition: all 300ms;
26 | }
27 | img.zoom-img {
28 | cursor: pointer;
29 | cursor: -webkit-zoom-out;
30 | cursor: -moz-zoom-out;
31 | }
32 | .zoom-overlay {
33 | z-index: 420;
34 | background: #fff;
35 | position: fixed;
36 | top: 0;
37 | left: 0;
38 | right: 0;
39 | bottom: 0;
40 | pointer-events: none;
41 | filter: "alpha(opacity=0)";
42 | opacity: 0;
43 | -webkit-transition: opacity 300ms;
44 | -o-transition: opacity 300ms;
45 | transition: opacity 300ms;
46 | }
47 | .zoom-overlay-open .zoom-overlay {
48 | filter: "alpha(opacity=100)";
49 | opacity: 1;
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/archives.php:
--------------------------------------------------------------------------------
1 |
2 | need('header.php'); ?>
10 |
123 |
124 |
Archives
125 |
126 |
127 | "Jan",
129 | 2 => "Feb",
130 | 3 => "Mar",
131 | 4 => "Apr",
132 | 5 => "May",
133 | 6 => "Jun",
134 | 7 => "Jul",
135 | 8 => "Aug",
136 | 9 => "Sep",
137 | 10 => "Oct",
138 | 11 => "Nov",
139 | 12 => "Dec");
140 | $this->widget('Widget_Contents_Post_Recent', 'pageSize=10000')->to($archives);
141 | $year = 0;
142 | $mon = 0;
143 | $i = 0;
144 | $j = 0;
145 | $all = array();
146 | $output = '';
147 | while ($archives->next()):
148 | $year_tmp = date('Y', $archives->created);
149 | $mon_tmp = date('n', $archives->created);
150 |
151 | $y = $year;
152 | $m = $mon;
153 | if ($mon != $mon_tmp && $mon > 0) $output .= '
';
154 | if ($year != $year_tmp) {
155 | $year = $year_tmp;
156 | $all[$year] = array();
157 | }
158 |
159 | if ($mon != $mon_tmp) {
160 | $mon = $mon_tmp;
161 | array_push($all[$year], $mon);
162 | $output .= "$year-$Month_E[$mon]
";
163 | }
164 | $output .= '
';
165 | endwhile;
166 | $output .= '
';
167 | echo $output;
168 |
169 | $html = "";
170 | $year_now = date("Y");
171 | foreach ($all as $key => $value) {
172 | $html .= "$key";
173 | for ($i = 12; $i > 0; $i--) {
174 | if ($key == $year_now && $i > $value[0]) continue;
175 | $html .= in_array($i, $value) ? ("- $i
") : ("- $i
");
176 | }
177 | $html .= "
";
178 | }
179 | ?>
180 |
181 |