From fb07b16453337fe4f70d176bd9b42c01079b63b7 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 20 Feb 2013 16:42:27 +0800 Subject: [PATCH 01/11] =?UTF-8?q?timeline=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- timeline/article.ftl | 198 ++--- timeline/css/timeline.css | 1479 +++++++++++++++++---------------- timeline/css/timeline.min.css | 1 + timeline/footer.ftl | 148 ++-- timeline/js/timeline.js | 715 +++++++++------- timeline/js/timeline.min.js | 4 +- 6 files changed, 1345 insertions(+), 1200 deletions(-) diff --git a/timeline/article.ftl b/timeline/article.ftl index 7ac79e8..20196c5 100644 --- a/timeline/article.ftl +++ b/timeline/article.ftl @@ -1,99 +1,99 @@ -<#include "macro-head.ftl"> -<#include "macro-comments.ftl"> - - - - <@head title="${article.articleTitle} - ${blogTitle}"> - - - - - - ${topBarReplacement} - <#include "header.ftl"> -
-
-
-
- -

- - ${article.articleTitle} - - <#if article.hasUpdated> - - ${updatedLabel} - - - <#if article.articlePutTop> - - ${topArticleLabel} - - -

-
- ${article.articleContent} -
- <#if "" != article.articleSign.signHTML?trim> -

- ${article.articleSign.signHTML} -

- - - <#list article.articleTags?split(",") as articleTag><#if articleTag_has_next>, - - - - - - - - <#if article.articleCommentCount == 0> - ${noCommentLabel} - <#else> - ${article.articleCommentCount} - - - - - - ${article.articleViewCount} - - -
-
- <#if nextArticlePermalink??> - - - <#if previousArticlePermalink??> - - -
- <@comments commentList=articleComments article=article> -
-
-
- <#include "footer.ftl"> - <@comment_script oId=article.oId> - page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; - - - +<#include "macro-head.ftl"> +<#include "macro-comments.ftl"> + + + + <@head title="${article.articleTitle} - ${blogTitle}"> + + + + + + ${topBarReplacement} + <#include "header.ftl"> +
+
+
+
+ +

+ + ${article.articleTitle} + + <#if article.hasUpdated> + + ${updatedLabel} + + + <#if article.articlePutTop> + + ${topArticleLabel} + + +

+
+ ${article.articleContent} +
+ <#if "" != article.articleSign.signHTML?trim> +

+ ${article.articleSign.signHTML} +

