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