Commit 0fce73d3 authored by Liang Ding's avatar Liang Ding

#19 开始使用入口处理

parent 8c365bd6
...@@ -59,7 +59,7 @@ import static org.b3log.solo.model.Article.ARTICLE_CONTENT; ...@@ -59,7 +59,7 @@ import static org.b3log.solo.model.Article.ARTICLE_CONTENT;
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.7.0.12, Jan 2, 2020 * @version 1.7.0.13, Jan 9, 2020
* @since 0.3.1 * @since 0.3.1
*/ */
@Service @Service
...@@ -1081,6 +1081,10 @@ public class DataModelService { ...@@ -1081,6 +1081,10 @@ public class DataModelService {
* @throws ServiceException service exception * @throws ServiceException service exception
*/ */
public String getTopBarHTML(final RequestContext context) throws ServiceException { public String getTopBarHTML(final RequestContext context) throws ServiceException {
if (Solos.GEN_STATIC_SITE) {
return "";
}
Stopwatchs.start("Gens Top Bar HTML"); Stopwatchs.start("Gens Top Bar HTML");
try { try {
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
</a> </a>
</h1> </h1>
<small> &nbsp; ${blogSubtitle}</small> <small> &nbsp; ${blogSubtitle}</small>
<#if !staticSite>
<div class="fn-right"> <div class="fn-right">
<#if isLoggedIn> <#if isLoggedIn>
<a class="fn__flex-inline" href="${servePath}/admin-index.do#main" title="${adminLabel}"> <a class="fn__flex-inline" href="${servePath}/admin-index.do#main" title="${adminLabel}">
...@@ -40,6 +41,7 @@ ...@@ -40,6 +41,7 @@
</a> </a>
</#if> </#if>
</div> </div>
</#if>
</div> </div>
</div> </div>
...@@ -85,6 +87,7 @@ ...@@ -85,6 +87,7 @@
<div class="responsive fn-none"> <div class="responsive fn-none">
<i class="icon-list"></i> <i class="icon-list"></i>
<ul class="list"> <ul class="list">
<#if !staticSite>
<#if isLoggedIn> <#if isLoggedIn>
<li> <li>
<a href="${servePath}/admin-index.do#main" title="${adminLabel}"> <a href="${servePath}/admin-index.do#main" title="${adminLabel}">
...@@ -103,6 +106,7 @@ ...@@ -103,6 +106,7 @@
</a> </a>
</li> </li>
</#if> </#if>
</#if>
<li> <li>
<a href="${servePath}"> <a href="${servePath}">
<i class="icon-home"></i> <i class="icon-home"></i>
......
...@@ -99,6 +99,7 @@ ...@@ -99,6 +99,7 @@
<li> <li>
<a href="${servePath}/search?keyword=">Search</a> <a href="${servePath}/search?keyword=">Search</a>
</li> </li>
<#if !staticSite>
<#if isLoggedIn> <#if isLoggedIn>
<li> <li>
<a href="${servePath}/admin-index.do#main"> <a href="${servePath}/admin-index.do#main">
...@@ -117,6 +118,7 @@ ...@@ -117,6 +118,7 @@
</a> </a>
</li> </li>
</#if> </#if>
</#if>
</ul> </ul>
</div> </div>
</div> </div>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
--> -->
<#macro header type> <#macro header type>
<header class="header header--${type}"> <header class="header header--${type}">
<div class="wrapper header__title"> <div class="wrapper header__title">
<h1 class="header__h1 fn__flex-inline"> <h1 class="header__h1 fn__flex-inline">
<img src="${faviconURL}"> <img src="${faviconURL}">
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
RSS RSS
</a> </a>
<#if !staticSite>
<#if isLoggedIn> <#if isLoggedIn>
<a href="${servePath}/admin-index.do#main"> <a href="${servePath}/admin-index.do#main">
${adminLabel} ${adminLabel}
...@@ -64,7 +65,8 @@ ...@@ -64,7 +65,8 @@
${startToUseLabel} ${startToUseLabel}
</a> </a>
</#if> </#if>
</#if>
</div> </div>
</nav> </nav>
</header> </header>
</#macro> </#macro>
\ No newline at end of file
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<div class="fn-clear"> <#if !staticSite>
<div class="fn-clear">
<span class="fn-right"> <span class="fn-right">
<#if isLoggedIn> <#if isLoggedIn>
<a href="${servePath}/admin-index.do#main" title="${adminLabel}" class="icon-setting"></a> <a href="${servePath}/admin-index.do#main" title="${adminLabel}" class="icon-setting"></a>
...@@ -27,14 +28,16 @@ ...@@ -27,14 +28,16 @@
<a href="${servePath}/start" title="${startToUseLabel}" class="icon-login"></a> <a href="${servePath}/start" title="${startToUseLabel}" class="icon-login"></a>
</#if> </#if>
</span> </span>
</div> </div>
</#if>
<#if article?? && article.articleToC?? && article.articleToC?size &gt; 0> <#if article?? && article.articleToC?? && article.articleToC?size &gt; 0>
<#include "../../common-template/toc.ftl"/> <#include "../../common-template/toc.ftl"/>
<#else> <#else>
<ul> <ul>
<#list pageNavigations as page> <#list pageNavigations as page>
<li> <li>
<a href="${page.pagePermalink}" target="${page.pageOpenTarget}"><#if page.pageIcon != ''><img class="page-icon" src="${page.pageIcon}"></#if>${page.pageTitle}</a> <a href="${page.pagePermalink}" target="${page.pageOpenTarget}"><#if page.pageIcon != ''><img
class="page-icon" src="${page.pageIcon}"></#if>${page.pageTitle}</a>
</li> </li>
</#list> </#list>
<#if commentable> <#if commentable>
......
...@@ -32,26 +32,32 @@ ...@@ -32,26 +32,32 @@
</a> </a>
</#list> </#list>
<a href="${servePath}/categories.html" rel="section" aria-label="${categoryLabel}" class="vditor-tooltipped vditor-tooltipped__w"> <a href="${servePath}/categories.html" rel="section" aria-label="${categoryLabel}"
class="vditor-tooltipped vditor-tooltipped__w">
<i class="icon__category"></i> <i class="icon__category"></i>
</a> </a>
<a href="${servePath}/tags.html" rel="section" aria-label="${allTagsLabel}" class="vditor-tooltipped vditor-tooltipped__w"> <a href="${servePath}/tags.html" rel="section" aria-label="${allTagsLabel}"
class="vditor-tooltipped vditor-tooltipped__w">
<i class="icon__tags"></i> <i class="icon__tags"></i>
</a> </a>
<a href="${servePath}/archives.html" aria-label="${archiveLabel}" class="vditor-tooltipped vditor-tooltipped__w"> <a href="${servePath}/archives.html" aria-label="${archiveLabel}"
class="vditor-tooltipped vditor-tooltipped__w">
<i class="icon__inbox"></i> <i class="icon__inbox"></i>
</a> </a>
<a rel="archive" href="${servePath}/links.html" aria-label="${linkLabel}" class="vditor-tooltipped vditor-tooltipped__w"> <a rel="archive" href="${servePath}/links.html" aria-label="${linkLabel}"
class="vditor-tooltipped vditor-tooltipped__w">
<i class="icon__link"></i> <i class="icon__link"></i>
</a> </a>
<a href="${servePath}/search" class="vditor-tooltipped__w vditor-tooltipped" aria-label="${searchLabel}"> <a href="${servePath}/search" class="vditor-tooltipped__w vditor-tooltipped" aria-label="${searchLabel}">
<i class="icon__search"></i> <i class="icon__search"></i>
</a> </a>
<a rel="alternate" href="${servePath}/rss.xml" rel="section" aria-label="RSS" class="vditor-tooltipped vditor-tooltipped__w"> <a rel="alternate" href="${servePath}/rss.xml" rel="section" aria-label="RSS"
class="vditor-tooltipped vditor-tooltipped__w">
<i class="icon__rss"></i> <i class="icon__rss"></i>
</a> </a>
</div> </div>
<#if !staticSite>
<div> <div>
<#if isLoggedIn> <#if isLoggedIn>
<a href="${servePath}/admin-index.do#main" <a href="${servePath}/admin-index.do#main"
...@@ -73,4 +79,5 @@ ...@@ -73,4 +79,5 @@
<i class="icon__up"></i> <i class="icon__up"></i>
</span> </span>
</div> </div>
</#if>
</header> </header>
\ No newline at end of file
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
</svg> </svg>
RSS RSS
</a> </a>
<#if !staticSite>
<#if isLoggedIn> <#if isLoggedIn>
<a href="${servePath}/admin-index.do#main"> <a href="${servePath}/admin-index.do#main">
<svg> <svg>
...@@ -74,5 +75,6 @@ ...@@ -74,5 +75,6 @@
${startToUseLabel} ${startToUseLabel}
</a> </a>
</#if> </#if>
</#if>
</div> </div>
</nav> </nav>
\ No newline at end of file
...@@ -29,17 +29,20 @@ ...@@ -29,17 +29,20 @@
</a> </a>
</#list> </#list>
<a class="ft__link" rel="alternate" href="${servePath}/rss.xml" rel="section">RSS</a> <a class="ft__link" rel="alternate" href="${servePath}/rss.xml" rel="section">RSS</a>
<#if !staticSite>
<#if isLoggedIn> <#if isLoggedIn>
<a class="ft__link" href="${servePath}/admin-index.do#main" title="${adminLabel}">${adminLabel}</a> <a class="ft__link" href="${servePath}/admin-index.do#main" title="${adminLabel}">${adminLabel}</a>
<a class="ft__link" href="${logoutURL}">${logoutLabel}</a> <a class="ft__link" href="${logoutURL}">${logoutLabel}</a>
<#else> <#else>
<a class="ft__link" href="${servePath}/start">${startToUseLabel}</a> <a class="ft__link" href="${servePath}/start">${startToUseLabel}</a>
</#if> </#if>
</#if>
</nav> </nav>
<div class="footer__border mobile__none"></div> <div class="footer__border mobile__none"></div>
<div class="wrapper fn__flex"> <div class="wrapper fn__flex">
<div class="fn__flex-1 mobile__none"> <div class="fn__flex-1 mobile__none">
<div class="ft__fade">${adminUser.userName} - ${blogSubtitle}</div><br> <div class="ft__fade">${adminUser.userName} - ${blogSubtitle}</div>
<br>
<#if noticeBoard??> <#if noticeBoard??>
${noticeBoard} ${noticeBoard}
</#if> </#if>
...@@ -47,7 +50,8 @@ ...@@ -47,7 +50,8 @@
<#if 0 != mostUsedCategories?size> <#if 0 != mostUsedCategories?size>
<div class="footer__mid fn__flex-1 mobile__none"> <div class="footer__mid fn__flex-1 mobile__none">
<div class="ft__fade">${categoryLabel}</div> <br> <div class="ft__fade">${categoryLabel}</div>
<br>
<#list mostUsedCategories as category> <#list mostUsedCategories as category>
<a href="${servePath}/category/${category.categoryURI}" <a href="${servePath}/category/${category.categoryURI}"
aria-label="${category.categoryTagCnt} ${cntLabel}${tagsLabel}" aria-label="${category.categoryTagCnt} ${cntLabel}${tagsLabel}"
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
</li> </li>
<#list pageNavigations as page> <#list pageNavigations as page>
<li> <li>
<a href="${page.pagePermalink}" target="${page.pageOpenTarget}"><#if page.pageIcon != ''><img class="page-icon" src="${page.pageIcon}"></#if>${page.pageTitle}</a> <a href="${page.pagePermalink}" target="${page.pageOpenTarget}"><#if page.pageIcon != ''><img
class="page-icon" src="${page.pageIcon}"></#if>${page.pageTitle}</a>
</li> </li>
</#list> </#list>
<#if commentable> <#if commentable>
...@@ -51,6 +52,7 @@ ...@@ -51,6 +52,7 @@
<a href="${servePath}/links.html">${linkLabel}</a> <a href="${servePath}/links.html">${linkLabel}</a>
</li> </li>
</ul> </ul>
<#if !staticSite>
<div class="fn-right top-info"> <div class="fn-right top-info">
<#if isLoggedIn> <#if isLoggedIn>
<a href="${servePath}/admin-index.do#main" title="${adminLabel}" data-ico="&#x0070;"></a> <a href="${servePath}/admin-index.do#main" title="${adminLabel}" data-ico="&#x0070;"></a>
...@@ -60,4 +62,5 @@ ...@@ -60,4 +62,5 @@
<a href="${servePath}/start" title="${startToUseLabel}" data-ico="&#xe03f;"></a> <a href="${servePath}/start" title="${startToUseLabel}" data-ico="&#xe03f;"></a>
</#if> </#if>
</div> </div>
</#if>
</div> </div>
\ No newline at end of file
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
</a> </a>
</div> </div>
<#if !staticSite>
<div class="links-of-author"> <div class="links-of-author">
<#if isLoggedIn> <#if isLoggedIn>
<span class="links-of-author-item"> <span class="links-of-author-item">
...@@ -94,6 +95,7 @@ ...@@ -94,6 +95,7 @@
</span> </span>
</#if> </#if>
</div> </div>
</#if>
<#if noticeBoard??> <#if noticeBoard??>
<div class="links-of-author"> <div class="links-of-author">
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
</a> </a>
</nav> </nav>
<#if !staticSite>
<div class="header__login"> <div class="header__login">
<#if isLoggedIn> <#if isLoggedIn>
<a href="${servePath}/admin-index.do#main" title="${adminLabel}"> <a href="${servePath}/admin-index.do#main" title="${adminLabel}">
...@@ -68,6 +69,7 @@ ...@@ -68,6 +69,7 @@
</a> </a>
</#if> </#if>
</div> </div>
</#if>
</div> </div>
</header> </header>
<div class="header__m fn__none"> <div class="header__m fn__none">
...@@ -76,6 +78,7 @@ ...@@ -76,6 +78,7 @@
<i class="icon__more" onclick="$(this).next().slideToggle()"></i> <i class="icon__more" onclick="$(this).next().slideToggle()"></i>
<main class="module__list"> <main class="module__list">
<ul> <ul>
<#if !staticSite>
<#if isLoggedIn> <#if isLoggedIn>
<li> <li>
<a href="${servePath}/admin-index.do#main" title="${adminLabel}"> <a href="${servePath}/admin-index.do#main" title="${adminLabel}">
...@@ -94,6 +97,7 @@ ...@@ -94,6 +97,7 @@
</a> </a>
</li> </li>
</#if> </#if>
</#if>
<#list pageNavigations as page> <#list pageNavigations as page>
<li> <li>
<a href="${page.pagePermalink}" target="${page.pageOpenTarget}" rel="section"> <a href="${page.pagePermalink}" target="${page.pageOpenTarget}" rel="section">
......
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
<ul> <ul>
<#list pageNavigations as page> <#list pageNavigations as page>
<li> <li>
<a href="${page.pagePermalink}" target="${page.pageOpenTarget}"><#if page.pageIcon != ''><img class="page-icon" src="${page.pageIcon}"></#if>${page.pageTitle}</a> <a href="${page.pagePermalink}" target="${page.pageOpenTarget}"><#if page.pageIcon != ''><img
class="page-icon" src="${page.pageIcon}"></#if>${page.pageTitle}</a>
</li> </li>
</#list> </#list>
<li> <li>
...@@ -67,6 +68,7 @@ ...@@ -67,6 +68,7 @@
<#if noticeBoard??> <#if noticeBoard??>
<div class="vditor-reset">${noticeBoard}</div> <div class="vditor-reset">${noticeBoard}</div>
</#if> </#if>
<#if !staticSite>
<#if isLoggedIn> <#if isLoggedIn>
<a href="${servePath}/admin-index.do#main" title="${adminLabel}" class="icon-setting"></a> <a href="${servePath}/admin-index.do#main" title="${adminLabel}" class="icon-setting"></a>
&nbsp; &nbsp; &nbsp; &nbsp;
...@@ -74,6 +76,7 @@ ...@@ -74,6 +76,7 @@
<#else> <#else>
<a href="${servePath}/start" title="${startToUseLabel}" class="icon-login"></a> <a href="${servePath}/start" title="${startToUseLabel}" class="icon-login"></a>
</#if> &nbsp; &nbsp; </#if> &nbsp; &nbsp;
</#if>
<a rel="alternate" href="${servePath}/rss.xml" title="${subscribeLabel}" class="icon-rss"></a> <a rel="alternate" href="${servePath}/rss.xml" title="${subscribeLabel}" class="icon-rss"></a>
</footer> </footer>
<#if article?? && article.articleToC?? && article.articleToC?size &gt; 0> <#if article?? && article.articleToC?? && article.articleToC?size &gt; 0>
......
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