+ + + <#list article.articleTags?split(",") as articleTag><#if articleTag_has_next>, + + + + + + + + <#if article.articleCommentCount == 0> + ${noCommentLabel} + <#else> + ${article.articleCommentCount} + + + + + + ${article.articleViewCount} + + +
+
+ <#if nextArticlePermalink??> + + + <#if previousArticlePermalink??> + + +
+ <@comments commentList=articleComments article=article> +
+
+
+ <#include "footer.ftl"> + <@comment_script oId=article.oId> + page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; + + + diff --git a/timeline/css/timeline.css b/timeline/css/timeline.css index d159125..efc2784 100644 --- a/timeline/css/timeline.css +++ b/timeline/css/timeline.css @@ -1,736 +1,745 @@ -/* - * Copyright (c) 2009, 2010, 2011, 2012, B3log Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ -/* -* timeline skin style. -* -* @author Liyuan Li -* @version 1.0.1.0, Jan 30, 2013 -*/ -/* start reset */ -html, body { - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; - margin: 0; - padding: 0; - height: 100%; -} - -body { - font: 0.81em Verdana, arial, '\5fae\8f6f\96c5\9ed1'; - color: #666666; - background-color: #363A3D; -} - -button, -input, -select, -textarea { - margin: 0; - font-size: 100%; - vertical-align: middle; - font-family: Verdana, arial,'\5fae\8f6f\96c5\9ed1'; - outline: none; -} - -a { - color: #6599C6; - outline: medium none; - text-decoration: none; - transition: color 1s ease 0s; -} - -a:hover { - color: #000; -} - -img { - max-width: 100%; - border: 0; - vertical-align: middle; -} - -::selection { - background-color: #D5D5D5; - color: #FCFCFC; -} - -::-moz-selection { - background-color: #D5D5D5; - color: #FCFCFC; -} -/* end reset */ - -/* start function */ -.left { - float: left; -} - -.right { - float: right; -} - -.clear { - background-color: transparent; - border: 0; - clear: both; - display: block; - font-size: 0; - height: 0; - line-height: 0; - overflow: hidden; -} - -.none { - display: none; -} - -.fn-clear:before, -.fn-clear:after { - display: table; - content: ""; -} - -.fn-clear:after { - clear: both; -} -/* end function */ - -/* start common */ -.em00, .em01, .em02, .em03, .em04, .em05, .em06, .em07, .em08, .em09, -.em10, .em11, .em12, .em13, .em14 { - cursor: pointer; - background-image: url("../../ease/images/emotions/emotions-ease.png"); - float: left; - height: 24px; - margin-right: 5px; - width: 24px; - transition: all .2s ease-out; - -webkit-transition: all .2s ease-out; - -moz-transition: all .2s ease-out; -} - -#emotions span:hover { - transform: scale(1.2) rotate(360deg); - -webkit-transform: scale(1.2) rotate(360deg); - -moz-transform: scale(1.2) rotate(360deg); -} - -.em01 { - background-position: -24px 0; -} -.em02 { - background-position: -48px 0; -} -.em03 { - background-position: -72px 0; -} -.em04 { - background-position: -96px 1px; -} -.em05 { - background-position: 0 -24px; -} -.em06 { - background-position: -24px -24px; -} -.em07 { - background-position: -48px -24px; -} -.em08 { - background-position: -72px -24px; -} -.em09 { - background-position: -96px -24px; -} -.em10 { - background-position: 0 -48px; -} -.em11 { - background-position: -24px -48px ; -} -.em12 { - background-position: -48px -48px; -} -.em13 { - background-position: -72px -48px; -} -.em14 { - background-position: -96px -48px; -} - -#tags { - margin: 0; -} - -#tags li { - float: left; - list-style-type: none; - height: 45px; -} - -#tags a { - background-color: #FCFCFC; - box-shadow: 0 0 2px #D5D5D5; - display: block; - margin: 5px 10px; - padding: 5px 10px; -} - -#tags a:hover { - text-shadow: 0 0 2px; - text-decoration: none; - box-shadow: 0 0 4px #D5D5D5; -} - -#tags b { - font-size: 70%; - opacity: 0.6; - filter: alpha(opacity=60); -} - -.tags1, .tags1:visited { - font-size: 12px; - color: #a7a7a7; -} - -.tags2, .tags2:visited { - font-size: 14px; - color: #808080; -} - -.tags3, .tags3:visited { - font-size: 16px; - color: #595959; -} - -.tags4, .tags4:visited { - font-size: 18px; - color: #323232; -} - -.tags5, .tags5:visited { - font-size: 20px; - color: #0a0a0a; -} - -.module { - background-color: #FFFFFF; - border: 1px solid #BEC3C7; - border-radius: 5px 5px 5px 5px; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); - margin-bottom: 30px; - padding: 15px; - word-wrap: break-word; - position: relative; -} - -.module > h3.title { - margin: 0 0 10px 0; - color: #444; -} - -.module > ul.list { - list-style-type: none; - padding-left: 0; - margin: 0; - overflow: hidden; -} - -.module > ul.list > li { - border-top: 1px solid #EEEEEE; - padding: 6px 0; -} -/* end common */ - -/* start icon */ -.articles .arrow, -.ico-author, -.ico-tags, -.ico-comment, -.ico-top, -.ico-view, -.ico-reply, -.ico-translate, -#search { - background-repeat: no-repeat; - background-image: url("../../timeline/images/icons.png"); -} - -.ico-author, -.ico-tags, -.ico-comment, -.ico-view, -.ico-reply { - padding-left: 20px; - background-position: -1px -63px; - margin-right: 10px; -} - -.ico-tags { - background-position: -1px -83px; -} - -.ico-comment { - background-position: -1px -41px; -} - -.ico-view { - background-position: 0 -122px; -} - -.ico-reply { - background-position: 0 -162px; -} - -.ico-translate { - background-position: 0 -186px; - cursor: pointer; - float: right; - height: 16px; - margin-left: 10px; - width: 16px; -} - -#search { - background-position: 5px -138px; - border: medium none; - border-radius: 12px 12px 12px 12px; - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4) inset, 0 1px 0 rgba(255, 255, 255, 0.1); - color: #A5A099; - height: 22px; - margin-top: 13px; - padding-left: 25px; - transition: width 0.7s ease 0s; - width: 60px; -} - -#search:focus { - color: #333; - width: 140px; -} - -.ico-top { - background-color: #363A3D; - background-position: 4px -100px; - border-radius: 20em 20em 20em 20em; - bottom: 60px; - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.3) inset, 0 1px 0 rgba(255, 255, 255, 0.15); - height: 25px; - position: fixed; - left: 90%; - width: 25px; - cursor: pointer; -} - -.ico-next, -.ico-pre { - background-color: #6599C6; - border-radius: 10em 10em 10em 10em; - color: #FFFFFF; - display: block; - float: left; - font: 20px/100% "Times New Roman",Times,serif; - height: 28px; - margin: -8px 10px 0 0; - padding: 4px 0 0; - text-align: center; - transition: background 1s ease 0s; - width: 32px; -} - -.ico-next { - float: right; - margin: -8px 0 0 10px; -} - -a:hover > .ico-next, -a:hover > .ico-pre { - background-color: #000; -} -/* end icon */ - -/* start framework */ -.wrapper { - min-width: 500px; - padding: 50px 0; - background: url("../../timeline/images/bg.png") repeat scroll 0 0 #DEE4EA; -} - -.header { - background-color: #BFBFBF; - background-image: url("../../timeline/images/nav-bg.png"), linear-gradient(#CCCCCC, #A9A9A9); - background-image: url("../../timeline/images/nav-bg.png"), -ms-linear-gradient(#CCCCCC, #A9A9A9); - background-image: url("../../timeline/images/nav-bg.png"), -o-linear-gradient(#CCCCCC, #A9A9A9); - background-image: url("../../timeline/images/nav-bg.png"), -webkit-linear-gradient(#CCCCCC, #A9A9A9); - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#CCCCCC', endColorstr='#A9A9A9'); - border-bottom: 1px solid #898989; - box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 1px rgba(0, 0, 0, 0.2); - height: 50px; - overflow: hidden; -} - -.container { - width: 80%; - margin: 0 auto; -} - -.footer { - border-top: 1px solid #232323; - padding: 20px 0; - color: #ddd; - font-size: 80%; -} - -.footer a { - color: #9CC0DE; -} - -.footer a:hover { - text-decoration: underline; -} -/* end framework */ - -/* start header */ -.header .title { - font-size: 150%; - margin: 3px 0 0; -} - -.header .title a { - color: #414141; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7); -} - -.header li a { - color: #444; - padding: 17px; - line-height: 20px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7); - white-space: nowrap; -} - -.header li a.current { - border-bottom: 2px solid #D26911; -} - -.header a:hover { - color: #000; -} - -.header li { - float: left; - list-style-type: none; -} -/* end header */ - -/* start article list */ -.articles { - position: relative; - margin-top: 11px; -} - -.articles > div.fn-clear { - position: relative; - margin-bottom: 50px; -} - -.articles > div.fn-clear > h2 { - margin: 0; - text-align: center; - height: 28px; -} - -.articles > .vertical { - background-color: #9EB5C6; - border-radius: 20em 20em 20em 20em; - box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.5) inset, 0 0 1px 0 rgba(255, 255, 255, 0.6); - height: 100%; - left: 50%; - margin-left: -3px; - position: absolute; - top: 0; - width: 6px -} - -.articles article { - width: 50%; - float: left; -} - -.articles article.l > div.module { - margin-right: 30px; - left: 0; -} - -.articles article.r { - left: 50%; -} - -.articles article.r > div { - margin-left: 30px; - position: relative; -} - -.articles .dot { - background-color: #FFFFFF; - border: 3px solid #60829F; - border-radius: 20em 20em 20em 20em; - height: 6px; - position: absolute; - right: -37px; - top: 22px; - width: 6px; -} - -.articles .r .dot { - left: -37px; - right: inherit; -} - -.articles .arrow { - height: 15px; - position: absolute; - right: -9px; - top: 21px; - width: 9px; -} - -.articles .r .arrow { - background-position: 0 -22px; - left: -9px; - right: inherit -} - -time.article-time { - top: -8px; - left: 50%; - position: absolute; -} - -time.article-time > span { - background-color: #FFFFFF; - border: 1px solid #A8A9A9; - border-radius: 20em 20em 20em 20em; - font-size: 80%; - margin-left: -56px; - padding: 5px 10px; -} - -article .article-title { - margin: 10px 0 0 0; -} - -article .article-title > sup { - color: #6599C6; - font-size: 70%; -} - -article .article-title a { - color: #000; - text-decoration: none; -} - -.ico > a { - color: #999999; - font-size: 80%; - text-decoration: none; -} - -.ico > a:hover { - color: #000; -} - -.article-more { - background-color: #60829F; - border-radius: 20em 20em 20em 20em; - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.6); - color: #FFFFFF; - cursor: pointer; - font-weight: bold; - height: 19px; - left: 50%; - margin-left: -38px; - padding: 5px 20px; - position: absolute; - text-align: center; - top: 100%; - width: 36px; -} - -.article-archive { - background-color: #60829F; - border-radius: 20em 20em 20em 20em; - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.6); - color: #FFFFFF; - font-size: 80%; - font-weight: normal; - padding: 5px 20px; -} -/* end article list */ - -/* start dynamic */ -.dynamic-l { - float: left; - width: 70%; -} - -.dynamic-l > div { - margin-right: 30px; -} - -.dynamic-r { - float: right; - width: 30%; -} - -.dynamic-r .tags a, -.links a { - line-height: 24px; -} -/* end dynamic */ - -/* start comments */ -#comments { - margin: 30px 0 50px; - position: relative; -} - -.comments > li > img { - height: 60px; - width: 60px; - border-radius: 30px; - float: left; - margin-right: 15px; -} - -.comments .author { - font-size: 130%; - font-style: italic; -} - -.comments > li > div > div.article-body { - padding-left: 75px; - margin: 12px 0; -} - -.module > ul > li.comment-body-ref { - background-color: #FFFFFF; - border: 1px solid #ddd; - left: 76px; - opacity: 0.8; - filter: alpha(opacity=80); - padding: 10px; - position: absolute; - width: 74%; - border-radius: 10px; -} - -.comment-body-ref .ico-reply { - display: none; -} - -.comment-form { - width: 100%; - margin: 30px 0; -} - -#commentForm { - margin-top: 0; -} - -.comment-form input[type='text'], -.comment-form textarea { - background: url("../../timeline/images/bg.png") repeat scroll 0 0 #E5E8EA; - border: 1px solid #BCBDBE; - border-radius: 5px 5px 5px 5px; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset; - margin: 5px 5px 5px 0; - padding: 6px; -} - -.comment-form input[type='text']:focus, -.comment-form textarea:focus { - background-color: #EFEFEF; - outline: medium none; -} - -#submitCommentButton, -#submitCommentButtonReply { - background: none repeat scroll 0 0 #868889; - border: 1px solid #5D6265; - border-radius: 10em 10em 10em 10em; - box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 1px rgba(0, 0, 0, 0.3); - color: #FFFFFF; - cursor: pointer; - padding: 5px 20px; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); -} - -#submitCommentButton:hover, -#submitCommentButtonReply:hover { - color: #fff; - background-color: #444; -} -/* end comments */ - -/* start others */ -.nav-abs { - background-color: #6B6B6B; - border: 1px solid #898989; - border-radius: 5px 5px 5px 5px; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) inset, 0 1px 0 rgba(255, 255, 255, 0.7), 0 -1px 0 rgba(255, 255, 255, 0.6); - color: #CCCCCC; - padding: 5px 10px; - position: absolute; - right: 30px; - top: 61px; - z-index: 1; - text-align: center; - white-space: nowrap; -} - -.nav-abs li { - background-color: #DEDDDD; - border: 1px solid #6B6B6B; - color: #616161; - cursor: pointer; - float: left; - height: 20px; - list-style-type: none; - padding: 3px 5px; - width: 28px; -} - -.nav-abs li.year { - background-color: #6B6B6B; - clear: both; - color: #CCCCCC; - float: none; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); - width: auto; - border-width: 0; -} - -.nav-abs li:hover { - background-color: #EFEEEE; - color: #000; -} - -.nav-abs li.year:hover, .nav-abs li.open { - background-color: #353535; - color: #fff; -} +/* + * Copyright (c) 2009, 2010, 2011, 2012, B3log Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ +/* +* timeline skin style. +* +* @author Liyuan Li +* @version 1.0.1.1, Feb 20, 2013 +*/ +/* start reset */ +html, body { + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + margin: 0; + padding: 0; + height: 100%; +} + +body { + font: 0.81em Verdana, arial, '\5fae\8f6f\96c5\9ed1'; + color: #666666; + background-color: #363A3D; +} + +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; + font-family: Verdana, arial,'\5fae\8f6f\96c5\9ed1'; + outline: none; +} + +a { + color: #6599C6; + outline: medium none; + text-decoration: none; + transition: color 1s ease 0s; +} + +a:hover { + color: #000; +} + +img { + max-width: 100%; + border: 0; + vertical-align: middle; +} + +::selection { + background-color: #D5D5D5; + color: #FCFCFC; +} + +::-moz-selection { + background-color: #D5D5D5; + color: #FCFCFC; +} +/* end reset */ + +/* start function */ +.left { + float: left; +} + +.right { + float: right; +} + +.clear { + background-color: transparent; + border: 0; + clear: both; + display: block; + font-size: 0; + height: 0; + line-height: 0; + overflow: hidden; +} + +.none { + display: none; +} + +.fn-clear:before, +.fn-clear:after { + display: table; + content: ""; +} + +.fn-clear:after { + clear: both; +} +/* end function */ + +/* start common */ +.em00, .em01, .em02, .em03, .em04, .em05, .em06, .em07, .em08, .em09, +.em10, .em11, .em12, .em13, .em14 { + cursor: pointer; + background-image: url("../../ease/images/emotions/emotions-ease.png"); + float: left; + height: 24px; + margin-right: 5px; + width: 24px; + transition: all .2s ease-out; + -webkit-transition: all .2s ease-out; + -moz-transition: all .2s ease-out; +} + +#emotions span:hover { + transform: scale(1.2) rotate(360deg); + -webkit-transform: scale(1.2) rotate(360deg); + -moz-transform: scale(1.2) rotate(360deg); +} + +.em01 { + background-position: -24px 0; +} +.em02 { + background-position: -48px 0; +} +.em03 { + background-position: -72px 0; +} +.em04 { + background-position: -96px 1px; +} +.em05 { + background-position: 0 -24px; +} +.em06 { + background-position: -24px -24px; +} +.em07 { + background-position: -48px -24px; +} +.em08 { + background-position: -72px -24px; +} +.em09 { + background-position: -96px -24px; +} +.em10 { + background-position: 0 -48px; +} +.em11 { + background-position: -24px -48px ; +} +.em12 { + background-position: -48px -48px; +} +.em13 { + background-position: -72px -48px; +} +.em14 { + background-position: -96px -48px; +} + +#tags { + margin: 0; +} + +#tags li { + float: left; + list-style-type: none; + height: 45px; +} + +#tags a { + background-color: #FCFCFC; + box-shadow: 0 0 2px #D5D5D5; + display: block; + margin: 5px 10px; + padding: 5px 10px; +} + +#tags a:hover { + text-shadow: 0 0 2px; + text-decoration: none; + box-shadow: 0 0 4px #D5D5D5; +} + +#tags b { + font-size: 70%; + opacity: 0.6; + filter: alpha(opacity=60); +} + +.tags1, .tags1:visited { + font-size: 12px; + color: #a7a7a7; +} + +.tags2, .tags2:visited { + font-size: 14px; + color: #808080; +} + +.tags3, .tags3:visited { + font-size: 16px; + color: #595959; +} + +.tags4, .tags4:visited { + font-size: 18px; + color: #323232; +} + +.tags5, .tags5:visited { + font-size: 20px; + color: #0a0a0a; +} + +.module { + background-color: #FFFFFF; + border: 1px solid #BEC3C7; + border-radius: 5px 5px 5px 5px; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); + margin-bottom: 30px; + padding: 15px; + word-wrap: break-word; + position: relative; +} + +.module > h3.title { + margin: 0 0 10px 0; + color: #444; +} + +.module > ul.list { + list-style-type: none; + padding-left: 0; + margin: 0; + overflow: hidden; +} + +.module > ul.list > li { + border-top: 1px solid #EEEEEE; + padding: 6px 0; +} +/* end common */ + +/* start icon */ +.articles .arrow, +.ico-author, +.ico-tags, +.ico-comment, +.ico-top, +.ico-view, +.ico-reply, +.ico-translate, +#search { + background-repeat: no-repeat; + background-image: url("../../timeline/images/icons.png"); +} + +.ico-author, +.ico-tags, +.ico-comment, +.ico-view, +.ico-reply { + padding-left: 20px; + background-position: -1px -63px; + margin-right: 10px; +} + +.ico-tags { + background-position: -1px -83px; +} + +.ico-comment { + background-position: -1px -41px; +} + +.ico-view { + background-position: 0 -122px; +} + +.ico-reply { + background-position: 0 -162px; +} + +.ico-translate { + background-position: 0 -186px; + cursor: pointer; + float: right; + height: 16px; + margin-left: 10px; + width: 16px; +} + +#search { + background-position: 5px -138px; + border: medium none; + border-radius: 12px 12px 12px 12px; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4) inset, 0 1px 0 rgba(255, 255, 255, 0.1); + color: #A5A099; + height: 22px; + margin-top: 13px; + padding-left: 25px; + transition: width 0.7s ease 0s; + width: 60px; +} + +#search:focus { + color: #333; + width: 140px; +} + +.ico-top { + background-color: #363A3D; + background-position: 4px -100px; + border-radius: 20em 20em 20em 20em; + bottom: 60px; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.3) inset, 0 1px 0 rgba(255, 255, 255, 0.15); + height: 25px; + position: fixed; + left: 90%; + width: 25px; + cursor: pointer; +} + +.ico-next, +.ico-pre { + background-color: #6599C6; + border-radius: 10em 10em 10em 10em; + color: #FFFFFF; + display: block; + float: left; + font: 20px/100% "Times New Roman",Times,serif; + height: 28px; + margin: -8px 10px 0 0; + padding: 4px 0 0; + text-align: center; + transition: background 1s ease 0s; + width: 32px; +} + +.ico-next { + float: right; + margin: -8px 0 0 10px; +} + +a:hover > .ico-next, +a:hover > .ico-pre { + background-color: #000; +} +/* end icon */ + +/* start framework */ +.wrapper { + min-width: 500px; + padding: 50px 0; + background: url("../../timeline/images/bg.png") repeat scroll 0 0 #DEE4EA; +} + +.header { + background-color: #BFBFBF; + background-image: url("../../timeline/images/nav-bg.png"), linear-gradient(#CCCCCC, #A9A9A9); + background-image: url("../../timeline/images/nav-bg.png"), -ms-linear-gradient(#CCCCCC, #A9A9A9); + background-image: url("../../timeline/images/nav-bg.png"), -o-linear-gradient(#CCCCCC, #A9A9A9); + background-image: url("../../timeline/images/nav-bg.png"), -webkit-linear-gradient(#CCCCCC, #A9A9A9); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#CCCCCC', endColorstr='#A9A9A9'); + border-bottom: 1px solid #898989; + box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 1px rgba(0, 0, 0, 0.2); + height: 50px; + overflow: hidden; +} + +.container { + width: 80%; + margin: 0 auto; +} + +.footer { + border-top: 1px solid #232323; + padding: 20px 0; + color: #ddd; + font-size: 80%; +} + +.footer a { + color: #9CC0DE; +} + +.footer a:hover { + text-decoration: underline; +} +/* end framework */ + +/* start header */ +.header .title { + font-size: 150%; + margin: 3px 0 0; +} + +.header .title a { + color: #414141; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7); +} + +.header li a { + color: #444; + padding: 17px; + line-height: 20px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7); + white-space: nowrap; +} + +.header li a.current { + border-bottom: 2px solid #D26911; +} + +.header a:hover { + color: #000; +} + +.header li { + float: left; + list-style-type: none; +} +/* end header */ + +/* start article list */ +.articles { + position: relative; + margin-top: 11px; +} + +.articles > div.fn-clear { + position: relative; + margin-bottom: 50px; +} + +.articles > div.fn-clear > h2 { + margin: 0; + text-align: center; + height: 28px; +} + +.articles > .vertical { + background-color: #9EB5C6; + border-radius: 20em 20em 20em 20em; + box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.5) inset, 0 0 1px 0 rgba(255, 255, 255, 0.6); + height: 100%; + left: 50%; + margin-left: -3px; + position: absolute; + top: 0; + width: 6px +} + +.articles article { + width: 50%; + float: left; +} + +.articles article.l > div.module { + margin-right: 30px; + left: 0; +} + +.articles article.r { + left: 50%; +} + +.articles article.r > div { + margin-left: 30px; + position: relative; +} + +.articles .dot { + background-color: #FFFFFF; + border: 3px solid #60829F; + border-radius: 20em 20em 20em 20em; + height: 6px; + position: absolute; + right: -37px; + top: 22px; + width: 6px; +} + +.articles .r .dot { + left: -37px; + right: inherit; +} + +.articles .arrow { + height: 15px; + position: absolute; + right: -9px; + top: 21px; + width: 9px; +} + +.articles .r .arrow { + background-position: 0 -22px; + left: -9px; + right: inherit +} + +.articles pre { + background-color: #F5F5F5; + border: 1px solid #ddd; + border-radius: 4px 4px 4px 4px; + padding: 9.5px; + white-space: pre-wrap; + word-wrap: break-word; +} + +time.article-time { + top: -8px; + left: 50%; + position: absolute; +} + +time.article-time > span { + background-color: #FFFFFF; + border: 1px solid #A8A9A9; + border-radius: 20em 20em 20em 20em; + font-size: 80%; + margin-left: -56px; + padding: 5px 10px; +} + +article .article-title { + margin: 10px 0 0 0; +} + +article .article-title > sup { + color: #6599C6; + font-size: 70%; +} + +article .article-title a { + color: #000; + text-decoration: none; +} + +.ico > a { + color: #999999; + font-size: 80%; + text-decoration: none; +} + +.ico > a:hover { + color: #000; +} + +.article-more { + background-color: #60829F; + border-radius: 20em 20em 20em 20em; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.6); + color: #FFFFFF; + cursor: pointer; + font-weight: bold; + height: 19px; + left: 50%; + margin-left: -38px; + padding: 5px 20px; + position: absolute; + text-align: center; + top: 100%; + width: 36px; +} + +.article-archive { + background-color: #60829F; + border-radius: 20em 20em 20em 20em; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.6); + color: #FFFFFF; + font-size: 80%; + font-weight: normal; + padding: 5px 20px; +} +/* end article list */ + +/* start dynamic */ +.dynamic-l { + float: left; + width: 70%; +} + +.dynamic-l > div { + margin-right: 30px; +} + +.dynamic-r { + float: right; + width: 30%; +} + +.dynamic-r .tags a, +.links a { + line-height: 24px; +} +/* end dynamic */ + +/* start comments */ +#comments { + margin: 30px 0 50px; + position: relative; +} + +.comments > li > img { + height: 60px; + width: 60px; + border-radius: 30px; + float: left; + margin-right: 15px; +} + +.comments .author { + font-size: 130%; + font-style: italic; +} + +.comments > li > div > div.article-body { + padding-left: 75px; + margin: 12px 0; +} + +.module > ul > li.comment-body-ref { + background-color: #FFFFFF; + border: 1px solid #ddd; + left: 76px; + opacity: 0.8; + filter: alpha(opacity=80); + padding: 10px; + position: absolute; + width: 74%; + border-radius: 10px; +} + +.comment-body-ref .ico-reply { + display: none; +} + +.comment-form { + width: 100%; + margin: 30px 0; +} + +#commentForm { + margin-top: 0; +} + +.comment-form input[type='text'], +.comment-form textarea { + background: url("../../timeline/images/bg.png") repeat scroll 0 0 #E5E8EA; + border: 1px solid #BCBDBE; + border-radius: 5px 5px 5px 5px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset; + margin: 5px 5px 5px 0; + padding: 6px; +} + +.comment-form input[type='text']:focus, +.comment-form textarea:focus { + background-color: #EFEFEF; + outline: medium none; +} + +#submitCommentButton, +#submitCommentButtonReply { + background: none repeat scroll 0 0 #868889; + border: 1px solid #5D6265; + border-radius: 10em 10em 10em 10em; + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 1px rgba(0, 0, 0, 0.3); + color: #FFFFFF; + cursor: pointer; + padding: 5px 20px; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); +} + +#submitCommentButton:hover, +#submitCommentButtonReply:hover { + color: #fff; + background-color: #444; +} +/* end comments */ + +/* start others */ +.nav-abs { + background-color: #6B6B6B; + border: 1px solid #898989; + border-radius: 5px 5px 5px 5px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) inset, 0 1px 0 rgba(255, 255, 255, 0.7), 0 -1px 0 rgba(255, 255, 255, 0.6); + color: #CCCCCC; + padding: 5px 10px; + position: absolute; + right: 30px; + top: 61px; + z-index: 1; + text-align: center; + white-space: nowrap; +} + +.nav-abs li { + background-color: #DEDDDD; + border: 1px solid #6B6B6B; + color: #616161; + cursor: pointer; + float: left; + height: 20px; + list-style-type: none; + padding: 3px 5px; + width: 28px; +} + +.nav-abs li.year { + background-color: #6B6B6B; + clear: both; + color: #CCCCCC; + float: none; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); + width: auto; + border-width: 0; +} + +.nav-abs li:hover { + background-color: #EFEEEE; + color: #000; +} + +.nav-abs li.year:hover, .nav-abs li.open { + background-color: #353535; + color: #fff; +} /* end others */ \ No newline at end of file diff --git a/timeline/css/timeline.min.css b/timeline/css/timeline.min.css index 02e60f6..ab06496 100644 --- a/timeline/css/timeline.min.css +++ b/timeline/css/timeline.min.css @@ -79,6 +79,7 @@ a:hover>.ico-next,a:hover>.ico-pre{background-color:#000;} .articles .r .dot{left:-37px;right:inherit;} .articles .arrow{height:15px;position:absolute;right:-9px;top:21px;width:9px;} .articles .r .arrow{background-position:0 -22px;left:-9px;right:inherit;} +.articles pre{background-color:#F5F5F5;border:1px solid #ddd;border-radius:4px 4px 4px 4px;padding:9.5px;white-space:pre-wrap;word-wrap:break-word;} time.article-time{top:-8px;left:50%;position:absolute;} time.article-time>span{background-color:#FFFFFF;border:1px solid #A8A9A9;border-radius:20em 20em 20em 20em;font-size:80%;margin-left:-56px;padding:5px 10px;} article .article-title{margin:10px 0 0 0;} diff --git a/timeline/footer.ftl b/timeline/footer.ftl index 06b14e8..10036ae 100644 --- a/timeline/footer.ftl +++ b/timeline/footer.ftl @@ -1,74 +1,74 @@ - -
- - - - -${plugins} + +
+ + + + +${plugins} diff --git a/timeline/js/timeline.js b/timeline/js/timeline.js index 4d48cb2..ef29da2 100644 --- a/timeline/js/timeline.js +++ b/timeline/js/timeline.js @@ -1,291 +1,426 @@ -/* - * Copyright (c) 2009, 2010, 2011, 2012, B3log Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview timeline js. - * - * @author Liyuan Li - * @version 1.0.1.0, Jan 30, 2013 - */ -var timeline = { - _COLHA: 0, - _COLHB: 20, - _initArticleList: function () { - var $articles = $(".articles"); - if ($articles.length === 0 || $(".articles > .fn-clear").length > 0) { - return; - } - - $(window).resize(function () { - var colH = [timeline._COLHA, timeline._COLHB]; - $articles.find("article").each(function () { - var $it = $(this), - isLeft = colH[1] > colH[0], - top = isLeft ? colH[0] : colH[1]; - if (!$it.hasClass("r") && !$it.hasClass("l")) { - $it.css({ - "top": top + "px", - "position": "absolute" - }); - - if (isLeft) { - this.className = "l"; - } else { - this.className = "r"; - } - } - colH[( isLeft ? '0' : '1' )] += parseInt($it.outerHeight(true)); - }); - - $articles.height(colH[0] > colH[1] ? colH[0] : colH[1]); - }); - - setTimeout(function () { - $(window).resize(); - }, 500); - }, - - - _initIndexList: function () { - var $archives = $(".articles > .fn-clear"); - if ($archives.length === 0) { - return; - } - - // 如果为 index 页面,重构 archives 结构,使其可收缩 - var year = 0; - $(".nav-abs li").each(function (i) { - var $this = $(this); - $this.hide(); - if (year !== $this.data("year")) { - year = $this.data("year"); - $this.before("
  • " + year + "
  • "); - } - }); - - // 首次加载时,当没有下一页时,使用 js 隐藏"更多"按钮 - if ($(".article-more").parent().data("count") <= $(".article-more").parent().find("article").length) { - $(".article-more").remove(); - } - - $(window).resize(function () { - $archives.each(function () { - var colH = [timeline._COLHA + 60, timeline._COLHB * 4]; - - var $articles = $(this).find("article"); - if ($articles.length === 0) { - $(this).find("h2").remove(); - $(this).css("margin-bottom" , 0); - } else { - $articles.each(function () { - var $it = $(this), - isLeft = colH[1] > colH[0], - top = isLeft ? colH[0] : colH[1]; - - if (!$it.hasClass("r") && !$it.hasClass("l")) { - $it.css({ - "top": top + "px", - "position": "absolute" - }); - - if (isLeft) { - this.className = "l"; - } else { - this.className = "r"; - } - } - colH[( isLeft ? '0' : '1' )] += parseInt($it.outerHeight(true)); - }); - $(this).height(colH[0] > colH[1] ? colH[0] : colH[1]); - } - }); - }); - - setTimeout(function () { - $(window).resize(); - }, 500); - }, - - _setNavCurrent: function () { - $(".header li a").each(function () { - if($(this).prop("href") === location.href.split("#")[0]) { - this.className = "current"; - } else { - this.className = ""; - } - }) - }, - - init: function () { - $(window).scroll(function () { - if ($(window).scrollTop() > 60) { - $(".ico-top").show(); - } else { - $(".ico-top").hide(); - } - }); - timeline._initIndexList(); - timeline._initArticleList(); - timeline._setNavCurrent(); - }, - - translate: function () { - window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href); - }, - - getArchive: function (year, month, monthName) { - var archiveDate = year + month, - archive = year + "/" + month; - window.location.hash = "#" + archiveDate; - if ($("#" + archiveDate + " > article").length === 0) { - var archiveDataTitle = year + " " + Label.yearLabel + " " + month + " " + Label.monthLabel; - if (Label.localeString.substring(0, 2) === "en") { - archiveDataTitle = monthName + " " + year; - } - var archiveHTML = '

    ' + archiveDataTitle + '

    ' - + '
    ' + Label.moreLabel + '
    '; - - $("#" + archiveDate).html(archiveHTML).css("margin-bottom", "50px"); - timeline.getNextPage($("#" + archiveDate).find(".article-more")[0], archive); - } - }, - - getNextPage: function (it, archive) { - var $more = $(it), - currentPage = $more.data("page") + 1, - path = "/articles/"; - if($("#tag").length === 1) { - var pathnames = location.pathname.split("/"); - path = "/articles/tags/" + pathnames[pathnames.length - 1] + "/"; - } else if ($("#author").length === 1) { - var pathnames = location.pathname.split("/"); - path = "/articles/authors/" + pathnames[pathnames.length - 1] + "/"; - } else if (archive) { - path = "/articles/archives/" + archive + "/"; - } - $.ajax({ - url: latkeConfig.servePath + path + currentPage, - type: "GET", - beforeSend: function () { - $more.css("background", - "url(" + latkeConfig.staticServePath - + "/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text(""); - }, - success: function(result, textStatus){ - if (!result.sc) { - $more.css("background", "none #60829F").text("Error"); - return; - } - - if (result.rslts.articles.length === 0) { - $more.remove(); - return; - } - - var articlesHTML = "", - pagination = result.rslts.pagination; - - // append articles - for (var i = 0; i < result.rslts.articles.length; i++) { - var article = result.rslts.articles[i]; - - articlesHTML += '
    ' - + '

    ' - +article.articleTitle + ''; - - if (article.hasUpdated) { - articlesHTML += '' + Label.updatedLabel + ''; - } - - if (article.articlePutTop) { - articlesHTML += '' + Label.topArticleLabel + ''; - } - - articlesHTML += '

    ' + article.articleAbstract + '

    ' - + ''; - - var articleTags = article.articleTags.split(","); - for (var j = 0; j < articleTags.length; j++) { - articlesHTML += '' + articleTags[j] + ''; - - if (j < articleTags.length - 1) { - articlesHTML += ","; - } - } - - articlesHTML += ' ' - + ' ' + (article.articleCommentCount === 0 ? Label.noCommentLabel : article.articleCommentCount) - + ' ' - + '' + article.articleViewCount - + '
    '; - } - - $more.before(articlesHTML).data("page", currentPage); - // 最后一页处理 - if (pagination.paginationPageCount <= currentPage) { - $more.remove(); - } else { - $more.css("background", "none #60829F").text(Label.moreLabel); - } - - setTimeout(function () { - $(window).resize(); - }, 500); - } - }); - }, - - toggleArchives: function (it, year) { - $(".nav-abs li").each(function (i) { - var $it = $(this); - if (!$it.hasClass("year")) { - $it.hide(); - if (year === $it.data("year") && $(it).hasClass("close")) { - $it.show(); - } - } - }); - - $(".nav-abs li.year").each(function () { - if (parseInt($(this).text()) === year) { - if ($(it).hasClass("close")) { - it.className = "year open"; - } else { - it.className = "year close"; - } - } else { - this.className = "year close"; - } - }); - } -}; - -(function () { - Util.init(); - Util.replaceSideEm($(".recent-comments-content")); - Util.buildTags("tagsSide"); - - timeline.init(); +/* + * Copyright (c) 2009, 2010, 2011, 2012, B3log Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview timeline js. + * + * @author Liyuan Li + * @version 1.0.1.1, Feb 20, 2013 + */ +var timeline = { + _COLHA: 0, + _COLHB: 20, + _initArticleList: function () { + var $articles = $(".articles"); + if ($articles.length === 0 || $(".articles > .fn-clear").length > 0) { + return; + } + + $(window).resize(function () { + var colH = [timeline._COLHA, timeline._COLHB]; + $articles.find("article").each(function () { + var $it = $(this), + isLeft = colH[1] > colH[0], + top = isLeft ? colH[0] : colH[1]; + if (parseInt($it.css("top")) !== top) { + $it.css({ + "top": top + "px", + "position": "absolute" + }); + + if (isLeft) { + this.className = "l"; + } else { + this.className = "r"; + } + } + colH[( isLeft ? '0' : '1' )] += parseInt($it.outerHeight(true)); + }); + + $articles.height(colH[0] > colH[1] ? colH[0] : colH[1]); + }); + + $(window).resize(); + $(".module img").imagesLoaded(function () { + $(window).resize(); + }); + }, + + + _initIndexList: function () { + var $archives = $(".articles > .fn-clear"); + if ($archives.length === 0) { + return; + } + + // 如果为 index 页面,重构 archives 结构,使其可收缩 + var year = 0; + $(".nav-abs li").each(function (i) { + var $this = $(this); + $this.hide(); + if (year !== $this.data("year")) { + year = $this.data("year"); + $this.before("
  • " + year + "
  • "); + } + }); + + // 首次加载时,当没有下一页时,使用 js 隐藏"更多"按钮 + if ($(".article-more").parent().data("count") <= $(".article-more").parent().find("article").length) { + $(".article-more").remove(); + } + + $(window).resize(function () { + console.log("resize"); + $archives.each(function () { + var colH = [timeline._COLHA + 60, timeline._COLHB * 4]; + + var $articles = $(this).find("article"); + if ($articles.length === 0) { + $(this).find("h2").remove(); + $(this).css("margin-bottom" , 0); + } else { + $articles.each(function () { + var $it = $(this), + isLeft = colH[1] > colH[0], + top = isLeft ? colH[0] : colH[1]; + + if (parseInt($it.css("top")) !== top) { + console.log(top); + $it.css({ + "top": top + "px", + "position": "absolute" + }); + + if (isLeft) { + this.className = "l"; + } else { + this.className = "r"; + } + } + colH[( isLeft ? '0' : '1' )] += parseInt($it.outerHeight(true)); + }); + $(this).height(colH[0] > colH[1] ? colH[0] : colH[1]); + } + }); + }); + + $(window).resize(); + $(".module img").imagesLoaded(function () { + $(window).resize(); + }); + }, + + _setNavCurrent: function () { + $(".header li a").each(function () { + if($(this).prop("href") === location.href.split("#")[0]) { + this.className = "current"; + } else { + this.className = ""; + } + }) + }, + + init: function () { + $(window).scroll(function () { + if ($(window).scrollTop() > 60) { + $(".ico-top").show(); + } else { + $(".ico-top").hide(); + } + }); + timeline._initIndexList(); + timeline._initArticleList(); + timeline._setNavCurrent(); + }, + + translate: function () { + window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href); + }, + + getArchive: function (year, month, monthName) { + var archiveDate = year + month, + archive = year + "/" + month; + window.location.hash = "#" + archiveDate; + if ($("#" + archiveDate + " > article").length === 0) { + var archiveDataTitle = year + " " + Label.yearLabel + " " + month + " " + Label.monthLabel; + if (Label.localeString.substring(0, 2) === "en") { + archiveDataTitle = monthName + " " + year; + } + var archiveHTML = '

    ' + archiveDataTitle + '

    ' + + '
    ' + Label.moreLabel + '
    '; + + $("#" + archiveDate).html(archiveHTML).css("margin-bottom", "50px"); + timeline.getNextPage($("#" + archiveDate).find(".article-more")[0], archive); + } + }, + + getNextPage: function (it, archive) { + var $more = $(it), + currentPage = $more.data("page") + 1, + path = "/articles/"; + if($("#tag").length === 1) { + var pathnames = location.pathname.split("/"); + path = "/articles/tags/" + pathnames[pathnames.length - 1] + "/"; + } else if ($("#author").length === 1) { + var pathnames = location.pathname.split("/"); + path = "/articles/authors/" + pathnames[pathnames.length - 1] + "/"; + } else if (archive) { + path = "/articles/archives/" + archive + "/"; + } + $.ajax({ + url: latkeConfig.servePath + path + currentPage, + type: "GET", + beforeSend: function () { + $more.css("background", + "url(" + latkeConfig.staticServePath + + "/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text(""); + }, + success: function(result, textStatus){ + if (!result.sc) { + $more.css("background", "none #60829F").text("Error"); + return; + } + + if (result.rslts.articles.length === 0) { + $more.remove(); + return; + } + + var articlesHTML = "", + pagination = result.rslts.pagination; + + // append articles + for (var i = 0; i < result.rslts.articles.length; i++) { + var article = result.rslts.articles[i]; + + articlesHTML += '
    ' + + '

    ' + +article.articleTitle + ''; + + if (article.hasUpdated) { + articlesHTML += '' + Label.updatedLabel + ''; + } + + if (article.articlePutTop) { + articlesHTML += '' + Label.topArticleLabel + ''; + } + + articlesHTML += '

    ' + article.articleAbstract + '

    ' + + ''; + + var articleTags = article.articleTags.split(","); + for (var j = 0; j < articleTags.length; j++) { + articlesHTML += '' + articleTags[j] + ''; + + if (j < articleTags.length - 1) { + articlesHTML += ","; + } + } + + articlesHTML += ' ' + + ' ' + (article.articleCommentCount === 0 ? Label.noCommentLabel : article.articleCommentCount) + + ' ' + + '' + article.articleViewCount + + '
    '; + } + + $more.before(articlesHTML).data("page", currentPage); + // 最后一页处理 + if (pagination.paginationPageCount <= currentPage) { + $more.remove(); + } else { + $more.css("background", "none #60829F").text(Label.moreLabel); + } + + $(window).resize(); + $(".module img").imagesLoaded(function () { + $(window).resize(); + }); + } + }); + }, + + toggleArchives: function (it, year) { + $(".nav-abs li").each(function (i) { + var $it = $(this); + if (!$it.hasClass("year")) { + $it.hide(); + if (year === $it.data("year") && $(it).hasClass("close")) { + $it.show(); + } + } + }); + + $(".nav-abs li.year").each(function () { + if (parseInt($(this).text()) === year) { + if ($(it).hasClass("close")) { + it.className = "year open"; + } else { + it.className = "year close"; + } + } else { + this.className = "year close"; + } + }); + } +}; + +/*! +* jQuery imagesLoaded plugin v2.1.1 +* http://github.com/desandro/imagesloaded +* +* MIT License. by Paul Irish et al. +*/ + +/*jshint curly: true, eqeqeq: true, noempty: true, strict: true, undef: true, browser: true */ +/*global jQuery: false */ + +; +(function($, undefined) { + 'use strict'; + + // blank image data-uri bypasses webkit log warning (thx doug jones) + var BLANK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=='; + + $.fn.imagesLoaded = function( callback ) { + var $this = this, + deferred = $.isFunction($.Deferred) ? $.Deferred() : 0, + hasNotify = $.isFunction(deferred.notify), + $images = $this.find('img').add( $this.filter('img') ), + loaded = [], + proper = [], + broken = []; + + // Register deferred callbacks + if ($.isPlainObject(callback)) { + $.each(callback, function (key, value) { + if (key === 'callback') { + callback = value; + } else if (deferred) { + deferred[key](value); + } + }); + } + + function doneLoading() { + var $proper = $(proper), + $broken = $(broken); + + if ( deferred ) { + if ( broken.length ) { + deferred.reject( $images, $proper, $broken ); + } else { + deferred.resolve( $images ); + } + } + + if ( $.isFunction( callback ) ) { + callback.call( $this, $images, $proper, $broken ); + } + } + + function imgLoadedHandler( event ) { + imgLoaded( event.target, event.type === 'error' ); + } + + function imgLoaded( img, isBroken ) { + // don't proceed if BLANK image, or image is already loaded + if ( img.src === BLANK || $.inArray( img, loaded ) !== -1 ) { + return; + } + + // store element in loaded images array + loaded.push( img ); + + // keep track of broken and properly loaded images + if ( isBroken ) { + broken.push( img ); + } else { + proper.push( img ); + } + + // cache image and its state for future calls + $.data( img, 'imagesLoaded', { + isBroken: isBroken, + src: img.src + } ); + + // trigger deferred progress method if present + if ( hasNotify ) { + deferred.notifyWith( $(img), [ isBroken, $images, $(proper), $(broken) ] ); + } + + // call doneLoading and clean listeners if all images are loaded + if ( $images.length === loaded.length ) { + setTimeout( doneLoading ); + $images.unbind( '.imagesLoaded', imgLoadedHandler ); + } + } + + // if no images, trigger immediately + if ( !$images.length ) { + doneLoading(); + } else { + $images.bind( 'load.imagesLoaded error.imagesLoaded', imgLoadedHandler ) + .each( function( i, el ) { + var src = el.src; + + // find out if this image has been already checked for status + // if it was, and src has not changed, call imgLoaded on it + var cached = $.data( el, 'imagesLoaded' ); + if ( cached && cached.src === src ) { + imgLoaded( el, cached.isBroken ); + return; + } + + // if complete is true and browser supports natural sizes, try + // to check for image status manually + if ( el.complete && el.naturalWidth !== undefined ) { + imgLoaded( el, el.naturalWidth === 0 || el.naturalHeight === 0 ); + return; + } + + // cached images don't fire load sometimes, so we reset src, but only when + // dealing with IE, or image is complete (loaded) and failed manual check + // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f + if ( el.readyState || el.complete ) { + el.src = BLANK; + el.src = src; + } + }); + } + + return deferred ? deferred.promise( $this ) : $this; + }; + +})(jQuery); + +(function () { + Util.init(); + Util.replaceSideEm($(".recent-comments-content")); + Util.buildTags("tagsSide"); + + timeline.init(); })(); \ No newline at end of file diff --git a/timeline/js/timeline.min.js b/timeline/js/timeline.min.js index 7246fc5..92beed9 100644 --- a/timeline/js/timeline.min.js +++ b/timeline/js/timeline.min.js @@ -16,5 +16,5 @@ * @fileoverview timeline js. * * @author Liyuan Li - * @version 1.0.1.0, Jan 30, 2013 - */var timeline={_COLHA:0,_COLHB:20,_initArticleList:function(){var e=$(".articles");if(e.length===0||$(".articles > .fn-clear").length>0)return;$(window).resize(function(){var t=[timeline._COLHA,timeline._COLHB];e.find("article").each(function(){var e=$(this),n=t[1]>t[0],r=n?t[0]:t[1];!e.hasClass("r")&&!e.hasClass("l")&&(e.css({top:r+"px",position:"absolute"}),n?this.className="l":this.className="r"),t[n?"0":"1"]+=parseInt(e.outerHeight(!0))}),e.height(t[0]>t[1]?t[0]:t[1])}),setTimeout(function(){$(window).resize()},500)},_initIndexList:function(){var e=$(".articles > .fn-clear");if(e.length===0)return;var t=0;$(".nav-abs li").each(function(e){var n=$(this);n.hide(),t!==n.data("year")&&(t=n.data("year"),n.before("
  • "+t+"
  • "))}),$(".article-more").parent().data("count")<=$(".article-more").parent().find("article").length&&$(".article-more").remove(),$(window).resize(function(){e.each(function(){var e=[timeline._COLHA+60,timeline._COLHB*4],t=$(this).find("article");t.length===0?($(this).find("h2").remove(),$(this).css("margin-bottom",0)):(t.each(function(){var t=$(this),n=e[1]>e[0],r=n?e[0]:e[1];!t.hasClass("r")&&!t.hasClass("l")&&(t.css({top:r+"px",position:"absolute"}),n?this.className="l":this.className="r"),e[n?"0":"1"]+=parseInt(t.outerHeight(!0))}),$(this).height(e[0]>e[1]?e[0]:e[1]))})}),setTimeout(function(){$(window).resize()},500)},_setNavCurrent:function(){$(".header li a").each(function(){$(this).prop("href")===location.href.split("#")[0]?this.className="current":this.className=""})},init:function(){$(window).scroll(function(){$(window).scrollTop()>60?$(".ico-top").show():$(".ico-top").hide()}),timeline._initIndexList(),timeline._initArticleList(),timeline._setNavCurrent()},translate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getArchive:function(e,t,n){var r=e+t,i=e+"/"+t;window.location.hash="#"+r;if($("#"+r+" > article").length===0){var s=e+" "+Label.yearLabel+" "+t+" "+Label.monthLabel;Label.localeString.substring(0,2)==="en"&&(s=n+" "+e);var o='

    '+s+"

    "+'
    '+Label.moreLabel+"
    ";$("#"+r).html(o).css("margin-bottom","50px"),timeline.getNextPage($("#"+r).find(".article-more")[0],i)}},getNextPage:function(e,t){var n=$(e),r=n.data("page")+1,i="/articles/";if($("#tag").length===1){var s=location.pathname.split("/");i="/articles/tags/"+s[s.length-1]+"/"}else if($("#author").length===1){var s=location.pathname.split("/");i="/articles/authors/"+s[s.length-1]+"/"}else t&&(i="/articles/archives/"+t+"/");$.ajax({url:latkeConfig.servePath+i+r,type:"GET",beforeSend:function(){n.css("background","url("+latkeConfig.staticServePath+"/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text("")},success:function(e,t){if(!e.sc){n.css("background","none #60829F").text("Error");return}if(e.rslts.articles.length===0){n.remove();return}var i="",s=e.rslts.pagination;for(var o=0;o

    '+u.articleTitle+"",u.hasUpdated&&(i+=""+Label.updatedLabel+""),u.articlePutTop&&(i+=""+Label.topArticleLabel+""),i+="

    "+u.articleAbstract+"

    "+'';var a=u.articleTags.split(",");for(var f=0;f'+a[f]+"",f '+' '+(u.articleCommentCount===0?Label.noCommentLabel:u.articleCommentCount)+' '+''+u.articleViewCount+"
    "}n.before(i).data("page",r),s.paginationPageCount<=r?n.remove():n.css("background","none #60829F").text(Label.moreLabel),setTimeout(function(){$(window).resize()},500)}})},toggleArchives:function(e,t){$(".nav-abs li").each(function(n){var r=$(this);r.hasClass("year")||(r.hide(),t===r.data("year")&&$(e).hasClass("close")&&r.show())}),$(".nav-abs li.year").each(function(){parseInt($(this).text())===t?$(e).hasClass("close")?e.className="year open":e.className="year close":this.className="year close"})}};(function(){Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide"),timeline.init()})(); \ No newline at end of file + * @version 1.0.1.1, Feb 20, 2013 + */var timeline={_COLHA:0,_COLHB:20,_initArticleList:function(){var e=$(".articles");if(e.length===0||$(".articles > .fn-clear").length>0)return;$(window).resize(function(){var t=[timeline._COLHA,timeline._COLHB];e.find("article").each(function(){var e=$(this),n=t[1]>t[0],r=n?t[0]:t[1];parseInt(e.css("top"))!==r&&(e.css({top:r+"px",position:"absolute"}),n?this.className="l":this.className="r"),t[n?"0":"1"]+=parseInt(e.outerHeight(!0))}),e.height(t[0]>t[1]?t[0]:t[1])}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})},_initIndexList:function(){var e=$(".articles > .fn-clear");if(e.length===0)return;var t=0;$(".nav-abs li").each(function(e){var n=$(this);n.hide(),t!==n.data("year")&&(t=n.data("year"),n.before("
  • "+t+"
  • "))}),$(".article-more").parent().data("count")<=$(".article-more").parent().find("article").length&&$(".article-more").remove(),$(window).resize(function(){console.log("resize"),e.each(function(){var e=[timeline._COLHA+60,timeline._COLHB*4],t=$(this).find("article");t.length===0?($(this).find("h2").remove(),$(this).css("margin-bottom",0)):(t.each(function(){var t=$(this),n=e[1]>e[0],r=n?e[0]:e[1];parseInt(t.css("top"))!==r&&(console.log(r),t.css({top:r+"px",position:"absolute"}),n?this.className="l":this.className="r"),e[n?"0":"1"]+=parseInt(t.outerHeight(!0))}),$(this).height(e[0]>e[1]?e[0]:e[1]))})}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})},_setNavCurrent:function(){$(".header li a").each(function(){$(this).prop("href")===location.href.split("#")[0]?this.className="current":this.className=""})},init:function(){$(window).scroll(function(){$(window).scrollTop()>60?$(".ico-top").show():$(".ico-top").hide()}),timeline._initIndexList(),timeline._initArticleList(),timeline._setNavCurrent()},translate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getArchive:function(e,t,n){var r=e+t,i=e+"/"+t;window.location.hash="#"+r;if($("#"+r+" > article").length===0){var s=e+" "+Label.yearLabel+" "+t+" "+Label.monthLabel;Label.localeString.substring(0,2)==="en"&&(s=n+" "+e);var o='

    '+s+"

    "+'
    '+Label.moreLabel+"
    ";$("#"+r).html(o).css("margin-bottom","50px"),timeline.getNextPage($("#"+r).find(".article-more")[0],i)}},getNextPage:function(e,t){var n=$(e),r=n.data("page")+1,i="/articles/";if($("#tag").length===1){var s=location.pathname.split("/");i="/articles/tags/"+s[s.length-1]+"/"}else if($("#author").length===1){var s=location.pathname.split("/");i="/articles/authors/"+s[s.length-1]+"/"}else t&&(i="/articles/archives/"+t+"/");$.ajax({url:latkeConfig.servePath+i+r,type:"GET",beforeSend:function(){n.css("background","url("+latkeConfig.staticServePath+"/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text("")},success:function(e,t){if(!e.sc){n.css("background","none #60829F").text("Error");return}if(e.rslts.articles.length===0){n.remove();return}var i="",s=e.rslts.pagination;for(var o=0;o

    '+u.articleTitle+"",u.hasUpdated&&(i+=""+Label.updatedLabel+""),u.articlePutTop&&(i+=""+Label.topArticleLabel+""),i+="

    "+u.articleAbstract+"

    "+'';var a=u.articleTags.split(",");for(var f=0;f'+a[f]+"",f '+' '+(u.articleCommentCount===0?Label.noCommentLabel:u.articleCommentCount)+' '+''+u.articleViewCount+"
    "}n.before(i).data("page",r),s.paginationPageCount<=r?n.remove():n.css("background","none #60829F").text(Label.moreLabel),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})}})},toggleArchives:function(e,t){$(".nav-abs li").each(function(n){var r=$(this);r.hasClass("year")||(r.hide(),t===r.data("year")&&$(e).hasClass("close")&&r.show())}),$(".nav-abs li.year").each(function(){parseInt($(this).text())===t?$(e).hasClass("close")?e.className="year open":e.className="year close":this.className="year close"})}};(function(e,t){"use strict";var n="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";e.fn.imagesLoaded=function(r){function c(){var t=e(f),n=e(l);s&&(l.length?s.reject(u,t,n):s.resolve(u)),e.isFunction(r)&&r.call(i,u,t,n)}function h(e){p(e.target,e.type==="error")}function p(t,r){if(t.src===n||e.inArray(t,a)!==-1)return;a.push(t),r?l.push(t):f.push(t),e.data(t,"imagesLoaded",{isBroken:r,src:t.src}),o&&s.notifyWith(e(t),[r,u,e(f),e(l)]),u.length===a.length&&(setTimeout(c),u.unbind(".imagesLoaded",h))}var i=this,s=e.isFunction(e.Deferred)?e.Deferred():0,o=e.isFunction(s.notify),u=i.find("img").add(i.filter("img")),a=[],f=[],l=[];return e.isPlainObject(r)&&e.each(r,function(e,t){e==="callback"?r=t:s&&s[e](t)}),u.length?u.bind("load.imagesLoaded error.imagesLoaded",h).each(function(r,i){var s=i.src,o=e.data(i,"imagesLoaded");if(o&&o.src===s){p(i,o.isBroken);return}if(i.complete&&i.naturalWidth!==t){p(i,i.naturalWidth===0||i.naturalHeight===0);return}if(i.readyState||i.complete)i.src=n,i.src=s}):c(),s?s.promise(i):i}})(jQuery),function(){Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide"),timeline.init()}(); \ No newline at end of file From 3c41aa0165461ac7b47159798e8bf4843f06dfea Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 20 Feb 2013 16:58:22 +0800 Subject: [PATCH 02/11] =?UTF-8?q?timeline=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- timeline/footer.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timeline/footer.ftl b/timeline/footer.ftl index 10036ae..628e9fa 100644 --- a/timeline/footer.ftl +++ b/timeline/footer.ftl @@ -7,7 +7,7 @@ ${b3logLabel}  Solo, ver ${version}   - Theme by postline & Vanessa. + Theme by Postline & Vanessa.
    From 0c7f487c81d52a4558400b2940940765f27ef96e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 20 Feb 2013 17:45:58 +0800 Subject: [PATCH 03/11] =?UTF-8?q?timeline=20=E5=8A=A8=E6=80=81=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=AF=84=E8=AE=BA=E8=A1=A8=E6=83=85=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- timeline/js/timeline.js | 2 +- timeline/js/timeline.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/timeline/js/timeline.js b/timeline/js/timeline.js index ef29da2..bcc57f6 100644 --- a/timeline/js/timeline.js +++ b/timeline/js/timeline.js @@ -419,7 +419,7 @@ var timeline = { (function () { Util.init(); - Util.replaceSideEm($(".recent-comments-content")); + Util.replaceSideEm($(".comments .article-body")); Util.buildTags("tagsSide"); timeline.init(); diff --git a/timeline/js/timeline.min.js b/timeline/js/timeline.min.js index 92beed9..b3408ec 100644 --- a/timeline/js/timeline.min.js +++ b/timeline/js/timeline.min.js @@ -17,4 +17,4 @@ * * @author Liyuan Li * @version 1.0.1.1, Feb 20, 2013 - */var timeline={_COLHA:0,_COLHB:20,_initArticleList:function(){var e=$(".articles");if(e.length===0||$(".articles > .fn-clear").length>0)return;$(window).resize(function(){var t=[timeline._COLHA,timeline._COLHB];e.find("article").each(function(){var e=$(this),n=t[1]>t[0],r=n?t[0]:t[1];parseInt(e.css("top"))!==r&&(e.css({top:r+"px",position:"absolute"}),n?this.className="l":this.className="r"),t[n?"0":"1"]+=parseInt(e.outerHeight(!0))}),e.height(t[0]>t[1]?t[0]:t[1])}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})},_initIndexList:function(){var e=$(".articles > .fn-clear");if(e.length===0)return;var t=0;$(".nav-abs li").each(function(e){var n=$(this);n.hide(),t!==n.data("year")&&(t=n.data("year"),n.before("
  • "+t+"
  • "))}),$(".article-more").parent().data("count")<=$(".article-more").parent().find("article").length&&$(".article-more").remove(),$(window).resize(function(){console.log("resize"),e.each(function(){var e=[timeline._COLHA+60,timeline._COLHB*4],t=$(this).find("article");t.length===0?($(this).find("h2").remove(),$(this).css("margin-bottom",0)):(t.each(function(){var t=$(this),n=e[1]>e[0],r=n?e[0]:e[1];parseInt(t.css("top"))!==r&&(console.log(r),t.css({top:r+"px",position:"absolute"}),n?this.className="l":this.className="r"),e[n?"0":"1"]+=parseInt(t.outerHeight(!0))}),$(this).height(e[0]>e[1]?e[0]:e[1]))})}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})},_setNavCurrent:function(){$(".header li a").each(function(){$(this).prop("href")===location.href.split("#")[0]?this.className="current":this.className=""})},init:function(){$(window).scroll(function(){$(window).scrollTop()>60?$(".ico-top").show():$(".ico-top").hide()}),timeline._initIndexList(),timeline._initArticleList(),timeline._setNavCurrent()},translate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getArchive:function(e,t,n){var r=e+t,i=e+"/"+t;window.location.hash="#"+r;if($("#"+r+" > article").length===0){var s=e+" "+Label.yearLabel+" "+t+" "+Label.monthLabel;Label.localeString.substring(0,2)==="en"&&(s=n+" "+e);var o='

    '+s+"

    "+'
    '+Label.moreLabel+"
    ";$("#"+r).html(o).css("margin-bottom","50px"),timeline.getNextPage($("#"+r).find(".article-more")[0],i)}},getNextPage:function(e,t){var n=$(e),r=n.data("page")+1,i="/articles/";if($("#tag").length===1){var s=location.pathname.split("/");i="/articles/tags/"+s[s.length-1]+"/"}else if($("#author").length===1){var s=location.pathname.split("/");i="/articles/authors/"+s[s.length-1]+"/"}else t&&(i="/articles/archives/"+t+"/");$.ajax({url:latkeConfig.servePath+i+r,type:"GET",beforeSend:function(){n.css("background","url("+latkeConfig.staticServePath+"/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text("")},success:function(e,t){if(!e.sc){n.css("background","none #60829F").text("Error");return}if(e.rslts.articles.length===0){n.remove();return}var i="",s=e.rslts.pagination;for(var o=0;o

    '+u.articleTitle+"",u.hasUpdated&&(i+=""+Label.updatedLabel+""),u.articlePutTop&&(i+=""+Label.topArticleLabel+""),i+="

    "+u.articleAbstract+"

    "+'';var a=u.articleTags.split(",");for(var f=0;f'+a[f]+"",f '+' '+(u.articleCommentCount===0?Label.noCommentLabel:u.articleCommentCount)+' '+''+u.articleViewCount+"
    "}n.before(i).data("page",r),s.paginationPageCount<=r?n.remove():n.css("background","none #60829F").text(Label.moreLabel),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})}})},toggleArchives:function(e,t){$(".nav-abs li").each(function(n){var r=$(this);r.hasClass("year")||(r.hide(),t===r.data("year")&&$(e).hasClass("close")&&r.show())}),$(".nav-abs li.year").each(function(){parseInt($(this).text())===t?$(e).hasClass("close")?e.className="year open":e.className="year close":this.className="year close"})}};(function(e,t){"use strict";var n="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";e.fn.imagesLoaded=function(r){function c(){var t=e(f),n=e(l);s&&(l.length?s.reject(u,t,n):s.resolve(u)),e.isFunction(r)&&r.call(i,u,t,n)}function h(e){p(e.target,e.type==="error")}function p(t,r){if(t.src===n||e.inArray(t,a)!==-1)return;a.push(t),r?l.push(t):f.push(t),e.data(t,"imagesLoaded",{isBroken:r,src:t.src}),o&&s.notifyWith(e(t),[r,u,e(f),e(l)]),u.length===a.length&&(setTimeout(c),u.unbind(".imagesLoaded",h))}var i=this,s=e.isFunction(e.Deferred)?e.Deferred():0,o=e.isFunction(s.notify),u=i.find("img").add(i.filter("img")),a=[],f=[],l=[];return e.isPlainObject(r)&&e.each(r,function(e,t){e==="callback"?r=t:s&&s[e](t)}),u.length?u.bind("load.imagesLoaded error.imagesLoaded",h).each(function(r,i){var s=i.src,o=e.data(i,"imagesLoaded");if(o&&o.src===s){p(i,o.isBroken);return}if(i.complete&&i.naturalWidth!==t){p(i,i.naturalWidth===0||i.naturalHeight===0);return}if(i.readyState||i.complete)i.src=n,i.src=s}):c(),s?s.promise(i):i}})(jQuery),function(){Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide"),timeline.init()}(); \ No newline at end of file + */var timeline={_COLHA:0,_COLHB:20,_initArticleList:function(){var e=$(".articles");if(e.length===0||$(".articles > .fn-clear").length>0)return;$(window).resize(function(){var t=[timeline._COLHA,timeline._COLHB];e.find("article").each(function(){var e=$(this),n=t[1]>t[0],r=n?t[0]:t[1];parseInt(e.css("top"))!==r&&(e.css({top:r+"px",position:"absolute"}),n?this.className="l":this.className="r"),t[n?"0":"1"]+=parseInt(e.outerHeight(!0))}),e.height(t[0]>t[1]?t[0]:t[1])}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})},_initIndexList:function(){var e=$(".articles > .fn-clear");if(e.length===0)return;var t=0;$(".nav-abs li").each(function(e){var n=$(this);n.hide(),t!==n.data("year")&&(t=n.data("year"),n.before("
  • "+t+"
  • "))}),$(".article-more").parent().data("count")<=$(".article-more").parent().find("article").length&&$(".article-more").remove(),$(window).resize(function(){console.log("resize"),e.each(function(){var e=[timeline._COLHA+60,timeline._COLHB*4],t=$(this).find("article");t.length===0?($(this).find("h2").remove(),$(this).css("margin-bottom",0)):(t.each(function(){var t=$(this),n=e[1]>e[0],r=n?e[0]:e[1];parseInt(t.css("top"))!==r&&(console.log(r),t.css({top:r+"px",position:"absolute"}),n?this.className="l":this.className="r"),e[n?"0":"1"]+=parseInt(t.outerHeight(!0))}),$(this).height(e[0]>e[1]?e[0]:e[1]))})}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})},_setNavCurrent:function(){$(".header li a").each(function(){$(this).prop("href")===location.href.split("#")[0]?this.className="current":this.className=""})},init:function(){$(window).scroll(function(){$(window).scrollTop()>60?$(".ico-top").show():$(".ico-top").hide()}),timeline._initIndexList(),timeline._initArticleList(),timeline._setNavCurrent()},translate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getArchive:function(e,t,n){var r=e+t,i=e+"/"+t;window.location.hash="#"+r;if($("#"+r+" > article").length===0){var s=e+" "+Label.yearLabel+" "+t+" "+Label.monthLabel;Label.localeString.substring(0,2)==="en"&&(s=n+" "+e);var o='

    '+s+"

    "+'
    '+Label.moreLabel+"
    ";$("#"+r).html(o).css("margin-bottom","50px"),timeline.getNextPage($("#"+r).find(".article-more")[0],i)}},getNextPage:function(e,t){var n=$(e),r=n.data("page")+1,i="/articles/";if($("#tag").length===1){var s=location.pathname.split("/");i="/articles/tags/"+s[s.length-1]+"/"}else if($("#author").length===1){var s=location.pathname.split("/");i="/articles/authors/"+s[s.length-1]+"/"}else t&&(i="/articles/archives/"+t+"/");$.ajax({url:latkeConfig.servePath+i+r,type:"GET",beforeSend:function(){n.css("background","url("+latkeConfig.staticServePath+"/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text("")},success:function(e,t){if(!e.sc){n.css("background","none #60829F").text("Error");return}if(e.rslts.articles.length===0){n.remove();return}var i="",s=e.rslts.pagination;for(var o=0;o

    '+u.articleTitle+"",u.hasUpdated&&(i+=""+Label.updatedLabel+""),u.articlePutTop&&(i+=""+Label.topArticleLabel+""),i+="

    "+u.articleAbstract+"

    "+'';var a=u.articleTags.split(",");for(var f=0;f'+a[f]+"",f '+' '+(u.articleCommentCount===0?Label.noCommentLabel:u.articleCommentCount)+' '+''+u.articleViewCount+"
    "}n.before(i).data("page",r),s.paginationPageCount<=r?n.remove():n.css("background","none #60829F").text(Label.moreLabel),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})}})},toggleArchives:function(e,t){$(".nav-abs li").each(function(n){var r=$(this);r.hasClass("year")||(r.hide(),t===r.data("year")&&$(e).hasClass("close")&&r.show())}),$(".nav-abs li.year").each(function(){parseInt($(this).text())===t?$(e).hasClass("close")?e.className="year open":e.className="year close":this.className="year close"})}};(function(e,t){"use strict";var n="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";e.fn.imagesLoaded=function(r){function c(){var t=e(f),n=e(l);s&&(l.length?s.reject(u,t,n):s.resolve(u)),e.isFunction(r)&&r.call(i,u,t,n)}function h(e){p(e.target,e.type==="error")}function p(t,r){if(t.src===n||e.inArray(t,a)!==-1)return;a.push(t),r?l.push(t):f.push(t),e.data(t,"imagesLoaded",{isBroken:r,src:t.src}),o&&s.notifyWith(e(t),[r,u,e(f),e(l)]),u.length===a.length&&(setTimeout(c),u.unbind(".imagesLoaded",h))}var i=this,s=e.isFunction(e.Deferred)?e.Deferred():0,o=e.isFunction(s.notify),u=i.find("img").add(i.filter("img")),a=[],f=[],l=[];return e.isPlainObject(r)&&e.each(r,function(e,t){e==="callback"?r=t:s&&s[e](t)}),u.length?u.bind("load.imagesLoaded error.imagesLoaded",h).each(function(r,i){var s=i.src,o=e.data(i,"imagesLoaded");if(o&&o.src===s){p(i,o.isBroken);return}if(i.complete&&i.naturalWidth!==t){p(i,i.naturalWidth===0||i.naturalHeight===0);return}if(i.readyState||i.complete)i.src=n,i.src=s}):c(),s?s.promise(i):i}})(jQuery),function(){Util.init(),Util.replaceSideEm($(".comments .article-body")),Util.buildTags("tagsSide"),timeline.init()}(); \ No newline at end of file From 096ab6c1f2ca154a4be107c9560dbdb3b5682b9c Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 23 Feb 2013 12:01:30 +0800 Subject: [PATCH 04/11] compress --- community/css/community.min.css | 4 +- ease/js/ease.min.js | 21 +- neoease/js/neoease.min.js | 21 +- timeline/css/timeline.min.css | 2 +- timeline/js/timeline.js | 848 ++++++++++++++++---------------- timeline/js/timeline.min.js | 21 +- 6 files changed, 429 insertions(+), 488 deletions(-) diff --git a/community/css/community.min.css b/community/css/community.min.css index 0df4a13..34ad079 100644 --- a/community/css/community.min.css +++ b/community/css/community.min.css @@ -7,8 +7,8 @@ a:hover{text-decoration:underline;} .content>h2{margin:-20px 0 20px 0;} .hr{background:url("../images/indentline-light.png") repeat-x scroll left top transparent;margin:20px 0 40px;clear:both;height:2px;} .arrow-right{background:url("../images/icon.png") 0px -64px no-repeat;float:left;height:38px;width:14px;} -input[type='button']{border-radius:5px;box-shadow:0 1px 0 rgba(255, 255, 255, 0.3) inset,0 0 2px rgba(255, 255, 255, 0.3) inset,0 1px 2px rgba(0, 0, 0, 0.29);background-color:#000000;background-image:linear-gradient(top, #333333, #000000);background-image:-moz-linear-gradient(top, #333333, #000000);background-image:-ms-linear-gradient(top, #333333, #000000);background-image:-o-linear-gradient(top, #333333, #000000);background-image:-webkit-gradient(linear, left top, left bottom, from(#333333), to(#000000));filter:progid:dximagetransform.microsoft.gradient(startColorstr='#333333', endColorstr='#000000');border:1px solid #000000;color:white;margin:15px 0 0 200px;padding:7px 13px;height:auto;} -input[type='button']:hover{background-color:#333333;background-image:linear-gradient(top, #333333, #212121);background-image:-moz-linear-gradient(top, #333333, #212121);background-image:-ms-linear-gradient(top, #333333, #212121);background-image:-o-linear-gradient(top, #333333, #212121);background-image:-webkit-gradient(linear, left top, left bottom, from(#333333), to(#212121));filter:progid:dximagetransform.microsoft.gradient(startColorstr='#333333', endColorstr='#212121');} +input[type='button']{border-radius:5px;box-shadow:0 1px 0 rgba(255, 255, 255, 0.3) inset,0 0 2px rgba(255, 255, 255, 0.3) inset,0 1px 2px rgba(0, 0, 0, 0.29);background-color:#000000;background-image:linear-gradient(top, #333333, #000000);background-image:-moz-linear-gradient(top, #333333, #000000);background-image:-ms-linear-gradient(top, #333333, #000000);background-image:-o-linear-gradient(top, #333333, #000000);background-image:-webkit-gradient(linear, left top, left bottom, from(#333333), to(#000000));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#000000');border:1px solid #000000;color:white;margin:15px 0 0 200px;padding:7px 13px;height:auto;} +input[type='button']:hover{background-color:#333333;background-image:linear-gradient(top, #333333, #212121);background-image:-moz-linear-gradient(top, #333333, #212121);background-image:-ms-linear-gradient(top, #333333, #212121);background-image:-o-linear-gradient(top, #333333, #212121);background-image:-webkit-gradient(linear, left top, left bottom, from(#333333), to(#212121));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#212121');} .marginBottom40{margin-bottom:40px;} .header-user{background-color:#DEDEDE;padding-top:1px;} .header-navi{background:url("../images/icon.png") 0px -130px repeat-x #333333;margin-bottom:50px;} diff --git a/ease/js/ease.min.js b/ease/js/ease.min.js index 3ccd9d9..60ae32a 100644 --- a/ease/js/ease.min.js +++ b/ease/js/ease.min.js @@ -1,20 +1 @@ -/* - * Copyright (c) 2009, 2010, 2011, 2012, B3log Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *//** - * @fileoverview ease js. - * - * @author Liyuan Li - * @version 1.0.1.5, Jan 29, 2013 - */var goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getNextPage=function(){var e=$(".article-next");currentPage+=1;var t="/articles/";if($("#tag").length===1){var n=location.pathname.split("/");t="/articles/tags/"+n[n.length-1]+"/"}else if($("#archive").length===1){var n=location.pathname.split("/");t="/articles/archives/"+n[n.length-2]+"/"+n[n.length-1]+"/"}else if($("#author").length===1){var n=location.pathname.split("/");t="/articles/authors/"+n[n.length-1]+"/"}$.ajax({url:latkeConfig.servePath+t+currentPage,type:"GET",beforeSend:function(){e.css("background","url("+latkeConfig.staticServePath+"/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe")},success:function(t,n){if(!t.sc)return;var r="",i=t.rslts.pagination;for(var s=0;s'+'
    '+"

    "+''+o.articleTitle+"",o.hasUpdated&&(r+=""+Label.updatedLabel+""),o.articlePutTop&&(r+=""+Label.topArticleLabel+""),r+='

    "+'
    '+"
    "+'
    '+'
    '+o.articleAbstract+"
    "+'
    '+"
    "+'
    ',o.hasUpdated?r+=Util.toDate(o.articleUpdateTime,"yy-MM-dd HH:mm"):r+=Util.toDate(o.articleCreateTime,"yy-MM-dd HH:mm"),r+=' '+o.authorName+""+"
    "+'
    '+Label.tag1Label+" ";var a=o.articleTags.split(",");for(var f=0;f
    "}e.html(r);var a=$(".archives>div"),f=0,l=0,c=[];for(var h=0;h=a.length)break;a[h].style.left=p*310+"px",f>0?(a[h-3].style.top!==""&&(l=parseInt(a[h-3].style.top)),a[h].style.top=$(a[h-3]).height()+60+l+"px",c[p]=parseInt(a[h].style.top)+$(a[h]).height()+60):c[p]=$(a[h]).height()+60,p<2&&(h+=1)}f+=1}e.height(c.sort()[c.length-1])},scrollEvent:function(){var e=this;$(window).scroll(function(){var t=$(window).scrollTop(),n=0;$("#top").css("display")==="block"&&(n=$("#top").height()),t>=e.headerH+n?(e.$nav.css("position","fixed"),e.$body.css("marginTop","55px")):(e.$nav.css("position","inherit"),e.$body.css("marginTop","0"));if(t>e.headerH){var r=$(window).height(),i=t+r-21;$("body").height()-58<=t+r&&(i=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",i)}else $("#goTop").hide()})},setDynamic:function(){var e=$(".dynamic");if($(".dynamic").length<1)return;var t=e.find(".side-comments"),n=e.find(".side-tags"),r=e.find(".side-most-comment"),i=e.find(".side-most-view");t.height()>n.height()?n.height(t.height()):t.height(n.height()),r.height()>i.height()?i.height(r.height()):r.height(i.height()),$(".article-body").each(function(){this.innerHTML=Util.replaceEmString($(this).html())})},scrollToCmt:function(){$(window.location.hash).length==1&&$(window).scrollTop($(window.location.hash).offset().top-60)}};(function(){ease.getCurrentPage(),ease.initCommon(),ease.scrollEvent(),ease.setNavCurrent(),ease.initArchives(),ease.setDynamic()})(); \ No newline at end of file +var goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)};var getNextPage=function(){var $more=$(".article-next");currentPage+=1;var path="/articles/";if($("#tag").length===1){var pathnames=location.pathname.split("/");path="/articles/tags/"+pathnames[pathnames.length-1]+"/"}else if($("#archive").length===1){var pathnames=location.pathname.split("/");path="/articles/archives/"+pathnames[pathnames.length-2]+"/"+pathnames[pathnames.length-1]+"/"}else if($("#author").length===1){var pathnames=location.pathname.split("/");path="/articles/authors/"+pathnames[pathnames.length-1]+"/"}$.ajax({url:latkeConfig.servePath+path+currentPage,type:"GET",beforeSend:function(){$more.css("background","url("+latkeConfig.staticServePath+"/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe")},success:function(result,textStatus){if(!result.sc){return}var articlesHTML="",pagination=result.rslts.pagination;for(var i=0;i'+'
    '+"

    "+''+article.articleTitle+"";if(article.hasUpdated){articlesHTML+=""+Label.updatedLabel+""}if(article.articlePutTop){articlesHTML+=""+Label.topArticleLabel+""}articlesHTML+="

    "+'"+'
    '+"
    "+'
    '+'
    '+article.articleAbstract+"
    "+'
    '+"
    "+'
    ';if(article.hasUpdated){articlesHTML+=Util.toDate(article.articleUpdateTime,"yy-MM-dd HH:mm")}else{articlesHTML+=Util.toDate(article.articleCreateTime,"yy-MM-dd HH:mm")}articlesHTML+=' '+article.authorName+""+"
    "+'
    '+Label.tag1Label+" ";var articleTags=article.articleTags.split(",");for(var j=0;j
    '+""}$(".article-last").removeClass("article-last");$(".main>.wrapper>ul").append(articlesHTML);if(pagination.paginationPageCount===currentPage){$more.remove()}else{$more.css("background","none")}}})};var ease={$header:$(".header"),headerH:103,$body:$(".main > .wrapper"),$nav:$(".nav"),getCurrentPage:function(){var $next=$(".article-next");if($next.length>0){window.currentPage=$next.data("page")}},setNavCurrent:function(){$(".nav ul a").each(function(){var $this=$(this);if($this.attr("href")===latkeConfig.servePath+location.pathname){$this.addClass("current")}else if(/\/[0-9]+$/.test(location.pathname)){$(".nav ul li")[0].className="current"}})},initCommon:function(){Util.init();Util.replaceSideEm($(".recent-comments-content"));Util.buildTags("tagsSide")},initArchives:function(){var $archives=$(".archives");if($archives.length<1){return}$(".footer").css("marginTop","30px");var years=[],$archiveList=$archives.find("span").each(function(){var year=$(this).data("year"),tag=true;for(var i=0;i

    "+years[j]+"

    "+monthsHTML+"
    "}$archives.html(yearsHTML);var $items=$(".archives>div"),line=0,top=0,heights=[];for(var m=0;m<$items.length;m++){for(var n=0;n<3;n++){if(m>=$items.length){break}$items[m].style.left=n*310+"px";if(line>0){if($items[m-3].style.top!==""){top=parseInt($items[m-3].style.top)}$items[m].style.top=$($items[m-3]).height()+60+top+"px";heights[n]=parseInt($items[m].style.top)+$($items[m]).height()+60}else{heights[n]=$($items[m]).height()+60}if(n<2){m+=1}}line+=1}$archives.height(heights.sort()[heights.length-1])},scrollEvent:function(){var _it=this;$(window).scroll(function(){var y=$(window).scrollTop(),topH=0;if($("#top").css("display")==="block"){topH=$("#top").height()}if(y>=_it.headerH+topH){_it.$nav.css("position","fixed");_it.$body.css("marginTop","55px")}else{_it.$nav.css("position","inherit");_it.$body.css("marginTop","0")}if(y>_it.headerH){var bodyH=$(window).height();var top=y+bodyH-21;if($("body").height()-58<=y+bodyH){top=$(".footer").offset().top-21}$("#goTop").fadeIn("slow").css("top",top)}else{$("#goTop").hide()}})},setDynamic:function(){var $dynamic=$(".dynamic");if($(".dynamic").length<1){return}var $comments=$dynamic.find(".side-comments"),$tags=$dynamic.find(".side-tags"),$mostComment=$dynamic.find(".side-most-comment"),$mostView=$dynamic.find(".side-most-view");if($comments.height()>$tags.height()){$tags.height($comments.height())}else{$comments.height($tags.height())}if($mostComment.height()>$mostView.height()){$mostView.height($mostComment.height())}else{$mostComment.height($mostView.height())}$(".article-body").each(function(){this.innerHTML=Util.replaceEmString($(this).html())})},scrollToCmt:function(){if($(window.location.hash).length==1){$(window).scrollTop($(window.location.hash).offset().top-60)}}};(function(){ease.getCurrentPage();ease.initCommon();ease.scrollEvent();ease.setNavCurrent();ease.initArchives();ease.setDynamic()})(); \ No newline at end of file diff --git a/neoease/js/neoease.min.js b/neoease/js/neoease.min.js index a2252f5..0775676 100644 --- a/neoease/js/neoease.min.js +++ b/neoease/js/neoease.min.js @@ -1,20 +1 @@ -/* - * Copyright (c) 2009, 2010, 2011, 2012, B3log Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *//** - * @fileoverview neoease js. - * - * @author Liyuan Li - * @version 1.0.0.8, Sep 6, 2012 - */var goTop=function(e){e=e||.1;var t=$(window).scrollTop(),n=1+e;window.scrollTo(0,Math.floor(t/n));if(t>0){var r="goTop("+e+")";window.setTimeout(r,16)}},collapseArchive=function(e,t){var n=!0;e.className==="collapse-ico"?(e.className="expand-ico",n=!1):e.className="collapse-ico",$("#archiveSide li").each(function(){var e=$(this);e.data("year")===t&&(n?$(this).show():$(this).hide())})},getArticle=function(e,t){var n=$("#abstract"+t),r=$("#content"+t);return r.html()===""?$.ajax({url:"/get-article-content?id="+t,type:"GET",dataType:"html",beforeSend:function(){n.css("background","url(/skins/neoease/images/ajax-loader.gif) no-repeat scroll center center transparent")},success:function(t,i){e.className="collapse-ico",r.html(t),n.hide().css("background","none"),r.fadeIn("slow")}}):e.className==="expand-ico"?(n.hide(),r.fadeIn(),e.className="collapse-ico"):(r.hide(),n.fadeIn(),e.className="expand-ico"),!1},goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)};(function(){$(window).scroll(function(){var e=$(window).scrollTop();if(e>182){var t=$(window).height(),n=e+t-21;$("body").height()-58<=e+t&&(n=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",n)}else $("#goTop").hide()});var e=(new Date).getFullYear(),t=e;$("#archiveSide li").each(function(n){var r=$(this);r.data("year")!==e&&$(this).hide(),t!==r.data("year")&&(t=r.data("year"),r.before("
  • "+t+" 年
  • "))}),$(".recent-comments .expand-ico").click(function(){this.className==="expand-ico"?($(this).parent().next().css({height:"auto","white-space":"normal"}),this.className="collapse-ico"):($(this).parent().next().animate({height:"18px"},function(){$(this).css("white-space","nowrap")}),this.className="expand-ico")}),$(".nav ul li").each(function(){var e=$(this).find("a");e.attr("href")===latkeConfig.servePath+location.pathname?$(this).addClass("current"):/\/[0-9]+$/.test(location.pathname)&&($(".nav ul li")[0].className="current")}),Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide"),$(".recent-comments .recent-comments-main").each(function(){$(this).find(".recent-comments-content>a").height()<30?$(this).find(".expand-ico").remove():$(this).find(".expand-ico").parent().next().css({"white-space":"nowrap"})})})(); \ No newline at end of file +var goTop=function(acceleration){acceleration=acceleration||.1;var y=$(window).scrollTop();var speed=1+acceleration;window.scrollTo(0,Math.floor(y/speed));if(y>0){var invokeFunction="goTop("+acceleration+")";window.setTimeout(invokeFunction,16)}};var collapseArchive=function(it,year){var tag=true;if(it.className==="collapse-ico"){it.className="expand-ico";tag=false}else{it.className="collapse-ico"}$("#archiveSide li").each(function(){var $this=$(this);if($this.data("year")===year){if(tag){$(this).show()}else{$(this).hide()}}})};var getArticle=function(it,id){var $abstract=$("#abstract"+id),$content=$("#content"+id);if($content.html()===""){$.ajax({url:"/get-article-content?id="+id,type:"GET",dataType:"html",beforeSend:function(){$abstract.css("background","url(/skins/neoease/images/ajax-loader.gif) no-repeat scroll center center transparent")},success:function(result,textStatus){it.className="collapse-ico";$content.html(result);$abstract.hide().css("background","none");$content.fadeIn("slow")}})}else{if(it.className==="expand-ico"){$abstract.hide();$content.fadeIn();it.className="collapse-ico"}else{$content.hide();$abstract.fadeIn();it.className="expand-ico"}}return false};var goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)};(function(){$(window).scroll(function(){var y=$(window).scrollTop();if(y>182){var bodyH=$(window).height();var top=y+bodyH-21;if($("body").height()-58<=y+bodyH){top=$(".footer").offset().top-21}$("#goTop").fadeIn("slow").css("top",top)}else{$("#goTop").hide()}});var currentYear=(new Date).getFullYear(),year=currentYear;$("#archiveSide li").each(function(i){var $this=$(this);if($this.data("year")!==currentYear){$(this).hide()}if(year!==$this.data("year")){year=$this.data("year");$this.before("
  • "+year+" 年
  • ")}});$(".recent-comments .expand-ico").click(function(){if(this.className==="expand-ico"){$(this).parent().next().css({height:"auto","white-space":"normal"});this.className="collapse-ico"}else{$(this).parent().next().animate({height:"18px"},function(){$(this).css("white-space","nowrap")});this.className="expand-ico"}});$(".nav ul li").each(function(){var $a=$(this).find("a");if($a.attr("href")===latkeConfig.servePath+location.pathname){$(this).addClass("current")}else if(/\/[0-9]+$/.test(location.pathname)){$(".nav ul li")[0].className="current"}});Util.init();Util.replaceSideEm($(".recent-comments-content"));Util.buildTags("tagsSide");$(".recent-comments .recent-comments-main").each(function(){if($(this).find(".recent-comments-content>a").height()<30){$(this).find(".expand-ico").remove()}else{$(this).find(".expand-ico").parent().next().css({"white-space":"nowrap"})}})})(); \ No newline at end of file diff --git a/timeline/css/timeline.min.css b/timeline/css/timeline.min.css index ab06496..ebc6219 100644 --- a/timeline/css/timeline.min.css +++ b/timeline/css/timeline.min.css @@ -56,7 +56,7 @@ img{max-width:100%;border:0;vertical-align:middle;} .ico-next{float:right;margin:-8px 0 0 10px;} a:hover>.ico-next,a:hover>.ico-pre{background-color:#000;} .wrapper{min-width:500px;padding:50px 0;background:url("../../timeline/images/bg.png") repeat scroll 0 0 #dee4ea;} -.header{background-color:#BFBFBF;background-image:url("../../timeline/images/nav-bg.png"),linear-gradient(#cccccc, #a9a9a9);background-image:url("../../timeline/images/nav-bg.png"),-ms-linear-gradient(#cccccc, #a9a9a9);background-image:url("../../timeline/images/nav-bg.png"),-o-linear-gradient(#cccccc, #a9a9a9);background-image:url("../../timeline/images/nav-bg.png"),-webkit-linear-gradient(#cccccc, #a9a9a9);filter:progid:dximagetransform.microsoft.gradient(GradientType=0, startColorstr='#CCCCCC', endColorstr='#A9A9A9');border-bottom:1px solid #898989;box-shadow:0 -1px 0 rgba(255, 255, 255, 0.3) inset,0 1px 1px rgba(0, 0, 0, 0.2);height:50px;overflow:hidden;} +.header{background-color:#BFBFBF;background-image:url("../../timeline/images/nav-bg.png"),linear-gradient(#cccccc, #a9a9a9);background-image:url("../../timeline/images/nav-bg.png"),-ms-linear-gradient(#cccccc, #a9a9a9);background-image:url("../../timeline/images/nav-bg.png"),-o-linear-gradient(#cccccc, #a9a9a9);background-image:url("../../timeline/images/nav-bg.png"),-webkit-linear-gradient(#cccccc, #a9a9a9);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#CCCCCC', endColorstr='#A9A9A9');border-bottom:1px solid #898989;box-shadow:0 -1px 0 rgba(255, 255, 255, 0.3) inset,0 1px 1px rgba(0, 0, 0, 0.2);height:50px;overflow:hidden;} .container{width:80%;margin:0 auto;} .footer{border-top:1px solid #232323;padding:20px 0;color:#ddd;font-size:80%;} .footer a{color:#9CC0DE;} diff --git a/timeline/js/timeline.js b/timeline/js/timeline.js index bcc57f6..301b13f 100644 --- a/timeline/js/timeline.js +++ b/timeline/js/timeline.js @@ -1,426 +1,424 @@ -/* - * Copyright (c) 2009, 2010, 2011, 2012, B3log Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview timeline js. - * - * @author Liyuan Li - * @version 1.0.1.1, Feb 20, 2013 - */ -var timeline = { - _COLHA: 0, - _COLHB: 20, - _initArticleList: function () { - var $articles = $(".articles"); - if ($articles.length === 0 || $(".articles > .fn-clear").length > 0) { - return; - } - - $(window).resize(function () { - var colH = [timeline._COLHA, timeline._COLHB]; - $articles.find("article").each(function () { - var $it = $(this), - isLeft = colH[1] > colH[0], - top = isLeft ? colH[0] : colH[1]; - if (parseInt($it.css("top")) !== top) { - $it.css({ - "top": top + "px", - "position": "absolute" - }); - - if (isLeft) { - this.className = "l"; - } else { - this.className = "r"; - } - } - colH[( isLeft ? '0' : '1' )] += parseInt($it.outerHeight(true)); - }); - - $articles.height(colH[0] > colH[1] ? colH[0] : colH[1]); - }); - - $(window).resize(); - $(".module img").imagesLoaded(function () { - $(window).resize(); - }); - }, - - - _initIndexList: function () { - var $archives = $(".articles > .fn-clear"); - if ($archives.length === 0) { - return; - } - - // 如果为 index 页面,重构 archives 结构,使其可收缩 - var year = 0; - $(".nav-abs li").each(function (i) { - var $this = $(this); - $this.hide(); - if (year !== $this.data("year")) { - year = $this.data("year"); - $this.before("
  • " + year + "
  • "); - } - }); - - // 首次加载时,当没有下一页时,使用 js 隐藏"更多"按钮 - if ($(".article-more").parent().data("count") <= $(".article-more").parent().find("article").length) { - $(".article-more").remove(); - } - - $(window).resize(function () { - console.log("resize"); - $archives.each(function () { - var colH = [timeline._COLHA + 60, timeline._COLHB * 4]; - - var $articles = $(this).find("article"); - if ($articles.length === 0) { - $(this).find("h2").remove(); - $(this).css("margin-bottom" , 0); - } else { - $articles.each(function () { - var $it = $(this), - isLeft = colH[1] > colH[0], - top = isLeft ? colH[0] : colH[1]; - - if (parseInt($it.css("top")) !== top) { - console.log(top); - $it.css({ - "top": top + "px", - "position": "absolute" - }); - - if (isLeft) { - this.className = "l"; - } else { - this.className = "r"; - } - } - colH[( isLeft ? '0' : '1' )] += parseInt($it.outerHeight(true)); - }); - $(this).height(colH[0] > colH[1] ? colH[0] : colH[1]); - } - }); - }); - - $(window).resize(); - $(".module img").imagesLoaded(function () { - $(window).resize(); - }); - }, - - _setNavCurrent: function () { - $(".header li a").each(function () { - if($(this).prop("href") === location.href.split("#")[0]) { - this.className = "current"; - } else { - this.className = ""; - } - }) - }, - - init: function () { - $(window).scroll(function () { - if ($(window).scrollTop() > 60) { - $(".ico-top").show(); - } else { - $(".ico-top").hide(); - } - }); - timeline._initIndexList(); - timeline._initArticleList(); - timeline._setNavCurrent(); - }, - - translate: function () { - window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href); - }, - - getArchive: function (year, month, monthName) { - var archiveDate = year + month, - archive = year + "/" + month; - window.location.hash = "#" + archiveDate; - if ($("#" + archiveDate + " > article").length === 0) { - var archiveDataTitle = year + " " + Label.yearLabel + " " + month + " " + Label.monthLabel; - if (Label.localeString.substring(0, 2) === "en") { - archiveDataTitle = monthName + " " + year; - } - var archiveHTML = '

    ' + archiveDataTitle + '

    ' - + '
    ' + Label.moreLabel + '
    '; - - $("#" + archiveDate).html(archiveHTML).css("margin-bottom", "50px"); - timeline.getNextPage($("#" + archiveDate).find(".article-more")[0], archive); - } - }, - - getNextPage: function (it, archive) { - var $more = $(it), - currentPage = $more.data("page") + 1, - path = "/articles/"; - if($("#tag").length === 1) { - var pathnames = location.pathname.split("/"); - path = "/articles/tags/" + pathnames[pathnames.length - 1] + "/"; - } else if ($("#author").length === 1) { - var pathnames = location.pathname.split("/"); - path = "/articles/authors/" + pathnames[pathnames.length - 1] + "/"; - } else if (archive) { - path = "/articles/archives/" + archive + "/"; - } - $.ajax({ - url: latkeConfig.servePath + path + currentPage, - type: "GET", - beforeSend: function () { - $more.css("background", - "url(" + latkeConfig.staticServePath - + "/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text(""); - }, - success: function(result, textStatus){ - if (!result.sc) { - $more.css("background", "none #60829F").text("Error"); - return; - } - - if (result.rslts.articles.length === 0) { - $more.remove(); - return; - } - - var articlesHTML = "", - pagination = result.rslts.pagination; - - // append articles - for (var i = 0; i < result.rslts.articles.length; i++) { - var article = result.rslts.articles[i]; - - articlesHTML += '
    ' - + '

    ' - +article.articleTitle + ''; - - if (article.hasUpdated) { - articlesHTML += '' + Label.updatedLabel + ''; - } - - if (article.articlePutTop) { - articlesHTML += '' + Label.topArticleLabel + ''; - } - - articlesHTML += '

    ' + article.articleAbstract + '

    ' - + ''; - - var articleTags = article.articleTags.split(","); - for (var j = 0; j < articleTags.length; j++) { - articlesHTML += '' + articleTags[j] + ''; - - if (j < articleTags.length - 1) { - articlesHTML += ","; - } - } - - articlesHTML += ' ' - + ' ' + (article.articleCommentCount === 0 ? Label.noCommentLabel : article.articleCommentCount) - + ' ' - + '' + article.articleViewCount - + '
    '; - } - - $more.before(articlesHTML).data("page", currentPage); - // 最后一页处理 - if (pagination.paginationPageCount <= currentPage) { - $more.remove(); - } else { - $more.css("background", "none #60829F").text(Label.moreLabel); - } - - $(window).resize(); - $(".module img").imagesLoaded(function () { - $(window).resize(); - }); - } - }); - }, - - toggleArchives: function (it, year) { - $(".nav-abs li").each(function (i) { - var $it = $(this); - if (!$it.hasClass("year")) { - $it.hide(); - if (year === $it.data("year") && $(it).hasClass("close")) { - $it.show(); - } - } - }); - - $(".nav-abs li.year").each(function () { - if (parseInt($(this).text()) === year) { - if ($(it).hasClass("close")) { - it.className = "year open"; - } else { - it.className = "year close"; - } - } else { - this.className = "year close"; - } - }); - } -}; - -/*! -* jQuery imagesLoaded plugin v2.1.1 -* http://github.com/desandro/imagesloaded -* -* MIT License. by Paul Irish et al. -*/ - -/*jshint curly: true, eqeqeq: true, noempty: true, strict: true, undef: true, browser: true */ -/*global jQuery: false */ - -; -(function($, undefined) { - 'use strict'; - - // blank image data-uri bypasses webkit log warning (thx doug jones) - var BLANK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=='; - - $.fn.imagesLoaded = function( callback ) { - var $this = this, - deferred = $.isFunction($.Deferred) ? $.Deferred() : 0, - hasNotify = $.isFunction(deferred.notify), - $images = $this.find('img').add( $this.filter('img') ), - loaded = [], - proper = [], - broken = []; - - // Register deferred callbacks - if ($.isPlainObject(callback)) { - $.each(callback, function (key, value) { - if (key === 'callback') { - callback = value; - } else if (deferred) { - deferred[key](value); - } - }); - } - - function doneLoading() { - var $proper = $(proper), - $broken = $(broken); - - if ( deferred ) { - if ( broken.length ) { - deferred.reject( $images, $proper, $broken ); - } else { - deferred.resolve( $images ); - } - } - - if ( $.isFunction( callback ) ) { - callback.call( $this, $images, $proper, $broken ); - } - } - - function imgLoadedHandler( event ) { - imgLoaded( event.target, event.type === 'error' ); - } - - function imgLoaded( img, isBroken ) { - // don't proceed if BLANK image, or image is already loaded - if ( img.src === BLANK || $.inArray( img, loaded ) !== -1 ) { - return; - } - - // store element in loaded images array - loaded.push( img ); - - // keep track of broken and properly loaded images - if ( isBroken ) { - broken.push( img ); - } else { - proper.push( img ); - } - - // cache image and its state for future calls - $.data( img, 'imagesLoaded', { - isBroken: isBroken, - src: img.src - } ); - - // trigger deferred progress method if present - if ( hasNotify ) { - deferred.notifyWith( $(img), [ isBroken, $images, $(proper), $(broken) ] ); - } - - // call doneLoading and clean listeners if all images are loaded - if ( $images.length === loaded.length ) { - setTimeout( doneLoading ); - $images.unbind( '.imagesLoaded', imgLoadedHandler ); - } - } - - // if no images, trigger immediately - if ( !$images.length ) { - doneLoading(); - } else { - $images.bind( 'load.imagesLoaded error.imagesLoaded', imgLoadedHandler ) - .each( function( i, el ) { - var src = el.src; - - // find out if this image has been already checked for status - // if it was, and src has not changed, call imgLoaded on it - var cached = $.data( el, 'imagesLoaded' ); - if ( cached && cached.src === src ) { - imgLoaded( el, cached.isBroken ); - return; - } - - // if complete is true and browser supports natural sizes, try - // to check for image status manually - if ( el.complete && el.naturalWidth !== undefined ) { - imgLoaded( el, el.naturalWidth === 0 || el.naturalHeight === 0 ); - return; - } - - // cached images don't fire load sometimes, so we reset src, but only when - // dealing with IE, or image is complete (loaded) and failed manual check - // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f - if ( el.readyState || el.complete ) { - el.src = BLANK; - el.src = src; - } - }); - } - - return deferred ? deferred.promise( $this ) : $this; - }; - -})(jQuery); - -(function () { - Util.init(); - Util.replaceSideEm($(".comments .article-body")); - Util.buildTags("tagsSide"); - - timeline.init(); +/* + * Copyright (c) 2009, 2010, 2011, 2012, B3log Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview timeline js. + * + * @author Liyuan Li + * @version 1.0.1.1, Feb 20, 2013 + */ +var timeline = { + _COLHA: 0, + _COLHB: 20, + _initArticleList: function () { + var $articles = $(".articles"); + if ($articles.length === 0 || $(".articles > .fn-clear").length > 0) { + return; + } + + $(window).resize(function () { + var colH = [timeline._COLHA, timeline._COLHB]; + $articles.find("article").each(function () { + var $it = $(this), + isLeft = colH[1] > colH[0], + top = isLeft ? colH[0] : colH[1]; + if (parseInt($it.css("top")) !== top) { + $it.css({ + "top": top + "px", + "position": "absolute" + }); + + if (isLeft) { + this.className = "l"; + } else { + this.className = "r"; + } + } + colH[( isLeft ? '0' : '1' )] += parseInt($it.outerHeight(true)); + }); + + $articles.height(colH[0] > colH[1] ? colH[0] : colH[1]); + }); + + $(window).resize(); + $(".module img").imagesLoaded(function () { + $(window).resize(); + }); + }, + + + _initIndexList: function () { + var $archives = $(".articles > .fn-clear"); + if ($archives.length === 0) { + return; + } + + // 如果为 index 页面,重构 archives 结构,使其可收缩 + var year = 0; + $(".nav-abs li").each(function (i) { + var $this = $(this); + $this.hide(); + if (year !== $this.data("year")) { + year = $this.data("year"); + $this.before("
  • " + year + "
  • "); + } + }); + + // 首次加载时,当没有下一页时,使用 js 隐藏"更多"按钮 + if ($(".article-more").parent().data("count") <= $(".article-more").parent().find("article").length) { + $(".article-more").remove(); + } + + $(window).resize(function () { + $archives.each(function () { + var colH = [timeline._COLHA + 60, timeline._COLHB * 4]; + + var $articles = $(this).find("article"); + if ($articles.length === 0) { + $(this).find("h2").remove(); + $(this).css("margin-bottom" , 0); + } else { + $articles.each(function () { + var $it = $(this), + isLeft = colH[1] > colH[0], + top = isLeft ? colH[0] : colH[1]; + + if (parseInt($it.css("top")) !== top) { + $it.css({ + "top": top + "px", + "position": "absolute" + }); + + if (isLeft) { + this.className = "l"; + } else { + this.className = "r"; + } + } + colH[( isLeft ? '0' : '1' )] += parseInt($it.outerHeight(true)); + }); + $(this).height(colH[0] > colH[1] ? colH[0] : colH[1]); + } + }); + }); + + $(window).resize(); + $(".module img").imagesLoaded(function () { + $(window).resize(); + }); + }, + + _setNavCurrent: function () { + $(".header li a").each(function () { + if($(this).prop("href") === location.href.split("#")[0]) { + this.className = "current"; + } else { + this.className = ""; + } + }) + }, + + init: function () { + $(window).scroll(function () { + if ($(window).scrollTop() > 60) { + $(".ico-top").show(); + } else { + $(".ico-top").hide(); + } + }); + timeline._initIndexList(); + timeline._initArticleList(); + timeline._setNavCurrent(); + }, + + translate: function () { + window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href); + }, + + getArchive: function (year, month, monthName) { + var archiveDate = year + month, + archive = year + "/" + month; + window.location.hash = "#" + archiveDate; + if ($("#" + archiveDate + " > article").length === 0) { + var archiveDataTitle = year + " " + Label.yearLabel + " " + month + " " + Label.monthLabel; + if (Label.localeString.substring(0, 2) === "en") { + archiveDataTitle = monthName + " " + year; + } + var archiveHTML = '

    ' + archiveDataTitle + '

    ' + + '
    ' + Label.moreLabel + '
    '; + + $("#" + archiveDate).html(archiveHTML).css("margin-bottom", "50px"); + timeline.getNextPage($("#" + archiveDate).find(".article-more")[0], archive); + } + }, + + getNextPage: function (it, archive) { + var $more = $(it), + currentPage = $more.data("page") + 1, + path = "/articles/"; + if($("#tag").length === 1) { + var pathnames = location.pathname.split("/"); + path = "/articles/tags/" + pathnames[pathnames.length - 1] + "/"; + } else if ($("#author").length === 1) { + var pathnames = location.pathname.split("/"); + path = "/articles/authors/" + pathnames[pathnames.length - 1] + "/"; + } else if (archive) { + path = "/articles/archives/" + archive + "/"; + } + $.ajax({ + url: latkeConfig.servePath + path + currentPage, + type: "GET", + beforeSend: function () { + $more.css("background", + "url(" + latkeConfig.staticServePath + + "/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text(""); + }, + success: function(result, textStatus){ + if (!result.sc) { + $more.css("background", "none #60829F").text("Error"); + return; + } + + if (result.rslts.articles.length === 0) { + $more.remove(); + return; + } + + var articlesHTML = "", + pagination = result.rslts.pagination; + + // append articles + for (var i = 0; i < result.rslts.articles.length; i++) { + var article = result.rslts.articles[i]; + + articlesHTML += '
    ' + + '

    ' + +article.articleTitle + ''; + + if (article.hasUpdated) { + articlesHTML += '' + Label.updatedLabel + ''; + } + + if (article.articlePutTop) { + articlesHTML += '' + Label.topArticleLabel + ''; + } + + articlesHTML += '

    ' + article.articleAbstract + '

    ' + + ''; + + var articleTags = article.articleTags.split(","); + for (var j = 0; j < articleTags.length; j++) { + articlesHTML += '' + articleTags[j] + ''; + + if (j < articleTags.length - 1) { + articlesHTML += ","; + } + } + + articlesHTML += ' ' + + ' ' + (article.articleCommentCount === 0 ? Label.noCommentLabel : article.articleCommentCount) + + ' ' + + '' + article.articleViewCount + + '
    '; + } + + $more.before(articlesHTML).data("page", currentPage); + // 最后一页处理 + if (pagination.paginationPageCount <= currentPage) { + $more.remove(); + } else { + $more.css("background", "none #60829F").text(Label.moreLabel); + } + + $(window).resize(); + $(".module img").imagesLoaded(function () { + $(window).resize(); + }); + } + }); + }, + + toggleArchives: function (it, year) { + $(".nav-abs li").each(function (i) { + var $it = $(this); + if (!$it.hasClass("year")) { + $it.hide(); + if (year === $it.data("year") && $(it).hasClass("close")) { + $it.show(); + } + } + }); + + $(".nav-abs li.year").each(function () { + if (parseInt($(this).text()) === year) { + if ($(it).hasClass("close")) { + it.className = "year open"; + } else { + it.className = "year close"; + } + } else { + this.className = "year close"; + } + }); + } +}; + +/*! +* jQuery imagesLoaded plugin v2.1.1 +* http://github.com/desandro/imagesloaded +* +* MIT License. by Paul Irish et al. +*/ + +/*jshint curly: true, eqeqeq: true, noempty: true, strict: true, undef: true, browser: true */ +/*global jQuery: false */ + +; +(function($, undefined) { + 'use strict'; + + // blank image data-uri bypasses webkit log warning (thx doug jones) + var BLANK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=='; + + $.fn.imagesLoaded = function( callback ) { + var $this = this, + deferred = $.isFunction($.Deferred) ? $.Deferred() : 0, + hasNotify = $.isFunction(deferred.notify), + $images = $this.find('img').add( $this.filter('img') ), + loaded = [], + proper = [], + broken = []; + + // Register deferred callbacks + if ($.isPlainObject(callback)) { + $.each(callback, function (key, value) { + if (key === 'callback') { + callback = value; + } else if (deferred) { + deferred[key](value); + } + }); + } + + function doneLoading() { + var $proper = $(proper), + $broken = $(broken); + + if ( deferred ) { + if ( broken.length ) { + deferred.reject( $images, $proper, $broken ); + } else { + deferred.resolve( $images ); + } + } + + if ( $.isFunction( callback ) ) { + callback.call( $this, $images, $proper, $broken ); + } + } + + function imgLoadedHandler( event ) { + imgLoaded( event.target, event.type === 'error' ); + } + + function imgLoaded( img, isBroken ) { + // don't proceed if BLANK image, or image is already loaded + if ( img.src === BLANK || $.inArray( img, loaded ) !== -1 ) { + return; + } + + // store element in loaded images array + loaded.push( img ); + + // keep track of broken and properly loaded images + if ( isBroken ) { + broken.push( img ); + } else { + proper.push( img ); + } + + // cache image and its state for future calls + $.data( img, 'imagesLoaded', { + isBroken: isBroken, + src: img.src + } ); + + // trigger deferred progress method if present + if ( hasNotify ) { + deferred.notifyWith( $(img), [ isBroken, $images, $(proper), $(broken) ] ); + } + + // call doneLoading and clean listeners if all images are loaded + if ( $images.length === loaded.length ) { + setTimeout( doneLoading ); + $images.unbind( '.imagesLoaded', imgLoadedHandler ); + } + } + + // if no images, trigger immediately + if ( !$images.length ) { + doneLoading(); + } else { + $images.bind( 'load.imagesLoaded error.imagesLoaded', imgLoadedHandler ) + .each( function( i, el ) { + var src = el.src; + + // find out if this image has been already checked for status + // if it was, and src has not changed, call imgLoaded on it + var cached = $.data( el, 'imagesLoaded' ); + if ( cached && cached.src === src ) { + imgLoaded( el, cached.isBroken ); + return; + } + + // if complete is true and browser supports natural sizes, try + // to check for image status manually + if ( el.complete && el.naturalWidth !== undefined ) { + imgLoaded( el, el.naturalWidth === 0 || el.naturalHeight === 0 ); + return; + } + + // cached images don't fire load sometimes, so we reset src, but only when + // dealing with IE, or image is complete (loaded) and failed manual check + // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f + if ( el.readyState || el.complete ) { + el.src = BLANK; + el.src = src; + } + }); + } + + return deferred ? deferred.promise( $this ) : $this; + }; + +})(jQuery); + +(function () { + Util.init(); + Util.replaceSideEm($(".comments .article-body")); + Util.buildTags("tagsSide"); + + timeline.init(); })(); \ No newline at end of file diff --git a/timeline/js/timeline.min.js b/timeline/js/timeline.min.js index b3408ec..dbf980c 100644 --- a/timeline/js/timeline.min.js +++ b/timeline/js/timeline.min.js @@ -1,20 +1 @@ -/* - * Copyright (c) 2009, 2010, 2011, 2012, B3log Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *//** - * @fileoverview timeline js. - * - * @author Liyuan Li - * @version 1.0.1.1, Feb 20, 2013 - */var timeline={_COLHA:0,_COLHB:20,_initArticleList:function(){var e=$(".articles");if(e.length===0||$(".articles > .fn-clear").length>0)return;$(window).resize(function(){var t=[timeline._COLHA,timeline._COLHB];e.find("article").each(function(){var e=$(this),n=t[1]>t[0],r=n?t[0]:t[1];parseInt(e.css("top"))!==r&&(e.css({top:r+"px",position:"absolute"}),n?this.className="l":this.className="r"),t[n?"0":"1"]+=parseInt(e.outerHeight(!0))}),e.height(t[0]>t[1]?t[0]:t[1])}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})},_initIndexList:function(){var e=$(".articles > .fn-clear");if(e.length===0)return;var t=0;$(".nav-abs li").each(function(e){var n=$(this);n.hide(),t!==n.data("year")&&(t=n.data("year"),n.before("
  • "+t+"
  • "))}),$(".article-more").parent().data("count")<=$(".article-more").parent().find("article").length&&$(".article-more").remove(),$(window).resize(function(){console.log("resize"),e.each(function(){var e=[timeline._COLHA+60,timeline._COLHB*4],t=$(this).find("article");t.length===0?($(this).find("h2").remove(),$(this).css("margin-bottom",0)):(t.each(function(){var t=$(this),n=e[1]>e[0],r=n?e[0]:e[1];parseInt(t.css("top"))!==r&&(console.log(r),t.css({top:r+"px",position:"absolute"}),n?this.className="l":this.className="r"),e[n?"0":"1"]+=parseInt(t.outerHeight(!0))}),$(this).height(e[0]>e[1]?e[0]:e[1]))})}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})},_setNavCurrent:function(){$(".header li a").each(function(){$(this).prop("href")===location.href.split("#")[0]?this.className="current":this.className=""})},init:function(){$(window).scroll(function(){$(window).scrollTop()>60?$(".ico-top").show():$(".ico-top").hide()}),timeline._initIndexList(),timeline._initArticleList(),timeline._setNavCurrent()},translate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getArchive:function(e,t,n){var r=e+t,i=e+"/"+t;window.location.hash="#"+r;if($("#"+r+" > article").length===0){var s=e+" "+Label.yearLabel+" "+t+" "+Label.monthLabel;Label.localeString.substring(0,2)==="en"&&(s=n+" "+e);var o='

    '+s+"

    "+'
    '+Label.moreLabel+"
    ";$("#"+r).html(o).css("margin-bottom","50px"),timeline.getNextPage($("#"+r).find(".article-more")[0],i)}},getNextPage:function(e,t){var n=$(e),r=n.data("page")+1,i="/articles/";if($("#tag").length===1){var s=location.pathname.split("/");i="/articles/tags/"+s[s.length-1]+"/"}else if($("#author").length===1){var s=location.pathname.split("/");i="/articles/authors/"+s[s.length-1]+"/"}else t&&(i="/articles/archives/"+t+"/");$.ajax({url:latkeConfig.servePath+i+r,type:"GET",beforeSend:function(){n.css("background","url("+latkeConfig.staticServePath+"/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text("")},success:function(e,t){if(!e.sc){n.css("background","none #60829F").text("Error");return}if(e.rslts.articles.length===0){n.remove();return}var i="",s=e.rslts.pagination;for(var o=0;o

    '+u.articleTitle+"",u.hasUpdated&&(i+=""+Label.updatedLabel+""),u.articlePutTop&&(i+=""+Label.topArticleLabel+""),i+="

    "+u.articleAbstract+"

    "+'';var a=u.articleTags.split(",");for(var f=0;f'+a[f]+"",f '+' '+(u.articleCommentCount===0?Label.noCommentLabel:u.articleCommentCount)+' '+''+u.articleViewCount+"
    "}n.before(i).data("page",r),s.paginationPageCount<=r?n.remove():n.css("background","none #60829F").text(Label.moreLabel),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})}})},toggleArchives:function(e,t){$(".nav-abs li").each(function(n){var r=$(this);r.hasClass("year")||(r.hide(),t===r.data("year")&&$(e).hasClass("close")&&r.show())}),$(".nav-abs li.year").each(function(){parseInt($(this).text())===t?$(e).hasClass("close")?e.className="year open":e.className="year close":this.className="year close"})}};(function(e,t){"use strict";var n="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";e.fn.imagesLoaded=function(r){function c(){var t=e(f),n=e(l);s&&(l.length?s.reject(u,t,n):s.resolve(u)),e.isFunction(r)&&r.call(i,u,t,n)}function h(e){p(e.target,e.type==="error")}function p(t,r){if(t.src===n||e.inArray(t,a)!==-1)return;a.push(t),r?l.push(t):f.push(t),e.data(t,"imagesLoaded",{isBroken:r,src:t.src}),o&&s.notifyWith(e(t),[r,u,e(f),e(l)]),u.length===a.length&&(setTimeout(c),u.unbind(".imagesLoaded",h))}var i=this,s=e.isFunction(e.Deferred)?e.Deferred():0,o=e.isFunction(s.notify),u=i.find("img").add(i.filter("img")),a=[],f=[],l=[];return e.isPlainObject(r)&&e.each(r,function(e,t){e==="callback"?r=t:s&&s[e](t)}),u.length?u.bind("load.imagesLoaded error.imagesLoaded",h).each(function(r,i){var s=i.src,o=e.data(i,"imagesLoaded");if(o&&o.src===s){p(i,o.isBroken);return}if(i.complete&&i.naturalWidth!==t){p(i,i.naturalWidth===0||i.naturalHeight===0);return}if(i.readyState||i.complete)i.src=n,i.src=s}):c(),s?s.promise(i):i}})(jQuery),function(){Util.init(),Util.replaceSideEm($(".comments .article-body")),Util.buildTags("tagsSide"),timeline.init()}(); \ No newline at end of file +var timeline={_COLHA:0,_COLHB:20,_initArticleList:function(){var $articles=$(".articles");if($articles.length===0||$(".articles > .fn-clear").length>0){return}$(window).resize(function(){var colH=[timeline._COLHA,timeline._COLHB];$articles.find("article").each(function(){var $it=$(this),isLeft=colH[1]>colH[0],top=isLeft?colH[0]:colH[1];if(parseInt($it.css("top"))!==top){$it.css({top:top+"px",position:"absolute"});if(isLeft){this.className="l"}else{this.className="r"}}colH[isLeft?"0":"1"]+=parseInt($it.outerHeight(true))});$articles.height(colH[0]>colH[1]?colH[0]:colH[1])});$(window).resize();$(".module img").imagesLoaded(function(){$(window).resize()})},_initIndexList:function(){var $archives=$(".articles > .fn-clear");if($archives.length===0){return}var year=0;$(".nav-abs li").each(function(i){var $this=$(this);$this.hide();if(year!==$this.data("year")){year=$this.data("year");$this.before("
  • "+year+"
  • ")}});if($(".article-more").parent().data("count")<=$(".article-more").parent().find("article").length){$(".article-more").remove()}$(window).resize(function(){$archives.each(function(){var colH=[timeline._COLHA+60,timeline._COLHB*4];var $articles=$(this).find("article");if($articles.length===0){$(this).find("h2").remove();$(this).css("margin-bottom",0)}else{$articles.each(function(){var $it=$(this),isLeft=colH[1]>colH[0],top=isLeft?colH[0]:colH[1];if(parseInt($it.css("top"))!==top){$it.css({top:top+"px",position:"absolute"});if(isLeft){this.className="l"}else{this.className="r"}}colH[isLeft?"0":"1"]+=parseInt($it.outerHeight(true))});$(this).height(colH[0]>colH[1]?colH[0]:colH[1])}})});$(window).resize();$(".module img").imagesLoaded(function(){$(window).resize()})},_setNavCurrent:function(){$(".header li a").each(function(){if($(this).prop("href")===location.href.split("#")[0]){this.className="current"}else{this.className=""}})},init:function(){$(window).scroll(function(){if($(window).scrollTop()>60){$(".ico-top").show()}else{$(".ico-top").hide()}});timeline._initIndexList();timeline._initArticleList();timeline._setNavCurrent()},translate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getArchive:function(year,month,monthName){var archiveDate=year+month,archive=year+"/"+month;window.location.hash="#"+archiveDate;if($("#"+archiveDate+" > article").length===0){var archiveDataTitle=year+" "+Label.yearLabel+" "+month+" "+Label.monthLabel;if(Label.localeString.substring(0,2)==="en"){archiveDataTitle=monthName+" "+year}var archiveHTML='

    '+archiveDataTitle+"

    "+'
    '+Label.moreLabel+"
    ";$("#"+archiveDate).html(archiveHTML).css("margin-bottom","50px");timeline.getNextPage($("#"+archiveDate).find(".article-more")[0],archive)}},getNextPage:function(it,archive){var $more=$(it),currentPage=$more.data("page")+1,path="/articles/";if($("#tag").length===1){var pathnames=location.pathname.split("/");path="/articles/tags/"+pathnames[pathnames.length-1]+"/"}else if($("#author").length===1){var pathnames=location.pathname.split("/");path="/articles/authors/"+pathnames[pathnames.length-1]+"/"}else if(archive){path="/articles/archives/"+archive+"/"}$.ajax({url:latkeConfig.servePath+path+currentPage,type:"GET",beforeSend:function(){$more.css("background","url("+latkeConfig.staticServePath+"/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text("")},success:function(result,textStatus){if(!result.sc){$more.css("background","none #60829F").text("Error");return}if(result.rslts.articles.length===0){$more.remove();return}var articlesHTML="",pagination=result.rslts.pagination;for(var i=0;i
    '+'

    '+article.articleTitle+"";if(article.hasUpdated){articlesHTML+=""+Label.updatedLabel+""}if(article.articlePutTop){articlesHTML+=""+Label.topArticleLabel+""}articlesHTML+="

    "+article.articleAbstract+"

    "+'';var articleTags=article.articleTags.split(",");for(var j=0;j'+articleTags[j]+"";if(j '+' '+(article.articleCommentCount===0?Label.noCommentLabel:article.articleCommentCount)+' '+''+article.articleViewCount+"
    "}$more.before(articlesHTML).data("page",currentPage);if(pagination.paginationPageCount<=currentPage){$more.remove()}else{$more.css("background","none #60829F").text(Label.moreLabel)}$(window).resize();$(".module img").imagesLoaded(function(){$(window).resize()})}})},toggleArchives:function(it,year){$(".nav-abs li").each(function(i){var $it=$(this);if(!$it.hasClass("year")){$it.hide();if(year===$it.data("year")&&$(it).hasClass("close")){$it.show()}}});$(".nav-abs li.year").each(function(){if(parseInt($(this).text())===year){if($(it).hasClass("close")){it.className="year open"}else{it.className="year close"}}else{this.className="year close"}})}};(function($,undefined){"use strict";var BLANK="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";$.fn.imagesLoaded=function(callback){var $this=this,deferred=$.isFunction($.Deferred)?$.Deferred():0,hasNotify=$.isFunction(deferred.notify),$images=$this.find("img").add($this.filter("img")),loaded=[],proper=[],broken=[];if($.isPlainObject(callback)){$.each(callback,function(key,value){if(key==="callback"){callback=value}else if(deferred){deferred[key](value)}})}function doneLoading(){var $proper=$(proper),$broken=$(broken);if(deferred){if(broken.length){deferred.reject($images,$proper,$broken)}else{deferred.resolve($images)}}if($.isFunction(callback)){callback.call($this,$images,$proper,$broken)}}function imgLoadedHandler(event){imgLoaded(event.target,event.type==="error")}function imgLoaded(img,isBroken){if(img.src===BLANK||$.inArray(img,loaded)!==-1){return}loaded.push(img);if(isBroken){broken.push(img)}else{proper.push(img)}$.data(img,"imagesLoaded",{isBroken:isBroken,src:img.src});if(hasNotify){deferred.notifyWith($(img),[isBroken,$images,$(proper),$(broken)])}if($images.length===loaded.length){setTimeout(doneLoading);$images.unbind(".imagesLoaded",imgLoadedHandler)}}if(!$images.length){doneLoading()}else{$images.bind("load.imagesLoaded error.imagesLoaded",imgLoadedHandler).each(function(i,el){var src=el.src;var cached=$.data(el,"imagesLoaded");if(cached&&cached.src===src){imgLoaded(el,cached.isBroken);return}if(el.complete&&el.naturalWidth!==undefined){imgLoaded(el,el.naturalWidth===0||el.naturalHeight===0);return}if(el.readyState||el.complete){el.src=BLANK;el.src=src}})}return deferred?deferred.promise($this):$this}})(jQuery);(function(){Util.init();Util.replaceSideEm($(".comments .article-body"));Util.buildTags("tagsSide");timeline.init()})(); \ No newline at end of file From 073d63dbf976d3f2c6eacd486aa90ddf6cb2c306 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 31 Mar 2013 22:26:12 +0800 Subject: [PATCH 05/11] =?UTF-8?q?meta=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- andrea/macro-head.ftl | 33 ++++++------ classic/macro-head.ftl | 29 +++++----- community/macro-head.ftl | 29 +++++----- ease/macro-head.ftl | 27 +++++----- favourite/macro-head.ftl | 29 +++++----- i-nove/macro-head.ftl | 29 +++++----- mobile/macro-head.ftl | 110 +++++++++++++++++++------------------- neoease/macro-head.ftl | 7 +-- owmx-3.0/macro-head.ftl | 53 +++++++++--------- timeline/macro-head.ftl | 27 +++++----- tree-house/macro-head.ftl | 29 +++++----- 11 files changed, 207 insertions(+), 195 deletions(-) diff --git a/andrea/macro-head.ftl b/andrea/macro-head.ftl index e5c63fe..f44086f 100644 --- a/andrea/macro-head.ftl +++ b/andrea/macro-head.ftl @@ -1,17 +1,18 @@ -<#macro head title> - -${title} -<#nested> - - - - - - - - - - - -${htmlHead} +<#macro head title> + +${title} +<#nested> + + + + + + + + + + + + +${htmlHead} \ No newline at end of file diff --git a/classic/macro-head.ftl b/classic/macro-head.ftl index f9bd9be..db0b067 100644 --- a/classic/macro-head.ftl +++ b/classic/macro-head.ftl @@ -1,15 +1,16 @@ -<#macro head title> - -${title} -<#nested> - - - - - - - - - -${htmlHead} +<#macro head title> + +${title} +<#nested> + + + + + + + + + + +${htmlHead} \ No newline at end of file diff --git a/community/macro-head.ftl b/community/macro-head.ftl index f9bd9be..db0b067 100644 --- a/community/macro-head.ftl +++ b/community/macro-head.ftl @@ -1,15 +1,16 @@ -<#macro head title> - -${title} -<#nested> - - - - - - - - - -${htmlHead} +<#macro head title> + +${title} +<#nested> + + + + + + + + + + +${htmlHead} \ No newline at end of file diff --git a/ease/macro-head.ftl b/ease/macro-head.ftl index be40ab0..accb52e 100644 --- a/ease/macro-head.ftl +++ b/ease/macro-head.ftl @@ -1,14 +1,15 @@ -<#macro head title> - -${title} -<#nested> - - - - - - - - -${htmlHead} +<#macro head title> + +${title} +<#nested> + + + + + + + + + +${htmlHead} \ No newline at end of file diff --git a/favourite/macro-head.ftl b/favourite/macro-head.ftl index f9bd9be..db0b067 100644 --- a/favourite/macro-head.ftl +++ b/favourite/macro-head.ftl @@ -1,15 +1,16 @@ -<#macro head title> - -${title} -<#nested> - - - - - - - - - -${htmlHead} +<#macro head title> + +${title} +<#nested> + + + + + + + + + + +${htmlHead} \ No newline at end of file diff --git a/i-nove/macro-head.ftl b/i-nove/macro-head.ftl index f9bd9be..db0b067 100644 --- a/i-nove/macro-head.ftl +++ b/i-nove/macro-head.ftl @@ -1,15 +1,16 @@ -<#macro head title> - -${title} -<#nested> - - - - - - - - - -${htmlHead} +<#macro head title> + +${title} +<#nested> + + + + + + + + + + +${htmlHead} \ No newline at end of file diff --git a/mobile/macro-head.ftl b/mobile/macro-head.ftl index 3f4db2e..9717143 100644 --- a/mobile/macro-head.ftl +++ b/mobile/macro-head.ftl @@ -1,55 +1,57 @@ -<#macro head title> - -${title} -<#nested> - - - - - - - - - - - - - - -${htmlHead} +<#macro head title> + +${title} +<#nested> + + + + + + + + + + + + + + + + +${htmlHead} \ No newline at end of file diff --git a/neoease/macro-head.ftl b/neoease/macro-head.ftl index 6c86566..accb52e 100644 --- a/neoease/macro-head.ftl +++ b/neoease/macro-head.ftl @@ -2,10 +2,11 @@ ${title} <#nested> - - + + + + - diff --git a/owmx-3.0/macro-head.ftl b/owmx-3.0/macro-head.ftl index 7f98596..be71390 100644 --- a/owmx-3.0/macro-head.ftl +++ b/owmx-3.0/macro-head.ftl @@ -1,27 +1,28 @@ -<#macro head title> - -${title} -<#nested> - - - - - - - - - - -${htmlHead} +<#macro head title> + +${title} +<#nested> + + + + + + + + + + + +${htmlHead} \ No newline at end of file diff --git a/timeline/macro-head.ftl b/timeline/macro-head.ftl index be40ab0..accb52e 100644 --- a/timeline/macro-head.ftl +++ b/timeline/macro-head.ftl @@ -1,14 +1,15 @@ -<#macro head title> - -${title} -<#nested> - - - - - - - - -${htmlHead} +<#macro head title> + +${title} +<#nested> + + + + + + + + + +${htmlHead} \ No newline at end of file diff --git a/tree-house/macro-head.ftl b/tree-house/macro-head.ftl index f9bd9be..db0b067 100644 --- a/tree-house/macro-head.ftl +++ b/tree-house/macro-head.ftl @@ -1,15 +1,16 @@ -<#macro head title> - -${title} -<#nested> - - - - - - - - - -${htmlHead} +<#macro head title> + +${title} +<#nested> + + + + + + + + + + +${htmlHead} \ No newline at end of file From 0fe742f5a15edd7d5a3d3dc2bfe03d75b79c45b7 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 24 Apr 2013 10:04:04 +0800 Subject: [PATCH 06/11] fixed #223 --- timeline/css/timeline.css | 7 +++ timeline/css/timeline.min.css | 3 +- timeline/header.ftl | 90 +++++++++++++++++------------------ timeline/js/timeline.min.js | 21 +++++++- 4 files changed, 74 insertions(+), 47 deletions(-) diff --git a/timeline/css/timeline.css b/timeline/css/timeline.css index efc2784..5431f79 100644 --- a/timeline/css/timeline.css +++ b/timeline/css/timeline.css @@ -414,6 +414,13 @@ a:hover > .ico-pre { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7); } +.header .sub-title { + float: left; + max-width: 574px; + white-space: normal; + word-wrap: break-word; +} + .header li a { color: #444; padding: 17px; diff --git a/timeline/css/timeline.min.css b/timeline/css/timeline.min.css index ebc6219..42c1998 100644 --- a/timeline/css/timeline.min.css +++ b/timeline/css/timeline.min.css @@ -56,13 +56,14 @@ img{max-width:100%;border:0;vertical-align:middle;} .ico-next{float:right;margin:-8px 0 0 10px;} a:hover>.ico-next,a:hover>.ico-pre{background-color:#000;} .wrapper{min-width:500px;padding:50px 0;background:url("../../timeline/images/bg.png") repeat scroll 0 0 #dee4ea;} -.header{background-color:#BFBFBF;background-image:url("../../timeline/images/nav-bg.png"),linear-gradient(#cccccc, #a9a9a9);background-image:url("../../timeline/images/nav-bg.png"),-ms-linear-gradient(#cccccc, #a9a9a9);background-image:url("../../timeline/images/nav-bg.png"),-o-linear-gradient(#cccccc, #a9a9a9);background-image:url("../../timeline/images/nav-bg.png"),-webkit-linear-gradient(#cccccc, #a9a9a9);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#CCCCCC', endColorstr='#A9A9A9');border-bottom:1px solid #898989;box-shadow:0 -1px 0 rgba(255, 255, 255, 0.3) inset,0 1px 1px rgba(0, 0, 0, 0.2);height:50px;overflow:hidden;} +.header{background-color:#BFBFBF;background-image:url("../../timeline/images/nav-bg.png"),linear-gradient(#cccccc, #a9a9a9);background-image:url("../../timeline/images/nav-bg.png"),-ms-linear-gradient(#cccccc, #a9a9a9);background-image:url("../../timeline/images/nav-bg.png"),-o-linear-gradient(#cccccc, #a9a9a9);background-image:url("../../timeline/images/nav-bg.png"),-webkit-linear-gradient(#cccccc, #a9a9a9);filter:progid:dximagetransform.microsoft.gradient(GradientType=0, startColorstr='#CCCCCC', endColorstr='#A9A9A9');border-bottom:1px solid #898989;box-shadow:0 -1px 0 rgba(255, 255, 255, 0.3) inset,0 1px 1px rgba(0, 0, 0, 0.2);height:50px;overflow:hidden;} .container{width:80%;margin:0 auto;} .footer{border-top:1px solid #232323;padding:20px 0;color:#ddd;font-size:80%;} .footer a{color:#9CC0DE;} .footer a:hover{text-decoration:underline;} .header .title{font-size:150%;margin:3px 0 0;} .header .title a{color:#414141;text-shadow:0 1px 0 rgba(255, 255, 255, 0.7);} +.header .sub-title{float:left;max-width:574px;white-space:normal;word-wrap:break-word;} .header li a{color:#444;padding:17px;line-height:20px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.7);white-space:nowrap;} .header li a.current{border-bottom:2px solid #D26911;} .header a:hover{color:#000;} diff --git a/timeline/header.ftl b/timeline/header.ftl index 827fad9..2560168 100644 --- a/timeline/header.ftl +++ b/timeline/header.ftl @@ -1,46 +1,46 @@ - -
    -
    -
    -

    - - ${blogTitle} - -

    - ${blogSubtitle} -
    - -
    - - - - - - -
    -
    + +
    +
    +
    +

    + + ${blogTitle} + +

    + ${blogSubtitle} +
    + +
    + + + + + + +
    +
    \ No newline at end of file diff --git a/timeline/js/timeline.min.js b/timeline/js/timeline.min.js index dbf980c..3f6b3de 100644 --- a/timeline/js/timeline.min.js +++ b/timeline/js/timeline.min.js @@ -1 +1,20 @@ -var timeline={_COLHA:0,_COLHB:20,_initArticleList:function(){var $articles=$(".articles");if($articles.length===0||$(".articles > .fn-clear").length>0){return}$(window).resize(function(){var colH=[timeline._COLHA,timeline._COLHB];$articles.find("article").each(function(){var $it=$(this),isLeft=colH[1]>colH[0],top=isLeft?colH[0]:colH[1];if(parseInt($it.css("top"))!==top){$it.css({top:top+"px",position:"absolute"});if(isLeft){this.className="l"}else{this.className="r"}}colH[isLeft?"0":"1"]+=parseInt($it.outerHeight(true))});$articles.height(colH[0]>colH[1]?colH[0]:colH[1])});$(window).resize();$(".module img").imagesLoaded(function(){$(window).resize()})},_initIndexList:function(){var $archives=$(".articles > .fn-clear");if($archives.length===0){return}var year=0;$(".nav-abs li").each(function(i){var $this=$(this);$this.hide();if(year!==$this.data("year")){year=$this.data("year");$this.before("
  • "+year+"
  • ")}});if($(".article-more").parent().data("count")<=$(".article-more").parent().find("article").length){$(".article-more").remove()}$(window).resize(function(){$archives.each(function(){var colH=[timeline._COLHA+60,timeline._COLHB*4];var $articles=$(this).find("article");if($articles.length===0){$(this).find("h2").remove();$(this).css("margin-bottom",0)}else{$articles.each(function(){var $it=$(this),isLeft=colH[1]>colH[0],top=isLeft?colH[0]:colH[1];if(parseInt($it.css("top"))!==top){$it.css({top:top+"px",position:"absolute"});if(isLeft){this.className="l"}else{this.className="r"}}colH[isLeft?"0":"1"]+=parseInt($it.outerHeight(true))});$(this).height(colH[0]>colH[1]?colH[0]:colH[1])}})});$(window).resize();$(".module img").imagesLoaded(function(){$(window).resize()})},_setNavCurrent:function(){$(".header li a").each(function(){if($(this).prop("href")===location.href.split("#")[0]){this.className="current"}else{this.className=""}})},init:function(){$(window).scroll(function(){if($(window).scrollTop()>60){$(".ico-top").show()}else{$(".ico-top").hide()}});timeline._initIndexList();timeline._initArticleList();timeline._setNavCurrent()},translate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getArchive:function(year,month,monthName){var archiveDate=year+month,archive=year+"/"+month;window.location.hash="#"+archiveDate;if($("#"+archiveDate+" > article").length===0){var archiveDataTitle=year+" "+Label.yearLabel+" "+month+" "+Label.monthLabel;if(Label.localeString.substring(0,2)==="en"){archiveDataTitle=monthName+" "+year}var archiveHTML='

    '+archiveDataTitle+"

    "+'
    '+Label.moreLabel+"
    ";$("#"+archiveDate).html(archiveHTML).css("margin-bottom","50px");timeline.getNextPage($("#"+archiveDate).find(".article-more")[0],archive)}},getNextPage:function(it,archive){var $more=$(it),currentPage=$more.data("page")+1,path="/articles/";if($("#tag").length===1){var pathnames=location.pathname.split("/");path="/articles/tags/"+pathnames[pathnames.length-1]+"/"}else if($("#author").length===1){var pathnames=location.pathname.split("/");path="/articles/authors/"+pathnames[pathnames.length-1]+"/"}else if(archive){path="/articles/archives/"+archive+"/"}$.ajax({url:latkeConfig.servePath+path+currentPage,type:"GET",beforeSend:function(){$more.css("background","url("+latkeConfig.staticServePath+"/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text("")},success:function(result,textStatus){if(!result.sc){$more.css("background","none #60829F").text("Error");return}if(result.rslts.articles.length===0){$more.remove();return}var articlesHTML="",pagination=result.rslts.pagination;for(var i=0;i
    '+'

    '+article.articleTitle+"";if(article.hasUpdated){articlesHTML+=""+Label.updatedLabel+""}if(article.articlePutTop){articlesHTML+=""+Label.topArticleLabel+""}articlesHTML+="

    "+article.articleAbstract+"

    "+'';var articleTags=article.articleTags.split(",");for(var j=0;j'+articleTags[j]+"";if(j '+' '+(article.articleCommentCount===0?Label.noCommentLabel:article.articleCommentCount)+' '+''+article.articleViewCount+"
    "}$more.before(articlesHTML).data("page",currentPage);if(pagination.paginationPageCount<=currentPage){$more.remove()}else{$more.css("background","none #60829F").text(Label.moreLabel)}$(window).resize();$(".module img").imagesLoaded(function(){$(window).resize()})}})},toggleArchives:function(it,year){$(".nav-abs li").each(function(i){var $it=$(this);if(!$it.hasClass("year")){$it.hide();if(year===$it.data("year")&&$(it).hasClass("close")){$it.show()}}});$(".nav-abs li.year").each(function(){if(parseInt($(this).text())===year){if($(it).hasClass("close")){it.className="year open"}else{it.className="year close"}}else{this.className="year close"}})}};(function($,undefined){"use strict";var BLANK="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";$.fn.imagesLoaded=function(callback){var $this=this,deferred=$.isFunction($.Deferred)?$.Deferred():0,hasNotify=$.isFunction(deferred.notify),$images=$this.find("img").add($this.filter("img")),loaded=[],proper=[],broken=[];if($.isPlainObject(callback)){$.each(callback,function(key,value){if(key==="callback"){callback=value}else if(deferred){deferred[key](value)}})}function doneLoading(){var $proper=$(proper),$broken=$(broken);if(deferred){if(broken.length){deferred.reject($images,$proper,$broken)}else{deferred.resolve($images)}}if($.isFunction(callback)){callback.call($this,$images,$proper,$broken)}}function imgLoadedHandler(event){imgLoaded(event.target,event.type==="error")}function imgLoaded(img,isBroken){if(img.src===BLANK||$.inArray(img,loaded)!==-1){return}loaded.push(img);if(isBroken){broken.push(img)}else{proper.push(img)}$.data(img,"imagesLoaded",{isBroken:isBroken,src:img.src});if(hasNotify){deferred.notifyWith($(img),[isBroken,$images,$(proper),$(broken)])}if($images.length===loaded.length){setTimeout(doneLoading);$images.unbind(".imagesLoaded",imgLoadedHandler)}}if(!$images.length){doneLoading()}else{$images.bind("load.imagesLoaded error.imagesLoaded",imgLoadedHandler).each(function(i,el){var src=el.src;var cached=$.data(el,"imagesLoaded");if(cached&&cached.src===src){imgLoaded(el,cached.isBroken);return}if(el.complete&&el.naturalWidth!==undefined){imgLoaded(el,el.naturalWidth===0||el.naturalHeight===0);return}if(el.readyState||el.complete){el.src=BLANK;el.src=src}})}return deferred?deferred.promise($this):$this}})(jQuery);(function(){Util.init();Util.replaceSideEm($(".comments .article-body"));Util.buildTags("tagsSide");timeline.init()})(); \ No newline at end of file +/* + * Copyright (c) 2009, 2010, 2011, 2012, B3log Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//** + * @fileoverview timeline js. + * + * @author Liyuan Li + * @version 1.0.1.1, Feb 20, 2013 + */var timeline={_COLHA:0,_COLHB:20,_initArticleList:function(){var e=$(".articles");if(e.length===0||$(".articles > .fn-clear").length>0)return;$(window).resize(function(){var t=[timeline._COLHA,timeline._COLHB];e.find("article").each(function(){var e=$(this),n=t[1]>t[0],r=n?t[0]:t[1];parseInt(e.css("top"))!==r&&(e.css({top:r+"px",position:"absolute"}),n?this.className="l":this.className="r"),t[n?"0":"1"]+=parseInt(e.outerHeight(!0))}),e.height(t[0]>t[1]?t[0]:t[1])}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})},_initIndexList:function(){var e=$(".articles > .fn-clear");if(e.length===0)return;var t=0;$(".nav-abs li").each(function(e){var n=$(this);n.hide(),t!==n.data("year")&&(t=n.data("year"),n.before("
  • "+t+"
  • "))}),$(".article-more").parent().data("count")<=$(".article-more").parent().find("article").length&&$(".article-more").remove(),$(window).resize(function(){e.each(function(){var e=[timeline._COLHA+60,timeline._COLHB*4],t=$(this).find("article");t.length===0?($(this).find("h2").remove(),$(this).css("margin-bottom",0)):(t.each(function(){var t=$(this),n=e[1]>e[0],r=n?e[0]:e[1];parseInt(t.css("top"))!==r&&(t.css({top:r+"px",position:"absolute"}),n?this.className="l":this.className="r"),e[n?"0":"1"]+=parseInt(t.outerHeight(!0))}),$(this).height(e[0]>e[1]?e[0]:e[1]))})}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})},_setNavCurrent:function(){$(".header li a").each(function(){$(this).prop("href")===location.href.split("#")[0]?this.className="current":this.className=""})},init:function(){$(window).scroll(function(){$(window).scrollTop()>60?$(".ico-top").show():$(".ico-top").hide()}),timeline._initIndexList(),timeline._initArticleList(),timeline._setNavCurrent()},translate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getArchive:function(e,t,n){var r=e+t,i=e+"/"+t;window.location.hash="#"+r;if($("#"+r+" > article").length===0){var s=e+" "+Label.yearLabel+" "+t+" "+Label.monthLabel;Label.localeString.substring(0,2)==="en"&&(s=n+" "+e);var o='

    '+s+"

    "+'
    '+Label.moreLabel+"
    ";$("#"+r).html(o).css("margin-bottom","50px"),timeline.getNextPage($("#"+r).find(".article-more")[0],i)}},getNextPage:function(e,t){var n=$(e),r=n.data("page")+1,i="/articles/";if($("#tag").length===1){var s=location.pathname.split("/");i="/articles/tags/"+s[s.length-1]+"/"}else if($("#author").length===1){var s=location.pathname.split("/");i="/articles/authors/"+s[s.length-1]+"/"}else t&&(i="/articles/archives/"+t+"/");$.ajax({url:latkeConfig.servePath+i+r,type:"GET",beforeSend:function(){n.css("background","url("+latkeConfig.staticServePath+"/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text("")},success:function(e,t){if(!e.sc){n.css("background","none #60829F").text("Error");return}if(e.rslts.articles.length===0){n.remove();return}var i="",s=e.rslts.pagination;for(var o=0;o

    '+u.articleTitle+"",u.hasUpdated&&(i+=""+Label.updatedLabel+""),u.articlePutTop&&(i+=""+Label.topArticleLabel+""),i+="

    "+u.articleAbstract+"

    "+'';var a=u.articleTags.split(",");for(var f=0;f'+a[f]+"",f '+' '+(u.articleCommentCount===0?Label.noCommentLabel:u.articleCommentCount)+' '+''+u.articleViewCount+"
    "}n.before(i).data("page",r),s.paginationPageCount<=r?n.remove():n.css("background","none #60829F").text(Label.moreLabel),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})}})},toggleArchives:function(e,t){$(".nav-abs li").each(function(n){var r=$(this);r.hasClass("year")||(r.hide(),t===r.data("year")&&$(e).hasClass("close")&&r.show())}),$(".nav-abs li.year").each(function(){parseInt($(this).text())===t?$(e).hasClass("close")?e.className="year open":e.className="year close":this.className="year close"})}};(function(e,t){"use strict";var n="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";e.fn.imagesLoaded=function(r){function c(){var t=e(f),n=e(l);s&&(l.length?s.reject(u,t,n):s.resolve(u)),e.isFunction(r)&&r.call(i,u,t,n)}function h(e){p(e.target,e.type==="error")}function p(t,r){if(t.src===n||e.inArray(t,a)!==-1)return;a.push(t),r?l.push(t):f.push(t),e.data(t,"imagesLoaded",{isBroken:r,src:t.src}),o&&s.notifyWith(e(t),[r,u,e(f),e(l)]),u.length===a.length&&(setTimeout(c),u.unbind(".imagesLoaded",h))}var i=this,s=e.isFunction(e.Deferred)?e.Deferred():0,o=e.isFunction(s.notify),u=i.find("img").add(i.filter("img")),a=[],f=[],l=[];return e.isPlainObject(r)&&e.each(r,function(e,t){e==="callback"?r=t:s&&s[e](t)}),u.length?u.bind("load.imagesLoaded error.imagesLoaded",h).each(function(r,i){var s=i.src,o=e.data(i,"imagesLoaded");if(o&&o.src===s){p(i,o.isBroken);return}if(i.complete&&i.naturalWidth!==t){p(i,i.naturalWidth===0||i.naturalHeight===0);return}if(i.readyState||i.complete)i.src=n,i.src=s}):c(),s?s.promise(i):i}})(jQuery),function(){Util.init(),Util.replaceSideEm($(".comments .article-body")),Util.buildTags("tagsSide"),timeline.init()}(); \ No newline at end of file From 1c44cf1bd9cc0535033344fbd60710129b7a9151 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 26 Apr 2013 11:44:30 +0800 Subject: [PATCH 07/11] update version --- andrea/skin.properties | 50 +++++++++++++++++------------------ classic/skin.properties | 54 +++++++++++++++++++------------------- community/skin.properties | 50 +++++++++++++++++------------------ ease/skin.properties | 54 +++++++++++++++++++------------------- favourite/skin.properties | 52 ++++++++++++++++++------------------ i-nove/skin.properties | 50 +++++++++++++++++------------------ mobile/skin.properties | 52 ++++++++++++++++++------------------ neoease/skin.properties | 52 ++++++++++++++++++------------------ owmx-3.0/skin.properties | 50 +++++++++++++++++------------------ timeline/skin.properties | 54 +++++++++++++++++++------------------- tree-house/skin.properties | 50 +++++++++++++++++------------------ 11 files changed, 284 insertions(+), 284 deletions(-) diff --git a/andrea/skin.properties b/andrea/skin.properties index 03ce917..7b92587 100644 --- a/andrea/skin.properties +++ b/andrea/skin.properties @@ -1,26 +1,26 @@ -# -# Copyright (C) 2011, B3log Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Description: Andrea skin. -# Version: 1.0.0.8, Nov 21, 2012 -# Author: Liyuan Li -# - -name=Andrea -version=2.0.5 -forSolo=0.5.6 +# +# Copyright (C) 2011, B3log Team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Description: Andrea skin. +# Version: 1.0.0.8, Nov 21, 2012 +# Author: Liyuan Li +# + +name=Andrea +version=2.0.5 +forSolo=0.6.6 memo=Refers to http://www.madeincima.eu \ No newline at end of file diff --git a/classic/skin.properties b/classic/skin.properties index a76f0f3..687ccaa 100644 --- a/classic/skin.properties +++ b/classic/skin.properties @@ -1,27 +1,27 @@ -# -# Copyright (C) 2009, 2010, 2010, B3log Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Description: Classic blue skin. -# Version: 1.0.0.8, Nov 21, 2012 -# Author: Liang Ding -# Author: Liyuan Li -# - -name=\u7ecf\u5178\u6de1\u84dd -version=2.0.5 -forSolo=0.5.6 -memo=\u8fd9\u4e2a\u76ae\u80a4\u5f88\u4e11\u4e48\uff1f\u6211\u52d2\u4e2a\u53bb\u3002 +# +# Copyright (C) 2009, 2010, 2010, B3log Team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Description: Classic blue skin. +# Version: 1.0.0.8, Nov 21, 2012 +# Author: Liang Ding +# Author: Liyuan Li +# + +name=\u7ecf\u5178\u6de1\u84dd +version=2.0.5 +forSolo=0.6.6 +memo=\u8fd9\u4e2a\u76ae\u80a4\u5f88\u4e11\u4e48\uff1f\u6211\u52d2\u4e2a\u53bb\u3002 diff --git a/community/skin.properties b/community/skin.properties index 722599d..01e491e 100644 --- a/community/skin.properties +++ b/community/skin.properties @@ -1,26 +1,26 @@ -# -# Copyright (C) 2011, B3log Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Description: Community skin. -# Version: 1.0.0.9, Nov 21, 2012 -# Author: Liyuan Li -# - -name=Community -version=2.0.5 -forSolo=0.5.6 +# +# Copyright (C) 2011, B3log Team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Description: Community skin. +# Version: 1.0.0.9, Nov 21, 2012 +# Author: Liyuan Li +# + +name=Community +version=2.0.5 +forSolo=0.6.6 memo=Refers to http://demo.woothemes.com/skeptical/ \ No newline at end of file diff --git a/ease/skin.properties b/ease/skin.properties index 987291b..abf53e9 100644 --- a/ease/skin.properties +++ b/ease/skin.properties @@ -1,27 +1,27 @@ -# -# Copyright (C) 2009, 2010, 2011, B3log Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Description: ease skin. -# Version: 1.0.0.4, Feb 4, 2013 -# Author: Liyuan Li -# Author: Liang Ding -# - -name=ease -version=1.0.4 -forSolo=0.5.6 -memo=\u56de\u5f52\u606c\u9759 +# +# Copyright (C) 2009, 2010, 2011, B3log Team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Description: ease skin. +# Version: 1.0.0.4, Feb 4, 2013 +# Author: Liyuan Li +# Author: Liang Ding +# + +name=ease +version=1.0.4 +forSolo=0.6.6 +memo=\u56de\u5f52\u606c\u9759 diff --git a/favourite/skin.properties b/favourite/skin.properties index 5a300c7..8c64c2d 100644 --- a/favourite/skin.properties +++ b/favourite/skin.properties @@ -1,27 +1,27 @@ -# -# Copyright (C) 2010, 2011, B3log Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Description: Favourite skin. -# Version: 1.0.0.7, Nov 21, 2012 -# Author: Lamb Gao -# Author: Liyuan Li -# - -name=favourite -version=2.0.5 -forSolo=0.5.6 +# +# Copyright (C) 2010, 2011, B3log Team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Description: Favourite skin. +# Version: 1.0.0.7, Nov 21, 2012 +# Author: Lamb Gao +# Author: Liyuan Li +# + +name=favourite +version=2.0.5 +forSolo=0.6.6 memo=Refers to http://www.iprimidieci.com/ \ No newline at end of file diff --git a/i-nove/skin.properties b/i-nove/skin.properties index fa41ef7..c507f90 100644 --- a/i-nove/skin.properties +++ b/i-nove/skin.properties @@ -1,26 +1,26 @@ -# -# Copyright (C) 2011, B3log Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Description: i-nove skin. -# Version: 1.0.0.8, Nov 21, 2012 -# Author: Liyuan Li -# - -name=i-nove -version=2.0.5 -forSolo=0.5.6 +# +# Copyright (C) 2011, B3log Team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Description: i-nove skin. +# Version: 1.0.0.8, Nov 21, 2012 +# Author: Liyuan Li +# + +name=i-nove +version=2.0.5 +forSolo=0.6.6 memo=Refers to http://demo.neoease.com \ No newline at end of file diff --git a/mobile/skin.properties b/mobile/skin.properties index b59bde9..44994c8 100644 --- a/mobile/skin.properties +++ b/mobile/skin.properties @@ -1,26 +1,26 @@ -# -# Copyright (C) 2009, 2010, 2010, B3log Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Description: Mobile skin. -# Version: 1.0.0.6, Feb 4, 2013 -# Author: Liang Ding -# - -name=Mobile -version=0.1.5 -forSolo=0.5.6 -memo=\u8bf7\u4e0d\u8981\u4ece\u90e8\u7f72\u76ee\u5f55\u4e2d\u5220\u9664\u8be5\u76ae\u80a4\uff0c\u5426\u5219\u79fb\u52a8\u8bbe\u5907\u8bbf\u95ee\u65f6\u535a\u5ba2\u5c06\u4e0d\u53ef\u7528\u3002 +# +# Copyright (C) 2009, 2010, 2010, B3log Team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Description: Mobile skin. +# Version: 1.0.0.6, Feb 4, 2013 +# Author: Liang Ding +# + +name=Mobile +version=0.1.5 +forSolo=0.6.6 +memo=\u8bf7\u4e0d\u8981\u4ece\u90e8\u7f72\u76ee\u5f55\u4e2d\u5220\u9664\u8be5\u76ae\u80a4\uff0c\u5426\u5219\u79fb\u52a8\u8bbe\u5907\u8bbf\u95ee\u65f6\u535a\u5ba2\u5c06\u4e0d\u53ef\u7528\u3002 diff --git a/neoease/skin.properties b/neoease/skin.properties index e96504f..56c7487 100644 --- a/neoease/skin.properties +++ b/neoease/skin.properties @@ -1,26 +1,26 @@ -# -# Copyright (C) 2009, 2010, 2011, B3log Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Description: NeoEase skin. -# Version: 1.0.0.7, Nov 21, 2012 -# Author: Liyuan Li -# - -name=NeoEase -version=1.0.5 -forSolo=0.5.6 -memo=http://www.neoease.com/ +# +# Copyright (C) 2009, 2010, 2011, B3log Team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Description: NeoEase skin. +# Version: 1.0.0.7, Nov 21, 2012 +# Author: Liyuan Li +# + +name=NeoEase +version=1.0.5 +forSolo=0.6.6 +memo=http://www.neoease.com/ diff --git a/owmx-3.0/skin.properties b/owmx-3.0/skin.properties index 5be22df..065d37c 100644 --- a/owmx-3.0/skin.properties +++ b/owmx-3.0/skin.properties @@ -1,26 +1,26 @@ -# -# Copyright (C) 2011, B3log Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Description: html5 + css3 -# Version: 1.0.0.9, Nov 21, 2012 -# Author: Liyuan Li -# - -name=owmx-3.0 -version=2.0.5 -forSolo=0.5.6 +# +# Copyright (C) 2011, B3log Team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Description: html5 + css3 +# Version: 1.0.0.9, Nov 21, 2012 +# Author: Liyuan Li +# + +name=owmx-3.0 +version=2.0.5 +forSolo=0.6.6 memo=Refers to http://lightdian.b3log.org \ No newline at end of file diff --git a/timeline/skin.properties b/timeline/skin.properties index c3fe0d4..1e2700e 100644 --- a/timeline/skin.properties +++ b/timeline/skin.properties @@ -1,27 +1,27 @@ -# -# Copyright (C) 2009, 2010, 2011, B3log Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Description: timeline skin. -# Version: 1.0.0.1, Jan 7, 2013 -# Author: Liyuan Li -# - -name=timeline -version=1.0.1 -forSolo=0.5.6 -memo=\u65f6\u5149\u6d41\u901d -note=\u6b64\u76ae\u80a4\u5ffd\u7565\u66f4\u65b0\u3001\u7f6e\u9876\u6392\u5e8f +# +# Copyright (C) 2009, 2010, 2011, B3log Team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Description: timeline skin. +# Version: 1.0.0.1, Jan 7, 2013 +# Author: Liyuan Li +# + +name=timeline +version=1.0.1 +forSolo=0.6.6 +memo=\u65f6\u5149\u6d41\u901d +note=\u6b64\u76ae\u80a4\u5ffd\u7565\u66f4\u65b0\u3001\u7f6e\u9876\u6392\u5e8f diff --git a/tree-house/skin.properties b/tree-house/skin.properties index d650ba7..2c0428a 100644 --- a/tree-house/skin.properties +++ b/tree-house/skin.properties @@ -1,26 +1,26 @@ -# -# Copyright (C) 2010, 2011, B3log Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Description: Tree House skin. -# Version: 1.0.0.8, Nov 21, 2012 -# Author: Liyuan Li -# - -name=Tree House -version=2.0.5 -forSolo=0.5.6 +# +# Copyright (C) 2010, 2011, B3log Team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Description: Tree House skin. +# Version: 1.0.0.8, Nov 21, 2012 +# Author: Liyuan Li +# + +name=Tree House +version=2.0.5 +forSolo=0.6.6 memo=Refers to http://www.thepixel.com/blog \ No newline at end of file From 120d567aeaf3e94773968e4a02812d749e1f1b08 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 26 Apr 2013 13:53:10 +0800 Subject: [PATCH 08/11] update version --- andrea/skin.properties | 2 +- classic/skin.properties | 2 +- community/skin.properties | 2 +- ease/skin.properties | 2 +- favourite/skin.properties | 2 +- i-nove/skin.properties | 2 +- mobile/skin.properties | 2 +- neoease/skin.properties | 2 +- owmx-3.0/skin.properties | 2 +- timeline/skin.properties | 2 +- tree-house/skin.properties | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/andrea/skin.properties b/andrea/skin.properties index 7b92587..db662b2 100644 --- a/andrea/skin.properties +++ b/andrea/skin.properties @@ -22,5 +22,5 @@ name=Andrea version=2.0.5 -forSolo=0.6.6 +forSolo=0.6.0 memo=Refers to http://www.madeincima.eu \ No newline at end of file diff --git a/classic/skin.properties b/classic/skin.properties index 687ccaa..ef08a01 100644 --- a/classic/skin.properties +++ b/classic/skin.properties @@ -23,5 +23,5 @@ name=\u7ecf\u5178\u6de1\u84dd version=2.0.5 -forSolo=0.6.6 +forSolo=0.6.0 memo=\u8fd9\u4e2a\u76ae\u80a4\u5f88\u4e11\u4e48\uff1f\u6211\u52d2\u4e2a\u53bb\u3002 diff --git a/community/skin.properties b/community/skin.properties index 01e491e..a2e71dd 100644 --- a/community/skin.properties +++ b/community/skin.properties @@ -22,5 +22,5 @@ name=Community version=2.0.5 -forSolo=0.6.6 +forSolo=0.6.0 memo=Refers to http://demo.woothemes.com/skeptical/ \ No newline at end of file diff --git a/ease/skin.properties b/ease/skin.properties index abf53e9..aaec19b 100644 --- a/ease/skin.properties +++ b/ease/skin.properties @@ -23,5 +23,5 @@ name=ease version=1.0.4 -forSolo=0.6.6 +forSolo=0.6.0 memo=\u56de\u5f52\u606c\u9759 diff --git a/favourite/skin.properties b/favourite/skin.properties index 8c64c2d..63fb30b 100644 --- a/favourite/skin.properties +++ b/favourite/skin.properties @@ -23,5 +23,5 @@ name=favourite version=2.0.5 -forSolo=0.6.6 +forSolo=0.6.0 memo=Refers to http://www.iprimidieci.com/ \ No newline at end of file diff --git a/i-nove/skin.properties b/i-nove/skin.properties index c507f90..0d1fc78 100644 --- a/i-nove/skin.properties +++ b/i-nove/skin.properties @@ -22,5 +22,5 @@ name=i-nove version=2.0.5 -forSolo=0.6.6 +forSolo=0.6.0 memo=Refers to http://demo.neoease.com \ No newline at end of file diff --git a/mobile/skin.properties b/mobile/skin.properties index 44994c8..79f0524 100644 --- a/mobile/skin.properties +++ b/mobile/skin.properties @@ -22,5 +22,5 @@ name=Mobile version=0.1.5 -forSolo=0.6.6 +forSolo=0.6.0 memo=\u8bf7\u4e0d\u8981\u4ece\u90e8\u7f72\u76ee\u5f55\u4e2d\u5220\u9664\u8be5\u76ae\u80a4\uff0c\u5426\u5219\u79fb\u52a8\u8bbe\u5907\u8bbf\u95ee\u65f6\u535a\u5ba2\u5c06\u4e0d\u53ef\u7528\u3002 diff --git a/neoease/skin.properties b/neoease/skin.properties index 56c7487..13c9418 100644 --- a/neoease/skin.properties +++ b/neoease/skin.properties @@ -22,5 +22,5 @@ name=NeoEase version=1.0.5 -forSolo=0.6.6 +forSolo=0.6.0 memo=http://www.neoease.com/ diff --git a/owmx-3.0/skin.properties b/owmx-3.0/skin.properties index 065d37c..a7f7147 100644 --- a/owmx-3.0/skin.properties +++ b/owmx-3.0/skin.properties @@ -22,5 +22,5 @@ name=owmx-3.0 version=2.0.5 -forSolo=0.6.6 +forSolo=0.6.0 memo=Refers to http://lightdian.b3log.org \ No newline at end of file diff --git a/timeline/skin.properties b/timeline/skin.properties index 1e2700e..fee7927 100644 --- a/timeline/skin.properties +++ b/timeline/skin.properties @@ -22,6 +22,6 @@ name=timeline version=1.0.1 -forSolo=0.6.6 +forSolo=0.6.0 memo=\u65f6\u5149\u6d41\u901d note=\u6b64\u76ae\u80a4\u5ffd\u7565\u66f4\u65b0\u3001\u7f6e\u9876\u6392\u5e8f diff --git a/tree-house/skin.properties b/tree-house/skin.properties index 2c0428a..cbb3321 100644 --- a/tree-house/skin.properties +++ b/tree-house/skin.properties @@ -22,5 +22,5 @@ name=Tree House version=2.0.5 -forSolo=0.6.6 +forSolo=0.6.0 memo=Refers to http://www.thepixel.com/blog \ No newline at end of file From c98167fe3246166e43b59e51ef9809dc47176fa5 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 26 Apr 2013 14:09:31 +0800 Subject: [PATCH 09/11] compress --- community/css/community.min.css | 4 ++-- ease/js/ease.min.js | 21 ++++++++++++++++++++- ease/macro-head.ftl | 2 +- ease/skin.properties | 2 +- neoease/js/neoease.min.js | 21 ++++++++++++++++++++- 5 files changed, 44 insertions(+), 6 deletions(-) diff --git a/community/css/community.min.css b/community/css/community.min.css index 34ad079..0df4a13 100644 --- a/community/css/community.min.css +++ b/community/css/community.min.css @@ -7,8 +7,8 @@ a:hover{text-decoration:underline;} .content>h2{margin:-20px 0 20px 0;} .hr{background:url("../images/indentline-light.png") repeat-x scroll left top transparent;margin:20px 0 40px;clear:both;height:2px;} .arrow-right{background:url("../images/icon.png") 0px -64px no-repeat;float:left;height:38px;width:14px;} -input[type='button']{border-radius:5px;box-shadow:0 1px 0 rgba(255, 255, 255, 0.3) inset,0 0 2px rgba(255, 255, 255, 0.3) inset,0 1px 2px rgba(0, 0, 0, 0.29);background-color:#000000;background-image:linear-gradient(top, #333333, #000000);background-image:-moz-linear-gradient(top, #333333, #000000);background-image:-ms-linear-gradient(top, #333333, #000000);background-image:-o-linear-gradient(top, #333333, #000000);background-image:-webkit-gradient(linear, left top, left bottom, from(#333333), to(#000000));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#000000');border:1px solid #000000;color:white;margin:15px 0 0 200px;padding:7px 13px;height:auto;} -input[type='button']:hover{background-color:#333333;background-image:linear-gradient(top, #333333, #212121);background-image:-moz-linear-gradient(top, #333333, #212121);background-image:-ms-linear-gradient(top, #333333, #212121);background-image:-o-linear-gradient(top, #333333, #212121);background-image:-webkit-gradient(linear, left top, left bottom, from(#333333), to(#212121));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#212121');} +input[type='button']{border-radius:5px;box-shadow:0 1px 0 rgba(255, 255, 255, 0.3) inset,0 0 2px rgba(255, 255, 255, 0.3) inset,0 1px 2px rgba(0, 0, 0, 0.29);background-color:#000000;background-image:linear-gradient(top, #333333, #000000);background-image:-moz-linear-gradient(top, #333333, #000000);background-image:-ms-linear-gradient(top, #333333, #000000);background-image:-o-linear-gradient(top, #333333, #000000);background-image:-webkit-gradient(linear, left top, left bottom, from(#333333), to(#000000));filter:progid:dximagetransform.microsoft.gradient(startColorstr='#333333', endColorstr='#000000');border:1px solid #000000;color:white;margin:15px 0 0 200px;padding:7px 13px;height:auto;} +input[type='button']:hover{background-color:#333333;background-image:linear-gradient(top, #333333, #212121);background-image:-moz-linear-gradient(top, #333333, #212121);background-image:-ms-linear-gradient(top, #333333, #212121);background-image:-o-linear-gradient(top, #333333, #212121);background-image:-webkit-gradient(linear, left top, left bottom, from(#333333), to(#212121));filter:progid:dximagetransform.microsoft.gradient(startColorstr='#333333', endColorstr='#212121');} .marginBottom40{margin-bottom:40px;} .header-user{background-color:#DEDEDE;padding-top:1px;} .header-navi{background:url("../images/icon.png") 0px -130px repeat-x #333333;margin-bottom:50px;} diff --git a/ease/js/ease.min.js b/ease/js/ease.min.js index 60ae32a..3ccd9d9 100644 --- a/ease/js/ease.min.js +++ b/ease/js/ease.min.js @@ -1 +1,20 @@ -var goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)};var getNextPage=function(){var $more=$(".article-next");currentPage+=1;var path="/articles/";if($("#tag").length===1){var pathnames=location.pathname.split("/");path="/articles/tags/"+pathnames[pathnames.length-1]+"/"}else if($("#archive").length===1){var pathnames=location.pathname.split("/");path="/articles/archives/"+pathnames[pathnames.length-2]+"/"+pathnames[pathnames.length-1]+"/"}else if($("#author").length===1){var pathnames=location.pathname.split("/");path="/articles/authors/"+pathnames[pathnames.length-1]+"/"}$.ajax({url:latkeConfig.servePath+path+currentPage,type:"GET",beforeSend:function(){$more.css("background","url("+latkeConfig.staticServePath+"/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe")},success:function(result,textStatus){if(!result.sc){return}var articlesHTML="",pagination=result.rslts.pagination;for(var i=0;i'+'
    '+"

    "+''+article.articleTitle+"";if(article.hasUpdated){articlesHTML+=""+Label.updatedLabel+""}if(article.articlePutTop){articlesHTML+=""+Label.topArticleLabel+""}articlesHTML+="

    "+'"+'
    '+"
    "+'
    '+'
    '+article.articleAbstract+"
    "+'
    '+"
    "+'
    ';if(article.hasUpdated){articlesHTML+=Util.toDate(article.articleUpdateTime,"yy-MM-dd HH:mm")}else{articlesHTML+=Util.toDate(article.articleCreateTime,"yy-MM-dd HH:mm")}articlesHTML+=' '+article.authorName+""+"
    "+'
    '+Label.tag1Label+" ";var articleTags=article.articleTags.split(",");for(var j=0;j
    '+""}$(".article-last").removeClass("article-last");$(".main>.wrapper>ul").append(articlesHTML);if(pagination.paginationPageCount===currentPage){$more.remove()}else{$more.css("background","none")}}})};var ease={$header:$(".header"),headerH:103,$body:$(".main > .wrapper"),$nav:$(".nav"),getCurrentPage:function(){var $next=$(".article-next");if($next.length>0){window.currentPage=$next.data("page")}},setNavCurrent:function(){$(".nav ul a").each(function(){var $this=$(this);if($this.attr("href")===latkeConfig.servePath+location.pathname){$this.addClass("current")}else if(/\/[0-9]+$/.test(location.pathname)){$(".nav ul li")[0].className="current"}})},initCommon:function(){Util.init();Util.replaceSideEm($(".recent-comments-content"));Util.buildTags("tagsSide")},initArchives:function(){var $archives=$(".archives");if($archives.length<1){return}$(".footer").css("marginTop","30px");var years=[],$archiveList=$archives.find("span").each(function(){var year=$(this).data("year"),tag=true;for(var i=0;i

    "+years[j]+"

    "+monthsHTML+"
    "}$archives.html(yearsHTML);var $items=$(".archives>div"),line=0,top=0,heights=[];for(var m=0;m<$items.length;m++){for(var n=0;n<3;n++){if(m>=$items.length){break}$items[m].style.left=n*310+"px";if(line>0){if($items[m-3].style.top!==""){top=parseInt($items[m-3].style.top)}$items[m].style.top=$($items[m-3]).height()+60+top+"px";heights[n]=parseInt($items[m].style.top)+$($items[m]).height()+60}else{heights[n]=$($items[m]).height()+60}if(n<2){m+=1}}line+=1}$archives.height(heights.sort()[heights.length-1])},scrollEvent:function(){var _it=this;$(window).scroll(function(){var y=$(window).scrollTop(),topH=0;if($("#top").css("display")==="block"){topH=$("#top").height()}if(y>=_it.headerH+topH){_it.$nav.css("position","fixed");_it.$body.css("marginTop","55px")}else{_it.$nav.css("position","inherit");_it.$body.css("marginTop","0")}if(y>_it.headerH){var bodyH=$(window).height();var top=y+bodyH-21;if($("body").height()-58<=y+bodyH){top=$(".footer").offset().top-21}$("#goTop").fadeIn("slow").css("top",top)}else{$("#goTop").hide()}})},setDynamic:function(){var $dynamic=$(".dynamic");if($(".dynamic").length<1){return}var $comments=$dynamic.find(".side-comments"),$tags=$dynamic.find(".side-tags"),$mostComment=$dynamic.find(".side-most-comment"),$mostView=$dynamic.find(".side-most-view");if($comments.height()>$tags.height()){$tags.height($comments.height())}else{$comments.height($tags.height())}if($mostComment.height()>$mostView.height()){$mostView.height($mostComment.height())}else{$mostComment.height($mostView.height())}$(".article-body").each(function(){this.innerHTML=Util.replaceEmString($(this).html())})},scrollToCmt:function(){if($(window.location.hash).length==1){$(window).scrollTop($(window.location.hash).offset().top-60)}}};(function(){ease.getCurrentPage();ease.initCommon();ease.scrollEvent();ease.setNavCurrent();ease.initArchives();ease.setDynamic()})(); \ No newline at end of file +/* + * Copyright (c) 2009, 2010, 2011, 2012, B3log Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//** + * @fileoverview ease js. + * + * @author Liyuan Li + * @version 1.0.1.5, Jan 29, 2013 + */var goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getNextPage=function(){var e=$(".article-next");currentPage+=1;var t="/articles/";if($("#tag").length===1){var n=location.pathname.split("/");t="/articles/tags/"+n[n.length-1]+"/"}else if($("#archive").length===1){var n=location.pathname.split("/");t="/articles/archives/"+n[n.length-2]+"/"+n[n.length-1]+"/"}else if($("#author").length===1){var n=location.pathname.split("/");t="/articles/authors/"+n[n.length-1]+"/"}$.ajax({url:latkeConfig.servePath+t+currentPage,type:"GET",beforeSend:function(){e.css("background","url("+latkeConfig.staticServePath+"/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe")},success:function(t,n){if(!t.sc)return;var r="",i=t.rslts.pagination;for(var s=0;s'+'
    '+"

    "+''+o.articleTitle+"",o.hasUpdated&&(r+=""+Label.updatedLabel+""),o.articlePutTop&&(r+=""+Label.topArticleLabel+""),r+='

    "+'
    '+"
    "+'
    '+'
    '+o.articleAbstract+"
    "+'
    '+"
    "+'
    ',o.hasUpdated?r+=Util.toDate(o.articleUpdateTime,"yy-MM-dd HH:mm"):r+=Util.toDate(o.articleCreateTime,"yy-MM-dd HH:mm"),r+=' '+o.authorName+""+"
    "+'
    '+Label.tag1Label+" ";var a=o.articleTags.split(",");for(var f=0;f
    "}e.html(r);var a=$(".archives>div"),f=0,l=0,c=[];for(var h=0;h=a.length)break;a[h].style.left=p*310+"px",f>0?(a[h-3].style.top!==""&&(l=parseInt(a[h-3].style.top)),a[h].style.top=$(a[h-3]).height()+60+l+"px",c[p]=parseInt(a[h].style.top)+$(a[h]).height()+60):c[p]=$(a[h]).height()+60,p<2&&(h+=1)}f+=1}e.height(c.sort()[c.length-1])},scrollEvent:function(){var e=this;$(window).scroll(function(){var t=$(window).scrollTop(),n=0;$("#top").css("display")==="block"&&(n=$("#top").height()),t>=e.headerH+n?(e.$nav.css("position","fixed"),e.$body.css("marginTop","55px")):(e.$nav.css("position","inherit"),e.$body.css("marginTop","0"));if(t>e.headerH){var r=$(window).height(),i=t+r-21;$("body").height()-58<=t+r&&(i=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",i)}else $("#goTop").hide()})},setDynamic:function(){var e=$(".dynamic");if($(".dynamic").length<1)return;var t=e.find(".side-comments"),n=e.find(".side-tags"),r=e.find(".side-most-comment"),i=e.find(".side-most-view");t.height()>n.height()?n.height(t.height()):t.height(n.height()),r.height()>i.height()?i.height(r.height()):r.height(i.height()),$(".article-body").each(function(){this.innerHTML=Util.replaceEmString($(this).html())})},scrollToCmt:function(){$(window.location.hash).length==1&&$(window).scrollTop($(window.location.hash).offset().top-60)}};(function(){ease.getCurrentPage(),ease.initCommon(),ease.scrollEvent(),ease.setNavCurrent(),ease.initArchives(),ease.setDynamic()})(); \ No newline at end of file diff --git a/ease/macro-head.ftl b/ease/macro-head.ftl index accb52e..59e1297 100644 --- a/ease/macro-head.ftl +++ b/ease/macro-head.ftl @@ -4,9 +4,9 @@ <#nested> + - diff --git a/ease/skin.properties b/ease/skin.properties index aaec19b..3d999bc 100644 --- a/ease/skin.properties +++ b/ease/skin.properties @@ -23,5 +23,5 @@ name=ease version=1.0.4 -forSolo=0.6.0 +forSolo=0.5.6 memo=\u56de\u5f52\u606c\u9759 diff --git a/neoease/js/neoease.min.js b/neoease/js/neoease.min.js index 0775676..a2252f5 100644 --- a/neoease/js/neoease.min.js +++ b/neoease/js/neoease.min.js @@ -1 +1,20 @@ -var goTop=function(acceleration){acceleration=acceleration||.1;var y=$(window).scrollTop();var speed=1+acceleration;window.scrollTo(0,Math.floor(y/speed));if(y>0){var invokeFunction="goTop("+acceleration+")";window.setTimeout(invokeFunction,16)}};var collapseArchive=function(it,year){var tag=true;if(it.className==="collapse-ico"){it.className="expand-ico";tag=false}else{it.className="collapse-ico"}$("#archiveSide li").each(function(){var $this=$(this);if($this.data("year")===year){if(tag){$(this).show()}else{$(this).hide()}}})};var getArticle=function(it,id){var $abstract=$("#abstract"+id),$content=$("#content"+id);if($content.html()===""){$.ajax({url:"/get-article-content?id="+id,type:"GET",dataType:"html",beforeSend:function(){$abstract.css("background","url(/skins/neoease/images/ajax-loader.gif) no-repeat scroll center center transparent")},success:function(result,textStatus){it.className="collapse-ico";$content.html(result);$abstract.hide().css("background","none");$content.fadeIn("slow")}})}else{if(it.className==="expand-ico"){$abstract.hide();$content.fadeIn();it.className="collapse-ico"}else{$content.hide();$abstract.fadeIn();it.className="expand-ico"}}return false};var goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)};(function(){$(window).scroll(function(){var y=$(window).scrollTop();if(y>182){var bodyH=$(window).height();var top=y+bodyH-21;if($("body").height()-58<=y+bodyH){top=$(".footer").offset().top-21}$("#goTop").fadeIn("slow").css("top",top)}else{$("#goTop").hide()}});var currentYear=(new Date).getFullYear(),year=currentYear;$("#archiveSide li").each(function(i){var $this=$(this);if($this.data("year")!==currentYear){$(this).hide()}if(year!==$this.data("year")){year=$this.data("year");$this.before("
  • "+year+" 年
  • ")}});$(".recent-comments .expand-ico").click(function(){if(this.className==="expand-ico"){$(this).parent().next().css({height:"auto","white-space":"normal"});this.className="collapse-ico"}else{$(this).parent().next().animate({height:"18px"},function(){$(this).css("white-space","nowrap")});this.className="expand-ico"}});$(".nav ul li").each(function(){var $a=$(this).find("a");if($a.attr("href")===latkeConfig.servePath+location.pathname){$(this).addClass("current")}else if(/\/[0-9]+$/.test(location.pathname)){$(".nav ul li")[0].className="current"}});Util.init();Util.replaceSideEm($(".recent-comments-content"));Util.buildTags("tagsSide");$(".recent-comments .recent-comments-main").each(function(){if($(this).find(".recent-comments-content>a").height()<30){$(this).find(".expand-ico").remove()}else{$(this).find(".expand-ico").parent().next().css({"white-space":"nowrap"})}})})(); \ No newline at end of file +/* + * Copyright (c) 2009, 2010, 2011, 2012, B3log Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//** + * @fileoverview neoease js. + * + * @author Liyuan Li + * @version 1.0.0.8, Sep 6, 2012 + */var goTop=function(e){e=e||.1;var t=$(window).scrollTop(),n=1+e;window.scrollTo(0,Math.floor(t/n));if(t>0){var r="goTop("+e+")";window.setTimeout(r,16)}},collapseArchive=function(e,t){var n=!0;e.className==="collapse-ico"?(e.className="expand-ico",n=!1):e.className="collapse-ico",$("#archiveSide li").each(function(){var e=$(this);e.data("year")===t&&(n?$(this).show():$(this).hide())})},getArticle=function(e,t){var n=$("#abstract"+t),r=$("#content"+t);return r.html()===""?$.ajax({url:"/get-article-content?id="+t,type:"GET",dataType:"html",beforeSend:function(){n.css("background","url(/skins/neoease/images/ajax-loader.gif) no-repeat scroll center center transparent")},success:function(t,i){e.className="collapse-ico",r.html(t),n.hide().css("background","none"),r.fadeIn("slow")}}):e.className==="expand-ico"?(n.hide(),r.fadeIn(),e.className="collapse-ico"):(r.hide(),n.fadeIn(),e.className="expand-ico"),!1},goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)};(function(){$(window).scroll(function(){var e=$(window).scrollTop();if(e>182){var t=$(window).height(),n=e+t-21;$("body").height()-58<=e+t&&(n=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",n)}else $("#goTop").hide()});var e=(new Date).getFullYear(),t=e;$("#archiveSide li").each(function(n){var r=$(this);r.data("year")!==e&&$(this).hide(),t!==r.data("year")&&(t=r.data("year"),r.before("
  • "+t+" 年
  • "))}),$(".recent-comments .expand-ico").click(function(){this.className==="expand-ico"?($(this).parent().next().css({height:"auto","white-space":"normal"}),this.className="collapse-ico"):($(this).parent().next().animate({height:"18px"},function(){$(this).css("white-space","nowrap")}),this.className="expand-ico")}),$(".nav ul li").each(function(){var e=$(this).find("a");e.attr("href")===latkeConfig.servePath+location.pathname?$(this).addClass("current"):/\/[0-9]+$/.test(location.pathname)&&($(".nav ul li")[0].className="current")}),Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide"),$(".recent-comments .recent-comments-main").each(function(){$(this).find(".recent-comments-content>a").height()<30?$(this).find(".expand-ico").remove():$(this).find(".expand-ico").parent().next().css({"white-space":"nowrap"})})})(); \ No newline at end of file From 09261a605a3160941a0599359c4881ccab5afdbe Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 26 Apr 2013 14:10:35 +0800 Subject: [PATCH 10/11] c --- ease/skin.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ease/skin.properties b/ease/skin.properties index 3d999bc..aaec19b 100644 --- a/ease/skin.properties +++ b/ease/skin.properties @@ -23,5 +23,5 @@ name=ease version=1.0.4 -forSolo=0.5.6 +forSolo=0.6.0 memo=\u56de\u5f52\u606c\u9759 From d8a13a92ef6d6c2aa1b68c6b9ead9ff210f7574a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 26 Apr 2013 14:16:08 +0800 Subject: [PATCH 11/11] c --- ease/skin.properties | 2 +- mobile/macro-head.ftl | 3 +-- mobile/skin.properties | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ease/skin.properties b/ease/skin.properties index aaec19b..54e45f1 100644 --- a/ease/skin.properties +++ b/ease/skin.properties @@ -16,7 +16,7 @@ # # Description: ease skin. -# Version: 1.0.0.4, Feb 4, 2013 +# Version: 1.0.0.5, Apr 26, 2013 # Author: Liyuan Li # Author: Liang Ding # diff --git a/mobile/macro-head.ftl b/mobile/macro-head.ftl index 9717143..e428767 100644 --- a/mobile/macro-head.ftl +++ b/mobile/macro-head.ftl @@ -4,10 +4,9 @@ <#nested> + - - diff --git a/mobile/skin.properties b/mobile/skin.properties index 79f0524..d835074 100644 --- a/mobile/skin.properties +++ b/mobile/skin.properties @@ -16,7 +16,7 @@ # # Description: Mobile skin. -# Version: 1.0.0.6, Feb 4, 2013 +# Version: 1.0.0.7, Apr 26, 2013 # Author: Liang Ding #