Commit ae8b462a authored by Vanessa's avatar Vanessa

💄 #12389 header, nav and footer

parent 83a58ea0
<div class="footer__tag wrapper">
<#if 0 != mostUsedCategories?size>
<#list mostUsedCategories as category>
<a class="tag pipe-tooltipped pipe-tooltipped--n"
aria-label="${category.categoryTagCnt} ${cntLabel}${tagsLabel}"
href="${servePath}/tags/${category.categoryURI}">${category.categoryTitle}</a>
</#list>
</#if>
<#if 0 != mostUsedTags?size>
<#list mostUsedTags as tag>
<a rel="tag"
class="tag pipe-tooltipped pipe-tooltipped--n"
aria-label="${tag.tagPublishedRefCount} ${countLabel}${articleLabel}"
href="${servePath}/tags/${tag.tagTitle?url('UTF-8')}">${tag.tagTitle}</a>
</#list>
</#if>
</div>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<#include "macro-head.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${blogTitle}">
<meta name="keywords" content="${metaKeywords},${dynamicLabel}"/>
<meta name="description" content="${metaDescription},${dynamicLabel}"/>
</@head>
</head>
<body>
<#include "header.ftl">
<div class="wrapper">
<div class="main-wrap">
<main class="post">
<#if 0 != recentComments?size>
<ul class="comments" id="comments">
<#list recentComments as comment>
<li id="${comment.oId}">
<div>
<div class="avatar tooltipped tooltipped-n" aria-label="${comment.commentName}"
style="background-image: url(${comment.commentThumbnailURL})"></div>
<main>
<div class="fn-clear">
<#if "http://" == comment.commentURL>
${comment.commentName}
<#else>
<a class="user-name" href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
</#if>
<time class="ft-gray">${comment.commentDate?string("yyyy-MM-dd HH:mm")}</time>
<a class="reply-btn" href="${servePath}${comment.commentSharpURL}">${viewLabel}»</a>
</div>
<div class="content-reset">
${comment.commentContent}
</div>
</main>
</div>
</li>
</#list>
</ul>
</#if>
</main>
<#include "side.ftl">
</div>
</div>
<#include "footer.ftl">
<script>
var $commentContents = $(".comments .content-reset");
for (var i = 0; i < $commentContents.length; i++) {
var str = $commentContents[i].innerHTML;
$commentContents[i].innerHTML = Util.replaceEmString(str);
}
</script>
</body>
</html>
<footer class="footer fn-clear"> <div class="wrapper">
&copy; ${year} <footer class="footer">
${footerContent} <div class="fn-clear">
<a href="${servePath}">${blogTitle}</a> &nbsp; • &nbsp; ${blogSubtitle}
<a href="https://hacpai.com/tag/Solo" target="_blank">Solo</a> ${version} <br/> <div class="fn-right">
${blogTitle} &copy; ${year} ${footerContent}
Powered by <a href="http://b3log.org" target="_blank">B3log</a> 开源 &nbsp; </div>
<span class="ft-warn">&heartsuit;</span> </div>
Theme <a rel="friend" href="https://github.com/b3log/solo-skins" target="_blank">Medium</a> by <a href="https://medium.com/" target="_blank">Medium</a> & <a href="http://vanessa.b3log.org" target="_blank">Vanessa</a> <div class="fn-clear">
</footer> ${statistic.statisticPublishedBlogArticleCount} ${articleLabel} &nbsp;
<div class="icon-up" onclick="Util.goTop()"></div> ${statistic.statisticPublishedBlogCommentCount} ${commentLabel} &nbsp;
${statistic.statisticBlogViewCount} ${viewLabel} &nbsp;
${onlineVisitorCnt} ${onlineVisitorLabel}
<div class="fn-right">
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a> •
<a href="https://hacpai.com/tag/Solo" target="_blank">Solo</a> •
Theme <a rel="friend" href="https://github.com/b3log/solo-skins" target="_blank">Medium</a>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <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" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}"
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> charset="utf-8"></script>
<script type="text/javascript"
src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}"
charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
var latkeConfig = { var latkeConfig = {
"servePath": "${servePath}", "servePath": "${servePath}",
...@@ -41,7 +54,5 @@ ...@@ -41,7 +54,5 @@
}; };
Util.parseMarkdown('content-reset'); Util.parseMarkdown('content-reset');
Util.minerStart();
</script> </script>
${plugins} ${plugins}
This diff is collapsed.
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<@head title="${blogTitle}"> <@head title="${blogTitle}">
<#if metaKeywords??> <#if metaKeywords??>
<meta name="keywords" content="${metaKeywords}"/> <meta name="keywords" content="${metaKeywords}"/>
</#if> </#if>
<#if metaDescription??> <#if metaDescription??>
<meta name="description" content="${metaDescription}"/> <meta name="description" content="${metaDescription}"/>
</#if> </#if>
</@head> </@head>
</head> </head>
<body> <body>
<#include "header.ftl"> <#include "header.ftl">
<div class="wrapper"> <#include "nav.ftl">
<div class="main-wrap"> <div class="main">
<main> <#if noticeBoard??>
<#include "article-list.ftl"> <div class="board">
</main> ${noticeBoard}
<#include "side.ftl">
</div>
</div> </div>
<#include "footer.ftl"> </#if>
</body> <div class="wrapper content">
<#include "article-list.ftl">
</div>
<#include "bottom.ftl">
</div>
<#include "footer.ftl">
</body>
</html> </html>
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* @fileoverview util and every page should be used. * @fileoverview util and every page should be used.
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.1.0.0, Feb 17, 2017 * @version 0.1.0.0, Jan 29, 2018
*/ */
/** /**
...@@ -25,52 +25,24 @@ ...@@ -25,52 +25,24 @@
* @static * @static
*/ */
var Skin = { var Skin = {
_initCommon: function ($goTop) {
$('body').on('click', '.content-reset img', function () {
window.open(this.src);
});
var $banner = $('header .banner'),
$navbar = $('header .navbar');
$(window).scroll(function () {
if ($(window).scrollTop() > 125) {
$goTop.show();
} else {
$goTop.hide();
}
if ($(window).width() < 701) {
return false;
}
if ($(window).scrollTop() > $banner.height()) {
$navbar.addClass('pin');
$('.main-wrap').parent().css('margin-top', '86px')
} else {
$navbar.removeClass('pin');
$('.main-wrap').parent().css('margin-top', '0')
}
});
},
init: function () { init: function () {
this._initCommon($('.icon-up')); $('body').on('click', '.content-reset img', function () {
window.open(this.src);
});
$('.navbar nav a').each(function () { $(window).scroll(function () {
if (this.href === location.href) { if ($('#headerNav').length === 0) {
this.className = 'current' return
} }
}); if ($(window).scrollTop() > 64) {
$('#headerNav').addClass('header__nav--fixed');
$('.responsive .list a').each(function () { $('.main').css('margin-top', '100px');
if (this.href === location.href) { } else {
$(this).parent().addClass('current'); $('#headerNav').removeClass('header__nav--fixed');
} $('.main').css('margin-top', '50px');
}); }
});
$('.responsive .icon-list').click(function () { $(window).scroll();
$('.responsive .list').slideToggle();
});
}, },
_initArticleCommon: function (tocLabel, siteViewLabel) { _initArticleCommon: function (tocLabel, siteViewLabel) {
// TOC // TOC
......
This diff is collapsed.
This diff is collapsed.
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# #
# Description: Solo language configurations(en_US). # Description: Solo language configurations(en_US).
# Version: 1.2.0.0, Apr 8, 2017 # Version: 0.1.0.0, Jan 29, 2018
# Author: Liyuan Li # Author: Liyuan Li
# #
......
...@@ -16,16 +16,8 @@ ...@@ -16,16 +16,8 @@
# #
# Description: Solo default language configurations(zh_CN). # Description: Solo default language configurations(zh_CN).
# Version: 1.2.0.0, Apr 8, 2017 # Version: 0.1.0.0, Jan 29, 2018
# Author: Liyuan Li # Author: Liyuan Li
# #
siteViewLabel=\u7AD9\u70B9\u6982\u8981
onlineVisitorLabel=\u8BBF\u5BA2
tocLabel=\u6587\u7AE0\u76EE\u5F55
readLabel=\u9605\u8BFB\u5168\u6587
nextArticleLabel=\u65B0\u4E00\u7BC7
previousArticleLabel=\u65E7\u4E00\u7BC7
articleCP1Label=\u8F6C\u8F7D\u8BF7\u6CE8\u660E\u6765\u6E90\uFF1A
viewCountLabel=\u6D4F\u89C8\u6570
cntLabel=\u4E2A cntLabel=\u4E2A
\ No newline at end of file
<nav id="headerNav" class="header__nav">
<div class="wrapper">
<a href="${servePath}">
<svg>
<use xlink:href="#icon-home"></use>
</svg>
${indexLabel}
</a>
<a href="http://localhost:5897/blogs/Vanessa/categories">
<svg>
<use xlink:href="#icon-folders"></use>
</svg>
${categoryLabel}
</a>
<a href="${servePath}/tags.html" rel="section">
<svg>
<use xlink:href="#icon-tag"></use>
</svg> ${allTagsLabel}
</a>
<a href="${servePath}/archives.html">
<svg>
<use xlink:href="#icon-bookmark"></use>
</svg> ${archiveLabel}
</a>
<#list pageNavigations as page>
<a href="${page.pagePermalink}" target="${page.pageOpenTarget}" rel="section">
<#if page.pageIcon != ''><img src="${page.pageIcon}"></#if> ${page.pageTitle}
</a>
</#list>
<a rel="archive" href="${servePath}/links.html">
<svg>
<use xlink:href="#icon-link"></use>
</svg> ${linkLabel}
</a>
<a rel="alternate" href="${servePath}/blog-articles-rss.do" rel="section">
<svg>
<use xlink:href="#icon-feed"></use>
</svg>
RSS
</a>
<#if isLoggedIn>
<a href="${servePath}/admin-index.do#main">
<svg>
<use xlink:href="#icon-setting"></use>
</svg> ${adminLabel}
</a>
<#else>
<a href="${loginURL}">
<svg>
<use xlink:href="#icon-enter"></use>
</svg> ${loginLabel}
</a>
</#if>
</div>
</nav>
\ No newline at end of file
<aside>
<section>
<#if noticeBoard??>
<div class="ad content-reset">
${noticeBoard}
</div>
</#if>
<#if 0 != mostUsedCategories?size>
<div class="module">
<header><h2>${categoryLabel}</h2></header>
<main>
<#list mostUsedCategories as category>
<a href="${servePath}/category/${category.categoryURI}"
aria-label="${category.categoryTagCnt} ${cntLabel}${tagsLabel}"
class="tag tooltipped tooltipped-n">
${category.categoryTitle}</a>
</#list>
</main>
</div>
</#if>
<#if 0 != mostUsedTags?size>
<div class="module">
<header><h2>${tagsLabel}</h2></header>
<main>
<#list mostUsedTags as tag>
<a rel="tag"
href="${servePath}/tags/${tag.tagTitle?url('UTF-8')}"
class="tag tooltipped tooltipped-n"
aria-label="${tag.tagPublishedRefCount} ${countLabel}${articleLabel}">
${tag.tagTitle}</a>
</#list>
</main>
</div>
</#if>
<div class="module meta">
<header>
<h2>${adminUser.userName}</h2>
</header>
<main class="fn-clear">
<img src="${adminUser.userAvatar}" aria-label="${adminUser.userName}"/>
<div class="fn-right">
<a href="${servePath}/archives.html">
${statistic.statisticPublishedBlogArticleCount}
<span class="ft-gray">${articleLabel}</span></a><br/>
<a href="${servePath}/dynamic.html">
${statistic.statisticPublishedBlogCommentCount}
<span class="ft-gray">${commentLabel}</span></a><br/>
${statistic.statisticBlogViewCount} <span class="ft-gray">${viewLabel}</span><br/>
${onlineVisitorCnt} <span class="ft-gray">${onlineVisitorLabel}</span>
</div>
</main>
</div>
<#if 0 != mostCommentArticles?size> <#if 0 != mostCommentArticles?size>
<div class="module"> <div class="module">
...@@ -90,6 +37,4 @@ ...@@ -90,6 +37,4 @@
</ul> </ul>
</main> </main>
</div> </div>
</#if> </#if>
</section> \ No newline at end of file
</aside>
\ No newline at end of file
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