+<#include "footer.ftl">
+<@comment_script oId=article.oId>
+page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
+ <#if 0 != randomArticlesDisplayCount>
+page.loadRandomArticles('');
+ #if>
+ <#if 0 != externalRelevantArticlesDisplayCount>
+page.loadExternalRelevantArticles("<#list article.articleTags?split(",") as articleTag>${articleTag}<#if articleTag_has_next>,#if>#list>"
+ , "");
+ #if>
+ <#if 0 != relevantArticlesDisplayCount>
+ page.loadRelevantArticles('${article.oId}',
+ '');
+ #if>
+@comment_script>
+
diff --git a/nijigen/category-articles.ftl b/nijigen/category-articles.ftl
index 9cc78a6..c8847f1 100644
--- a/nijigen/category-articles.ftl
+++ b/nijigen/category-articles.ftl
@@ -20,29 +20,33 @@
<#include "macro-head.ftl">
-
- <@head title="${category.categoryTitle} - ${blogTitle}">
-
-
-
-
-
- ${category.categoryTitle}
- ${category.categoryDescription}
-
-
-
- <#include "article-list.ftl">
-
- <#include "side.ftl">
+
+<@head title="${category.categoryTitle} - ${blogTitle}">
+
+
+@head>
+
+
+<#include "header.ftl">
+
+
+
+
+
+
${blogTitle}
+ >
+
+ ${categoryLabel}
+ >
+
${category.categoryTitle}
- <#include "footer.ftl">
-
+ <#include "article-list.ftl">
+
+ <#include "side.ftl">
+
+<#include "footer.ftl">
+
diff --git a/nijigen/common-comment.ftl b/nijigen/common-comment.ftl
index f084ec3..7bdd32c 100644
--- a/nijigen/common-comment.ftl
+++ b/nijigen/common-comment.ftl
@@ -28,15 +28,17 @@
<#else>
${comment.commentName}
#if>
+
<#if comment.isReply>
@
${comment.commentOriginalCommentName}
#if>
-
- <#if article.commentable>
+
+
+ <#if article?? && article.commentable>
${replyLabel}
#if>
diff --git a/nijigen/css/base.css b/nijigen/css/base.css
index b891091..50cbcb1 100644
--- a/nijigen/css/base.css
+++ b/nijigen/css/base.css
@@ -604,6 +604,11 @@ a {
margin-bottom: 30px;
box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.2);
transition: all .3s; }
+ .module.item {
+ transform: translateY(30px);
+ transition: transform 2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
+ .module.item--active {
+ transform: translate(0); }
.module:hover {
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.8); }
.module__content {
@@ -723,6 +728,10 @@ a {
margin: auto;
display: flex; }
+.content {
+ flex: 1;
+ min-width: 1px; }
+
.side {
width: 280px;
min-width: 280px;
@@ -766,13 +775,18 @@ a {
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
text-decoration: none; }
+.breadcrumb {
+ color: #7266BA !important; }
+ .breadcrumb:hover {
+ color: #3d4450 !important; }
+
.footer {
text-align: center;
color: #fff;
padding: 15px;
margin-bottom: 30px; }
.footer a {
- color: #3d4450; }
+ color: #7266BA; }
.article-list .item {
border-radius: 5px;
@@ -781,7 +795,10 @@ a {
padding: 15px;
background-color: rgba(255, 255, 255, 0.8);
position: relative;
- transition: all .3s; }
+ transition: all 0.3s, transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
+ transform: perspective(2500px) rotateX(-100deg); }
+ .article-list .item--active {
+ transform: perspective(2500px) rotateX(0); }
.article-list .item:hover {
background-color: #fff;
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.8); }
@@ -828,7 +845,7 @@ a {
padding: 0 10px;
line-height: 24px;
display: inline-block;
- margin-left: 10px;
+ margin: 0 0 10px 10px;
background-color: rgba(114, 102, 186, 0.58); }
.pagination__item--text {
background-color: rgba(255, 255, 255, 0.8);
@@ -870,7 +887,8 @@ a {
.article-list .item__date--m {
text-align: center;
margin-bottom: 10px;
- color: #3d4450; }
+ color: #3d4450;
+ display: block; }
.tag {
margin: 0 5px 10px 0;
font-size: 12px; }
@@ -892,4 +910,6 @@ a {
.header__m .module__list {
display: none; }
.header__m .module__list li {
- background-color: #fff; } }
+ background-color: #fff; }
+ .module__content.ft__center {
+ text-align: left; } }
diff --git a/nijigen/css/base.scss b/nijigen/css/base.scss
index 09734a2..d290a0c 100644
--- a/nijigen/css/base.scss
+++ b/nijigen/css/base.scss
@@ -50,8 +50,16 @@ a {
box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.2);
transition: all .3s;
+ &.item {
+ transform: translateY(30px);
+ transition: transform 2s cubic-bezier(.175, .885, .32, 1.275);
+ &--active {
+ transform: translate(0);
+ }
+ }
+
&:hover {
- box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.8);
+ box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.8);
}
&__content {
@@ -225,6 +233,11 @@ a {
display: flex;
}
+.content {
+ flex: 1;
+ min-width: 1px;
+}
+
// side
.side {
width: 280px;
@@ -282,6 +295,13 @@ a {
}
}
+.breadcrumb {
+ color: $purple !important;
+ &:hover {
+ color: $black !important;
+ }
+}
+
// footer
.footer {
text-align: center;
@@ -289,7 +309,7 @@ a {
padding: 15px;
margin-bottom: 30px;
a {
- color: $black;
+ color: $purple;
}
}
@@ -302,11 +322,16 @@ a {
padding: 15px;
background-color: rgba(255, 255, 255, 0.8);
position: relative;
- transition: all .3s;
+ transition: all .3s, transform 1s cubic-bezier(.175, .885, .32, 1.275);
+ transform: perspective(2500px) rotateX(-100deg);
+
+ &--active {
+ transform: perspective(2500px) rotateX(0);
+ }
&:hover {
background-color: #fff;
- box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.8);
+ box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.8);
}
.tag {
@@ -368,7 +393,7 @@ a {
padding: 0 10px;
line-height: 24px;
display: inline-block;
- margin-left: 10px;
+ margin: 0 0 10px 10px;
background-color: rgba($purple, 0.58);
&--text {
@@ -436,6 +461,7 @@ a {
text-align: center;
margin-bottom: 10px;
color: $black;
+ display: block;
}
.tag {
@@ -473,4 +499,8 @@ a {
}
}
}
+
+ .module__content.ft__center {
+ text-align: left;
+ }
}
\ No newline at end of file
diff --git a/nijigen/dynamic.ftl b/nijigen/dynamic.ftl
index e32967b..aac9525 100644
--- a/nijigen/dynamic.ftl
+++ b/nijigen/dynamic.ftl
@@ -20,55 +20,55 @@
<#include "macro-head.ftl">
-
- <@head title="${blogTitle}">
-
-
- @head>
-
-
- <#include "header.ftl">
-
-
-
- <#if 0 != recentComments?size>
-
- #if>
-
- <#include "side.ftl">
-
-
- <#include "footer.ftl">
-
-
-
+
+<@head title="${blogTitle}">
+
+
+@head>
+
+
+<#include "header.ftl">
+
+
+ <#if 0 != recentComments?size>
+
+ #if>
+
+<#include "side.ftl">
+
+<#include "footer.ftl">
+
+
diff --git a/nijigen/js/common.js b/nijigen/js/common.js
index 13cdaa8..cb89887 100644
--- a/nijigen/js/common.js
+++ b/nijigen/js/common.js
@@ -27,114 +27,163 @@
* @static
*/
var Skin = {
- _initCommon: function ($goTop) {
- $('body').on('click', '.content-reset img', function () {
- window.open(this.src);
- });
+ _initCommon: function ($goTop) {
+ $('body').on('click', '.content-reset img', function () {
+ window.open(this.src)
+ })
- var $banner = $('header .banner'),
- $navbar = $('header .navbar');
+ var $banner = $('header .banner'),
+ $navbar = $('header .navbar')
- $(window).scroll(function () {
- if ($(window).scrollTop() > 125) {
- $goTop.show();
- } else {
- $goTop.hide();
- }
+ $(window).scroll(function () {
+ if ($(window).scrollTop() > 125) {
+ $goTop.show()
+ } else {
+ $goTop.hide()
+ }
- if ($(window).width() < 701) {
- return false;
- }
+ 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 () {
- this._initCommon($('.icon-up'));
-
- $('.navbar nav a').each(function () {
- if (this.href === location.href) {
- this.className = 'current'
- }
- });
-
- $('.responsive .list a').each(function () {
- if (this.href === location.href) {
- $(this).parent().addClass('current');
- }
- });
-
- $('.responsive .icon-list').click(function () {
- $('.responsive .list').slideToggle();
- });
- },
- _initArticleCommon: function (tocLabel, siteViewLabel) {
- // TOC
- if ($('.b3-solo-list li').length > 0 && $(window).width() > 1000) {
- // add color to sidebar menu
- $('aside').addClass('has-toc');
-
- // append toc to sidebar menu
- var articleTocHTML = '
- ' + tocLabel
- + '
- ' + siteViewLabel + '
';
- $('aside').prepend(articleTocHTML);
- var $sectionF = $('aside section:first').html($('.b3-solo-list')),
- $sectionL = $('aside section:last');
- $sectionF.height($(window).height() - 154).css({ 'overflow': 'auto', 'width': $('aside').width() + 'px'});
- $sectionL.hide();
- // 切换 tab
- $('aside > ul > li').click(function () {
- if ($(this).data('tab') === 'toc') {
- $sectionL.animate({
- "opacity": '0',
- "top": '-50px'
- }, 300, function () {
- $sectionF.show().css('top', '-50px');
- $sectionF.animate({
- "opacity": '1',
- "top": '0'
- }, 300).show();
- });
- } else {
- $sectionF.animate({
- "opacity": '0',
- "top": '-50px'
- }, 300, function () {
- $sectionF.hide().css('top', '-50px');
- $sectionL.animate({
- "opacity": '1',
- "top": '0'
- }, 300).show();
- }).hide();
- }
- $('aside > ul > li').removeClass('current');
- $(this).addClass('current');
- });
-
- $(window).scroll(function () {
- if ($(window).scrollTop() > 125) {
- $('aside section:eq(0)').css({
- position: "fixed",
- top: "51px",
- backgroundColor: "#fff"
- })
- } else {
- $('aside section:eq(0)').css({
- position: "inherit",
- borderLeft: 0
- })
- }
- });
- }
- },
- initArticle: function (tocLabel, siteViewLabel) {
- this._initArticleCommon(tocLabel, siteViewLabel);
+ 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 () {
+ if (!('IntersectionObserver' in window)) {
+ $('.item').addClass('item--active')
+ return false
}
-};
-Skin.init();
\ No newline at end of file
+
+ if (window.imageIntersectionObserver) {
+ window.imageIntersectionObserver.disconnect()
+ $('.item').each(function () {
+ window.imageIntersectionObserver.observe(this)
+ })
+ } else {
+ window.imageIntersectionObserver = new IntersectionObserver((entries) => {
+ entries.forEach((entrie) => {
+ if (typeof entrie.isIntersecting === 'undefined'
+ ? entrie.intersectionRatio !== 0 : entrie.isIntersecting) {
+ $(entrie.target).addClass('item--active')
+ } else {
+ if ($(entrie.target).closest('.side').length === 1) {
+ return
+ }
+ $(entrie.target).removeClass('item--active')
+ }
+ })
+ })
+ $('.item').each(function () {
+ window.imageIntersectionObserver.observe(this)
+ })
+ }
+
+ this._initCommon($('.icon-up'))
+
+ $('.navbar nav a').each(function () {
+ if (this.href === location.href) {
+ this.className = 'current'
+ }
+ })
+
+ $('.responsive .list a').each(function () {
+ if (this.href === location.href) {
+ $(this).parent().addClass('current')
+ }
+ })
+
+ $('.responsive .icon-list').click(function () {
+ $('.responsive .list').slideToggle()
+ })
+ },
+ _initArticleCommon: function (tocLabel, siteViewLabel) {
+ // TOC
+ if ($('.b3-solo-list li').length > 0 && $(window).width() > 1000) {
+ // add color to sidebar menu
+ $('aside').addClass('has-toc')
+
+ // append toc to sidebar menu
+ var articleTocHTML = '
- ' +
+ tocLabel
+ + '
- ' + siteViewLabel +
+ '
'
+ $('aside').prepend(articleTocHTML)
+ var $sectionF = $('aside section:first').html($('.b3-solo-list')),
+ $sectionL = $('aside section:last')
+ $sectionF.height($(window).height() - 154).
+ css({'overflow': 'auto', 'width': $('aside').width() + 'px'})
+ $sectionL.hide()
+ // 切换 tab
+ $('aside > ul > li').click(function () {
+ if ($(this).data('tab') === 'toc') {
+ $sectionL.animate({
+ 'opacity': '0',
+ 'top': '-50px',
+ }, 300, function () {
+ $sectionF.show().css('top', '-50px')
+ $sectionF.animate({
+ 'opacity': '1',
+ 'top': '0',
+ }, 300).show()
+ })
+ } else {
+ $sectionF.animate({
+ 'opacity': '0',
+ 'top': '-50px',
+ }, 300, function () {
+ $sectionF.hide().css('top', '-50px')
+ $sectionL.animate({
+ 'opacity': '1',
+ 'top': '0',
+ }, 300).show()
+ }).hide()
+ }
+ $('aside > ul > li').removeClass('current')
+ $(this).addClass('current')
+ })
+
+ $(window).scroll(function () {
+ if ($(window).scrollTop() > 125) {
+ $('aside section:eq(0)').css({
+ position: 'fixed',
+ top: '51px',
+ backgroundColor: '#fff',
+ })
+ } else {
+ $('aside section:eq(0)').css({
+ position: 'inherit',
+ borderLeft: 0,
+ })
+ }
+ })
+ }
+ },
+ initArticle: function (tocLabel, siteViewLabel) {
+ this._initArticleCommon(tocLabel, siteViewLabel)
+
+ setTimeout(function () {
+ if ($('#externalRelevantArticlesWrap li').length === 0) {
+ $('#externalRelevantArticlesWrap').next().remove()
+ $('#externalRelevantArticlesWrap').remove()
+ }
+
+ if ($('#relevantArticlesWrap li').length === 0) {
+ $('#relevantArticlesWrap').prev().remove()
+ $('#relevantArticlesWrap').remove()
+ }
+
+ if ($('#randomArticlesWrap li').length === 0) {
+ $('#randomArticlesWrap').prev().remove()
+ $('#randomArticlesWrap').remove()
+ }
+ }, 1000)
+ },
+}
+Skin.init()
\ No newline at end of file
diff --git a/nijigen/side.ftl b/nijigen/side.ftl
index c350f7f..20acb4f 100644
--- a/nijigen/side.ftl
+++ b/nijigen/side.ftl
@@ -35,7 +35,7 @@
-