优化图库页面;增加随机封面图;增加一键灰色背景设置
|
@ -4,15 +4,15 @@
|
||||||
<div class="card" <#if is_post??>style="display: block"</#if> >
|
<div class="card" <#if is_post??>style="display: block"</#if> >
|
||||||
<#if is_post?? || is_page?? || is_sheet??>
|
<#if is_post?? || is_page?? || is_sheet??>
|
||||||
<#else >
|
<#else >
|
||||||
<#if post.thumbnail?? && post.thumbnail!='' && (settings.post_thumbnail_enable?? && settings.post_thumbnail_enable)>
|
<#if check_post_thumbnail_enable()>
|
||||||
<div class="card-image is-hidden-mobile">
|
<div class="card-image is-hidden-mobile">
|
||||||
<#if index>
|
<#if index>
|
||||||
<a href="${post.fullPath!}">
|
<a href="${post.fullPath!}">
|
||||||
<img class="thumbnail" src="${post.thumbnail!}" alt="${post.title!}">
|
<img class="thumbnail" src="${post_thumbnail_url(post.thumbnail!'')}" alt="${post.title!}">
|
||||||
</a>
|
</a>
|
||||||
<#else>
|
<#else>
|
||||||
<span class="image is-7by1">
|
<span class="image is-7by1">
|
||||||
<img class="thumbnail" src="${post.thumbnail!}" alt="${post.title!}">
|
<img class="thumbnail" src="${post_thumbnail_url(post.thumbnail!'')}" alt="${post.title!}">
|
||||||
</span>
|
</span>
|
||||||
</#if>
|
</#if>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,4 +5,26 @@
|
||||||
<#else>
|
<#else>
|
||||||
<#assign theme_base = settings.theme_static_base>
|
<#assign theme_base = settings.theme_static_base>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
<#function check_post_thumbnail_enable>
|
||||||
|
<#return (settings.post_thumbnail_enable?? && settings.post_thumbnail_enable != 'false')>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#assign time_count = 0>
|
||||||
|
<#function post_thumbnail_url src>
|
||||||
|
<#assign time_count = time_count + 1>
|
||||||
|
<#if check_post_thumbnail_enable()>
|
||||||
|
<#assign timestamp = .now?long + time_count>
|
||||||
|
<#assign random_pic = timestamp?substring(timestamp?length - 1) + ".jpg">
|
||||||
|
<#if settings.post_thumbnail_enable == 'true'>
|
||||||
|
<#if src != ''>
|
||||||
|
<#return src>
|
||||||
|
<#else>
|
||||||
|
<#return theme_base + "/source/images/cover/" + random_pic>
|
||||||
|
</#if>
|
||||||
|
<#elseif settings.post_thumbnail_enable == 'random_pic'>
|
||||||
|
<#return theme_base + "/source/images/cover/" + random_pic>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#function>
|
|
@ -1,5 +1,14 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
<#if settings.site_gray!false>
|
||||||
|
html {
|
||||||
|
-webkit-filter: grayscale(100%);
|
||||||
|
-moz-filter: grayscale(100%);
|
||||||
|
-ms-filter: grayscale(100%);
|
||||||
|
-o-filter: grayscale(100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
|
||||||
|
_filter: none;
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
:root {
|
:root {
|
||||||
--color: #333333;
|
--color: #333333;
|
||||||
--background: #f7f7f7;
|
--background: #f7f7f7;
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
<#list posts as post>
|
<#list posts as post>
|
||||||
<#if post_index lt 3>
|
<#if post_index lt 3>
|
||||||
<article class="media">
|
<article class="media">
|
||||||
<#if post.thumbnail?? && post.thumbnail!='' && (settings.post_thumbnail_enable?? && settings.post_thumbnail_enable)>
|
<#if check_post_thumbnail_enable()>
|
||||||
<a href="${post.fullPath!}" class="media-left">
|
<a href="${post.fullPath!}" class="media-left">
|
||||||
<p class="image is-64x64">
|
<p class="image is-64x64">
|
||||||
<img class="thumbnail" src="${post.thumbnail!}" alt="${post.title!}">
|
<img class="thumbnail" src="${post_thumbnail_url(post.thumbnail!'')}" alt="${post.title!}">
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
<@postTag method="latest" top="5">
|
<@postTag method="latest" top="5">
|
||||||
<#list posts as post>
|
<#list posts as post>
|
||||||
<article class="media">
|
<article class="media">
|
||||||
<#if post.thumbnail?? && post.thumbnail!='' && (settings.post_thumbnail_enable?? && settings.post_thumbnail_enable)>
|
<#if check_post_thumbnail_enable()>
|
||||||
<a href="${post.fullPath!}" class="media-left">
|
<a href="${post.fullPath!}" class="media-left">
|
||||||
<p class="image is-64x64">
|
<p class="image is-64x64">
|
||||||
<img class="thumbnail" src="${post.thumbnail!}" alt="${post.title!}">
|
<img class="thumbnail" src="${post_thumbnail_url(post.thumbnail!'')}" alt="${post.title!}">
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
<#list posts as post>
|
<#list posts as post>
|
||||||
<#if post_index lt 3>
|
<#if post_index lt 3>
|
||||||
<article class="media">
|
<article class="media">
|
||||||
<#if post.thumbnail?? && post.thumbnail!='' && (settings.post_thumbnail_enable?? && settings.post_thumbnail_enable)>
|
<#if check_post_thumbnail_enable()>
|
||||||
<a href="${post.fullPath!}" class="media-left">
|
<a href="${post.fullPath!}" class="media-left">
|
||||||
<p class="image is-64x64">
|
<p class="image is-64x64">
|
||||||
<img class="thumbnail" src="${post.thumbnail!}" alt="${post.title!}">
|
<img class="thumbnail" src="${post_thumbnail_url(post.thumbnail!'')}" alt="${post.title!}">
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
17
photos.ftl
|
@ -84,6 +84,7 @@
|
||||||
<#include "./layout/plugin/back-to-top.ftl">
|
<#include "./layout/plugin/back-to-top.ftl">
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
<script src="${settings.cdn_jquery_js!}"></script>
|
||||||
<script src="${theme_base!}/source/lib/lg/js/lightgallery.min.js"></script>
|
<script src="${theme_base!}/source/lib/lg/js/lightgallery.min.js"></script>
|
||||||
<script src="${theme_base!}/source/lib/lg/js/lg-thumbnail.min.js"></script>
|
<script src="${theme_base!}/source/lib/lg/js/lg-thumbnail.min.js"></script>
|
||||||
<script src="${theme_base!}/source/lib/lg/js/lg-fullscreen.min.js"></script>
|
<script src="${theme_base!}/source/lib/lg/js/lg-fullscreen.min.js"></script>
|
||||||
|
@ -107,7 +108,21 @@
|
||||||
progressBar: true,
|
progressBar: true,
|
||||||
selector: '.show'
|
selector: '.show'
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
|
var url = location.href;
|
||||||
|
var urlstatus = false;
|
||||||
|
$(".navbar-start a").each(function () {
|
||||||
|
if ((url + '/').indexOf($(this).attr('href')) > -1 && $(this).attr('href') != '/') {
|
||||||
|
$(this).addClass('is-active');
|
||||||
|
urlstatus = true;
|
||||||
|
} else {
|
||||||
|
$(this).removeClass('is-active');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!urlstatus) {
|
||||||
|
$(".navbar-start a").eq(0).addClass('is-active');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.card {
|
.card {
|
||||||
|
|
|
@ -12,6 +12,17 @@ sidebar:
|
||||||
label: 开启
|
label: 开启
|
||||||
- value: false
|
- value: false
|
||||||
label: 关闭
|
label: 关闭
|
||||||
|
site_gray:
|
||||||
|
name: site_gray
|
||||||
|
label: ※全站灰色背景※
|
||||||
|
type: radio
|
||||||
|
data-type: bool
|
||||||
|
default: false
|
||||||
|
options:
|
||||||
|
- value: true
|
||||||
|
label: 开启
|
||||||
|
- value: false
|
||||||
|
label: 关闭
|
||||||
profile_follow_url:
|
profile_follow_url:
|
||||||
name: profile_follow_url
|
name: profile_follow_url
|
||||||
label: 【关注我】按钮地址
|
label: 【关注我】按钮地址
|
||||||
|
@ -129,10 +140,10 @@ sidebar:
|
||||||
label: 关闭
|
label: 关闭
|
||||||
theme_static_base:
|
theme_static_base:
|
||||||
name: theme_static_base
|
name: theme_static_base
|
||||||
label: 主题静态文件URL前缀(静态文件和页面文件可分开布署)
|
label: 主题静态文件URL前缀(建议填写://s.xinac.net)
|
||||||
type: text
|
type: text
|
||||||
placeholder: '主题静态文件URL前缀,不知道无需填写'
|
placeholder: '主题CDN URL,不知道无需填写'
|
||||||
default: '//s.xinac.net'
|
default: ''
|
||||||
|
|
||||||
post:
|
post:
|
||||||
label: 文章设置
|
label: 文章设置
|
||||||
|
@ -214,14 +225,15 @@ post:
|
||||||
post_thumbnail_enable:
|
post_thumbnail_enable:
|
||||||
name: post_thumbnail_enable
|
name: post_thumbnail_enable
|
||||||
label: 显示文章封面图
|
label: 显示文章封面图
|
||||||
type: radio
|
type: select
|
||||||
data-type: bool
|
default: 'true'
|
||||||
default: true
|
|
||||||
options:
|
options:
|
||||||
- value: true
|
- value: 'true'
|
||||||
label: 开启
|
label: '开启,无封面图时使用随机图片'
|
||||||
- value: false
|
- value: 'random_pic'
|
||||||
label: 关闭
|
label: '开启,全部使用随机图片'
|
||||||
|
- value: 'false'
|
||||||
|
label: '关闭'
|
||||||
social:
|
social:
|
||||||
label: 博客信息
|
label: 博客信息
|
||||||
items:
|
items:
|
||||||
|
@ -400,113 +412,113 @@ custom_cdn:
|
||||||
name: cdn_jquery_js
|
name: cdn_jquery_js
|
||||||
label: jQuery
|
label: jQuery
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.bootcss.com/jquery/3.4.1/jquery.min.js'
|
default: '//s.xinac.net/static/jquery/v3.5.0/jquery.min.js'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_fontawesome_css:
|
cdn_fontawesome_css:
|
||||||
name: cdn_fontawesome_css
|
name: cdn_fontawesome_css
|
||||||
label: fontawesome-css(Font Awesome图标字体库)
|
label: fontawesome-css(Font Awesome图标字体库)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.bootcss.com/font-awesome/5.4.1/css/all.min.css'
|
default: '//s.xinac.net/static/font-awesome/v5.12.1/css/all.min.css'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_busuanzi_js:
|
cdn_busuanzi_js:
|
||||||
name: cdn_busuanzi_js
|
name: cdn_busuanzi_js
|
||||||
label: busuanzi(不蒜子网页计数器)
|
label: busuanzi(不蒜子网页计数器)
|
||||||
type: text
|
type: text
|
||||||
default: '//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js'
|
default: '//s.xinac.net/static/busuanzi/v2.3.0/bsz.pure.mini.js'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_canvas_nest_js:
|
cdn_canvas_nest_js:
|
||||||
name: cdn_canvas_nest_js
|
name: cdn_canvas_nest_js
|
||||||
label: canvas-nest(线条)
|
label: canvas-nest(线条)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.bootcss.com/canvas-nest.js/1.0.0/canvas-nest.min.js'
|
default: '//s.xinac.net/static/canvas-nest.js/v1.0.1/canvas-nest.min.js'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_bulma_css:
|
cdn_bulma_css:
|
||||||
name: cdn_bulma_css
|
name: cdn_bulma_css
|
||||||
label: bulma-css(Bulma框架)
|
label: bulma-css(Bulma框架)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/bulma@0.7.5/css/bulma.min.css'
|
default: '//s.xinac.net/static/bulma/v0.7.5/css/bulma.min.css'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_pace_js:
|
cdn_pace_js:
|
||||||
name: cdn_pace_js
|
name: cdn_pace_js
|
||||||
label: pace-js(浏览器加载效果插件)
|
label: pace-js(浏览器加载效果插件)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js'
|
default: '//s.xinac.net/static/pace/v1.0.2/pace.min.js'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_vue_js:
|
cdn_vue_js:
|
||||||
name: cdn_vue_js
|
name: cdn_vue_js
|
||||||
label: vue-js(VUE框架,评论模块用)
|
label: vue-js(VUE框架,评论模块用)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js'
|
default: '//s.xinac.net/static/vue/v2.6.11/vue.min.js'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_swiper_js:
|
cdn_swiper_js:
|
||||||
name: cdn_swiper_js
|
name: cdn_swiper_js
|
||||||
label: Swiper-js(触摸滑动插件)
|
label: Swiper-js(触摸滑动插件)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdnjs.cloudflare.com/ajax/libs/Swiper/4.3.5/js/swiper.min.js'
|
default: '//s.xinac.net/static/Swiper/v4.3.5/js/swiper.min.js'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_swiper_css:
|
cdn_swiper_css:
|
||||||
name: cdn_swiper_css
|
name: cdn_swiper_css
|
||||||
label: Swiper-css(触摸滑动插件)
|
label: Swiper-css(触摸滑动插件)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdnjs.cloudflare.com/ajax/libs/Swiper/4.3.5/css/swiper.min.css'
|
default: '//s.xinac.net/static/Swiper/v4.3.5/css/swiper.min.css'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_mathjax_js:
|
cdn_mathjax_js:
|
||||||
name: cdn_mathjax_js
|
name: cdn_mathjax_js
|
||||||
label: MathJax(数学公式支持插件)
|
label: MathJax(数学公式支持插件)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/mathjax@2.7.5/unpacked/MathJax.js?config=TeX-MML-AM_CHTML'
|
default: '//s.xinac.net/static/mathjax/v2.7.5/unpacked/MathJax.js?config=TeX-MML-AM_CHTML'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_aplayer_js:
|
cdn_aplayer_js:
|
||||||
name: cdn_aplayer_js
|
name: cdn_aplayer_js
|
||||||
label: APlayer-js(音乐播放器)
|
label: APlayer-js(音乐播放器)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.js'
|
default: '//s.xinac.net/static/aplayer/v1.10.1/APlayer.min.js'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_aplayer_css:
|
cdn_aplayer_css:
|
||||||
name: cdn_aplayer_css
|
name: cdn_aplayer_css
|
||||||
label: APlayer-css(音乐播放器)
|
label: APlayer-css(音乐播放器)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css'
|
default: '//s.xinac.net/static/aplayer/v1.10.1/APlayer.min.css'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_meting_js:
|
cdn_meting_js:
|
||||||
name: cdn_meting_js
|
name: cdn_meting_js
|
||||||
label: Meting-js(音乐播放器)
|
label: Meting-js(音乐播放器)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/meting@1.2.0/dist/Meting.min.js'
|
default: '//s.xinac.net/static/meting/v1.2.0/Meting.min.js'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_justifiedGallery_js:
|
cdn_justifiedGallery_js:
|
||||||
name: cdn_justifiedGallery_js
|
name: cdn_justifiedGallery_js
|
||||||
label: Justified Gallery-js(相册展示插件)
|
label: Justified Gallery-js(相册展示插件)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/css/justifiedGallery.min.js'
|
default: '//s.xinac.net/static/justifiedGallery/v3.7.0/js/jquery.justifiedGallery.min.js'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_justifiedGallery_css:
|
cdn_justifiedGallery_css:
|
||||||
name: cdn_justifiedGallery_css
|
name: cdn_justifiedGallery_css
|
||||||
label: Justified Gallery-css(相册展示插件)
|
label: Justified Gallery-css(相册展示插件)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/css/justifiedGallery.min.css'
|
default: '//s.xinac.net/static/justifiedGallery/v3.7.0/css/justifiedGallery.min.css'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_lightgallery_js:
|
cdn_lightgallery_js:
|
||||||
name: cdn_lightgallery_js
|
name: cdn_lightgallery_js
|
||||||
label: lightgallery-js(灯箱插件)
|
label: lightgallery-js(灯箱插件)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/lightgallery@1.6.8/dist/js/lightgallery.min.js'
|
default: '//s.xinac.net/static/lightgallery/v1.6.9/js/lightgallery.min.js'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_lightgallery_css:
|
cdn_lightgallery_css:
|
||||||
name: cdn_lightgallery_css
|
name: cdn_lightgallery_css
|
||||||
label: lightgallery-css(灯箱插件)
|
label: lightgallery-css(灯箱插件)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/lightgallery@1.6.8/dist/css/lightgallery.min.css'
|
default: '//s.xinac.net/static/lightgallery/v1.6.9/css/lightgallery.min.css'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_share_js:
|
cdn_share_js:
|
||||||
name: cdn_share_js
|
name: cdn_share_js
|
||||||
label: social-share-js(文章分享)
|
label: social-share-js(文章分享)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/js/social-share.min.js'
|
default: '//s.xinac.net/static/social-share.js/v1.0.16/js/social-share.min.js'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
cdn_share_css:
|
cdn_share_css:
|
||||||
name: cdn_share_css
|
name: cdn_share_css
|
||||||
label: social-share-css(文章分享)
|
label: social-share-css(文章分享)
|
||||||
type: text
|
type: text
|
||||||
default: '//cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/css/share.min.css'
|
default: '//s.xinac.net/static/social-share.js/v1.0.16/css/share.min.css'
|
||||||
placeholder: 'CDN网址'
|
placeholder: 'CDN网址'
|
||||||
|
|
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 15 KiB |
|
@ -3,9 +3,9 @@ name: Xinac-Fantastic
|
||||||
author:
|
author:
|
||||||
name: 新逸Cary
|
name: 新逸Cary
|
||||||
website: https://blog.xinac.cn
|
website: https://blog.xinac.cn
|
||||||
description: 本主题fork自 Bursteretion ,原作者 imkundev,当前版本v1.3.0:https://github.com/jinqilin721/halo-theme-fantastic
|
description: Fantastic主题,https://github.com/jinqilin721/halo-theme-fantastic
|
||||||
logo: https://blog.xinac.cn/avatar
|
logo: https://blog.xinac.cn/avatar
|
||||||
website: https://github.com/jinqilin721/halo-theme-fantastic
|
website: https://github.com/jinqilin721/halo-theme-fantastic
|
||||||
repo: https://github.com/jinqilin721/halo-theme-fantastic
|
repo: https://github.com/jinqilin721/halo-theme-fantastic
|
||||||
version: 1.3.0
|
version: 1.3.2
|
||||||
require: 1.3.0
|
require: 1.3.0
|
||||||
|
|