- 共计 <%= site.categories.length %> 个分类, <%= site.tags.length %> 个标签
+ 共计 <%= site.categories.length %> 个分类, <%= site.tags.length %> 个标签
<% if (site.categories.length){ %>
<% } %>
- <%- tagcloud({
- min_font: 16,
- max_font: 35,
- amount: 999,
- color: true,
- start_color: 'gray',
- end_color: 'black',
- }) %>
+
+ <%- tagcloud({
+ min_font: 16,
+ max_font: 35,
+ amount: 999,
+ color: true,
+ start_color: 'gray',
+ end_color: 'black',
+ }) %>
+
\ No newline at end of file
diff --git a/themes/yilia/source-src/css/core/_mixin.scss b/themes/yilia/source-src/css/core/_mixin.scss
index fadc982..446cf2d 100644
--- a/themes/yilia/source-src/css/core/_mixin.scss
+++ b/themes/yilia/source-src/css/core/_mixin.scss
@@ -685,12 +685,10 @@
%trans {
transition: all 0.2s ease-in;
+ -ms-transition: all 0.2s ease-in;
}
%trans8 {
transition: all 0.8s ease-in;
-}
-
-%paper-bg {
- background: url('./img/checkered-pattern.png') repeat #5d5d5d;
-}
+ -ms-transition: all 0.8s ease-in;
+}
\ No newline at end of file
diff --git a/themes/yilia/source-src/css/main.scss b/themes/yilia/source-src/css/main.scss
index 7eb2d75..ea476b2 100644
--- a/themes/yilia/source-src/css/main.scss
+++ b/themes/yilia/source-src/css/main.scss
@@ -20,6 +20,7 @@
@import "./waifu";
@import "./night";
@import "./page/photo-wall";
+@import "./page/categories.scss";
@media screen and (max-width: 800px) {
@import "./mobile";
@import "./mobile-slider";
diff --git a/themes/yilia/source-src/css/page/categories.scss b/themes/yilia/source-src/css/page/categories.scss
new file mode 100644
index 0000000..e706de8
--- /dev/null
+++ b/themes/yilia/source-src/css/page/categories.scss
@@ -0,0 +1,19 @@
+.category-list {
+ text-align: center;
+ padding: 20px;
+ li.category-list-item {
+ display: inline-block;
+ margin: 0 1em .5em 0;
+ padding: 4px;
+ border: 1px solid #d3d3d3;
+ font-size: 1.2rem;
+ }
+}
+.category-count {
+ text-align: center;
+}
+// hexo自带的标签云
+.tag-cloud {
+ text-align: center;
+ padding: 20px;
+}
\ No newline at end of file
diff --git a/themes/yilia/source-src/js/photo-wall.js b/themes/yilia/source-src/js/photo-wall.js
index 4fcae4a..36abd16 100644
--- a/themes/yilia/source-src/js/photo-wall.js
+++ b/themes/yilia/source-src/js/photo-wall.js
@@ -1,7 +1,11 @@
import axios from 'axios'
+import PhotoSwipe from '../lib/photoswipe/photoswipe'
+import PhotoSwipeUI_Default from '../lib/photoswipe/photoswipe-ui-default'
-var groupid = 1, currentIndex = 0, defaultStep = 20, scrollLock = false
+var groupid = 1, currentIndex = 0, totalIndex = 0, defaultStep = 20, scrollLock = false
+// 容器DIV
+const photoWallWrapper = document.getElementById('photo-wall')
// 滚动区域DOM
const scrollDom = document.getElementById('container')
// 作为底部标记的DOM
@@ -9,28 +13,59 @@ const markDom = document.getElementById('footer')
// 加载提示文字
const loadTip = document.getElementById('load-tip')
+// 相册集
+const items = []
+function getThumbBoundsFn(target) {
+ return function(index) { // index是当前点击的图片在相册中的索引值
+ var pageYScroll = window.pageYOffset || document.documentElement.scrollTop
+ var rect = target.getBoundingClientRect()
+ return {x:rect.left, y:rect.top + pageYScroll, w:rect.width}
+ }
+}
+var pswpElement = document.querySelectorAll('.pswp')[0]
function loadMoreItems(step) {
scrollLock = true //加载过程中锁定滚动加载
loadTip.style.display = 'block'
- var photoWallWrapper = document.getElementById('photo-wall')
// 滚动到底部时调用
axios.get(`${themeConfig.pictureCdn}/photo-wall/${groupid}/list.json`).then(res => {
var itemContainer = document.createElement('div')
- var imgItems = '', index = currentIndex
+ var index = currentIndex
while(index