Commit 39ebfc7e authored by Liang Ding's avatar Liang Ding

#12188

parent 9db11b54
...@@ -180,7 +180,9 @@ public class IndexProcessor { ...@@ -180,7 +180,9 @@ public class IndexProcessor {
dataModel.putAll(langs); dataModel.putAll(langs);
final JSONObject preference = preferenceQueryService.getPreference(); final JSONObject preference = preferenceQueryService.getPreference();
filler.fillBlogHeader(request, response, dataModel, preference);
filler.fillBlogFooter(request, dataModel, preference); filler.fillBlogFooter(request, dataModel, preference);
Keys.fillServer(dataModel);
Keys.fillRuntime(dataModel); Keys.fillRuntime(dataModel);
filler.fillMinified(dataModel); filler.fillMinified(dataModel);
} catch (final ServiceException e) { } catch (final ServiceException e) {
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
*/ */
package org.b3log.solo.processor.renderer; package org.b3log.solo.processor.renderer;
import freemarker.template.Configuration; import freemarker.template.Configuration;
import freemarker.template.Template; import freemarker.template.Template;
import freemarker.template.TemplateExceptionHandler;
import java.io.IOException; import java.io.IOException;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
...@@ -25,13 +25,12 @@ import org.b3log.latke.servlet.HTTPRequestContext; ...@@ -25,13 +25,12 @@ import org.b3log.latke.servlet.HTTPRequestContext;
import org.b3log.latke.servlet.renderer.freemarker.AbstractFreeMarkerRenderer; import org.b3log.latke.servlet.renderer.freemarker.AbstractFreeMarkerRenderer;
import org.b3log.solo.SoloServletListener; import org.b3log.solo.SoloServletListener;
/** /**
* <a href="http://freemarker.org">FreeMarker</a> HTTP response * <a href="http://freemarker.org">FreeMarker</a> HTTP response renderer for administrator console and initialization
* renderer for administrator console and initialization rendering. * rendering.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.1.1, Apr 15, 2014 * @version 1.0.1.2, Nov 2, 2016
* @since 0.4.1 * @since 0.4.1
*/ */
public final class ConsoleRenderer extends AbstractFreeMarkerRenderer { public final class ConsoleRenderer extends AbstractFreeMarkerRenderer {
...@@ -53,6 +52,8 @@ public final class ConsoleRenderer extends AbstractFreeMarkerRenderer { ...@@ -53,6 +52,8 @@ public final class ConsoleRenderer extends AbstractFreeMarkerRenderer {
final ServletContext servletContext = SoloServletListener.getServletContext(); final ServletContext servletContext = SoloServletListener.getServletContext();
TEMPLATE_CFG.setServletContextForTemplateLoading(servletContext, ""); TEMPLATE_CFG.setServletContextForTemplateLoading(servletContext, "");
TEMPLATE_CFG.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
TEMPLATE_CFG.setLogTemplateExceptions(false);
} }
@Override @Override
...@@ -65,8 +66,10 @@ public final class ConsoleRenderer extends AbstractFreeMarkerRenderer { ...@@ -65,8 +66,10 @@ public final class ConsoleRenderer extends AbstractFreeMarkerRenderer {
} }
@Override @Override
protected void beforeRender(final HTTPRequestContext context) throws Exception {} protected void beforeRender(final HTTPRequestContext context) throws Exception {
}
@Override @Override
protected void afterRender(final HTTPRequestContext context) throws Exception {} protected void afterRender(final HTTPRequestContext context) throws Exception {
}
} }
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
package org.b3log.solo.util; package org.b3log.solo.util;
import freemarker.template.TemplateExceptionHandler;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.util.HashMap; import java.util.HashMap;
...@@ -44,7 +45,7 @@ import org.b3log.solo.model.Skin; ...@@ -44,7 +45,7 @@ import org.b3log.solo.model.Skin;
* Skin utilities. * Skin utilities.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.4.7, Dec 27, 2015 * @version 1.1.4.8, Nov 2, 2016
* @since 0.3.1 * @since 0.3.1
*/ */
public final class Skins { public final class Skins {
...@@ -134,7 +135,12 @@ public final class Skins { ...@@ -134,7 +135,12 @@ public final class Skins {
final ServletContext servletContext = SoloServletListener.getServletContext(); final ServletContext servletContext = SoloServletListener.getServletContext();
Templates.MAIN_CFG.setServletContextForTemplateLoading(servletContext, "/skins/" + skinDirName); Templates.MAIN_CFG.setServletContextForTemplateLoading(servletContext, "/skins/" + skinDirName);
Templates.MAIN_CFG.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
Templates.MAIN_CFG.setLogTemplateExceptions(false);
Templates.MOBILE_CFG.setServletContextForTemplateLoading(servletContext, "/skins/mobile"); Templates.MOBILE_CFG.setServletContextForTemplateLoading(servletContext, "/skins/mobile");
Templates.MOBILE_CFG.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
Templates.MOBILE_CFG.setLogTemplateExceptions(false);
} }
/** /**
......
/*
* Copyright (c) 2010-2016, b3log.org & hacpai.com
*
* 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.
*/
package org.b3log.solo.processor;
import java.io.PrintWriter;
import java.io.StringWriter;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.b3log.latke.Keys;
import org.b3log.latke.model.User;
import org.b3log.solo.AbstractTestCase;
import org.b3log.solo.service.InitService;
import org.b3log.solo.service.UserQueryService;
import org.json.JSONObject;
import static org.mockito.Mockito.*;
import org.testng.Assert;
import org.testng.annotations.Test;
/**
* {@link IndexProcessor} test case.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.0, Nov 2, 2016
* @since 1.7.0
*/
@Test(suiteName = "processor")
public class IndexProcessorTestCase extends AbstractTestCase {
/**
* Init.
*
* @throws Exception exception
*/
@Test
public void init() throws Exception {
final InitService initService = getInitService();
final JSONObject requestJSONObject = new JSONObject();
requestJSONObject.put(User.USER_EMAIL, "test@gmail.com");
requestJSONObject.put(User.USER_NAME, "Admin");
requestJSONObject.put(User.USER_PASSWORD, "pass");
initService.init(requestJSONObject);
final UserQueryService userQueryService = getUserQueryService();
Assert.assertNotNull(userQueryService.getUserByEmail("test@gmail.com"));
}
/**
* showIndex.
*
* @throws Exception exception
*/
@Test(dependsOnMethods = "init")
public void showIndex() throws Exception {
final HttpServletRequest request = mock(HttpServletRequest.class);
when(request.getServletContext()).thenReturn(mock(ServletContext.class));
when(request.getRequestURI()).thenReturn("");
when(request.getMethod()).thenReturn("GET");
when(request.getAttribute(Keys.TEMAPLTE_DIR_NAME)).thenReturn("next");
when(request.getAttribute(Keys.HttpRequest.START_TIME_MILLIS)).thenReturn(System.currentTimeMillis());
final MockDispatcherServlet dispatcherServlet = new MockDispatcherServlet();
dispatcherServlet.init();
final StringWriter stringWriter = new StringWriter();
final PrintWriter printWriter = new PrintWriter(stringWriter);
final HttpServletResponse response = mock(HttpServletResponse.class);
when(response.getWriter()).thenReturn(printWriter);
dispatcherServlet.service(request, response);
final String content = stringWriter.toString();
Assert.assertTrue(StringUtils.contains(content, "<title>Solo 示例</title>"));
}
/**
* showKillBrowser.
*
* @throws Exception exception
*/
@Test(dependsOnMethods = "init")
public void showKillBrowser() throws Exception {
final HttpServletRequest request = mock(HttpServletRequest.class);
when(request.getServletContext()).thenReturn(mock(ServletContext.class));
when(request.getRequestURI()).thenReturn("/kill-browser");
when(request.getMethod()).thenReturn("GET");
when(request.getAttribute(Keys.TEMAPLTE_DIR_NAME)).thenReturn("next");
when(request.getAttribute(Keys.HttpRequest.START_TIME_MILLIS)).thenReturn(System.currentTimeMillis());
final MockDispatcherServlet dispatcherServlet = new MockDispatcherServlet();
dispatcherServlet.init();
final StringWriter stringWriter = new StringWriter();
final PrintWriter printWriter = new PrintWriter(stringWriter);
final HttpServletResponse response = mock(HttpServletResponse.class);
when(response.getWriter()).thenReturn(printWriter);
dispatcherServlet.service(request, response);
final String content = stringWriter.toString();
Assert.assertTrue(StringUtils.contains(content, "<title>Solo 示例</title>"));
}
/**
* register.
*
* @throws Exception exception
*/
@Test(dependsOnMethods = "init")
public void register() throws Exception {
final HttpServletRequest request = mock(HttpServletRequest.class);
when(request.getServletContext()).thenReturn(mock(ServletContext.class));
when(request.getRequestURI()).thenReturn("/register");
when(request.getMethod()).thenReturn("GET");
when(request.getAttribute(Keys.TEMAPLTE_DIR_NAME)).thenReturn("next");
when(request.getAttribute(Keys.HttpRequest.START_TIME_MILLIS)).thenReturn(System.currentTimeMillis());
final MockDispatcherServlet dispatcherServlet = new MockDispatcherServlet();
dispatcherServlet.init();
final StringWriter stringWriter = new StringWriter();
final PrintWriter printWriter = new PrintWriter(stringWriter);
final HttpServletResponse response = mock(HttpServletResponse.class);
when(response.getWriter()).thenReturn(printWriter);
dispatcherServlet.service(request, response);
final String content = stringWriter.toString();
Assert.assertTrue(StringUtils.contains(content, "<title>Solo 示例</title>"));
}
}
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path=""/>
A Java blogging system, feel free to create your or your team own blog.
Project home: https://github.com/b3log/solo
Request features/Report bugs: https://github.com/b3log/solo/issues/new
* QQ Qun: 13139268
* User Guide: https://github.com/b3log/solo/wiki/Pre_installation
* Dev Guide: https://github.com/b3log/solo/wiki/Pre_dev
* Skin Dev Guide: https://github.com/b3log/solo/wiki/Develop_steps
* Plugin Dev Guide: https://docs.google.com/document/pub?id=15H7Q3EBo-44v61Xp_epiYY7vK_gPJLkQaT7T1gkE64w&pli=1
====
B3log Index: http://b3log.org
B3log Team: https://github.com/b3log/solo/wiki/About_us
Join B3log Team: https://github.com/b3log/solo/wiki/Join_us
====
平等,自由,奔放
Equality, Freedom, Passion
;-)
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010-2016, b3log.org & hacpai.com
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: Cron job configurations.
Version: 1.0.1.5, Nov 5, 2015
Author: Liang Ding
-->
<cronentries>
<cron>
<url>/console/stat/onlineVisitorRefresh</url>
<description>Online Visitor Refresher</description>
<schedule>every 60 minutes</schedule>
</cron>
<cron>
<url>/blog/symphony/user</url>
<description>Sync user to https://hacpai.com</description>
<schedule>every 24 hours</schedule>
</cron>
</cronentries>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010-2016, b3log.org & hacpai.com
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: Task queue configurations.
Version: 2.0.1.2, Jan 8, 2016
Author: Liang Ding
-->
<queue-entries>
<queue>
<name>fix-queue</name>
<rate>20/m</rate>
<retry-parameters>
<task-retry-limit>7</task-retry-limit>
</retry-parameters>
</queue>
</queue-entries>
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2010-2016, b3log.org & hacpai.com
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: Static resources definition.
Version: 2.7.5.6, Aug 26, 2016
Author: Liang Ding
-->
<static-files>
<!-- Uses the STANDARD Ant Path Pattern to configure these paths! -->
<include path="/favicon.ico" />
<include path="/favicon.png" />
<include path="/robots.txt" />
<include path="/js/**.js" />
<include path="/js/**/*.js" />
<include path="/js/**.css" />
<include path="/js/**/*.css" />
<include path="/js/**.htm" />
<include path="/js/**/*.htm" />
<include path="/js/**.html" />
<include path="/js/**/*.html" />
<include path="/js/**.gif" />
<include path="/js/**/*.gif" />
<include path="/js/**.png" />
<include path="/js/**/*.png" />
<include path="/js/**.jpg" />
<include path="/js/**/*.jpg" />
<include path="/skins/**.css" />
<include path="/skins/**.css.map" />
<include path="/skins/**/*.css" />
<include path="/skins/**/*.css.map" />
<include path="/skins/**.js" />
<include path="/skins/**/*.js" />
<include path="/skins/**.png" />
<include path="/skins/**/*.png" />
<include path="/skins/**.jpg" />
<include path="/skins/**/*.jpg" />
<include path="/skins/**.swf" />
<include path="/skins/**/*.swf" />
<include path="/skins/**.gif" />
<include path="/skins/**/*.gif" />
<include path="/skins/**/*.eot" />
<include path="/skins/**/*.svg" />
<include path="/skins/**/*.ttf" />
<include path="/skins/**/*.woff" />
<include path="/css/**.css" />
<include path="/css/**/*.css" />
<include path="/css/fonts/*.eot" />
<include path="/css/fonts/*.svg" />
<include path="/css/fonts/*.ttf" />
<include path="/css/fonts/*.woff" />
<include path="/images/**.png" />
<include path="/images/**/*.png" />
<include path="/images/**.jpg" />
<include path="/images/**/*.jpg" />
<include path="/images/**.gif" />
<include path="/images/**/*.gif" />
<include path="/plugins/**.css" />
<include path="/plugins/**/*.css" />
<include path="/plugins/**.js" />
<include path="/plugins/**/*.js" />
<include path="/plugins/**.png" />
<include path="/plugins/**/*.png" />
<include path="/plugins/**.jpg" />
<include path="/plugins/**/*.jpg" />
<include path="/plugins/**.swf" />
<include path="/plugins/**/*.swf" />
<include path="/plugins/**.gif" />
<include path="/plugins/**/*.gif" />
<include path="/plugins/**.html" />
<include path="/plugins/**/*.html" />
<include path="/plugins/**.htm" />
<include path="/plugins/**/*.htm" />
<include path="/CHANGE_LOGS.html" />
<include path="/README.txt" />
<include path="/LICENSE.txt" />
</static-files>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010-2016, b3log.org & hacpai.com
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: Solo web deployment descriptor.
Version: 1.0.5.1, Sep 27, 2013
Author: Liang Ding
-->
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<listener>
<listener-class>org.b3log.solo.SoloServletListener</listener-class>
</listener>
<filter>
<filter-name>EncodingFilter</filter-name>
<filter-class>org.b3log.latke.servlet.filter.EncodingFilter</filter-class>
<init-param>
<param-name>requestEncoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>responseEncoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>EncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>AuthFilter</filter-name>
<filter-class>org.b3log.solo.filter.AuthFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>AuthFilter</filter-name>
<url-pattern>/admin-index.do</url-pattern>
<url-pattern>/admin-main.do</url-pattern>
<url-pattern>/admin-article.do</url-pattern>
<url-pattern>/admin-article-list.do</url-pattern>
<url-pattern>/admin-comment-list.do</url-pattern>
<url-pattern>/admin-link-list.do</url-pattern>
<url-pattern>/admin-preference.do</url-pattern>
<url-pattern>/admin-page-list.do</url-pattern>
<url-pattern>/admin-others.do</url-pattern>
<url-pattern>/admin-draft-list.do</url-pattern>
<url-pattern>/admin-user-list.do</url-pattern>
<url-pattern>/admin-plugin-list.do</url-pattern>
<url-pattern>/admin-about.do</url-pattern>
<url-pattern>/rm-all-data.do</url-pattern>
<url-pattern>/fix/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>PermalinkFilter</filter-name>
<filter-class>org.b3log.solo.filter.PermalinkFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PermalinkFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>InitCheckFilter</filter-name>
<filter-class>org.b3log.solo.filter.InitCheckFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>InitCheckFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<session-config>
<session-timeout>
5
</session-timeout>
</session-config>
<servlet>
<servlet-name>DispatcherServlet</servlet-name>
<servlet-class>org.b3log.latke.servlet.DispatcherServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>DispatcherServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<!-- Error Pages -->
<error-page>
<error-code>404</error-code>
<location>/error/404.html</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/error/403.html</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/error/500.html</location>
</error-page>
</web-app>
<style>
.about-developer .developer-title{
float: left;
width: 300px;
margin-left: 12px;
}
.about-developer .contributor-title{
margin-left: 18px;
float: left;
width: 300px;
margin-left: 12px;
}
.about-developer .developer-body{
float: left;
width: 300px;
}
.about-developer .contributor-body{
margin-left: 18px;
float: left;
width: 300px;
}
.about-developer .about-body ul{
width: 230px;
}
.about-developer .about-body ul li{
width: 100px;
float: left;
display: block;
}
</style>
<div class="module-panel">
<div class="module-header">
<h2>${aboutLabel}</h2>
</div>
<div class="module-body padding12">
<div class="about-logo">
<a href="http://b3log.org" target="_blank">
<img src="${staticServePath}/images/logo.png" alt="Solo" title="Solo" />
</a>
</div>
<div class="left" style="width: 73%">
<div id="aboutLatest" class="about-margin">${checkingVersionLabel}</div>
${aboutContentLabel}
</div>
<span class="clear" />
</div>
<div class="module-body padding12 about-developer">
<div class="about-logo">
<!-- <a href="http://b3log.org" target="_blank">
<img src="${staticServePath}/images/developers.jpg" alt="Solo" title="Solo" />
</a>-->
<div style="width: 156px; height: 56px;"></div>
</div>
<div class="about-body">
<div class="left" style="width: 73%">
<div class="about-margin developer-title">${developersLabel}</div>
<div class="about-margin contributor-title">${contributorsLabel}</div>
</div>
<div class="left" style="width: 73%">
<div class="developer-body">
<ul>
<li><a target="_blank" href="http://88250.b3log.org">D</a></li>
<li><a target="_blank" href="http://vanessa.b3log.org">V</a></li>
<li><a target="_blank" href="mailto:wmainlove@gmail.com">mainlove</a></li>
<li><a target="_blank" href="http://people.apache.org/%7Edongxu">DX</a></li>
<li><a target="_blank" href="http://mizhichashao.com">大叔</a></li>
<li><a target="_blank" href="http://www.jiangzezhou.com">javen.jiang</a></li>
</ul>
</div>
<div class="contributor-body">
<ul>
<li><a target="_blank" href="http://www.ansen.org">An Shen</a></li>
<li><a target="_blank" href="http://www.bestck.net">Chevo</a></li>
<li><a target="_blank" href="https://github.com/paul-luo">破生</a></li>
<li><a target="_blank" href="http://xxk.b3log.org">宋诗献</a></li>
<li><a target="_blank" href="http://www.mynah.org">Lamb</a></li>
<li><a target="_blank" href="https://github.com/xiaomogui">大姨夫</a></li>
</ul>
</div>
</div>
</div>
<span class="clear" />
</div>
</div>
${plugins}
<div id="articleTable">
</div>
<div id="articlePagination" class="right margin12">
</div>
<div id="articleComments" class="none">
</div>
<div class="clear"></div>
${plugins}
<div class="form">
<div>
<label>${title1Label}</label>
<input id="title" type="text"/>
</div>
<div>
<label>${content1Label}</label>
<textarea id="articleContent" name="articleContent"
style="height: 500px;width:100%;"></textarea>
</div>
<div>
<label>${uploadFileLabel}</label>
<form id="articleUpload" method="POST" enctype="multipart/form-data">
<input type="file" name="file" multiple=""/>
</form>
</div>
<div>
<label>${tags1WithTips1Label}</label>
<input id="tag" type="text"/>
</div>
<div class="comment-content">
<label>${abstract1Label}</label>
<textarea id="abstract" style="height: 200px;width: 100%;" name="abstract"></textarea>
</div>
<div>
<div class="left">
<label for="permalink">${permalink1Label}</label>
<input id="permalink" type="text" style="width: 416px;" />
</div>
<div class="right">
<label for="viewPwd">${articleViewPwd1Label}</label>
<input id="viewPwd" type="text" style="width: 156px" />
</div>
<div class="clear"></div>
</div>
<div>
<span class="signs">
<label>${sign1Label}</label>
<button style="margin-left: 0px;" id="articleSign1" class="selected">${signLabel} 1</button>
<button id="articleSign2">${signLabel} 2</button>
<button id="articleSign3">${signLabel} 3</button>
<button id="articleSign0">${noSignLabel}</button>
</span>
<div class="right">
<label for="articleCommentable">${allowComment1Label}</label>
<input type="checkbox" id="articleCommentable" checked="checked" />
<span id="postToCommunityPanel" class="none">
<label for="postToCommunity">
<a class="no-underline" href="https://hacpai.com/article/1440573175609" target="_blank">${postToCommunityLabel}</a>
</label>
<input id="postToCommunity" type="checkbox" checked="checked"/>
</span>
</div>
<div class="clear"></div>
</div>
<div class="right">
<button class="marginRight12" id="saveArticle">${saveLabel}</button>
<button id="submitArticle">${publishLabel}</button>
<button id="unSubmitArticle" class="none" onclick="admin.article.unPublish();">${unPublishLabel}</button>
</div>
<div class="clear"></div>
</div>
${plugins}
\ No newline at end of file
<div id="commentTable">
</div>
<div id="commentPagination" class="right margin12">
</div>
<div class="clear"></div>
${plugins}
\ No newline at end of file
<div id="draftTable">
</div>
<div id="draftPagination" class="right margin12">
</div>
<div class="clear"></div>
<div id="draftComments" class="none">
</div>
${plugins}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="robots" content="none" />
<title>${blogTitle} - ${adminConsoleLabel}</title>
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-base${miniPostfix}.css?${staticResourceVersion}" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-admin${miniPostfix}.css?${staticResourceVersion}" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/js/lib/CodeMirrorEditor/codemirror.min.css?${staticResourceVersion}" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/js/lib/highlight/styles/github.css?${staticResourceVersion}" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body onhashchange="admin.setCurByHash();">
<div class="tip"><span id="loadMsg">${loadingLabel}</span></div>
<div class="tip tip-msg"><span id="tipMsg"></span></div>
<div id="allPanel">
<div id="top">
<a href="http://b3log.org" target="_blank" class="hover">
Solo
</a>
<span class="right">
<a href="${servePath}" title='${indexLabel}'>${indexLabel}</a><a href='javascript:admin.logout();' title='${logoutLabel}'>${logoutLabel}</a>
</span>
</div>
<div id="tabs">
<ul>
<li>
<div id="tabs_main">
<a href="#main">
<span class="icon-refresh"></span> ${adminIndexLabel}
</a>
</div>
</li>
<li>
<div id="tabArticleTitle" class="tab-current" onclick="admin.collapseNav(this)">
<span class="icon-article"></span>
${articleLabel}
<span class="icon-chevron-up right"></span>
</div>
<ul id="tabArticleMgt">
<li>
<div id="tabs_article">
<a href="#article/article" onclick="admin.article.prePost()">${postArticleLabel}</a>
</div>
</li>
<li>
<div id="tabs_article-list">
<a href="#article/article-list">${articleListLabel}</a>
</div>
</li>
<li>
<div id="tabs_draft-list">
<a href="#article/draft-list">${draftListLabel}</a>
</div>
</li>
</ul>
</li>
<li>
<div id="tabs_comment-list">
<a href="#comment-list">
<span class="icon-cmts"></span> ${commentListLabel}
</a>
</div>
</li>
<li>
<div id="tabToolsTitle" onclick="admin.collapseNav(this)">
<span class="icon-setting"></span>
${ToolLabel}
<span class="icon-chevron-down right"></span>
</div>
<ul class="none" id="tabTools">
<li>
<div id="tabs_preference">
<a href="#tools/preference">${preferenceLabel}</a>
</div>
</li>
<li>
<div id="tabs_page-list">
<a href="#tools/page-list">${navMgmtLabel}</a>
</div>
</li>
<li>
<div id="tabs_link-list">
<a href="#tools/link-list">${linkManagementLabel}</a>
</div>
</li>
<li>
<div id="tabs_user-list">
<a href="#tools/user-list">${userManageLabel}</a>
</div>
</li>
<li>
<div id="tabs_plugin-list">
<a href="#tools/plugin-list">${pluginMgmtLabel}</a>
</div>
</li>
<li>
<div id="tabs_others">
<a href="#tools/others">${othersLabel}</a>
</div>
</li>
</ul>
</li>
<li>
<div id="tabs_about">
<a href="#about">
<span class="icon-info"></span> ${aboutLabel}
</a>
</div>
</li>
</ul>
</div>
<div id="tabsPanel">
<div id="tabsPanel_main" class="none"></div>
<div id="tabsPanel_article" class="none"></div>
<div id="tabsPanel_article-list" class="none"></div>
<div id="tabsPanel_draft-list" class="none"></div>
<div id="tabsPanel_link-list" class="none"></div>
<div id="tabsPanel_preference" class="none"></div>
<div id="tabsPanel_page-list" class="none"></div>
<div id="tabsPanel_others" class="none"></div>
<div id="tabsPanel_user-list" class="none"></div>
<div id="tabsPanel_comment-list" class="none"></div>
<div id="tabsPanel_plugin-list" class="none"></div>
<div id="tabsPanel_about" class="none"></div>
</div>
<div class="clear"></div>
<div class="footer">
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a><a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version}
</div>
</div>
<script src="${staticServePath}/js/lib/compress/admin-lib.min.js"></script>
<script src="${staticServePath}/js/lib/tiny_mce/tiny_mce.js"></script>
<script src="${staticServePath}/js/common${miniPostfix}.js"></script>
<#if "" == miniPostfix>
<script src="${staticServePath}/js/admin/admin.js"></script>
<script src="${staticServePath}/js/admin/editor.js"></script>
<script src="${staticServePath}/js/admin/editorTinyMCE.js"></script>
<script src="${staticServePath}/js/admin/editorKindEditor.js"></script>
<script src="${staticServePath}/js/admin/editorCodeMirror.js"></script>
<script src="${staticServePath}/js/admin/tablePaginate.js"></script>
<script src="${staticServePath}/js/admin/article.js"></script>
<script src="${staticServePath}/js/admin/comment.js"></script>
<script src="${staticServePath}/js/admin/articleList.js"></script>
<script src="${staticServePath}/js/admin/draftList.js"></script>
<script src="${staticServePath}/js/admin/pageList.js"></script>
<script src="${staticServePath}/js/admin/others.js"></script>
<script src="${staticServePath}/js/admin/linkList.js"></script>
<script src="${staticServePath}/js/admin/preference.js"></script>
<script src="${staticServePath}/js/admin/pluginList.js"></script>
<script src="${staticServePath}/js/admin/userList.js"></script>
<script src="${staticServePath}/js/admin/commentList.js"></script>
<script src="${staticServePath}/js/admin/plugin.js"></script>
<script src="${staticServePath}/js/admin/main.js"></script>
<script src="${staticServePath}/js/admin/about.js"></script>
<#else>
<script src="${staticServePath}/js/admin/latkeAdmin${miniPostfix}.js?${staticResourceVersion}"></script>
</#if>
<#include "admin-label.ftl">
${plugins}
<script >
admin.inited();
</script>
</body>
</html>
\ No newline at end of file
<script type="text/javascript">
var latkeConfig = {
"staticServePath": "${staticServePath}",
"servePath": "${servePath}"
};
var qiniu = {
"qiniuUploadToken": "${qiniuUploadToken}",
"qiniuDomain": "${qiniuDomain}"
};
var Label = {
"skinDirName": "${skinDirName}",
"editorType": "${editorType}",
"userRole": "${userRole}",
"PAGE_SIZE": "${articleListDisplayCount}",
"WINDOW_SIZE": "${articleListPaginationWindowSize}",
"localeString": "${localeString}",
"version": "${version}",
"miniPostfix": "${miniPostfix}",
"reportIssueLabel": "please report this issue on https://github.com/b3log/solo/issues/new",
"noDataLabel": "${noDataLabel}",
"linkDescriptionLabel": "${linkDescriptionLabel}",
"addressInvalidLabel": "${addressInvalidLabel}",
"selectLabel": "${selectLabel}",
"outOfDateLabel": "${outOfDateLabel}",
"upToDateLabel": "${upToDateLabel}",
"commentContentLabel": "${commentContentLabel}",
"loadingLabel": "${loadingLabel}",
"noCommentLabel": "${noCommentLabel}",
"confirmRemoveLabel": "${confirmRemoveLabel}",
"removeLabel": "${removeLabel}",
"cancelPutTopLabel": "${cancelPutTopLabel}",
"putTopLabel": "${putTopLabel}",
"viewLabel": "${viewLabel}",
"updateLabel": "${updateLabel}",
"commentLabel": "${commentLabel}",
"titleLabel": "${titleLabel}",
"tagsLabel": "${tagsLabel}",
"authorLabel": "${authorLabel}",
"createDateLabel": "${createDateLabel}",
"previousPageLabel": "${previousPageLabel}",
"pageLabel": "${pageLabel}",
"nextPagePabel": "${nextPagePabel}",
"gotoLabel": "${gotoLabel}",
"fileNameLabel": "${fileNameLabel}",
"uploadDateLabel": "${uploadDateLabel}",
"sizeLabel": "${sizeLabel}",
"downloadCountLabel": "${downloadCountLabel}",
"downloadLabel": "${downloadLabel}",
"permalinkLabel": "${permalinkLabel}",
"titleEmptyLabel": "${titleEmptyLabel}",
"contentEmptyLabel": "${contentEmptyLabel}",
"linkTitleLabel": "${linkTitleLabel}",
"urlLabel": "${urlLabel}",
"addressEmptyLabel": "${addressEmptyLabel}",
"pluginNameLabel": "${pluginNameLabel}",
"statusLabel": "${statusLabel}",
"versionLabel": "${versionLabel}",
"commentNameLabel": "${commentNameLabel}",
"commentEmailLabel": "${commentEmailLabel}",
"roleLabel": "${roleLabel}",
"administratorLabel": "${administratorLabel}",
"duplicatedEmailLabel": "${duplicatedEmailLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"noSettingLabel": "${noSettingLabel}",
"blogEmptyLabel": "${blogEmptyLabel}",
"sumLabel": "${sumLabel}",
"countLabel": "${countLabel}",
"blogArticleEmptyLabel": "${blogArticleEmptyLabel}",
"importSuccLabel": "${importSuccLabel}",
"categoryLabel": "${categoryLabel}",
"importedLabel": "${importedLabel}",
"passwordEmptyLabel": "${passwordEmptyLabel}",
"tagsEmptyLabel": "${tagsEmptyLabel}",
"abstractEmptyLabel": "${abstractEmptyLabel}",
"commonUserLabel": "${commonUserLabel}",
"articleLabel": "${articleLabel}",
"enabledLabel": "${enabledLabel}",
"disabledLabel": "${disabledLabel}",
"signIsNullLabel": "${signIsNullLabel}",
"editorLeaveLabel": "${editorLeaveLabel}",
"editorPostLabel": "${editorPostLabel}",
"enableLabel": "${enableLabel}",
"disableLabel": "${disableLabel}",
"settingLabel": "${settingLabel}",
"linkEmptyLabel": "${linkEmptyLabel}",
"openMethodLabel": "${openMethodLabel}",
"typeLabel": "${typeLabel}",
"markdownHelpLabel": "${markdownHelpLabel}",
"notFoundLabel": "${notFoundLabel}",
"em00Label": "${em00Label}",
"em01Label": "${em01Label}",
"em02Label": "${em02Label}",
"em03Label": "${em03Label}",
"em04Label": "${em04Label}",
"em05Label": "${em05Label}",
"em06Label": "${em06Label}",
"em07Label": "${em07Label}",
"em08Label": "${em08Label}",
"em09Label": "${em09Label}",
"em10Label": "${em10Label}",
"em11Label": "${em11Label}",
"em12Label": "${em12Label}",
"em13Label": "${em13Label}",
"em14Label": "${em14Label}",
"paramSettingsLabel": "${paramSettingsLabel}",
"nonNegativeIntegerOnlyLabel": "${nonNegativeIntegerOnlyLabel}",
"indexTagDisplayCntLabel": "${indexTagDisplayCntLabel}",
"indexRecentCommentDisplayCntLabel": "${indexRecentCommentDisplayCntLabel}",
"indexMostCommentArticleDisplayCntLabel": "${indexMostCommentArticleDisplayCntLabel}",
"indexMostViewArticleDisplayCntLabel": "${indexMostViewArticleDisplayCntLabel}",
"pageSizeLabel": "${pageSizeLabel}",
"windowSizeLabel": "${windowSizeLabel}",
"randomArticlesDisplayCntLabel": "${randomArticlesDisplayCntLabel}",
"relevantArticlesDisplayCntLabel": "${relevantArticlesDisplayCntLabel}",
"externalRelevantArticlesDisplayCntLabel": "${externalRelevantArticlesDisplayCntLabel}",
"nameTooLongLabel": "${nameTooLongLabel}",
"navLabel": "${navLabel}",
"userLabel": "${userLabel}",
"changeRoleLabel": "${changeRoleLabel}",
"visitorUserLabel": "${visitorUserLabel}",
"autoSaveLabel": "${autoSaveLabel}"
};
admin.init();
</script>
\ No newline at end of file
<div>
<div id="linkTable"></div>
<div id="linkPagination" class="margin12 right"></div>
</div>
<div class="clear"></div>
<table class="form" width="100%" cellpadding="0px" cellspacing="9px">
<thead>
<tr>
<th style="text-align: left" colspan="2">
${addLinkLabel}
</th>
</tr>
</thead>
<tbody>
<tr>
<th width="48px">
${linkTitle1Label}
</th>
<td>
<input id="linkTitle" type="text"/>
</td>
</tr>
<tr>
<th>
${url1Label}
</th>
<td>
<input id="linkAddress" type="text"/>
</td>
</tr>
<tr>
<th>
${linkDescription1Label}
</th>
<td>
<input id="linkDescription" type="text"/>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<button onclick="admin.linkList.add();">${saveLabel}</button>
</td>
</tr>
</tbody>
</table>
<div id="updateLink" class="none">
<table class="form" width="100%" cellpadding="0px" cellspacing="9px">
<thead>
<tr>
<th style="text-align: left" colspan="2">
${updateLinkLabel}
</th>
</tr>
</thead>
<tbody>
<tr>
<th width="48px">
${linkTitle1Label}
</th>
<td>
<input id="linkTitleUpdate" type="text"/>
</td>
</tr>
<tr>
<th>
${url1Label}
</th>
<td>
<input id="linkAddressUpdate" type="text"/>
</td>
</tr>
<tr>
<th>
${linkDescription1Label}
</th>
<td>
<input id="linkDescriptionUpdate" type="text"/>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<button onclick="admin.linkList.update();">${updateLabel}</button>
</td>
</tr>
</tbody>
</table>
</div>
${plugins}
\ No newline at end of file
<div id="mainPanel1"></div>
<div id="mainPanel2"></div>
${plugins}
<div id="tabOthers" class="sub-tabs">
<ul>
<li>
<div id="tabOthers_email">
<a class="tab-current" href="#tools/others/email">${replayEmailTemplateLabel}</a>
</div>
</li>
<li>
<div id="tabOthers_other">
<a href="#tools/others/other">${othersLabel}</a>
</div>
</li>
</ul>
</div>
<div id="tabOthersPanel" class="sub-tabs-main">
<div id="tabOthersPanel_email">
<table class="form" width="98%" cellpadding="0" cellspacing="9px">
<tbody>
<tr>
<th width="90px" valign="top">
<label for="replayEmailTemplateTitle">${emailSubject1Label}</label>
</th>
<td>
<input id="replayEmailTemplateTitle" type="text" />
</td>
<td rowspan="2" valign="top" width="260px">
<div class="marginLeft12">
${replayEmailExplanationLabel}
</div>
</td>
</tr>
<tr>
<th valign="top">
<label for="replayEmailTemplateBody">${emailContent1Label}</label>
</th>
<td>
<textarea rows="9" id="replayEmailTemplateBody"></textarea>
</td>
</tr>
<tr>
<td colspan="3" align="right">
<button onclick="admin.others.update()">${updateLabel}</button>
</td>
</tr>
</tbody>
</table>
</div>
<div id="tabOthersPanel_other" class="none">
<button class="margin12" onclick="admin.others.removeUnusedTags();">${removeUnusedTagsLabel}</button>
<#if isMySQL>
<button class="margin12" onclick="admin.others.exportSQL();">${exportSQLLabel}</button>
</#if>
</div>
</div>
${plugins}
<div>
<div id="pageTable">
</div>
<div id="pagePagination" class="margin12 right">
</div>
<div class="clear"></div>
</div>
<div class="form">
<div>
<label>${title1Label}</label>
<input id="pageTitle" type="text"/>
</div>
<div>
<label>${permalink1Label}</label>
<input id="pagePermalink" type="text"/>
</div>
<div>
<label>${openMethod1Label}</label>
<select id="pageTarget">
<option value="_self">${targetSelfLabel}</option>
<option value="_blank">${targetBlankLabel}</option>
<option value="_parent">${targetParentLabel}</option>
<option value="_top">${targetTopLabel}</option>
</select>&nbsp;&nbsp;&nbsp;&nbsp;
<label>${type1Label}</label>
<button data-type="link" class="selected fn-type">${pageLinkLabel}</button>
<button data-type="page" class="fn-type">${pageLabel}</button>
</div>
<div id="pagePagePanel" class="none">
<textarea id="pageContent" style="height: 430px;width: 100%;" name="pageContent"></textarea>
<label>${allowComment1Label}</label>
<input type="checkbox" id="pageCommentable" checked="checked" />
</div>
<div class="right">
<button onclick="admin.pageList.submit();">${saveLabel}</button>
</div>
<div class="clear"></div>
</div>
<div id="pageComments" class="none"></div>
<div class="clear"></div>
${plugins}
<div id="pluginTable">
</div>
<div id="pluginPagination" class="margin12 right">
</div>
<div id="pluginSetting" class="none">
</div>
<div class="clear"></div>
${plugins}
<textarea id="jsoneditor" rows="10" cols="110">
${setting}
</textarea>
<input type="hidden" id="pluginId" value="${oId}">
<button class="marginRight12" id="updateSetting" onclick="updateSetting()">save</button>
<script type="text/javascript">
function updateSetting(){
var pluginId = $("#pluginId").val();
var json = $("#jsoneditor").val();
alert(json);
$("#loadMsg").text(Label.loadingLabel);
var requestJSONObject = {
"oId": pluginId,
"setting":json
};
$.ajax({
url: latkeConfig.servePath + "/console/plugin/updateSetting",
type: "POST",
cache: false,
data: JSON.stringify(requestJSONObject),
success: function(result, textStatus){
$("#tipMsg").text(result.msg);
}
});
}
</script>
This diff is collapsed.
<div>
<div id="userTable"></div>
<div id="userPagination" class="margin12 right"></div>
</div>
<div class="clear"></div>
<table class="form" width="100%" cellpadding="0px" cellspacing="9px">
<thead>
<tr>
<th style="text-align: left" colspan="2">
${addUserLabel}
</th>
</tr>
</thead>
<tbody>
<tr>
<th width="48px">
<label for="userName">${commentName1Label}</label>
</th>
<td>
<input id="userName" type="text"/>
</td>
</tr>
<tr>
<th>
<label for="userEmail">${commentEmail1Label}</label>
</th>
<td>
<input id="userEmail" type="text"/>
</td>
</tr>
<tr>
<th>
<label for="userURL">${userURL1Label}</label>
</th>
<td>
<input id="userURL" type="text"/>
</td>
</tr>
<tr>
<th>
<label for="userPassword">${userPassword1Label}</label>
</th>
<td>
<input id="userPassword" type="password"/>
</td>
</tr>
<tr>
<th>
<label for="userAvatar">${userAvatar1Label}</label>
</th>
<td>
<input id="userAvatar" type="text"/>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<button onclick="admin.userList.add();">${saveLabel}</button>
</td>
</tr>
</tbody>
</table>
<div id="userUpdate" class="none">
<table class="form" width="100%" cellpadding="0px" cellspacing="9px">
<thead>
<tr>
<th style="text-align: left" colspan="2">
${updateUserLabel}
</th>
</tr>
</thead>
<tbody>
<tr>
<th width="48px">
<label for="userNameUpdate">${commentName1Label}</label>
</th>
<td>
<input id="userNameUpdate" type="text"/>
</td>
</tr>
<tr>
<th>
<label for="userEmailUpdate">${commentEmail1Label}</label>
</th>
<td>
<input id="userEmailUpdate" type="text"/>
</td>
</tr>
<tr>
<th>
<label for="userURLUpdate">${userURL1Label}</label>
</th>
<td>
<input id="userURLUpdate" type="text"/>
</td>
</tr>
<tr>
<th>
<label for="userPasswordUpdate">${userPassword1Label}</label>
</th>
<td>
<input id="userPasswordUpdate" type="password"/>
</td>
</tr>
<tr>
<th>
<label for="userAvatarUpdate">${userAvatar1Label}</label>
</th>
<td>
<input id="userAvatarUpdate" type="text"/>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<button onclick="admin.userList.update();">${updateLabel}</button>
</td>
</tr>
</tbody>
</table>
</div>
${plugins}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${articleViewPwdLabel}</title>
<meta name="keywords" content="Solo,Java 博客,开源" />
<meta name="description" content="An open source blog with Java. Java 开源博客" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" />
<meta name="generator" content="Solo" />
<meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" />
<meta name="robots" content="noindex, follow" />
<meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main article-pwd">
<h2>
${articleTitle}
</h2>
<div>
${articleAbstract}
</div>
<#if msg??>
<div>${msg}</div>
</#if>
<form method="POST" action="${servePath}/console/article-pwd">
<label for="pwdTyped">访问密码:</label>
<input type="password" id="pwdTyped" name="pwdTyped" />
<input type="hidden" name="articleId" value="${articleId}" />
<button id="confirm" type="submit">${confirmLabel}</button>
</form>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year} - <a href="${servePath}">${blogTitle}</a><br/>
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a><a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version}
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="robots" content="none" />
<title>${blogTitle} - 403 Forbidden!</title>
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main">
<h2>403 Forbidden!</h2>
<img class="img-403" src="${staticServePath}/images/403.png" alt="403: forbidden" title="403: forbidden" />
<div class="a-403">
<a href="${servePath}">Index</a> |
<a href="${loginURL}">Login</a>
</div>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year}
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a>, ver ${version}
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="robots" content="none" />
<title>${blogTitle} - 404 Not Found!</title>
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content" style="height: 380px;width: 760px">
<script type="text/javascript" src="http://www.qq.com/404/search_children.js?edition=small" charset="utf-8"></script>
</div>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year}
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a>, ver ${version}
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${blogTitle} - 500 Internal Server Error!</title>
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main">
<h2>500 Internal Server Error!</h2>
<img class="img-500" src="${staticServePath}/images/500.png" title="500: internal error" alt="500: internal error" />
<div class="a-500">
Please
<a href="https://github.com/b3log/solo/issues/new">report</a> it to help us.
Return to <a href="${servePath}">Index</a>.
</div>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year}
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a>, ver ${version}
</div>
</div>
</body>
</html>
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${blogTitle}</title>
<meta name="keywords" content="Solo,Java 博客,开源" />
<meta name="description" content="An open source blog with Java. Java 开源博客" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" />
<meta name="generator" content="Solo" />
<meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" />
<meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content" style="top:-6px">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main kill" style="height: 385px;">
${killBrowserLabel}
<br/>
&nbsp; &nbsp;&nbsp; <button onclick="closeIframe();">${closeLabel}</button> &nbsp; &nbsp;
<button onclick="closeIframeForever();">${closeForeverLabel}</button>
<img src='${staticServePath}/images/kill-browser.png' title='Kill IE6' alt='Kill IE6'/>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
</div>
<script>
var closeIframe = function () {
window.parent.$("iframe").prev().remove();
window.parent.$("iframe").remove();
};
var closeIframeForever = function () {
window.parent.Cookie.createCookie("showKill", true, 365);
closeIframe();
};
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${welcomeToSoloLabel} Solo!</title>
<meta name="keywords" content="Solo,Java 博客,开源" />
<meta name="description" content="An open source blog with Java. Java 开源博客" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" />
<meta name="generator" content="Solo" />
<meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" />
<meta name="robots" content="noindex, follow" />
<meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main">
<h2>
${loginLabel}
</h2>
<div class="form">
<label for="userEmail">
${commentEmailLabel}
</label>
<input id="userEmail" tabindex="1" />
<label for="userPassword">
${userPasswordLabel} <a href="/forgot">(${forgotLabel})</a>
</label>
<input type="password" id="userPassword" tabindex="2" />
<button onclick='login();'>${loginLabel}</button>
<span id="tip">${resetMsg}</span>
</div>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year} - <a href="${servePath}">${blogTitle}</a><br/>
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a><a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version}
</div>
</div>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
(function() {
$("#userEmail").focus();
$("#userPassword, #userEmail").keypress(function(event) {
if (13 === event.keyCode) { // Enter pressed
login();
}
});
// if no JSON, add it.
try {
JSON
} catch (e) {
document.write("<script src=\"${staticServePath}/js/lib/json2.js\"><\/script>");
}
})();
var login = function() {
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail" + status).val())) {
$("#tip").text("${mailInvalidLabel}");
$("#userEmail").focus();
return;
}
if ($("#userPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#userPassword").focus();
return;
}
var requestJSONObject = {
"userEmail": $("#userEmail").val(),
"userPassword": $("#userPassword").val()
};
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...")
$.ajax({
url: "${servePath}/login",
type: "POST",
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
error: function() {
// alert("Login error!");
},
success: function(data, textStatus) {
if (!data.isLoggedIn) {
$("#tip").text(data.msg);
return;
}
window.location.href = data.to;
}
});
};
</script>
</body>
</html>
#
# Copyright (c) 2010-2016, b3log.org & hacpai.com
#
# 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: Language configurations(zh_CN) of plugin b3log broadcast.
# Version: 1.0.1.1, Sep 4, 2016
# Author: Liyuan Li
# Author: Liang Ding
#
userBroadcastLabel=User Broadcast
titleLabel1=Title:
linkLabel1=Link:
contentLabel1=Content:
noEmptyLabel=No Empty
submitLabel=Submit
submitErrorLabel=Error
chanceBroadcastLabel1=Time to post:
#
# Copyright (c) 2010-2016, b3log.org & hacpai.com
#
# 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: Language configurations(zh_CN) of plugin b3log broadcast.
# Version: 1.0.0.1, Apr 24, 2013
# Author: Liyuan Li
#
userBroadcastLabel=\u7528\u6237\u5e7f\u64ad
titleLabel1=\u6807\u9898\uff1a
linkLabel1=\u94fe\u63a5\uff1a
contentLabel1=\u5185\u5bb9\uff1a
noEmptyLabel=\u4e0d\u80fd\u4e3a\u7a7a
submitLabel=\u63d0\u4ea4
submitErrorLabel=\u63d0\u4ea4\u5f02\u5e38
chanceBroadcastLabel1=\u5e7f\u64ad\u5269\u4f59\u65f6\u95f4\uff1a
\ No newline at end of file
<link type="text/css" rel="stylesheet" href="${staticServePath}/plugins/b3log-broadcast/style.css"/>
<div id="b3logBroadcastPanel">
<div id="b3logBroadcast">
<div class="module-panel">
<div class="module-header">
<h2 class="left">
<a target="_blank" href="https://hacpai.com/tags/B3log%20Broadcast">
${userBroadcastLabel}
</a>
</h2>
<button class="none right msg"></button>
<span class="clear"></span>
</div>
<div class="module-body padding12">
<div id="b3logBroadcastList">
</div>
</div>
</div>
</div>
<div id="b3logBroadcastDialog" class="form">
<label>${titleLabel1}</label>
<span class="none msg">${noEmptyLabel}</span>
<input type="text" id="b3logBroadcastTitle">
<label>${linkLabel1}</label>
<input type="text" id="b3logBroadcastLink">
<label>${contentLabel1}</label>
<span class="none msg">${noEmptyLabel}</span>
<textarea id="b3logBroadcastContent"></textarea>
<button class="marginTop12">${submitLabel}</button><span class="none msg">${submitErrorLabel}</span>
</div>
</div>
<script type="text/javascript">
plugins.b3logBroadcast = {
init: function() {
$("#loadMsg").text("${loadingLabel}");
// dialog
$("#b3logBroadcastDialog").dialog({
width: 700,
height: 245,
"modal": true,
"hideFooter": true
});
// 打开广播窗口
$("#b3logBroadcast .module-header > button").click(function() {
$("#b3logBroadcastDialog").dialog("open");
});
// 广播提交
$("#b3logBroadcastDialog button").click(function() {
var data = {
"broadcast": {
"title": $("#b3logBroadcastTitle").val().replace(/(^\s*)|(\s*$)/g, ""),
"content": $("#b3logBroadcastContent").val().replace(/(^\s*)|(\s*$)/g, ""),
"link": $("#b3logBroadcastLink").val()
}
};
if (data.broadcast.title === "") {
$("#b3logBroadcastTitle").prev().show();
}
if (data.broadcast.content === "") {
$("#b3logBroadcastContent").prev().show();
}
if (data.broadcast.title === "" || data.broadcast.content === "") {
return;
}
$.ajax({
type: "POST",
url: latkeConfig.servePath + "/console/plugins/b3log-broadcast",
data: JSON.stringify(data),
success: function(result) {
if (result.sc) {
$("#b3logBroadcastTitle").val("");
$("#b3logBroadcastLink").val("");
$("#b3logBroadcastContent").val("");
$("#b3logBroadcastDialog").dialog("close");
$("#b3logBroadcastDialog > button").next().hide();
$("#b3logBroadcastTitle").prev().hide();
$("#b3logBroadcastContent").prev().hide();
broadcastChange();
} else {
$("#b3logBroadcastDialog > button").next().show();
}
}
});
});
// 获取广播
$.ajax({
type: "GET",
url: "https://hacpai.com/apis/broadcasts",
dataType: "jsonp",
jsonp: "callback",
beforeSend: function() {
$("#b3logBroadcastList").css("background",
"url(${staticServePath}/images/loader.gif) no-repeat scroll center center transparent");
},
error: function() {
$("#b3logBroadcastList").html("Loading Symphony broadcasts failed :-(").css("background", "none");
},
success: function(result) {
var articles = result.articles;
if (0 === articles.length) {
return;
}
var listHTML = "<ul>";
for (var i = 0; i < articles.length; i++) {
var article = articles[i];
var articleLiHtml = "<li>"
+ "<a target='_blank' href='" + article.articlePermalink + "'>"
+ article.articleTitle + "</a>&nbsp; <span class='date'>" + $.bowknot.getDate(article.articleCreateTime, 1);
+"</span></li>";
listHTML += articleLiHtml;
}
listHTML += "</ul>";
$("#b3logBroadcastList").html(listHTML).css("background", "none");
},
complete: function(XMLHttpRequest, textStatus) {
$("#loadMsg").text("");
}
});
// 广播机会
var interval;
var broadcastChange = function() {
$.ajax({
type: "GET",
url: latkeConfig.servePath + "/console/plugins/b3log-broadcast/chance",
cache: false,
success: function(result) {
if (result.sc) {
var showCountDown = function() {
var now = new Date();
var leftTime = result.broadcastChanceExpirationTime - now.getTime();
var leftsecond = parseInt(leftTime / 1000);
if (leftsecond < 0) {
$("#b3logBroadcast .module-header > button").hide();
clearInterval(interval);
interval = undefined;
return;
} else {
var minute = Math.floor(leftsecond / 60),
second = Math.floor(leftsecond - minute * 60);
$("#b3logBroadcast .module-header > button").text("${chanceBroadcastLabel1}" + minute + ":" + second).show();
}
};
if (!interval) {
interval = window.setInterval(function() {
showCountDown();
}, 1000);
}
} else {
$("#b3logBroadcast .module-header > button").hide();
clearInterval(interval);
interval = undefined;
}
}
});
};
setInterval(function() {
broadcastChange();
}, 10000);
broadcastChange();
}
};
/*
* 添加插件
*/
admin.plugin.add({
"id": "b3logBroadcast",
"path": "/main/panel2",
"content": $("#b3logBroadcastPanel").html()
});
// 移除现有内容
$("#b3logBroadcastPanel").remove();
</script>
\ No newline at end of file
#
# Copyright (c) 2010-2016, b3log.org & hacpai.com
#
# 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: Description of plugin b3log-broadcast.
# Version: 1.0.0.1, Apr 24, 2013
# Author: Liang Ding
#
rendererId=admin-main.ftl
author=<a href="http://88250.b3log.org">88250</a> & <a href="http://vanessa.b3log.org">Vanessa</a>
name=B3log Broadcast
version=0.0.1
types=ADMIN
classesDirPath=/WEB-INF/classes/
# TODO: libDirPath=/WEB-INF/lib/
pluginClass=
eventListenerClasses=
\ No newline at end of file
/*
* plugin style for b3log-broadcast
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.0.0.1, Apr 24, 2011
*/
#b3logBroadcastDialog input,
#b3logBroadcastDialog textarea {
width: 98%;
}
#b3logBroadcast .module-header > button {
height: 22px;
}
#b3logBroadcastDialog label {
line-height: 30px;
}
#b3logBroadcast .msg,
#b3logBroadcastDialog .msg {
color: #D54121;
}
#b3logBroadcastList ul {
list-style: none;
}
#b3logBroadcastList a {
text-decoration: none;
}
#b3logBroadcastList .date {
color: #686868;
font-size: 12px;
}
\ No newline at end of file
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
.fancybox-wrap,
.fancybox-skin,
.fancybox-outer,
.fancybox-inner,
.fancybox-image,
.fancybox-wrap iframe,
.fancybox-wrap object,
.fancybox-nav,
.fancybox-nav span,
.fancybox-tmp
{
padding: 0;
margin: 0;
border: 0;
outline: none;
vertical-align: top;
}
.fancybox-wrap {
position: absolute;
top: 0;
left: 0;
z-index: 8020;
}
.fancybox-skin {
position: relative;
background: #f9f9f9;
color: #444;
text-shadow: none;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.fancybox-opened {
z-index: 8030;
}
.fancybox-opened .fancybox-skin {
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.fancybox-outer, .fancybox-inner {
position: relative;
}
.fancybox-inner {
overflow: hidden;
}
.fancybox-type-iframe .fancybox-inner {
-webkit-overflow-scrolling: touch;
}
.fancybox-error {
color: #444;
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
margin: 0;
padding: 15px;
white-space: nowrap;
}
.fancybox-image, .fancybox-iframe {
display: block;
width: 100%;
height: 100%;
}
.fancybox-image {
max-width: 100%;
max-height: 100%;
}
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
background-image: url('fancybox_sprite.png');
}
#fancybox-loading {
position: fixed;
top: 50%;
left: 50%;
margin-top: -22px;
margin-left: -22px;
background-position: 0 -108px;
opacity: 0.8;
cursor: pointer;
z-index: 8060;
}
#fancybox-loading div {
width: 44px;
height: 44px;
background: url('fancybox_loading.gif') center center no-repeat;
}
.fancybox-close {
position: absolute;
top: -18px;
right: -18px;
width: 36px;
height: 36px;
cursor: pointer;
z-index: 8040;
}
.fancybox-nav {
position: absolute;
top: 0;
width: 40%;
height: 100%;
cursor: pointer;
text-decoration: none;
background: transparent url('blank.gif'); /* helps IE */
-webkit-tap-highlight-color: rgba(0,0,0,0);
z-index: 8040;
}
.fancybox-prev {
left: 0;
}
.fancybox-next {
right: 0;
}
.fancybox-nav span {
position: absolute;
top: 50%;
width: 36px;
height: 34px;
margin-top: -18px;
cursor: pointer;
z-index: 8040;
visibility: hidden;
}
.fancybox-prev span {
left: 10px;
background-position: 0 -36px;
}
.fancybox-next span {
right: 10px;
background-position: 0 -72px;
}
.fancybox-nav:hover span {
visibility: visible;
}
.fancybox-tmp {
position: absolute;
top: -99999px;
left: -99999px;
visibility: hidden;
max-width: 99999px;
max-height: 99999px;
overflow: visible !important;
}
/* Overlay helper */
.fancybox-lock {
overflow: hidden !important;
width: auto;
}
.fancybox-lock body {
overflow: hidden !important;
}
.fancybox-lock-test {
overflow-y: hidden !important;
}
.fancybox-overlay {
position: absolute;
top: 0;
left: 0;
overflow: hidden;
display: none;
z-index: 8010;
background: url('fancybox_overlay.png');
}
.fancybox-overlay-fixed {
position: fixed;
bottom: 0;
right: 0;
}
.fancybox-lock .fancybox-overlay {
overflow: auto;
overflow-y: scroll;
}
/* Title helper */
.fancybox-title {
visibility: hidden;
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
position: relative;
text-shadow: none;
z-index: 8050;
}
.fancybox-opened .fancybox-title {
visibility: visible;
}
.fancybox-title-float-wrap {
position: absolute;
bottom: 0;
right: 50%;
margin-bottom: -35px;
z-index: 8050;
text-align: center;
}
.fancybox-title-float-wrap .child {
display: inline-block;
margin-right: -100%;
padding: 2px 20px;
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
background: rgba(0, 0, 0, 0.8);
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
text-shadow: 0 1px 2px #222;
color: #FFF;
font-weight: bold;
line-height: 24px;
white-space: nowrap;
}
.fancybox-title-outside-wrap {
position: relative;
margin-top: 10px;
color: #fff;
}
.fancybox-title-inside-wrap {
padding-top: 10px;
}
.fancybox-title-over-wrap {
position: absolute;
bottom: 0;
left: 0;
color: #fff;
padding: 10px;
background: #000;
background: rgba(0, 0, 0, .8);
}
/*Retina graphics!*/
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min--moz-device-pixel-ratio: 1.5),
only screen and (min-device-pixel-ratio: 1.5){
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
background-image: url('fancybox_sprite@2x.png');
background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/
}
#fancybox-loading div {
background-image: url('fancybox_loading@2x.gif');
background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/
}
}
\ No newline at end of file
This diff is collapsed.
#
# Copyright (c) 2010-2016, b3log.org & hacpai.com
#
# 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: Language configurations(en_US) of plugin fancybox.
# Version: 1.0.0.0, Apr 21, 2012
# Author: Liang Ding
#
#
# Copyright (c) 2010-2016, b3log.org & hacpai.com
#
# 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: Language configurations(zh_CN) of plugin fancybox.
# Version: 1.0.0.0, Apr 21, 2012
# Author: Liang Ding
#
<script type="text/javascript">
(function () {
var $groups = $("a[rel=group]"),
$fancybox = $(".fancybox");
if ($groups.length > 0 || $fancybox.length > 0) {
if (document.createStyleSheet) {
document.createStyleSheet("${staticServePath}/plugins/fancybox/js/jquery.fancybox.css");
} else {
$("head").append($("<link rel='stylesheet' href='${staticServePath}/plugins/fancybox/js/jquery.fancybox.css' type='text/css' charset='utf-8' />"));
}
$.ajax({
url: "${staticServePath}/plugins/fancybox/js/jquery.fancybox.pack.js",
dataType: "script",
cache: true,
complete: function() {
$groups.fancybox({
openEffect : 'none',
closeEffect : 'none',
prevEffect : 'none',
nextEffect : 'none'
});
$fancybox.fancybox({
openEffect : 'none',
closeEffect : 'none',
prevEffect : 'none',
nextEffect : 'none'
});
}
});
}
})();
</script>
#
# Copyright (c) 2010-2016, b3log.org & hacpai.com
#
# 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: Description of plugin fancybox.
# Version: 1.0.0.0, Apr 21, 2012
# Author: Liang Ding
#
rendererId=footer.ftl
author=<a href="http://88250.b3log.org">88250</a>
name=Facybox
version=0.0.1
types=PUBLIC
classesDirPath=/WEB-INF/classes/
# TODO: libDirPath=/WEB-INF/lib/
pluginClass=
eventListenerClasses=
\ No newline at end of file
#
# Copyright (c) 2010-2016, b3log.org & hacpai.com
#
# 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: Table of contents generator.
# Version: 1.0.0.0, May 30, 2014
# Author: Liang Ding
#
rendererId=footer.ftl
author=<a href="http://88250.b3log.org">88250</a>
name=Table of Contents Generator
version=0.0.1
types=PUBLIC
classesDirPath=/WEB-INF/classes/
pluginClass=
eventListenerClasses=org.b3log.solo.plugin.list.ListHandler
\ No newline at end of file
/*
* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 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.
*/
/**
* List plugin style.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.0.0, Jul 14, 2014
*/
.b3-solo-list {
margin: 20px 30px;
list-style: none;
font-size: 0.8em;
}
.b3-solo-list-h1 {
}
.b3-solo-list-h2 {
margin-left: 16px;
}
.b3-solo-list-h3 {
margin-left: 32px;
}
.b3-solo-list-h4 {
margin-left: 48px;
}
.b3-solo-list-h5 {
margin-left: 62px;
}
\ No newline at end of file
#
# Copyright (c) 2010-2016, b3log.org & hacpai.com
#
# 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: Language configurations(en_US) of plugin symphony-interest.
# Version: 1.0.0.1, Feb 20, 2016
# Author: Liang Ding
#
interestLabel=<a href="https://hacpai.com" target="_blank">Interest</a>
\ No newline at end of file
#
# Copyright (c) 2010-2016, b3log.org & hacpai.com
#
# 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: Language configurations(zh_CN) of plugin symphony-interest.
# Version: 1.0.0.1, Feb 20, 2016
# Author: Liang Ding
#
interestLabel=<a href="https://hacpai.com" target="_blank">\u793e\u533a\u63a8\u8350</a>
<link type="text/css" rel="stylesheet" href="${staticServePath}/plugins/symphony-interest/style.css"/>
<div id="symphonyInterestPanel">
<div class="module-panel">
<div class="module-header">
<h2>${interestLabel}</h2>
</div>
<div class="module-body padding12">
<div id="symphonyInterest">
</div>
</div>
</div>
</div>
<script type="text/javascript">
plugins.symphonyInterest = {
init: function () {
$("#loadMsg").text("${loadingLabel}");
$("#symphonyInterest").css("background",
"url(${staticServePath}/images/loader.gif) no-repeat scroll center center transparent");
$.ajax({
url: "${servePath}/blog/interest-tags",
type: "GET",
dataType: "json",
error: function () {
$("#symphonyInterest").html("Loading Interest failed :-(").css("background", "none");
},
success: function (result, textStatus) {
var tags = result.data;
if (0 === tags.length) {
return;
}
$.ajax({
url: "https://hacpai.com/apis/articles?p=1&size=7&tags=" + tags.join(),
type: "GET",
dataType: "jsonp",
jsonp: "callback",
error: function () {
$("#symphonyInterest").html("Loading Interest failed :-(").css("background", "none");
},
success: function (data, textStatus) {
var articles = data.articles;
if (0 === articles.length) {
return;
}
var listHTML = "<ul>";
for (var i = 0; i < articles.length; i++) {
var article = articles[i];
var articleLiHtml = "<li>"
+ "<a target='_blank' href='" + article.articlePermalink + "'>"
+ article.articleTitle + "</a>&nbsp; <span class='date'>" + $.bowknot.getDate(article.articleCreateTime, 1);
+"</span></li>"
listHTML += articleLiHtml
}
listHTML += "</ul>";
$("#symphonyInterest").html(listHTML).css("background", "none");
}
});
}
});
$("#loadMsg").text("");
}
};
/*
* 添加插件
*/
admin.plugin.add({
"id": "symphonyInterest",
"path": "/main/panel1",
"content": $("#symphonyInterestPanel").html()
});
// 移除现有内容
$("#symphonyInterestPanel").remove();
</script>
#
# Copyright (c) 2010-2016, b3log.org & hacpai.com
#
# 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: Description of plugin symphony-interest.
# Version: 1.0.0.0, Dec 17, 2015
# Author: Liang Ding
#
rendererId=admin-main.ftl
author=<a href="http://88250.b3log.org">88250</a>
name=Symphony Interest
version=0.0.1
types=ADMIN
classesDirPath=/WEB-INF/classes/
pluginClass=
eventListenerClasses=
\ No newline at end of file
/*
* plugin style for symphony-interest
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.0.0.1, Aug 9, 2011
*/
#symphonyInterest ul {
list-style: none;
}
#symphonyInterest a {
text-decoration: none;
}
#symphonyInterest .date {
color: #686868;
font-size: 12px;
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${blogTitle}</title>
<meta name="keywords" content="Solo,Java 博客,开源" />
<meta name="description" content="An open source blog with Java. Java 开源博客" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" />
<meta name="generator" content="Solo" />
<meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" />
<meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main register">
<h2>${registerSoloUserLabel}</h2>
<div class="form">
<label for="userEmail">
${commentEmail1Label}
</label>
<input id="userEmail" />
<label for="userName">
${userName1Label}
</label>
<input id="userName" />
<label for="userURL">
${userURL1Label}
</label>
<input id="userURL" />
<label for="userPassword">
${userPassword1Label}
</label>
<input type="password" id="userPassword" />
<label for="userPasswordConfirm">
${userPasswordConfirm1Label}
</label>
<input type="password" id="userPasswordConfirm" />
<button onclick='getUserInfo();'>${saveLabel}</button>
<span id="tip" ></span>
</div>
</div>
<span class="clear"></span>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year} - <a href="${servePath}">${blogTitle}</a><br/>
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a><a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version}
</div>
</div>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
var validate = function() {
var userName = $("#userName").val().replace(/(^\s*)|(\s*$)/g, "");
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail").val())) {
$("#tip").text("${mailInvalidLabel}");
$("#userEmail").focus();
} else if (2 > userName.length || userName.length > 20) {
$("#tip").text("${nameTooLongLabel}");
$("#userName").focus();
} else if ($("#userPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#userPassword").focus();
} else if ($("#userPassword").val() !== $("#userPasswordConfirm").val()) {
$("#tip").text("${passwordNotMatchLabel}");
$("#userPasswordConfirm").focus();
} else {
$("#tip").text("");
return true;
}
return false;
};
var getUserInfo = function() {
if (validate()) {
var requestJSONObject = {
"userName": $("#userName").val(),
"userEmail": $("#userEmail").val(),
"userURL": $("#userURL").val(),
"userPassword": $("#userPassword").val()
};
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...")
$.ajax({
url: "${servePath}" + "/console/user/",
type: "POST",
cache: false,
data: JSON.stringify(requestJSONObject),
success: function(result, textStatus) {
$("#tip").text(result.msg);
if (!result.sc) {
return;
}
setTimeout(function() {
window.location.href = "${servePath}";
}, 1000);
}
})
}
}
$(function() {
$("#userPasswordConfirm").keypress(function(event) {
if (event.keyCode === 13) {
getUserInfo();
}
});
});
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>${forgotLabel} Solo!</title>
<meta name="keywords" content="Solo,Java 博客,开源" />
<meta name="description" content="An open source blog with Java. Java 开源博客" />
<meta name="owner" content="B3log Team"/>
<meta name="author" content="B3log Team"/>
<meta name="generator" content="Solo"/>
<meta name="copyright" content="B3log"/>
<meta name="revised" content="B3log, ${year}"/>
<meta name="robots" content="noindex, follow"/>
<meta http-equiv="Window-target" content="_top"/>
<link type="text/css" rel="stylesheet"
href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8"/>
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png"/>
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log"
src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main">
<h2>
${forgotLabel}
</h2>
<#if "email" == inputType>
<div class="form">
<label for="emailOrPassword">
${commentEmailLabel}
</label>
<input id="emailOrPassword"/>
<button id="sendBtn" onclick='forgot();'>${sendLabel}</button>
<span id="tip"></span>
</div>
<#else>
<div class="form">
<label for="emailOrPassword">
${userPasswordLabel}
</label>
<input id="emailOrPassword"/>
<input type="hidden" id="userEmailHidden" value="${userEmailHidden}" />
<button id="sendBtn" onclick='reset();'>${ok}</button>
<span id="tip"></span>
</div>
</#if>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year} - <a href="${servePath}">${blogTitle}</a><br/>
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a><a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version}
</div>
</div>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
(function() {
$("#emailOrPassword").focus();
$("#emailOrPassword").keypress(function(event) {
if (13 === event.keyCode) { // Enter pressed
$('#sendBtn').click();
}
});
// if no JSON, add it.
try {
JSON
} catch (e) {
document.write("<script src=\"${staticServePath}/js/lib/json2.js\"><\/script>");
}
})();
var reset = function() {
if ($("#emailOrPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#emailOrPassword").focus();
return;
}
var requestJSONObject = {
"newPwd": $("#emailOrPassword").val(),
"userEmail": $("#userEmailHidden").val()
};
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...");
$.ajax({
url: "${servePath}/reset",
type: "POST",
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
error: function() {
// alert("reset password error!");
},
success: function(data, textStatus) {
if (data.succeed) {
window.location.href = data.to;
} else {
$("#tip").text(data.msg);
}
}
});
};
var forgot = function() {
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#emailOrPassword" + status).val())) {
$("#tip").text("${mailInvalidLabel}");
$("#emailOrPassword").focus();
return;
}
var requestJSONObject = {
"userEmail": $("#emailOrPassword").val()
};
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...")
$.ajax({
url: "${servePath}/forgot",
type: "POST",
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
error: function() {
// alert("reset password error!");
},
success: function(data, textStatus) {
if (data.succeed) {
window.location.href = data.to;
} else {
$("#tip").text(data.msg);
}
}
});
};
</script>
</body>
</html>
User-agent: *
Allow: /blog-articles-feed.do
Allow: /tag-articles-feed.do*
Disallow: /*.do
Disallow: /login
Disallow: /logout
Disallow: /authors/*
Disallow: /console/*
Disallow: /error/*
<#include "macro-head.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${archiveDate.archiveDateMonth} ${archiveDate.archiveDateYear} (${archiveDate.archiveDatePublishedArticleCount}) - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${archiveDate.archiveDateYear}${archiveDate.archiveDateMonth}"/>
<meta name="description" content="<#list articles as article>${article.articleTitle}<#if article_has_next>,</#if></#list>"/>
</@head>
</head>
<body class="classic-wptouch-bg ">
<#include "header.ftl">
<div class="content single">
<div class="post">
<h2 class="marginLeft12 marginBottom12">${archive1Label}
<#if "en" == localeString?substring(0, 2)>
${archiveDate.archiveDateMonth} ${archiveDate.archiveDateYear} (${archiveDate.archiveDatePublishedArticleCount})
<#else>
${archiveDate.archiveDateYear} ${yearLabel} ${archiveDate.archiveDateMonth} ${monthLabel} (${archiveDate.archiveDatePublishedArticleCount})
</#if>
</h2>
</div>
</div>
<#include "article-list.ftl">
<#include "footer.ftl">
</body>
</html>
<div class="content">
<div class="result-text"><!--TODO wptouch_core_body_result_text()--></div>
<#list articles as article>
<div class="post" id="post-${article.oId}">
<#if 0 lt article.articleCommentCount>
<div class="comment-bubble">${article.articleCommentCount}</div>
</#if>
<script type="text/javascript">
$wpt(document).ready(function(){
$wpt("a#arrow-${article.oId}").bind( touchStartOrClick, function(e) {
$wpt(this).toggleClass("post-arrow-down");
$wpt('#entry-${article.oId}').wptouchFadeToggle(500);
});
});
</script>
<a class="post-arrow" id="arrow-${article.oId}" href="javascript: return false;"></a>
<div class="calendar">
<div class="cal-month month-${article.articleUpdateDate?string("MM")}">${article.articleUpdateDate?string("MM")}</div>
<div class="cal-date">${article.articleUpdateDate?string("dd")}</div>
</div>
<a rel="bookmark" class="h2" href="${servePath}${article.articlePermalink}">${article.articleTitle}</a>
<div class="post-author">
<span class="lead">By</span> ${article.authorName}<br />
<span class="lead">${tags1Label}</span>
<#list article.articleTags?split(",") as articleTag>
<a rel="tag" href="${servePath}/tags/${articleTag?url('UTF-8')}">
${articleTag}</a><#if articleTag_has_next>,</#if>
</#list>
</div>
<div class="clearer"></div>
<div id="entry-${article.oId}" style="display:none" class="mainentry left-justified">
${article.articleAbstract}
<a class="read-more" href="${servePath}${article.articlePermalink}">${readThisPost}</a>
</div>
</div>
</div>
</#list>
<!--TODO ajax load page
<div id="call${paginationCurrentPageNum}" class="ajax-load-more">
<div id="spinner${paginationCurrentPageNum}" class="spin" style="display:none"></div>
<a class="ajax" href="javascript:void(0)" onclick="$wpt('#spinner${paginationCurrentPageNum}').fadeIn(200); $wpt('#ajaxentries${paginationCurrentPageNum}').load('${path}/${paginationPreviousPageNum}', {}, function(){ $wpt('#call${paginationCurrentPageNum}').fadeOut();});">
Load more entries...
</a>
</div>
<div id="ajaxentries${paginationCurrentPageNum}"></div>
-->
<#if 0 != paginationPageCount>
<div class="ajax-load-more">
<#if 1 != paginationPageNums?first>
<a href="${servePath}${path}/1">${firstPageLabel}</a>
<a id="previousPage" href="${servePath}${path}/${paginationPreviousPageNum}">${previousPageLabel}</a>
</#if>
<#list paginationPageNums as paginationPageNum>
<#if paginationPageNum == paginationCurrentPageNum>
<a href="${servePath}${path}/${paginationPageNum}" class="selected">${paginationPageNum}</a>
<#else>
<a href="${servePath}${path}/${paginationPageNum}">${paginationPageNum}</a>
</#if>
</#list>
<#if paginationPageNums?last != paginationPageCount>
<a id="nextPage" href="${servePath}${path}/${paginationNextPageNum}">${nextPagePabel}</a>
<a href="${servePath}${path}/${paginationPageCount}">${lastPageLabel}</a>
</#if>
&nbsp;&nbsp;${sumLabel} ${paginationPageCount} ${pageLabel}
</div>
</#if>
</div>
\ No newline at end of file
<#include "macro-head.ftl">
<#include "macro-comments.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${article.articleTitle} - ${blogTitle}">
<meta name="keywords" content="${article.articleTags}" />
<meta name="description" content="${article.articleAbstract?html}" />
</@head>
</head>
<body class="classic-wptouch-bg">
<#include "header.ftl">
<div class="content single">
<div class="post">
<a class="sh2" href="${servePath}${article.articlePermalink}" rel="bookmark">${article.articleTitle}</a>
<div class="single-post-meta-top">
<#if article.hasUpdated>
${article.articleUpdateDate?string("yyyy-MM-dd HH:mm:ss")}
<#else>
${article.articleCreateDate?string("yyyy-MM-dd HH:mm:ss")}
</#if>
&rsaquo; ${article.authorName}<br />
<a rel="nofollow" href="#comments">${skipToComment}</a>
</div>
</div>
<div class="clearer"></div>
<div class="post article-body" id="post-${article.oId}">
<div id="singlentry" class="left-justified">
${article.articleContent}
<#if "" != article.articleSign.signHTML?trim>
<div class=""><!--TODO sign class-->
${article.articleSign.signHTML}
</div>
</#if>
</div>
<!-- Categories and Tags post footer -->
<div class="single-post-meta-bottom">
${tags1Label}
<#list article.articleTags?split(",") as articleTag>
<a rel="tag" href="${servePath}/tags/${articleTag?url('UTF-8')}" rel="tag">${articleTag}</a><#if articleTag_has_next>,</#if>
</#list>
</div>
<ul id="post-options">
<#if nextArticlePermalink??>
<li><a href="${servePath}${nextArticlePermalink}" id="oprev"></a></li>
</#if>
<li><a href="mailto:?subject=${article.authorName} - ${article.articleTitle}&body=Check out this post: ${servePath}${article.articlePermalink}" id="omail"></a></li>
<li><a href="javascript:void(0)" onclick="window.open('http://service.weibo.com/share/share.php?url=${servePath}${article.articlePermalink}&title=B3LOG%20-%20${article.articleTitle}', '_blank');" id="otweet"></a></li>
<li><a href="javascript:void(0)" id="obook"></a></li>
<#if previousArticlePermalink??>
<li><a href="${servePath}${previousArticlePermalink}" id="onext"></a></li>
</#if>
</ul>
</div>
<div id="bookmark-box" style="display:none">
<ul>
<li><a href="http://del.icio.us/post?url=${servePath}/?p=12&title=${article.articleTitle}" target="_blank"><img src="${staticServePath}/skins/${skinDirName}/themes/core/core-images/bookmarks/delicious.jpg" alt="" /> Del.icio.us</a></li>
<li><a href="http://digg.com/submit?phase=2&url=${servePath}/?p=12&title=${article.articleTitle}" target="_blank"><img src="${staticServePath}/skins/${skinDirName}/themes/core/core-images/bookmarks/digg.jpg" alt="" /> Digg</a></li>
<li><a href="http://technorati.com/faves?add=${servePath}/?p=12" target="_blank"><img src="${staticServePath}/skins/${skinDirName}/themes/core/core-images/bookmarks/technorati.jpg" alt="" /> Technorati</a></li>
<li><a href="http://ma.gnolia.com/bookmarklet/add?url=${servePath}/?p=12&title=${article.articleTitle}" target="_blank"><img src="${staticServePath}/skins/${skinDirName}/themes/core/core-images/bookmarks/magnolia.jpg" alt="" /> Magnolia</a></li>
<li><a href="http://www.newsvine.com/_wine/save?popoff=0&u=${servePath}/?p=12&h=${article.articleTitle}" target="_blank"><img src="${staticServePath}/skins/${skinDirName}/themes/core/core-images/bookmarks/newsvine.jpg" target="_blank"> Newsvine</a></li>
<li class="noborder"><a href="http://reddit.com/submit?url=${servePath}/?p=12&title=${article.articleTitle}" target="_blank"><img src="${staticServePath}/skins/${skinDirName}/themes/core/core-images/bookmarks/reddit.jpg" alt="" /> Reddit</a></li>
</ul>
</div>
<div id="externalRelevantArticles" class="post"></div>
<@comments commentList=articleComments article=article></@comments>
</div>
<#include "footer.ftl">
<@comment_script oId=article.oId>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles();
</#if>
<#if 0 != relevantArticlesDisplayCount>
page.loadRelevantArticles('${article.oId}', '<h4>${relevantArticles1Label}</h4>');
</#if>
<#if 0 != externalRelevantArticlesDisplayCount>
page.loadExternalRelevantArticles("<#list article.articleTags?split(",") as articleTag>${articleTag}<#if articleTag_has_next>,</#if></#list>");
</#if>
</@comment_script>
</body>
</html>
\ No newline at end of file
<#include "macro-head.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${authorName} - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${authorName}"/>
<meta name="description" content="<#list articles as article>${article.articleTitle}<#if article_has_next>,</#if></#list>"/>
</@head>
</head>
<body class="classic-wptouch-bg ">
<#include "header.ftl">
<div class="content single">
<div class="post">
<h2 >
${author1Label}${authorName}
</h2>
</div>
</div>
<#include "article-list.ftl">
<#include "footer.ftl">
</body>
</html>
<!-- Here we're establishing whether the page was loaded via Ajax or not, for dynamic purposes. If it's ajax, we're not bringing in footer.php -->
<div id="footer">
<center>
<div id="wptouch-switch-link">
<script type="text/javascript">function switch_delayer() { location.reload();}</script>${mobileLabel} <a id="switch-link" onclick="wptouch_switch_confirmation('normal');" href="javascript:void(0)"></a> </div>
</center>
<p><span style="color: gray;">&copy; ${year}</span> - <a href="${servePath}">${blogTitle}</a>${footerContent}</p>
<p>Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a> • <a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version},
Theme by <a rel="friend" href="http://dx.b3log.org" target="_blank">dx</a> &lt
<a rel="friend" href="http://www.bravenewcode.com/products/wptouch-pro">WPtouch</a>.</p>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var latkeConfig = {
"servePath": "${servePath}",
"staticServePath": "${staticServePath}"
};
var Label = {
"skinDirName": "${skinDirName}",
"em00Label": "${em00Label}",
"em01Label": "${em01Label}",
"em02Label": "${em02Label}",
"em03Label": "${em03Label}",
"em04Label": "${em04Label}",
"em05Label": "${em05Label}",
"em06Label": "${em06Label}",
"em07Label": "${em07Label}",
"em08Label": "${em08Label}",
"em09Label": "${em09Label}",
"em10Label": "${em10Label}",
"em11Label": "${em11Label}",
"em12Label": "${em12Label}",
"em13Label": "${em13Label}",
"em14Label": "${em14Label}"
};
$(document).ready(function () {
Util.init();
var toggleArchive = function (it) {
var $it = $(it);
$it.next().slideToggle(260, function () {
var h4Obj = $it.find("h4");
if (this.style.display === "none") {
h4Obj.html("${archiveLabel} +");
} else {
h4Obj.html("${archiveLabel} -");
}
});
}
});
</script>
${plugins}
<!--TODO i18n-->
<!-- New noscript check, we need js on now folks -->
<noscript>
<div id="noscript-wrap">
<div id="noscript">
<h2>Notice</h2>
<p>JavaScript for Mobile Safari is currently turned off.</p>
<p>Turn it on in <em>Settings &rsaquo; Safari</em><br /> to view this website.</p>
</div>
</div>
</noscript>
<!-- Prowl: if DM is sent, let's tell the user what happened -->
<!-- #start The Search Overlay -->
<div id="wptouch-search">
<div id="wptouch-search-inner">
<form target="_blank" id="searchform" action="http://zhannei.baidu.com/cse/site">
<input id="search" placeholder="Search..." type="text" name="q" />
<input type="submit" id="search-submit" value="" />
<input type="hidden" name="cc" value="${serverHost}">
<a href="javascript:void(0)"><img class="head-close" src="${staticServePath}/skins/${skinDirName}/themes/core/core-images/head-close.png" alt="close" /></a>
</form>
</div>
</div>
<div id="wptouch-menu" class="dropper">
<div id="wptouch-menu-inner">
<div id="menu-head">
<div id="tabnav">
<a href="#head-pages"><img src="${staticServePath}/skins/${skinDirName}/images/icon-pool/Pages.png" alt=""/></a>
<a href="#head-tags"><img src="${staticServePath}/skins/${skinDirName}/images/icon-pool/Tags.png" alt=""/></a>
<a href="#head-cats"><img src="${staticServePath}/skins/${skinDirName}/images/icon-pool/Archives.png" alt=""/></a>
</div>
<ul id="head-pages">
<li id="admin" data-login="${isLoggedIn?string}"><a href="${servePath}/admin-index.do#main"><img src="${staticServePath}/skins/${skinDirName}/images/icon-pool/Home.png" alt=""/>Admin</a></li>
<#list pageNavigations as page>
<li><a href="${page.pagePermalink}" target="${page.pageOpenTarget}"><img src="${staticServePath}/skins/${skinDirName}/images/icon-pool/Apps.png" alt=""/>${page.pageTitle}</a></li>
</#list>
<li><a rel="alternate" href="${servePath}/blog-articles-rss.do"><img src="${staticServePath}/skins/${skinDirName}/images/icon-pool/RSS.png" alt="" />RSS Feed</a></li>
</ul>
<ul id="head-tags">
<#if 0 != mostUsedTags?size>
<#list mostUsedTags as tag>
<li><a href="${servePath}/tags/${tag.tagTitle?url('UTF-8')}">${tag.tagTitle} <span>(${tag.tagPublishedRefCount})</span></a></li>
</#list>
</#if>
</ul>
<ul id="head-cats">
<#if 0 != archiveDates?size>
<#list archiveDates as archiveDate>
<li>
<#if "en" == localeString?substring(0, 2)>
<a href="${servePath}/archives/${archiveDate.archiveDateYear}/${archiveDate.archiveDateMonth}">
${archiveDate.monthName} ${archiveDate.archiveDateYear} <span>(${archiveDate.archiveDatePublishedArticleCount})</span></a>
<#else>
<a href="${servePath}/archives/${archiveDate.archiveDateYear}/${archiveDate.archiveDateMonth}">
${archiveDate.archiveDateYear} ${yearLabel} ${archiveDate.archiveDateMonth} ${monthLabel} <span>(${archiveDate.archiveDatePublishedArticleCount})</span></a>
</#if>
</li>
</#list>
</#if>
</ul>
</div>
</div>
</div>
<div id="headerbar">
<div id="headerbar-title">
<!-- This fetches the admin selection logo icon for the header, which is also the bookmark icon -->
<img id="logo-icon" src="${staticServePath}/skins/${skinDirName}/images/icon-pool/Apps.png" alt="aln" />
<a rel="nofollow" href="${servePath}">${blogTitle}</a>
</div>
<div id="headerbar-menu">
<a href="javascript:void(0)"></a>
</div>
</div>
<div id="drop-fade">
<a id="searchopen" class="top" href="javascript:void(0)">${searchLabel}</a>
<!-- #start the Prowl Message Area -->
<div id="prowl-message" style="display:none">
<div id="push-style-bar"></div><!-- filler to get the styling just right -->
<img src="${staticServePath}/skins/${skinDirName}/themes/core/core-images/push-icon.png" alt="push icon" />
<h4>Send a Message</h4>
<p>This message will be pushed to the admin's iPhone instantly.</p><!--TODO instant msg-->
<form id="prowl-direct-message" method="post" action="/blog/">
<p>
<input name="prowl-msg-name" id="prowl-msg-name" type="text" />
<label for="prowl-msg-name">Name</label>
</p>
<p>
<input name="prowl-msg-email" id="prowl-msg-email" type="text" />
<label for="prowl-msg-email">E-Mail</label>
</p>
<textarea name="prowl-msg-message"></textarea>
<input type="hidden" name="wptouch-prowl-message" value="1" />
<input type="hidden" name="_nonce" value="3690953c13" />
<input type="submit" name="prowl-submit" value="Send Now" id="prowl-submit" />
</form>
<div class="clearer"></div>
</div>
</div>
\ No newline at end of file
<#include "macro-head.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${blogTitle}">
<#if metaKeywords??>
<meta name="keywords" content="${metaKeywords}"/>
</#if>
<#if metaDescription??>
<meta name="description" content="${metaDescription}"/>
</#if>
</@head>
</head>
<body class="classic-wptouch-bg">
<#include "header.ftl">
<#include "article-list.ftl">
<#include "footer.ftl">
</body>
</html>
/*
* Copyright (c) 2010-2016, b3log.org & hacpai.com
*
* 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.
*/
function convertEntities(b){var d,a;d=function(c){if(/&[^;]+;/.test(c)){var f=document.createElement("div");f.innerHTML=c;return !f.firstChild?c:f.firstChild.nodeValue}return c};if(typeof b==="string"){return d(b)}else{if(typeof b==="object"){for(a in b){if(typeof b[a]==="string"){b[a]=d(b[a])}}}}return b};
\ No newline at end of file
/*
* Copyright (c) 2010-2016, b3log.org & hacpai.com
*
* 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.
*/
function convertEntities(t){var e,n;if(e=function(t){if(/&[^;]+;/.test(t)){var e=document.createElement("div");return e.innerHTML=t,e.firstChild?e.firstChild.nodeValue:t}return t},"string"==typeof t)return e(t);if("object"==typeof t)for(n in t)"string"==typeof t[n]&&(t[n]=e(t[n]));return t}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<#macro head title>
<meta charset="utf-8" />
<title>${title}</title>
<#nested>
<meta name="author" content="${blogTitle?html}" />
<meta name="generator" content="B3log Solo" />
<meta name="copyright" content="B3log" />
<meta name="owner" content="B3log Team" />
<meta name="revised" content="${blogTitle?html}, ${year}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" />
<meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/themes/default/style.css?${staticResourceVersion}" charset="utf-8" />
<style type="text/css">
#headerbar, #wptouch-login, #wptouch-search {
background: #000000 url(/skins/${skinDirName}/themes/core/core-images/head-fade-bk.png);
}
#headerbar-title, #headerbar-title a {
color: #eeeeee;
}
#wptouch-menu-inner a:hover {
color: #006bb3;
}
#catsmenu-inner a:hover {
color: #006bb3;
}
#drop-fade {
background: #333333;
}
a, h3#com-head {
color: #006bb3;
}
a.h2, a.sh2, .page h2 {
font-family: 'Helvetica Neue';
}
a.h2{
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
</style>
<link href="${servePath}/blog-articles-rss.do" title="RSS" type="application/rss+xml" rel="alternate" />
<link rel="icon" type="image/png" href="${servePath}/favicon.png" />
<script type='text/javascript' src='${staticServePath}/skins/${skinDirName}/js/l10n${miniPostfix}.js?${staticResourceVersion}'></script>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type='text/javascript' src='${staticServePath}/skins/${skinDirName}/themes/core/core.js?${staticResourceVersion}'></script>
<script type="text/javascript">
// Hides the addressbar on non-post pages
function hideURLbar() { window.scrollTo(0,1); }
addEventListener('load', function() { setTimeout(hideURLbar, 0); }, false );
</script>
${htmlHead}
</#macro>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment