chore: 适配
This commit is contained in:
		
							parent
							
								
									cafe34baa3
								
							
						
					
					
						commit
						5362edf111
					
				
							
								
								
									
										117
									
								
								annotation-setting.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										117
									
								
								annotation-setting.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,117 @@ | |||||||
|  | apiVersion: v1alpha1 | ||||||
|  | kind: AnnotationSetting | ||||||
|  | metadata: | ||||||
|  |   generateName: annotation-setting- | ||||||
|  | spec: | ||||||
|  |   targetRef: | ||||||
|  |     group: content.halo.run | ||||||
|  |     kind: Post | ||||||
|  |   formSchema: | ||||||
|  |     - $formkit: radio | ||||||
|  |       name: enable_copyright | ||||||
|  |       label:  开启文章版权声明 | ||||||
|  |       help: '当前配置将覆盖主题中的默认配置。' | ||||||
|  |       options: | ||||||
|  |         - value: true | ||||||
|  |           label:  开启 | ||||||
|  |         - value: false | ||||||
|  |           label:  关闭 | ||||||
|  |     - $formkit: select | ||||||
|  |       name: top_thumbnail_mode | ||||||
|  |       label:  置顶文章列表缩略图模式 | ||||||
|  |       help: '文章在列表的缩略图模式,除网格布局外,当前配置将覆盖主题中的默认配置。' | ||||||
|  |       options: | ||||||
|  |         - value: default | ||||||
|  |           label:  默认模式 | ||||||
|  |         - value: back | ||||||
|  |           label:  背景图模式 | ||||||
|  |         - value: small | ||||||
|  |           label:  小图模式(左侧) | ||||||
|  |         - value: small-right | ||||||
|  |           label:  小图模式(右侧) | ||||||
|  |         - value: small-alter | ||||||
|  |           label:  小图模式(交替) | ||||||
|  |         - value: fold | ||||||
|  |           label:  折叠模式 | ||||||
|  |     - $formkit: text | ||||||
|  |       name: tips | ||||||
|  |       label:  文章提示 | ||||||
|  |       placeholder: '请输入提示内容' | ||||||
|  |       help: '在文章顶部显示一条提示。' | ||||||
|  |     - $formkit: radio | ||||||
|  |       name: enable_katex | ||||||
|  |       label:  KaTeX 公式支持 | ||||||
|  |       value: false | ||||||
|  |       help: '博客通过 KaTeX 做数学公式渲染,当前配置将覆盖主题中的默认配置。' | ||||||
|  |       options: | ||||||
|  |         - value: true | ||||||
|  |           label:  开启 | ||||||
|  |         - value: false | ||||||
|  |           label:  关闭 | ||||||
|  |     - $formkit: radio | ||||||
|  |       name: enable_share | ||||||
|  |       label:  开启文章分享 | ||||||
|  |       value: true | ||||||
|  |       help: '当前配置将覆盖主题中的默认配置。' | ||||||
|  |       options: | ||||||
|  |         - value: true | ||||||
|  |           label:  开启 | ||||||
|  |         - value: false | ||||||
|  |           label:  关闭 | ||||||
|  |     - $formkit: radio | ||||||
|  |       name: index_carousel | ||||||
|  |       label:  开启置顶轮播 | ||||||
|  |       value: true | ||||||
|  |       help: '如果该文章被置顶,在此处可开启文章置顶轮播。' | ||||||
|  |       options: | ||||||
|  |         - value: true | ||||||
|  |           label:  开启 | ||||||
|  |         - value: false | ||||||
|  |           label:  关闭 | ||||||
|  | 
 | ||||||
|  | --- | ||||||
|  | 
 | ||||||
|  | apiVersion: v1alpha1 | ||||||
|  | kind: AnnotationSetting | ||||||
|  | metadata: | ||||||
|  |   generateName: annotation-setting- | ||||||
|  | spec: | ||||||
|  |   targetRef: | ||||||
|  |     group: content.halo.run | ||||||
|  |     kind: SinglePage | ||||||
|  |   formSchema: | ||||||
|  |     - $formkit: radio | ||||||
|  |       name: enable_copyright | ||||||
|  |       label:  开启文章版权声明 | ||||||
|  |       value: true | ||||||
|  |       help: '当前配置将覆盖主题中的默认配置。' | ||||||
|  |       options: | ||||||
|  |         - value: true | ||||||
|  |           label:  开启 | ||||||
|  |         - value: false | ||||||
|  |           label:  关闭 | ||||||
|  |     - $formkit: text | ||||||
|  |       name: tips | ||||||
|  |       label:  文章提示 | ||||||
|  |       placeholder: '请输入提示内容' | ||||||
|  |       help: '在文章顶部显示一条提示。' | ||||||
|  |     - $formkit: radio | ||||||
|  |       name: enable_katex | ||||||
|  |       label:  KaTeX 公式支持 | ||||||
|  |       value: false | ||||||
|  |       help: '博客通过 KaTeX 做数学公式渲染,当前配置将覆盖主题中的默认配置。' | ||||||
|  |       options: | ||||||
|  |         - value: true | ||||||
|  |           label:  开启 | ||||||
|  |         - value: false | ||||||
|  |           label:  关闭 | ||||||
|  |     - $formkit: radio | ||||||
|  |       name: enable_share | ||||||
|  |       label:  开启文章分享 | ||||||
|  |       value: true | ||||||
|  |       help: '当前配置将覆盖主题中的默认配置。' | ||||||
|  |       options: | ||||||
|  |         - value: true | ||||||
|  |           label:  开启 | ||||||
|  |         - value: false | ||||||
|  |           label:  关闭 | ||||||
| @ -8,7 +8,7 @@ | |||||||
|     "test": "echo \"Error: no test specified\" && exit 1", |     "test": "echo \"Error: no test specified\" && exit 1", | ||||||
|     "release": "eslint **/*.js && gulp release", |     "release": "eslint **/*.js && gulp release", | ||||||
|     "push": "eslint **/*.js && gulp push", |     "push": "eslint **/*.js && gulp push", | ||||||
|     "zip": "eslint **/*.js && gulp zip", |     "zip": "gulp zip", | ||||||
|     "build": "eslint **/*.js && gulp", |     "build": "eslint **/*.js && gulp", | ||||||
|     "lint": "eslint **/*.js" |     "lint": "eslint **/*.js" | ||||||
|   }, |   }, | ||||||
|  | |||||||
							
								
								
									
										204
									
								
								settings.yaml
									
									
									
									
									
								
							
							
						
						
									
										204
									
								
								settings.yaml
									
									
									
									
									
								
							| @ -468,16 +468,15 @@ spec: | |||||||
|           label: 侧边栏展示 |           label: 侧边栏展示 | ||||||
|           help: 配置侧边栏展示方式,三列布局时不能在右侧显示音乐模块。 |           help: 配置侧边栏展示方式,三列布局时不能在右侧显示音乐模块。 | ||||||
|           value: |           value: | ||||||
|             - name: QQ |             - name: notice | ||||||
|               icon: <i class="fa-brands fa-qq"></i> |               position: left | ||||||
|               url: https://api.sumt.cn/api/qq.talk.php?qq=自己的QQ号&format=card |               hide: is-not-hidden | ||||||
|               delete: true |             - name: notice | ||||||
|             - name: Github |               position: right | ||||||
|               icon: <i class="fa-brands fa-github"></i> |               hide: is-not-hidden | ||||||
|               url: |             - name: notice | ||||||
|             - name: Email |               position: right | ||||||
|               icon: <i class="fa-solid fa-envelope"></i> |               hide: is-not-hidden | ||||||
|               url: mailto:邮箱地址 |  | ||||||
|           children: |           children: | ||||||
|             - $formkit: select |             - $formkit: select | ||||||
|               name: type |               name: type | ||||||
| @ -506,8 +505,8 @@ spec: | |||||||
|                   label:  文章标签模块 |                   label:  文章标签模块 | ||||||
|                 - value: 'tagcloud' |                 - value: 'tagcloud' | ||||||
|                   label:  文章标签云模块 |                   label:  文章标签云模块 | ||||||
|                 - value: 'links' | #                - value: 'links' | ||||||
|                   label:  友链模块 | #                  label:  友链模块 | ||||||
|             - $formkit: select |             - $formkit: select | ||||||
|               name: position |               name: position | ||||||
|               label: 模块位置 |               label: 模块位置 | ||||||
| @ -643,16 +642,15 @@ spec: | |||||||
|           label: 侧边栏音乐-自建API |           label: 侧边栏音乐-自建API | ||||||
|           placeholder: '请输入 API 地址' |           placeholder: '请输入 API 地址' | ||||||
|           help: '自建 API 方法见文档:<a href="https://github.com/metowolf/Meting" target="_blank">Meting</a>。' |           help: '自建 API 方法见文档:<a href="https://github.com/metowolf/Meting" target="_blank">Meting</a>。' | ||||||
| #        - $formkit: text |         - $formkit: radio | ||||||
| #          name: music_mode |           name: music_mode | ||||||
| #              label:  侧边栏音乐-音乐播放器配置方式 |           label:  侧边栏音乐-音乐播放器配置方式 | ||||||
| #      type: radio |           value: 'playlist' | ||||||
| #          value: 'playlist' |           options: | ||||||
| #          options: |             - value: 'playlist' | ||||||
| #            - value: 'playlist' |               label:  '网易云歌单 ID' | ||||||
| #              label:  '网易云歌单 ID' |             - value: 'config' | ||||||
| #            - value: 'config' |               label:  参数进阶配置 | ||||||
| #              label:  参数进阶配置 |  | ||||||
|         - $formkit: text |         - $formkit: text | ||||||
|           name: netease_playlist_id |           name: netease_playlist_id | ||||||
|           label: '侧边栏音乐-网易云歌单 ID' |           label: '侧边栏音乐-网易云歌单 ID' | ||||||
| @ -679,17 +677,15 @@ spec: | |||||||
| #              label:  显示 | #              label:  显示 | ||||||
| #            - value: false | #            - value: false | ||||||
| #              label:  不显示 | #              label:  不显示 | ||||||
| #        - $formkit: text |         - $formkit: radio | ||||||
| #          name: ad_tag_close |           name: ad_tag_close | ||||||
| #              label:  侧边栏广告-点击“广告”标签可关闭广告 |           label:  侧边栏广告-点击“广告”标签可关闭广告 | ||||||
| #      type: radio |           value: true | ||||||
| #      data-type: bool |           options: | ||||||
| #          value: true |             - value: true | ||||||
| #          options: |               label:  是 | ||||||
| #            - value: true |             - value: false | ||||||
| #              label:  是 |               label:  否 | ||||||
| #            - value: false |  | ||||||
| #              label:  否 |  | ||||||
| #        - $formkit: text | #        - $formkit: text | ||||||
| #          name: ad_mode | #          name: ad_mode | ||||||
| #              label:  侧边栏广告-广告展示方法 | #              label:  侧边栏广告-广告展示方法 | ||||||
| @ -718,16 +714,16 @@ spec: | |||||||
| #      type: textarea | #      type: textarea | ||||||
| #          placeholder: '请输入广告代码' | #          placeholder: '请输入广告代码' | ||||||
| #          help: '在这里黏贴广告联盟提供的广告代码,<u>自定义广告代码模式时不能为空。' | #          help: '在这里黏贴广告联盟提供的广告代码,<u>自定义广告代码模式时不能为空。' | ||||||
| #        - $formkit: text |         - $formkit: text | ||||||
| #          name: recent_posts_num |           name: recent_posts_num | ||||||
| #              label:  侧边栏最近文章-展示文章数量 |           label:  侧边栏最近文章-展示文章数量 | ||||||
| #          placeholder: 请输入数量数值 |           placeholder: 请输入数量数值 | ||||||
| #          value: 5 |           value: 5 | ||||||
| #        - $formkit: text |         - $formkit: text | ||||||
| #          name: recent_comments_num |           name: recent_comments_num | ||||||
| #              label:  侧边栏最近评论-展示评论数量 |           label:  侧边栏最近评论-展示评论数量 | ||||||
| #          placeholder: 请输入数量数值 |           placeholder: 请输入数量数值 | ||||||
| #          value: 5 |           value: 5 | ||||||
| #        - $formkit: text | #        - $formkit: text | ||||||
| #          name: categories_more | #          name: categories_more | ||||||
| #              label:  侧边栏分类-显示”更多”按钮 | #              label:  侧边栏分类-显示”更多”按钮 | ||||||
| @ -740,72 +736,62 @@ spec: | |||||||
| #              label:  显示 | #              label:  显示 | ||||||
| #            - value: false | #            - value: false | ||||||
| #              label:  不显示 | #              label:  不显示 | ||||||
| #        - $formkit: text |         - $formkit: text | ||||||
| #          name: categories_num |           name: categories_num | ||||||
| #              label:  侧边栏分类-展示分类数量 |           label:  侧边栏分类-展示分类数量 | ||||||
| #          placeholder: 请输入数量数值 |           placeholder: 请输入数量数值 | ||||||
| #          value: 10 |           value: 10 | ||||||
| #        - $formkit: text |         - $formkit: radio | ||||||
| #          name: tags_more |           name: tags_more | ||||||
| #              label:  侧边栏标签-显示”更多”按钮 |           label:  侧边栏标签-显示”更多”按钮 | ||||||
| #      type: radio |           value: true | ||||||
| #      data-type: bool |           help: '超出展示的标签数量后是否显示更多按钮。' | ||||||
| #          value: true |           options: | ||||||
| #          help: '超出展示的标签数量后是否显示更多按钮。' |             - value: true | ||||||
| #          options: |               label:  显示 | ||||||
| #            - value: true |             - value: false | ||||||
| #              label:  显示 |               label:  不显示 | ||||||
| #            - value: false |         - $formkit: text | ||||||
| #              label:  不显示 |           name: tags_num | ||||||
| #        - $formkit: text |           label:  侧边栏标签-展示标签数量 | ||||||
| #          name: tags_num |           placeholder: 请输入数量数值 | ||||||
| #              label:  侧边栏标签-展示标签数量 |           value: 18 | ||||||
| #          placeholder: 请输入数量数值 |         - $formkit: radio | ||||||
| #          value: 18 |           name: enable_tag_color | ||||||
| #        - $formkit: text |           label:  侧边栏标签-开启标签颜色 | ||||||
| #          name: enable_tag_color |           value: false | ||||||
| #              label:  侧边栏标签-开启标签颜色 |           options: | ||||||
| #      type: switch |             - value: true | ||||||
| #      data-type: bool |               label:  开启 | ||||||
| #          value: false |             - value: false | ||||||
| #          options: |               label:  关闭 | ||||||
| #            - value: true |         - $formkit: radio | ||||||
| #              label:  开启 |           name: tagcloud_more | ||||||
| #            - value: false |           label:  侧边栏标签云-显示”更多”按钮 | ||||||
| #              label:  关闭 |           value: true | ||||||
| #        - $formkit: text |           help: '超出展示的标签数量后是否显示更多按钮。' | ||||||
| #          name: tagcloud_more |           options: | ||||||
| #              label:  侧边栏标签云-显示”更多”按钮 |             - value: true | ||||||
| #      type: radio |               label:  显示 | ||||||
| #      data-type: bool |             - value: false | ||||||
| #          value: true |               label:  不显示 | ||||||
| #          help: '超出展示的标签数量后是否显示更多按钮。' |         - $formkit: text | ||||||
| #          options: |           name: tagcloud_num | ||||||
| #            - value: true |           label:  侧边栏标签云-展示标签数量 | ||||||
| #              label:  显示 |           placeholder: 请输入数量数值 | ||||||
| #            - value: false |           value: 32 | ||||||
| #              label:  不显示 |         - $formkit: radio | ||||||
| #        - $formkit: text |           name: enable_tagcloud_color | ||||||
| #          name: tagcloud_num |           label:  侧边栏标签云-开启标签颜色 | ||||||
| #              label:  侧边栏标签云-展示标签数量 |           value: false | ||||||
| #          placeholder: 请输入数量数值 |           options: | ||||||
| #          value: 32 |             - value: true | ||||||
| #        - $formkit: text |               label:  开启 | ||||||
| #          name: enable_tagcloud_color |             - value: false | ||||||
| #              label:  侧边栏标签云-开启标签颜色 |               label:  关闭 | ||||||
| #      type: switch | #        - $formkit: radio | ||||||
| #      data-type: bool |  | ||||||
| #          value: false |  | ||||||
| #          options: |  | ||||||
| #            - value: true |  | ||||||
| #              label:  开启 |  | ||||||
| #            - value: false |  | ||||||
| #              label:  关闭 |  | ||||||
| #        - $formkit: text |  | ||||||
| #          name: links_more | #          name: links_more | ||||||
| #              label:  侧边栏友链-显示”更多”按钮 | #          label:  侧边栏友链-显示”更多”按钮 | ||||||
| #      type: radio |  | ||||||
| #      data-type: bool |  | ||||||
| #          value: true | #          value: true | ||||||
| #          help: '超出展示的友链数量后是否显示更多按钮。' | #          help: '超出展示的友链数量后是否显示更多按钮。' | ||||||
| #          options: | #          options: | ||||||
| @ -815,7 +801,7 @@ spec: | |||||||
| #              label:  不显示 | #              label:  不显示 | ||||||
| #        - $formkit: text | #        - $formkit: text | ||||||
| #          name: links_num | #          name: links_num | ||||||
| #              label:  侧边栏友链-展示友链数量 | #          label:  侧边栏友链-展示友链数量 | ||||||
| #          placeholder: 请输入数量数值 | #          placeholder: 请输入数量数值 | ||||||
| #          value: 10 | #          value: 10 | ||||||
|     - group: page_config |     - group: page_config | ||||||
|  | |||||||
| @ -91,86 +91,60 @@ | |||||||
|     // </#if> |     // </#if> | ||||||
|     /** 主题配置 */ |     /** 主题配置 */ | ||||||
|     const DreamConfig = {}; |     const DreamConfig = {}; | ||||||
|     DreamConfig["theme_version"] = '${theme_version!}'; |     DreamConfig["theme_version"] = [[${theme.spec.version}]]; | ||||||
|     DreamConfig["theme_base"] = '${theme_base!}'; |     DreamConfig["theme_base"] = "[(${#theme.assets('/')})]"; | ||||||
|     DreamConfig["access_key"] = '${settings.access_key!'dream'}' |     [(${!#strings.isEmpty(theme.config.post.code_fold_line)?'DreamConfig["code_fold_line"] = "' + theme.config.post.code_fold_line + '";': ''})] | ||||||
|     DreamConfig["code_fold_line"] = [[${theme.config.post.code_fold_line}]] |     [(${!#strings.isEmpty(theme.config.basic_info.document_hidden_title)?'DreamConfig["document_hidden_title"] = "' + theme.config.basic_info.document_hidden_title + '";': ''})] | ||||||
|     DreamConfig["document_hidden_title"] = [[${theme.config.basic_info.document_hidden_title}]] |     [(${!#strings.isEmpty(theme.config.basic_info.document_visible_title)?'DreamConfig["document_visible_title"] = "' + theme.config.basic_info.document_visible_title + '";' : ''})] | ||||||
|     <#if settings.document_visible_title?? && settings.document_visible_title!=''> |     [(${!#strings.isEmpty(theme.config.basic_info.website_time)?'DreamConfig["website_time"] = "' + theme.config.basic_info.website_time + '";' : ''})] | ||||||
|     DreamConfig["document_visible_title"] = '${settings.document_visible_title}'; |     // <#if settings.enable_color_character!false> | ||||||
|     </#if> |     // DreamConfig["spark_input_content"] = ['${user.description?trim?replace('\n', '')?js_string}'<#if settings.color_character?? && settings.color_character?trim!=''>, '${settings.color_character?trim?js_string?replace('\\n', "','")}'</#if>]; | ||||||
|     <#if settings.enable_color_character!false> |     // </#if> | ||||||
|     DreamConfig["spark_input_content"] = ['${user.description?trim?replace('\n', '')?js_string}'<#if settings.color_character?? && settings.color_character?trim!=''>, '${settings.color_character?trim?js_string?replace('\\n', "','")}'</#if>]; |     // <#if settings.sidebar_notice?? && settings.sidebar_notice!='none'> | ||||||
|     </#if> |     // DreamConfig["notice_show_mode"] = '${settings.notice_show_mode!'index'}'; | ||||||
|     <#if settings.website_time?? && settings.website_time!=''> |     // </#if> | ||||||
|     DreamConfig["website_time"] = '${settings.website_time}'; |     [(${(!#strings.isEmpty(theme.config.post.img_fold_height) && #numbers.sequence(theme.config.post.img_fold_height,theme.config.post.img_fold_height)[0] >= 400)?'DreamConfig["img_fold_height"] = ' + theme.config.post.img_fold_height + ';': ''})] | ||||||
|     </#if> |     // <#if settings.journals_fold_height?? && settings.journals_fold_height?number gte 260> | ||||||
|     <#if settings.sidebar_notice?? && settings.sidebar_notice!='none'> |     // DreamConfig["journals_fold_height"] = ${settings.journals_fold_height}; | ||||||
|     DreamConfig["notice_show_mode"] = '${settings.notice_show_mode!'index'}'; |     // </#if> | ||||||
|     </#if> |     [(${theme.config.enhance.cursor_move != 'none'?'DreamConfig["cursor_move"] = "' + theme.config.enhance.cursor_move + '";': ''})] | ||||||
|     <#if settings.img_fold_height?? && settings.img_fold_height?number gte 400> |     [(${theme.config.enhance.cursor_click != 'none'?'DreamConfig["cursor_click"] = "' + theme.config.enhance.cursor_click + '";': ''})] | ||||||
|     DreamConfig["img_fold_height"] = ${settings.img_fold_height}; |     [(${theme.config.enhance.effects_sakura_mode != 'none'?'DreamConfig["effects_sakura_mode"] = "' + theme.config.enhance.effects_sakura_mode + '";': ''})] | ||||||
|     </#if> |     [(${theme.config.enhance.effects_universe_mode != 'none'?'DreamConfig["effects_universe_mode"] = "' + theme.config.enhance.effects_universe_mode + '";': ''})] | ||||||
|     <#if settings.journals_fold_height?? && settings.journals_fold_height?number gte 260> |       [(${theme.config.enhance.effects_circle_magic_mode != 'none'?'DreamConfig["effects_circle_magic_mode"] = "' + theme.config.enhance.effects_circle_magic_mode + '";': ''})] | ||||||
|     DreamConfig["journals_fold_height"] = ${settings.journals_fold_height}; |       [(${theme.config.enhance.enable_baidu_push?'DreamConfig["enable_baidu_push"] = true;': ''})] | ||||||
|     </#if> |       [(${theme.config.enhance.enable_toutiao_push?'DreamConfig["enable_toutiao_push"] = true;': ''})] | ||||||
|     <#if settings.cursor_move?? && settings.cursor_move!='none'> |       [(${theme.config.basic_style.load_progress != 'none'?'DreamConfig["load_progress"] = "' + theme.config.basic_style.load_progress + '";': ''})] | ||||||
|     DreamConfig["cursor_move"] = '${settings.cursor_move}'; |     // <#if settings.journals_share_image?? && settings.journals_share_image != 'none'> | ||||||
|     </#if> |     // DreamConfig["journals_share_image"] = '${settings.journals_share_image}'; | ||||||
|     <#if settings.cursor_click?? && settings.cursor_click!='none'> |     // </#if> | ||||||
|     DreamConfig["cursor_click"] = '${settings.cursor_click}'; |       [(${!#strings.isEmpty(theme.config.sidebar.meting_api)?'var meting_api = "' + theme.config.sidebar.meting_api + '";': ''})] | ||||||
|     </#if> |     // /** 看板娘相关配置 */ | ||||||
|     <#if settings.effects_sakura_mode?? && settings.effects_sakura_mode!='none'> |     // <#if settings.enable_live2d!true> | ||||||
|     DreamConfig["effects_sakura_mode"] = '${settings.effects_sakura_mode}'; |     // DreamConfig["enable_live2d"] = true; | ||||||
|     </#if> |     // <#if settings.live2d_about_page?? && settings.live2d_about_page!=''> | ||||||
|     <#if settings.effects_universe_mode?? && settings.effects_universe_mode!='none'> |     // DreamConfig["live2d_about_page"] = '${settings.live2d_about_page}'; | ||||||
|     DreamConfig["effects_universe_mode"] = '${settings.effects_universe_mode}'; |     // </#if> | ||||||
|     </#if> |     // DreamConfig["live2d_model_url"] = '${settings.live2d_model_url!'https://unpkg.com/live2d-widget-model@1.0.1/'}'; | ||||||
|     <#if settings.effects_circle_magic_mode?? && settings.effects_circle_magic_mode!='none'> |     // DreamConfig["live2d_tips_url"] = '${settings.live2d_tips_url!'/themes/dream/source/lib/live2d@1.0.1/waifu-tips.json'}'; | ||||||
|     DreamConfig["effects_circle_magic_mode"] = '${settings.effects_circle_magic_mode}'; |     // DreamConfig["live2d_edge_side"] = '${settings.live2d_edge_side!'right:50'}'; | ||||||
|     </#if> |     // DreamConfig["live2d_waifu_size"] = '${settings.live2d_waifu_size!'280x260'}'; | ||||||
|     <#if settings.enable_baidu_push!false> |     // DreamConfig["live2d_model_id"] = '${settings.live2d_model_id!'0'}'; | ||||||
|     DreamConfig["enable_baidu_push"] = true; |     // DreamConfig["live2d_model_textures_id"] = '${settings.live2d_model_textures_id!'0'}'; | ||||||
|     </#if> |     // DreamConfig["live2d_show_tool_menu"] = ${(settings.live2d_show_tool_menu!true)?c}; | ||||||
|     <#if settings.enable_toutiao_push!false> |     // DreamConfig["live2d_can_turn_to_home_page"] = ${(settings.live2d_can_turn_to_home_page!true)?c}; | ||||||
|     DreamConfig["enable_toutiao_push"] = true; |     // DreamConfig["live2d_can_switch_hitokoto"] = ${(settings.live2d_can_switch_hitokoto!true)?c}; | ||||||
|     </#if> |     // DreamConfig["live2d_can_switch_model"] = ${(settings.live2d_can_switch_model!true)?c}; | ||||||
|     <#if settings.load_progress?? && settings.load_progress != 'none'> |     // DreamConfig["live2d_can_switch_textures"] = ${(settings.live2d_can_switch_textures!true)?c}; | ||||||
|     DreamConfig["load_progress"] = '${settings.load_progress}'; |     // DreamConfig["live2d_can_take_screenshot"] = ${(settings.live2d_can_take_screenshot!true)?c}; | ||||||
|     </#if> |     // DreamConfig["live2d_can_turn_to_about_page"] = ${(settings.live2d_can_turn_to_about_page!true)?c}; | ||||||
|     <#if settings.journals_share_image?? && settings.journals_share_image != 'none'> |     // DreamConfig["live2d_can_close_live2d"] = ${(settings.live2d_can_close_live2d!true)?c}; | ||||||
|     DreamConfig["journals_share_image"] = '${settings.journals_share_image}'; |     // DreamConfig["live2d_model_rand_mode"] = '${settings.live2d_model_rand_mode!'switch'}'; | ||||||
|     </#if> |     // DreamConfig["live2d_model_textures_rand_mode"] = '${settings.live2d_model_textures_rand_mode!'rand'}'; | ||||||
|     <#if settings.meting_api?? && settings.meting_api != ''> |     // </#if> | ||||||
|     var meting_api = '${settings.meting_api}'; |  | ||||||
|     </#if> |  | ||||||
|     /** 看板娘相关配置 */ |  | ||||||
|     <#if settings.enable_live2d!true> |  | ||||||
|     DreamConfig["enable_live2d"] = true; |  | ||||||
|     <#if settings.live2d_about_page?? && settings.live2d_about_page!=''> |  | ||||||
|     DreamConfig["live2d_about_page"] = '${settings.live2d_about_page}'; |  | ||||||
|     </#if> |  | ||||||
|     DreamConfig["live2d_model_url"] = '${settings.live2d_model_url!'https://unpkg.com/live2d-widget-model@1.0.1/'}'; |  | ||||||
|     DreamConfig["live2d_tips_url"] = '${settings.live2d_tips_url!'/themes/dream/source/lib/live2d@1.0.1/waifu-tips.json'}'; |  | ||||||
|     DreamConfig["live2d_edge_side"] = '${settings.live2d_edge_side!'right:50'}'; |  | ||||||
|     DreamConfig["live2d_waifu_size"] = '${settings.live2d_waifu_size!'280x260'}'; |  | ||||||
|     DreamConfig["live2d_model_id"] = '${settings.live2d_model_id!'0'}'; |  | ||||||
|     DreamConfig["live2d_model_textures_id"] = '${settings.live2d_model_textures_id!'0'}'; |  | ||||||
|     DreamConfig["live2d_show_tool_menu"] = ${(settings.live2d_show_tool_menu!true)?c}; |  | ||||||
|     DreamConfig["live2d_can_turn_to_home_page"] = ${(settings.live2d_can_turn_to_home_page!true)?c}; |  | ||||||
|     DreamConfig["live2d_can_switch_hitokoto"] = ${(settings.live2d_can_switch_hitokoto!true)?c}; |  | ||||||
|     DreamConfig["live2d_can_switch_model"] = ${(settings.live2d_can_switch_model!true)?c}; |  | ||||||
|     DreamConfig["live2d_can_switch_textures"] = ${(settings.live2d_can_switch_textures!true)?c}; |  | ||||||
|     DreamConfig["live2d_can_take_screenshot"] = ${(settings.live2d_can_take_screenshot!true)?c}; |  | ||||||
|     DreamConfig["live2d_can_turn_to_about_page"] = ${(settings.live2d_can_turn_to_about_page!true)?c}; |  | ||||||
|     DreamConfig["live2d_can_close_live2d"] = ${(settings.live2d_can_close_live2d!true)?c}; |  | ||||||
|     DreamConfig["live2d_model_rand_mode"] = '${settings.live2d_model_rand_mode!'switch'}'; |  | ||||||
|     DreamConfig["live2d_model_textures_rand_mode"] = '${settings.live2d_model_textures_rand_mode!'rand'}'; |  | ||||||
|     </#if> |  | ||||||
| 
 | 
 | ||||||
|     /** 配置主题模式 */ |     /** 配置主题模式 */ | ||||||
|     DreamConfig["default_theme"] = '${settings.default_theme!'light'}'; |     DreamConfig["default_theme"] = '[(${theme.config.basic_style.default_theme})]'; | ||||||
| 
 |  | ||||||
|     (function(){ |     (function(){ | ||||||
|         let isNight = DreamConfig.default_theme === 'system'? matchMedia('(prefers-color-scheme: dark)').matches : localStorage.getItem('night') || DreamConfig.default_theme === 'night'; |         let isNight = DreamConfig.default_theme === 'system'? matchMedia('(prefers-color-scheme: dark)').matches : localStorage.getItem('night') || DreamConfig.default_theme === 'night'; | ||||||
|         if (isNight.toString() === 'true') { |         if (isNight.toString() === 'true') { | ||||||
|  | |||||||
| @ -55,19 +55,13 @@ | |||||||
| 
 | 
 | ||||||
|   <th:block th:replace="~{common/config}"/> |   <th:block th:replace="~{common/config}"/> | ||||||
| 
 | 
 | ||||||
|   <script src="@{/assets/lib/jquery@3.5.1/jquery.min.js}"></script> |   <script th:src="@{/assets/lib/jquery@3.5.1/jquery.min.js}"></script> | ||||||
| 
 | 
 | ||||||
|   <script th:if="${theme.config.enhance.enable_patch}" src="//cdn.jsdelivr.net/gh/nineya/halo-theme-dream@master/src/patch.js"></script> |   <script th:if="${theme.config.enhance.enable_patch}" src="//cdn.jsdelivr.net/gh/nineya/halo-theme-dream@master/src/patch.js"></script> | ||||||
|   <!--<#if settings.external_css?? && settings.external_css!=''>--> |   <link th:if="${!#strings.isEmpty(theme.config.custom.external_css)}" rel="stylesheet" th:href="${theme.config.custom.external_css}"> | ||||||
|   <!--    <link rel="stylesheet" th:href="${settings.external_css!}">--> | 
 | ||||||
|   <!--</#if>--> |   <style th:if="${!#strings.isEmpty(theme.config.custom.inline_css)}" type="text/css" th:text="${theme.config.custom.inline_css}"></style> | ||||||
|   <!--<#if settings.inline_css?? && settings.inline_css!=''>--> |   [(${theme.config.custom.external_js_head})] | ||||||
|   <!--    <style type="text/css">${settings.inline_css!}</style>--> |   <script th:if="${!#strings.isEmpty(theme.config.custom.inline_js_head)}" type="text/javascript" th:text="${theme.config.custom.inline_js_head}"> | ||||||
|   <!--</#if>--> |   </script> | ||||||
|   <!--${settings.external_js_head!}--> |  | ||||||
|   <!--<#if settings.inline_js_head?? && settings.inline_js_head!=''>--> |  | ||||||
|   <!--    <script type="text/javascript">--> |  | ||||||
|   <!--        ${settings.inline_js_head!}--> |  | ||||||
|   <!--    </script>--> |  | ||||||
|   <!--</#if>--> |  | ||||||
| </head> | </head> | ||||||
| @ -1,6 +1,7 @@ | |||||||
| <html lang="zh" xmlns:th="https://www.thymeleaf.org" | <html lang="zh" xmlns:th="https://www.thymeleaf.org" | ||||||
|       th:fragment="layout (title, canonical, content, isPost)"> |       th:fragment="layout (title, canonical, content, isPost)" | ||||||
| <th:block th:if="${#strings.equals('',param._pjax) == false}"> |       th:with="isPjax = ${#strings.equals('',param._pjax)}"> | ||||||
|  | <th:block th:if="${isPjax}"> | ||||||
|   <th:block th:replace="~{common/head :: head}"/> |   <th:block th:replace="~{common/head :: head}"/> | ||||||
|   <body> |   <body> | ||||||
|   <div class="column-main"> |   <div class="column-main"> | ||||||
| @ -9,7 +10,7 @@ | |||||||
|   <th:block th:replace="~{common/scripts}"/> |   <th:block th:replace="~{common/scripts}"/> | ||||||
|   </body> |   </body> | ||||||
| </th:block> | </th:block> | ||||||
| <th:block th:if="${#strings.equals('',param._pjax)}"> | <th:block th:unless="${isPjax}"> | ||||||
|   <th:block th:replace="~{common/head :: head}"/> |   <th:block th:replace="~{common/head :: head}"/> | ||||||
|   <body> |   <body> | ||||||
|   <th:block th:replace="~{common/navbar}"/> |   <th:block th:replace="~{common/navbar}"/> | ||||||
| @ -17,12 +18,11 @@ | |||||||
|     <th:block th:replace="~{common/banner :: banner}"/> |     <th:block th:replace="~{common/banner :: banner}"/> | ||||||
|   </th:block> |   </th:block> | ||||||
|   <section class="section"> |   <section class="section"> | ||||||
|     <div class="${theme.config.basic_style.sidebar_column != 'all' ? 'container two-column' : 'container' }"> |     <div th:class="${theme.config.basic_style.sidebar_column != 'all' ? 'container two-column' : 'container' }"> | ||||||
|       <div class="columns"> |       <div class="columns"> | ||||||
|         <div class="column column-main"> |         <div class="column column-main"> | ||||||
|           <th:block th:insert="${content}"/> |           <th:block th:insert="${content}"/> | ||||||
|         </div> |         </div> | ||||||
|         <th:block th:insert="${content}"/> |  | ||||||
|         <th:block th:if="${theme.config.basic_style.sidebar_column!='only-right' && theme.config.basic_style.sidebar_column!='module-left'}"> |         <th:block th:if="${theme.config.basic_style.sidebar_column!='only-right' && theme.config.basic_style.sidebar_column!='module-left'}"> | ||||||
|           <th:block th:replace="~{common/widget :: widget('left')}"/> |           <th:block th:replace="~{common/widget :: widget('left')}"/> | ||||||
|         </th:block> |         </th:block> | ||||||
|  | |||||||
| @ -1,9 +1,9 @@ | |||||||
| <aside xmlns:th="https://www.thymeleaf.org" | <aside xmlns:th="https://www.thymeleaf.org" | ||||||
|        th:fragment="widget (position)" |        th:fragment="widget (position)" | ||||||
|        class="column column-side column-${position} ${settings[position+'_sidebar_sticky']!'none'}-sticky"> |        th:class="'column column-side column-' + ${position} + ' ' + ${position == 'left'?theme.config.basic_style.left_sidebar_sticky:theme.config.basic_style.right_sidebar_sticky} + '-sticky'"> | ||||||
|   <th:block th:each="sidebar :${theme.config.sidebar.sidebar_show}"> |   <th:block th:each="sidebar :${theme.config.sidebar.sidebar_show}"> | ||||||
|     <th:block th:if="${sidebar.position == position}"> |     <th:block th:if="${sidebar.position == position}"> | ||||||
|       <th:block th:replace="~{${'/widget/' + sidebar.type}}" /> |       <th:block th:replace="~{${'/widget/' + sidebar.type} :: widget ( hide = ${sidebar.hide})}" /> | ||||||
|     </th:block> |     </th:block> | ||||||
|   </th:block> |   </th:block> | ||||||
|   <div th:if="${position == 'left'}" class="column-right-shadow is-hidden-desktop"> |   <div th:if="${position == 'left'}" class="column-right-shadow is-hidden-desktop"> | ||||||
|  | |||||||
| @ -1,22 +1,17 @@ | |||||||
| <!DOCTYPE html> | <!DOCTYPE html> | ||||||
| <html xmlns:th="https://www.thymeleaf.org" | <html xmlns:th="https://www.thymeleaf.org" | ||||||
|   th:replace="~{common/layout :: layout (title = ${site.title}, canonical = ${site.url}, content = ~{::content}, isPost = false)}"> |   th:replace="~{common/layout :: layout (title = ${site.title}, canonical = ${site.url}, content = ~{::content}, isPost = false)}"> | ||||||
| <th:block th:fragment="content"> | <th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(posts)}"> | ||||||
| 首页 |   <div th:if="${isEmpty}" class="card card-empty"> | ||||||
|  |     <i class="fa fa-inbox"></i> | ||||||
|  |     还没有发表过文章 | ||||||
|  |   </div> | ||||||
|  |   <th:block th:unless="${isEmpty}"> | ||||||
|  |     <th:block th:replace="~{main/article_list :: articleList (${posts.items}, ${posts.first})}"/> | ||||||
|  | <!--    <#include "templates/main/article_list.html">--> | ||||||
|  | <!--    <@article_list posts.content/>--> | ||||||
|  | <!--    <#include "templates/main/pagination.html">--> | ||||||
|  | <!--    <@pagination method="index" datas=posts display="${settings.page_number!5}" />--> | ||||||
|  |   </th:block> | ||||||
| </th:block> | </th:block> | ||||||
| </html> | </html> | ||||||
| <!--<#include "templates/layout_pjax.html">--> |  | ||||||
| <!--<#global is_first_index=(posts.number == 0) >--> |  | ||||||
| <!--<@layout title="${blog_title!}" canonical="${blog_url!}">--> |  | ||||||
| <!--    <#if posts.content?? && posts.content?size gt 0>--> |  | ||||||
| <!--        <#include "templates/main/article_list.html">--> |  | ||||||
| <!--        <@article_list posts.content/>--> |  | ||||||
| <!--        <#include "templates/main/pagination.html">--> |  | ||||||
| <!--        <@pagination method="index" datas=posts display="${settings.page_number!5}" />--> |  | ||||||
| <!--    <#else>--> |  | ||||||
| <!--        <div class="card card-empty">--> |  | ||||||
| <!--            <i class="fa fa-inbox"></i>--> |  | ||||||
| <!--            还没有发表过文章--> |  | ||||||
| <!--        </div>--> |  | ||||||
| <!--    </#if>--> |  | ||||||
| <!--</@layout>--> |  | ||||||
| @ -1,260 +1,268 @@ | |||||||
| <#macro model_build content> | <div xmlns:th="https://www.thymeleaf.org" | ||||||
|     <#if content == ''> |      th:fragment="articleList (posts, isFirstIndex)"> | ||||||
|       <#return> |   <th:block th:each="post : ${posts}" | ||||||
|     </#if> |             th:with="thumbnail = ${#strings.isEmpty(post.spec.cover) ? theme.config.post.default_thumbnail + '?id=' + postStat.index : post.spec.cover}"> | ||||||
|     <#local content_option=content?split('|')> |     [(${thumbnail})] | ||||||
|     <#local tag=(content_option[0]!'')?trim> |   </th:block> | ||||||
|     <#local content=((content_option[1]!'')?trim != '')?then('<div class="title">${content_option[1]?trim}</div>', '')> | </div> | ||||||
|     <#local target=((content_option[2]!'false')?trim == 'true')?then('target="_blank"', '')> | <!--  <#list posts as post>--> | ||||||
|     <#local imageUrl=((content_option[3]!'')?trim != '')?then('style="background-image: url(${content_option[3]?trim})"', '')> | <!--  <#local thumbnail = (post.thumbnail?? && post.thumbnail!='')?then(post.thumbnail!, (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail + settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + post.id?c, ''))>--> | ||||||
|     <#local targetUrl=((content_option[4]!'')?trim != '')?then('href="${content_option[4]?trim}"', '')> | <!--  <#if is_first_index?? && thumbnail != '' && !(post.topPriority!=1 || !post.metas?? || (post.metas.index_carousel!'false')=='false')>--> | ||||||
|   <a class="card widget brightness ${(content!='')?then('bg-shadow', '')}" ${target} ${imageUrl} ${targetUrl}>${content}<div class="tag">${tag}</div></a> | <!--  <#continue>--> | ||||||
| </#macro> | <!--</#if>--> | ||||||
| <#macro article_list posts> | <!--<#local thumbnail_mode = ((settings.top_thumbnail_mode!'default')=='grid' || (post.topPriority==0 && (settings.thumbnail_mode!'default')=='grid'))?then(--> | ||||||
|     <#if is_first_index!false> | <!--'grid', (post.metas?? && (post.metas.thumbnail_mode!'')?trim!='')?then(post.metas.thumbnail_mode?trim, (post.topPriority==1)?then(settings.top_thumbnail_mode!'back', settings.thumbnail_mode!'default')))>--> | ||||||
|         <#local carousel_content> | <!--<#if thumbnail != '' && thumbnail_mode == "back">--> | ||||||
|           <#list posts as post> | <!--<div class="card widget card-cover">--> | ||||||
|               <#if post.topPriority!=1> | <!--  <a href="${post.fullPath!}">--> | ||||||
|                   <#break> | <!--    <div class="cover-image" style="background-image: url(${thumbnail!})">--> | ||||||
|               </#if> | <!--    </div>--> | ||||||
|               <#if !post.metas?? || (post.metas.index_carousel!'false')=='false'> | <!--    <div class="details">--> | ||||||
|                   <#continue> | <!--      <h2 class="title"><#if post.topPriority==1><span class="top">置顶</span></#if>${post.title!}--> | ||||||
|               </#if> | <!--      </h2>--> | ||||||
|               <#local thumbnail = (post.thumbnail?? && post.thumbnail!='')?then(post.thumbnail!, (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail + settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + post.id?c, ''))> | <!--      <ul class="breadcrumb">--> | ||||||
|               <#if thumbnail != ''> | <!--        <li><@global.timeline datetime=post.createTime/></li>--> | ||||||
|                 <a class="swiper-slide bg-shadow cover-image" style="background-image: url(${thumbnail})" href="${post.fullPath!}"> | <!--        <li><i class="fa fa-eye"></i>${post.visits?c}</li>--> | ||||||
|                     <div class="swiper-slide-details" data-swiper-parallax="200" data-swiper-parallax-duration="600"> | <!--        <#if !post.disallowComment!false>--> | ||||||
|                         <p class="swiper-slide-details-title">${post.title!}</p> | <!--        <li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>--> | ||||||
|                         <ul class="breadcrumb"> | <!--      <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>--> | ||||||
|                             <li><@global.timeline datetime=post.createTime/></li> | <!--      <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />--> | ||||||
|                             <li><i class="fa fa-eye"></i>${post.visits?c}</li> | <!--      <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> | ||||||
|                             <#if !post.disallowComment!false> | <!--      <li style="color: ${heatColor}">${heat}℃</li>--> | ||||||
|                                 <li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if> | <!--      </ul>--> | ||||||
|                             <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li> | <!--    </div>--> | ||||||
|                             <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) /> | <!--  </a>--> | ||||||
|                             <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) /> | <!--  <#if post.categories?? && post.categories?size gt 0>--> | ||||||
|                             <li style="color: ${heatColor}">${heat}℃</li> | <!--  <div class="category">--> | ||||||
|                         </ul> | <!--    <#list post.categories as category>--> | ||||||
|                     </div> | <!--    <a href="${category.fullPath!}">${category.name!}</a>--> | ||||||
|                 </a> | <!--  </#list>--> | ||||||
|               </#if> | <!--</div>--> | ||||||
|           </#list> | <!--</#if>--> | ||||||
|         </#local> | <!--</div>--> | ||||||
|         <#if settings.sidebar_column=='module-left' || settings.sidebar_column=='module-right'> | <!--<#elseif thumbnail != '' && (thumbnail_mode == "small" || (thumbnail_mode == "small-alter" && post_index%2 == 0))>--> | ||||||
|           <#if settings.module_links?? && settings.module_links?trim != ''> | <!--<div class="card widget card-small">--> | ||||||
|               <#local module_links=settings.module_links?split('\n')> | <!--  <a href="${post.fullPath!}">--> | ||||||
|           <#else> | <!--    <div class="small-image" style="background-image: url(${thumbnail!})"></div>--> | ||||||
|               <#local module_links=[]> | <!--  </a>--> | ||||||
|               <#list 0..1 as i> | <!--  <div class="card-content main">--> | ||||||
|                 <#local post=posts[i]> | <!--    <h2 class="title">--> | ||||||
|                 <#local module_links=module_links+["推荐|${post.title!}|false|${post.thumbnail!}|${post.fullPath!}"]> | <!--      <#if post.topPriority==1><span class="top">置顶</span></#if><a--> | ||||||
|               </#list> | <!--    href="${post.fullPath!}">${post.title!}</a>--> | ||||||
|           </#if> | <!--    </h2>--> | ||||||
|           <div class="model model-index"> | <!--    <div class="main-content">${post.summary!}</div>--> | ||||||
|             <div class="card widget swiper"> | <!--    <hr/>--> | ||||||
|               <div class="swiper-wrapper">${carousel_content}</div> | <!--    <div class="meta">--> | ||||||
|               <div class="swiper-pagination"></div> | <!--      <ul class="breadcrumb">--> | ||||||
|               <div class="swiper-button-prev"></div> | <!--        <li><@global.timeline datetime=post.createTime/></li>--> | ||||||
|               <div class="swiper-button-next"></div> | <!--        <li><i class="fa fa-eye"></i>${post.visits?c}</li>--> | ||||||
|             </div> | <!--        <#if !post.disallowComment!false><li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>--> | ||||||
|             <div class="model model-index-side"> | <!--      <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>--> | ||||||
|               <#list 0..1 as i> | <!--      <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />--> | ||||||
|                 <#if i < module_links?size > | <!--      <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> | ||||||
|                     <@model_build module_links[i]/> | <!--      <li style="color: ${heatColor}">${heat}℃</li>--> | ||||||
|                 </#if> | <!--      </ul>--> | ||||||
|               </#list> | <!--      <#if post.categories?? && post.categories?size gt 0>--> | ||||||
|             </div> | <!--      <div class="level-item is-hidden-mobile">--> | ||||||
|           </div> | <!--        <#list post.categories as category>--> | ||||||
|             <#if module_links?size > 2 && module_links?size<=6> | <!--        <a href="${category.fullPath!}">${category.name!}</a> --> | ||||||
|               <div class="model model-attach model-attach-${module_links?size-2}"> | <!--      </#list>--> | ||||||
|                 <#list 2..5 as i> | <!--    </div>--> | ||||||
|                     <#if i < module_links?size > | <!--  </#if>--> | ||||||
|                         <@model_build module_links[i]/> | <!--</div>--> | ||||||
|                     </#if> | <!--</div>--> | ||||||
|                 </#list> | <!--</div>--> | ||||||
|               </div> | <!--<#elseif thumbnail != '' && (thumbnail_mode == "small-right" || (thumbnail_mode == "small-alter" && post_index%2 == 1))>--> | ||||||
|             </#if> | <!--<div class="card widget card-small">--> | ||||||
|           <#assign is_carousel=true /> | <!--  <div class="card-content main">--> | ||||||
|         <#elseif carousel_content != ''> | <!--    <h2 class="title">--> | ||||||
|           <div class="card widget swiper"> | <!--      <#if post.topPriority==1><span class="top">置顶</span></#if><a--> | ||||||
|             <div class="swiper-wrapper">${carousel_content}</div> | <!--    href="${post.fullPath!}">${post.title!}</a>--> | ||||||
|             <div class="swiper-pagination"></div> | <!--    </h2>--> | ||||||
|             <div class="swiper-button-prev"></div> | <!--    <div class="main-content">${post.summary!}</div>--> | ||||||
|             <div class="swiper-button-next"></div> | <!--    <hr/>--> | ||||||
|           </div> | <!--    <div class="meta">--> | ||||||
|           <#assign is_carousel=true /> | <!--      <ul class="breadcrumb">--> | ||||||
|         </#if> | <!--        <li><@global.timeline datetime=post.createTime/></li>--> | ||||||
|         <#if settings.index_inform?? && settings.index_inform != ''> | <!--        <li><i class="fa fa-eye"></i>${post.visits?c}</li>--> | ||||||
|             <div class="card tips brightness">${settings.index_inform}</div> | <!--        <#if !post.disallowComment!false><li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>--> | ||||||
|         </#if> | <!--      <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>--> | ||||||
|     </#if> | <!--      <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />--> | ||||||
|     <#list posts as post> | <!--      <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> | ||||||
|         <#local thumbnail = (post.thumbnail?? && post.thumbnail!='')?then(post.thumbnail!, (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail + settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + post.id?c, ''))> | <!--      <li style="color: ${heatColor}">${heat}℃</li>--> | ||||||
|         <#if is_first_index?? && thumbnail != '' && !(post.topPriority!=1 || !post.metas?? || (post.metas.index_carousel!'false')=='false')> | <!--      </ul>--> | ||||||
|             <#continue> | <!--      <#if post.categories?? && post.categories?size gt 0>--> | ||||||
|         </#if> | <!--      <div class="level-item is-hidden-mobile">--> | ||||||
|         <#local thumbnail_mode = ((settings.top_thumbnail_mode!'default')=='grid' || (post.topPriority==0 && (settings.thumbnail_mode!'default')=='grid'))?then( | <!--        <#list post.categories as category>--> | ||||||
|         'grid', (post.metas?? && (post.metas.thumbnail_mode!'')?trim!='')?then(post.metas.thumbnail_mode?trim, (post.topPriority==1)?then(settings.top_thumbnail_mode!'back', settings.thumbnail_mode!'default')))> | <!--        <a href="${category.fullPath!}">${category.name!}</a> --> | ||||||
|         <#if thumbnail != '' && thumbnail_mode == "back"> | <!--      </#list>--> | ||||||
|             <div class="card widget card-cover"> | <!--    </div>--> | ||||||
|                 <a href="${post.fullPath!}"> | <!--  </#if>--> | ||||||
|                     <div class="cover-image" style="background-image: url(${thumbnail!})"> | <!--</div>--> | ||||||
|                     </div> | <!--</div>--> | ||||||
|                     <div class="details"> | <!--<a href="${post.fullPath!}"><div class="small-image" style="background-image: url(${thumbnail!})"></div></a>--> | ||||||
|                         <h2 class="title"><#if post.topPriority==1><span class="top">置顶</span></#if>${post.title!} | <!--</div>--> | ||||||
|                         </h2> | <!--<#elseif post.topPriority==1 && thumbnail_mode == "fold">--> | ||||||
|                         <ul class="breadcrumb"> | <!--<a class="card widget card-fold" href="${post.fullPath!}">--> | ||||||
|                             <li><@global.timeline datetime=post.createTime/></li> | <!--  <h2 class="title"><span class="top">置顶</span><p>${post.title!}</p></h2>--> | ||||||
|                             <li><i class="fa fa-eye"></i>${post.visits?c}</li> | <!--  <p><@global.timeline datetime=post.createTime/></p>--> | ||||||
|                             <#if !post.disallowComment!false> | <!--</a>--> | ||||||
|                                 <li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if> | <!--<#elseif thumbnail_mode == "grid">--> | ||||||
|                             <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li> | <!--<div class="column-main-grid">--> | ||||||
|                             <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) /> | <!--  <#list post_index..(posts?size-1) as i>--> | ||||||
|                             <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) /> | <!--  <#local gradPost=posts[i]>--> | ||||||
|                             <li style="color: ${heatColor}">${heat}℃</li> | <!--  <#local thumbnail = (gradPost.thumbnail?? && gradPost.thumbnail!='')?then(gradPost.thumbnail!, (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail + settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + gradPost.id?c, ''))>--> | ||||||
|                         </ul> | <!--  <#if is_first_index?? && thumbnail != '' && !(gradPost.topPriority!=1 || !gradPost.metas?? || (gradPost.metas.index_carousel!'false')=='false')>--> | ||||||
|                     </div> | <!--  <#continue>--> | ||||||
|                 </a> | <!--</#if>--> | ||||||
|                 <#if post.categories?? && post.categories?size gt 0> | <!--<div class="card widget">--> | ||||||
|                     <div class="category"> | <!--  <a class="thumbnail" href="${gradPost.fullPath!}">--> | ||||||
|                         <#list post.categories as category> | <!--    <div class="thumbnail-image" style="background-image: url(${thumbnail!})">--> | ||||||
|                             <a href="${category.fullPath!}">${category.name!}</a> | <!--    </div>--> | ||||||
|                         </#list> | <!--  </a>--> | ||||||
|                     </div> | <!--  <ul class="breadcrumb">--> | ||||||
|                 </#if> | <!--    <li><@global.timeline datetime=gradPost.createTime/></li>--> | ||||||
|             </div> | <!--    <li><i class="fa fa-eye"></i>${gradPost.visits?c}</li>--> | ||||||
|         <#elseif thumbnail != '' && (thumbnail_mode == "small" || (thumbnail_mode == "small-alter" && post_index%2 == 0))> | <!--    <#if !gradPost.disallowComment!false><li class="is-hidden-mobile"><i class="fa fa-comments-o"></i>${gradPost.commentCount?c}</li></#if>--> | ||||||
|             <div class="card widget card-small"> | <!--  <li class="is-hidden-mobile"><i class="fa fa-thumbs-o-up"></i>${gradPost.likes?c}</li>--> | ||||||
|                 <a href="${post.fullPath!}"> | <!--  <#local heat= (24+gradPost.visits*0.1+gradPost.likes*2+gradPost.commentCount*3) />--> | ||||||
|                     <div class="small-image" style="background-image: url(${thumbnail!})"></div> | <!--  <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> | ||||||
|                 </a> | <!--  <li style="color: ${heatColor}">${heat}℃</li>--> | ||||||
|                 <div class="card-content main"> | <!--  </ul>--> | ||||||
|                     <h2 class="title"> | <!--  <h2 class="title">--> | ||||||
|                         <#if post.topPriority==1><span class="top">置顶</span></#if><a | <!--    <#if gradPost.topPriority==1><span class="top">置顶</span></#if><a--> | ||||||
|                                 href="${post.fullPath!}">${post.title!}</a> | <!--  href="${gradPost.fullPath!}">${gradPost.title!}</a>--> | ||||||
|                     </h2> | <!--  </h2>--> | ||||||
|                     <div class="main-content">${post.summary!}</div> | <!--</div>--> | ||||||
|                     <hr/> | <!--</#list>--> | ||||||
|                     <div class="meta"> | <!--</div>--> | ||||||
|                         <ul class="breadcrumb"> | <!--<#break/>--> | ||||||
|                             <li><@global.timeline datetime=post.createTime/></li> | <!--<#else>--> | ||||||
|                             <li><i class="fa fa-eye"></i>${post.visits?c}</li> | <!--<div class="card widget">--> | ||||||
|                             <#if !post.disallowComment!false><li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if> | <!--  <#if thumbnail?? && thumbnail!=''>--> | ||||||
|                             <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li> | <!--  <a class="thumbnail" href="${post.fullPath!}">--> | ||||||
|                             <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) /> | <!--    <div class="thumbnail-image" style="background-image: url(${thumbnail!})">--> | ||||||
|                             <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) /> | <!--    </div>--> | ||||||
|                             <li style="color: ${heatColor}">${heat}℃</li> | <!--  </a>--> | ||||||
|                         </ul> | <!--</#if>--> | ||||||
|                         <#if post.categories?? && post.categories?size gt 0> | <!--<div class="card-content main">--> | ||||||
|                             <div class="level-item is-hidden-mobile"> | <!--  <h2 class="title">--> | ||||||
|                                 <#list post.categories as category> | <!--    <#if post.topPriority==1><span class="top">置顶</span></#if><a--> | ||||||
|                                     <a href="${category.fullPath!}">${category.name!}</a>  | <!--  href="${post.fullPath!}">${post.title!}</a>--> | ||||||
|                                 </#list> | <!--  </h2>--> | ||||||
|                             </div> | <!--  <div class="meta">--> | ||||||
|                         </#if> | <!--    <ul class="breadcrumb">--> | ||||||
|                     </div> | <!--      <li><@global.timeline datetime=post.createTime/></li>--> | ||||||
|                 </div> | <!--      <li><i class="fa fa-eye"></i>${post.visits?c}</li>--> | ||||||
|             </div> | <!--      <#if !post.disallowComment!false><li class="is-hidden-mobile"><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>--> | ||||||
|         <#elseif thumbnail != '' && (thumbnail_mode == "small-right" || (thumbnail_mode == "small-alter" && post_index%2 == 1))> | <!--    <li class="is-hidden-mobile"><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>--> | ||||||
|             <div class="card widget card-small"> | <!--    <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />--> | ||||||
|                 <div class="card-content main"> | <!--    <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> | ||||||
|                     <h2 class="title"> | <!--    <li style="color: ${heatColor}">${heat}℃</li>--> | ||||||
|                         <#if post.topPriority==1><span class="top">置顶</span></#if><a | <!--    </ul>--> | ||||||
|                                 href="${post.fullPath!}">${post.title!}</a> | <!--    <#if post.categories?? && post.categories?size gt 0>--> | ||||||
|                     </h2> | <!--    <div class="level-item">--> | ||||||
|                     <div class="main-content">${post.summary!}</div> | <!--      <#list post.categories as category>--> | ||||||
|                     <hr/> | <!--      <a href="${category.fullPath!}">${category.name!}</a> --> | ||||||
|                     <div class="meta"> | <!--    </#list>--> | ||||||
|                         <ul class="breadcrumb"> | <!--  </div>--> | ||||||
|                             <li><@global.timeline datetime=post.createTime/></li> | <!--</#if>--> | ||||||
|                             <li><i class="fa fa-eye"></i>${post.visits?c}</li> | <!--</div>--> | ||||||
|                             <#if !post.disallowComment!false><li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if> | <!--<hr/>--> | ||||||
|                             <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li> | <!--<div class="main-content">${post.summary!}</div>--> | ||||||
|                             <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) /> | <!--</div>--> | ||||||
|                             <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) /> | <!--</div>--> | ||||||
|                             <li style="color: ${heatColor}">${heat}℃</li> | <!--</#if>--> | ||||||
|                         </ul> | <!--</#list>--> | ||||||
|                         <#if post.categories?? && post.categories?size gt 0> | <!--</div>--> | ||||||
|                             <div class="level-item is-hidden-mobile"> | <!--<#macro model_build content>--> | ||||||
|                                 <#list post.categories as category> | <!--    <#if content == ''>--> | ||||||
|                                     <a href="${category.fullPath!}">${category.name!}</a>  | <!--      <#return>--> | ||||||
|                                 </#list> | <!--    </#if>--> | ||||||
|                             </div> | <!--    <#local content_option=content?split('|')>--> | ||||||
|                         </#if> | <!--    <#local tag=(content_option[0]!'')?trim>--> | ||||||
|                     </div> | <!--    <#local content=((content_option[1]!'')?trim != '')?then('<div class="title">${content_option[1]?trim}</div>', '')>--> | ||||||
|                 </div> | <!--    <#local target=((content_option[2]!'false')?trim == 'true')?then('target="_blank"', '')>--> | ||||||
|                 <a href="${post.fullPath!}"><div class="small-image" style="background-image: url(${thumbnail!})"></div></a> | <!--    <#local imageUrl=((content_option[3]!'')?trim != '')?then('style="background-image: url(${content_option[3]?trim})"', '')>--> | ||||||
|             </div> | <!--    <#local targetUrl=((content_option[4]!'')?trim != '')?then('href="${content_option[4]?trim}"', '')>--> | ||||||
|         <#elseif post.topPriority==1 && thumbnail_mode == "fold"> | <!--  <a class="card widget brightness ${(content!='')?then('bg-shadow', '')}" ${target} ${imageUrl} ${targetUrl}>${content}<div class="tag">${tag}</div></a>--> | ||||||
|             <a class="card widget card-fold" href="${post.fullPath!}"> | <!--</#macro>--> | ||||||
|                 <h2 class="title"><span class="top">置顶</span><p>${post.title!}</p></h2> | <!--<#macro article_list posts>--> | ||||||
|                 <p><@global.timeline datetime=post.createTime/></p> | <!--    <#if is_first_index!false>--> | ||||||
|             </a> | <!--        <#local carousel_content>--> | ||||||
|         <#elseif thumbnail_mode == "grid"> | <!--          <#list posts as post>--> | ||||||
|             <div class="column-main-grid"> | <!--              <#if post.topPriority!=1>--> | ||||||
|             <#list post_index..(posts?size-1) as i> | <!--                  <#break>--> | ||||||
|                 <#local gradPost=posts[i]> | <!--              </#if>--> | ||||||
|                 <#local thumbnail = (gradPost.thumbnail?? && gradPost.thumbnail!='')?then(gradPost.thumbnail!, (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail + settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + gradPost.id?c, ''))> | <!--              <#if !post.metas?? || (post.metas.index_carousel!'false')=='false'>--> | ||||||
|                 <#if is_first_index?? && thumbnail != '' && !(gradPost.topPriority!=1 || !gradPost.metas?? || (gradPost.metas.index_carousel!'false')=='false')> | <!--                  <#continue>--> | ||||||
|                     <#continue> | <!--              </#if>--> | ||||||
|                 </#if> | <!--              <#local thumbnail = (post.thumbnail?? && post.thumbnail!='')?then(post.thumbnail!, (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail + settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + post.id?c, ''))>--> | ||||||
|                 <div class="card widget"> | <!--              <#if thumbnail != ''>--> | ||||||
|                   <a class="thumbnail" href="${gradPost.fullPath!}"> | <!--                <a class="swiper-slide bg-shadow cover-image" style="background-image: url(${thumbnail})" href="${post.fullPath!}">--> | ||||||
|                     <div class="thumbnail-image" style="background-image: url(${thumbnail!})"> | <!--                    <div class="swiper-slide-details" data-swiper-parallax="200" data-swiper-parallax-duration="600">--> | ||||||
|                     </div> | <!--                        <p class="swiper-slide-details-title">${post.title!}</p>--> | ||||||
|                   </a> | <!--                        <ul class="breadcrumb">--> | ||||||
|                   <ul class="breadcrumb"> | <!--                            <li><@global.timeline datetime=post.createTime/></li>--> | ||||||
|                     <li><@global.timeline datetime=gradPost.createTime/></li> | <!--                            <li><i class="fa fa-eye"></i>${post.visits?c}</li>--> | ||||||
|                     <li><i class="fa fa-eye"></i>${gradPost.visits?c}</li> | <!--                            <#if !post.disallowComment!false>--> | ||||||
|                       <#if !gradPost.disallowComment!false><li class="is-hidden-mobile"><i class="fa fa-comments-o"></i>${gradPost.commentCount?c}</li></#if> | <!--                                <li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>--> | ||||||
|                     <li class="is-hidden-mobile"><i class="fa fa-thumbs-o-up"></i>${gradPost.likes?c}</li> | <!--                            <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>--> | ||||||
|                       <#local heat= (24+gradPost.visits*0.1+gradPost.likes*2+gradPost.commentCount*3) /> | <!--                            <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />--> | ||||||
|                       <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) /> | <!--                            <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> | ||||||
|                     <li style="color: ${heatColor}">${heat}℃</li> | <!--                            <li style="color: ${heatColor}">${heat}℃</li>--> | ||||||
|                   </ul> | <!--                        </ul>--> | ||||||
|                   <h2 class="title"> | <!--                    </div>--> | ||||||
|                       <#if gradPost.topPriority==1><span class="top">置顶</span></#if><a | <!--                </a>--> | ||||||
|                             href="${gradPost.fullPath!}">${gradPost.title!}</a> | <!--              </#if>--> | ||||||
|                   </h2> | <!--          </#list>--> | ||||||
|               </div> | <!--        </#local>--> | ||||||
|             </#list> | <!--        <#if settings.sidebar_column=='module-left' || settings.sidebar_column=='module-right'>--> | ||||||
|             </div> | <!--          <#if settings.module_links?? && settings.module_links?trim != ''>--> | ||||||
|             <#break/> | <!--              <#local module_links=settings.module_links?split('\n')>--> | ||||||
|         <#else> | <!--          <#else>--> | ||||||
|             <div class="card widget"> | <!--              <#local module_links=[]>--> | ||||||
|                 <#if thumbnail?? && thumbnail!=''> | <!--              <#list 0..1 as i>--> | ||||||
|                     <a class="thumbnail" href="${post.fullPath!}"> | <!--                <#local post=posts[i]>--> | ||||||
|                         <div class="thumbnail-image" style="background-image: url(${thumbnail!})"> | <!--                <#local module_links=module_links+["推荐|${post.title!}|false|${post.thumbnail!}|${post.fullPath!}"]>--> | ||||||
|                         </div> | <!--              </#list>--> | ||||||
|                     </a> | <!--          </#if>--> | ||||||
|                 </#if> | <!--          <div class="model model-index">--> | ||||||
|                 <div class="card-content main"> | <!--            <div class="card widget swiper">--> | ||||||
|                     <h2 class="title"> | <!--              <div class="swiper-wrapper">${carousel_content}</div>--> | ||||||
|                         <#if post.topPriority==1><span class="top">置顶</span></#if><a | <!--              <div class="swiper-pagination"></div>--> | ||||||
|                                 href="${post.fullPath!}">${post.title!}</a> | <!--              <div class="swiper-button-prev"></div>--> | ||||||
|                     </h2> | <!--              <div class="swiper-button-next"></div>--> | ||||||
|                     <div class="meta"> | <!--            </div>--> | ||||||
|                         <ul class="breadcrumb"> | <!--            <div class="model model-index-side">--> | ||||||
|                             <li><@global.timeline datetime=post.createTime/></li> | <!--              <#list 0..1 as i>--> | ||||||
|                             <li><i class="fa fa-eye"></i>${post.visits?c}</li> | <!--                <#if i < module_links?size >--> | ||||||
|                             <#if !post.disallowComment!false><li class="is-hidden-mobile"><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if> | <!--                    <@model_build module_links[i]/>--> | ||||||
|                             <li class="is-hidden-mobile"><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li> | <!--                </#if>--> | ||||||
|                             <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) /> | <!--              </#list>--> | ||||||
|                             <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) /> | <!--            </div>--> | ||||||
|                             <li style="color: ${heatColor}">${heat}℃</li> | <!--          </div>--> | ||||||
|                         </ul> | <!--            <#if module_links?size > 2 && module_links?size<=6>--> | ||||||
|                         <#if post.categories?? && post.categories?size gt 0> | <!--              <div class="model model-attach model-attach-${module_links?size-2}">--> | ||||||
|                             <div class="level-item"> | <!--                <#list 2..5 as i>--> | ||||||
|                                 <#list post.categories as category> | <!--                    <#if i < module_links?size >--> | ||||||
|                                     <a href="${category.fullPath!}">${category.name!}</a>  | <!--                        <@model_build module_links[i]/>--> | ||||||
|                                 </#list> | <!--                    </#if>--> | ||||||
|                             </div> | <!--                </#list>--> | ||||||
|                         </#if> | <!--              </div>--> | ||||||
|                     </div> | <!--            </#if>--> | ||||||
|                     <hr/> | <!--          <#assign is_carousel=true />--> | ||||||
|                     <div class="main-content">${post.summary!}</div> | <!--        <#elseif carousel_content != ''>--> | ||||||
|                 </div> | <!--          <div class="card widget swiper">--> | ||||||
|             </div> | <!--            <div class="swiper-wrapper">${carousel_content}</div>--> | ||||||
|         </#if> | <!--            <div class="swiper-pagination"></div>--> | ||||||
|     </#list> | <!--            <div class="swiper-button-prev"></div>--> | ||||||
| </#macro> | <!--            <div class="swiper-button-next"></div>--> | ||||||
|  | <!--          </div>--> | ||||||
|  | <!--          <#assign is_carousel=true />--> | ||||||
|  | <!--        </#if>--> | ||||||
|  | <!--        <#if settings.index_inform?? && settings.index_inform != ''>--> | ||||||
|  | <!--            <div class="card tips brightness">${settings.index_inform}</div>--> | ||||||
|  | <!--        </#if>--> | ||||||
|  | <!--    </#if>--> | ||||||
|  | <!--</#macro>--> | ||||||
| @ -1,6 +1,8 @@ | |||||||
| <#assign ad_show=(settings.ad_mode!true)?then(settings.ad_image?? && settings.ad_image != '', settings.ad_custom_code?? && settings.ad_custom_code!='')> | <#assign ad_show=(settings.ad_mode!true)?then(settings.ad_image?? && settings.ad_image != '', settings.ad_custom_code?? && settings.ad_custom_code!='')> | ||||||
| <#if ad_show> | <#if ad_show> | ||||||
|     <div class="card widget ${settings.hide_ad_piece!}"> |     <div xmlns:th="https://www.thymeleaf.org" | ||||||
|  |          th:fragment="widget (hide)" | ||||||
|  |          th:class="'card widget ' + ${hide}"> | ||||||
|         <#if settings.ad_mode!true> |         <#if settings.ad_mode!true> | ||||||
|             <a target="_blank" href="${settings.ad_target_url!}"> |             <a target="_blank" href="${settings.ad_target_url!}"> | ||||||
|                 <img width="100%" src="${settings.ad_image}" alt="广告"/> |                 <img width="100%" src="${settings.ad_image}" alt="广告"/> | ||||||
|  | |||||||
| @ -18,7 +18,9 @@ | |||||||
|     </#list> |     </#list> | ||||||
| </#macro> | </#macro> | ||||||
| <#assign num= settings.categories_num!10 /> | <#assign num= settings.categories_num!10 /> | ||||||
| <div class="card widget ${settings.hide_categories!}"> | <div xmlns:th="https://www.thymeleaf.org" | ||||||
|  |      th:fragment="widget (hide)" | ||||||
|  |      th:class="'card widget ' + ${hide}"> | ||||||
|     <#assign postCounts = {}> |     <#assign postCounts = {}> | ||||||
|     <@categoryTag method="list"> |     <@categoryTag method="list"> | ||||||
|         <div class="card-title"> |         <div class="card-title"> | ||||||
|  | |||||||
| @ -1,5 +1,7 @@ | |||||||
| <#assign num= settings.links_num!10 /> | <#assign num= settings.links_num!10 /> | ||||||
| <div class="card widget links ${settings.hide_links!}"> | <div xmlns:th="https://www.thymeleaf.org" | ||||||
|  |      th:fragment="widget (hide)" | ||||||
|  |      th:class="'card widget links ' + ${hide}"> | ||||||
|     <@linkTag method="listByRandom"> |     <@linkTag method="listByRandom"> | ||||||
|         <div class="card-title"> |         <div class="card-title"> | ||||||
|             <i class="fa fa-link card-title-label"></i><span>友链</span> |             <i class="fa fa-link card-title-label"></i><span>友链</span> | ||||||
|  | |||||||
| @ -1,4 +1,6 @@ | |||||||
| <div class="card widget love brightness ${settings.hide_love!}" xmlns:th="https://www.thymeleaf.org"> | <div xmlns:th="https://www.thymeleaf.org" | ||||||
|  |      th:fragment="widget (hide)" | ||||||
|  |      th:class="'card widget love brightness ' + ${hide}"> | ||||||
|   <div class="card-title"> |   <div class="card-title"> | ||||||
|     <i class="fa fa-heart card-title-label"></i><span>恋爱墙</span> |     <i class="fa fa-heart card-title-label"></i><span>恋爱墙</span> | ||||||
|   </div> |   </div> | ||||||
| @ -13,8 +15,7 @@ | |||||||
|           </a> |           </a> | ||||||
|         </div> |         </div> | ||||||
|         <div class="level-item"> |         <div class="level-item"> | ||||||
|           <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" |           <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"> | ||||||
|                xmlns:xlink="http://www.w3.org/1999/xlink"> |  | ||||||
|             <path fill="#ffd1da" |             <path fill="#ffd1da" | ||||||
|                   d="m629.4,576.5l117.6,-196.5l0.2,-0.3c64.7,-108.5 29.4,-248.9 -79,-313.8s-248.9,-29.7 -313.9,78.6l-4.9,-2.9c-108.5,-65 -249.1,-29.6 -314.1,78.9c-65,108.5 -29.6,249.1 78.9,314.1l4.9,2.9l191.6,114.7l201.4,120.5l117.3,-196.2z"/> |                   d="m629.4,576.5l117.6,-196.5l0.2,-0.3c64.7,-108.5 29.4,-248.9 -79,-313.8s-248.9,-29.7 -313.9,78.6l-4.9,-2.9c-108.5,-65 -249.1,-29.6 -314.1,78.9c-65,108.5 -29.6,249.1 78.9,314.1l4.9,2.9l191.6,114.7l201.4,120.5l117.3,-196.2z"/> | ||||||
|             <path fill="#ffa2b2" |             <path fill="#ffa2b2" | ||||||
|  | |||||||
| @ -1,6 +1,8 @@ | |||||||
| <#if ((settings.music_mode!'playlist') == 'playlist' && settings.netease_playlist_id?? && settings.netease_playlist_id!='') | <#if ((settings.music_mode!'playlist') == 'playlist' && settings.netease_playlist_id?? && settings.netease_playlist_id!='') | ||||||
| || (settings.music_mode! == 'config' && settings.music_config?? && settings.music_config!='')> | || (settings.music_mode! == 'config' && settings.music_config?? && settings.music_config!='')> | ||||||
|     <div class="card widget music ${settings.hide_music!}"> |     <div xmlns:th="https://www.thymeleaf.org" | ||||||
|  |          th:fragment="widget (hide)" | ||||||
|  |          th:class="'card widget music ' + ${hide}"> | ||||||
|         <div class="card-title"> |         <div class="card-title"> | ||||||
|             <i class="fa fa-music card-title-label"></i><span>音乐</span> |             <i class="fa fa-music card-title-label"></i><span>音乐</span> | ||||||
|         </div> |         </div> | ||||||
|  | |||||||
| @ -1,4 +1,6 @@ | |||||||
| <div class="card widget notice ${settings.hide_notice!} is-hidden-all" xmlns:th="https://www.thymeleaf.org"> | <div xmlns:th="https://www.thymeleaf.org" | ||||||
|  |      th:fragment="widget (hide)" | ||||||
|  |      th:class="'card widget notice ' + ${hide} + ' is-hidden-all'"> | ||||||
|     <div class="card-title"> |     <div class="card-title"> | ||||||
|         <i class="fa fa-volume-up card-title-label"></i><span>公告</span> |         <i class="fa fa-volume-up card-title-label"></i><span>公告</span> | ||||||
|     </div> |     </div> | ||||||
|  | |||||||
| @ -1,4 +1,6 @@ | |||||||
| <div class="card widget profile ${settings.hide_profile!}"> | <div xmlns:th="https://www.thymeleaf.org" | ||||||
|  |      th:fragment="widget (hide)" | ||||||
|  |      th:class="'card widget profile ' + ${hide}"> | ||||||
|     <div class="card-content"> |     <div class="card-content"> | ||||||
|         <nav class="level"> |         <nav class="level"> | ||||||
|             <div class="level-item" style="flex-direction: column;"> |             <div class="level-item" style="flex-direction: column;"> | ||||||
|  | |||||||
| @ -1,4 +1,6 @@ | |||||||
| <div class="card widget recent-comments ${settings.hide_recent_comments!}"> | <div xmlns:th="https://www.thymeleaf.org" | ||||||
|  |      th:fragment="widget (hide)" | ||||||
|  |      th:class="'card widget recent-comments ' + ${hide}"> | ||||||
|     <div class="card-title"> |     <div class="card-title"> | ||||||
|         <i class="fa fa-commenting-o card-title-label"></i><span>最新评论</span> |         <i class="fa fa-commenting-o card-title-label"></i><span>最新评论</span> | ||||||
|     </div> |     </div> | ||||||
|  | |||||||
| @ -1,21 +1,17 @@ | |||||||
| <div class="card widget recent-posts ${settings.hide_recent_posts!}"> | <div xmlns:th="https://www.thymeleaf.org" | ||||||
|  |      th:fragment="widget (hide)" | ||||||
|  |      th:class="'card widget recent-posts ' + ${hide}" | ||||||
|  |      th:with="num = ${#strings.isEmpty(theme.config.sidebar.recent_posts_num)? 5 : #numbers.sequence(theme.config.sidebar.recent_posts_num,theme.config.sidebar.recent_posts_num)[0]}, posts = ${postFinder.list(1,num)}, isEmpty = ${#lists.isEmpty(posts)}"> | ||||||
|     <div class="card-title"> |     <div class="card-title"> | ||||||
|         <i class="fa fa-history card-title-label"></i><span>最新文章</span> |         <i class="fa fa-history card-title-label"></i><span>最新文章</span> | ||||||
|     </div> |     </div> | ||||||
|     <@postTag method="latest" top="${settings.recent_posts_num!5}"> |     <div th:if="${isEmpty}" class="card-empty">暂无文章</div> | ||||||
|         <#if posts?size gt 0> |     <div th:unless="${isEmpty}" class="card-content"> | ||||||
|             <div class="card-content"> |         <ul class="list"> | ||||||
|                 <ul class="list"> |             <li class="item" th:each="post : ${posts}"> | ||||||
|                     <#list posts as post> |                 <a class="link" th:href="@{${ps.status.permalink}}" th:title="${ps.spec.title}" th:text="${ps.spec.title}"></a> | ||||||
|                         <li class="item"> |                 <i class="fa fa-link"></i> | ||||||
|                             <a class="link" href="${post.fullPath!}" title="${post.title!}">${post.title!}</a> |             </li> | ||||||
|                             <i class="fa fa-link"></i> |         </ul> | ||||||
|                         </li> |     </div> | ||||||
|                     </#list> |  | ||||||
|                 </ul> |  | ||||||
|             </div> |  | ||||||
|         <#else> |  | ||||||
|             <div class="card-empty">暂无文章</div> |  | ||||||
|         </#if> |  | ||||||
|     </@postTag> |  | ||||||
| </div> | </div> | ||||||
| @ -1,24 +1,26 @@ | |||||||
| <#assign num= settings.tagcloud_num!32 /> | <#assign num= settings.tagcloud_num!32 /> | ||||||
| <div class="card widget tagcloud ${settings.hide_tagcloud!}"> | <div xmlns:th="https://www.thymeleaf.org" | ||||||
|     <@tagTag method="list"> |      th:fragment="widget (hide)" | ||||||
|         <div class="card-title"> |      th:class="'card widget tagcloud ' + ${hide}" | ||||||
|             <i class="fa fa-cloud card-title-label"></i><span>标签云</span> |      th:with="num = ${#strings.isEmpty(theme.config.sidebar.tags_num)? 32 : #numbers.sequence(theme.config.sidebar.tags_num,theme.config.sidebar.tags_num)[0]}, tags = ${tagFinder.list(1,num)}, isEmpty = ${#lists.isEmpty(tags)}"> | ||||||
|             <#if settings.tagcloud_more?? && settings.tagcloud_more== true && tags?size gt num?number> | 
 | ||||||
|                 <a class="card-more" href="${tags_url!}">更多<i class="fa fa-angle-double-right"></i></a> |     <div class="card-title"> | ||||||
|             </#if> |         <i class="fa fa-cloud card-title-label"></i><span>标签云</span> | ||||||
|         </div> |         <a th:if="${tags.hasNext}" class="card-more" th:href="@{/tags}">更多<i class="fa fa-angle-double-right"></i></a> | ||||||
|         <#if tags?? && tags?size gt 0> |     </div> | ||||||
|             <div class="card-content"> |     <div th:if="${isEmpty}" class="card-empty">暂无标签</div> | ||||||
|                 <#assign size= (tags?size > num?number)?string(num, tags?size)?number - 1 /> |     <div th:unless="${isEmpty}" class="card-content"> | ||||||
|                 <#list 0..size as i> |         <a | ||||||
|                     <#assign tag= tags[i] /> |           th:each="tag : ${tags}" | ||||||
|                     <#assign size= tag.name?length + tag.slug?length + tag.postCount /> |           th:href="@{${tag.status.permalink}}" | ||||||
|                     <a href="${tag.fullPath!}" |           th:text="${tag.spec.displayName}"></a> | ||||||
|                        style="font-size:${(size < 14)?string('14',(size > 32)?string('32',size?string))}px;<#if settings.enable_tagcloud_color!false >color: ${tag.color}</#if>">${tag.name!}</a> |         <!--        <#if settings.enable_tags_color!false > style="color: ${tag.color}; border-color: ${tag.color}; background: ${tag.color!}20" </#if>--> | ||||||
|                 </#list> |     </div> | ||||||
|             </div> | <!--    <#assign size= (tags?size > num?number)?string(num, tags?size)?number - 1 />--> | ||||||
|         <#else> | <!--    <#list 0..size as i>--> | ||||||
|             <div class="card-empty">暂无标签</div> | <!--    <#assign tag= tags[i] />--> | ||||||
|         </#if> | <!--    <#assign size= tag.name?length + tag.slug?length + tag.postCount />--> | ||||||
|     </@tagTag> | <!--    <a href="${tag.fullPath!}"--> | ||||||
|  | <!--       style="font-size:${(size < 14)?string('14',(size > 32)?string('32',size?string))}px;<#if settings.enable_tagcloud_color!false >color: ${tag.color}</#if>">${tag.name!}</a>--> | ||||||
|  | <!--    </#list>--> | ||||||
| </div> | </div> | ||||||
| @ -1,22 +1,17 @@ | |||||||
| <#assign num= settings.tags_num!18 /> | <div xmlns:th="https://www.thymeleaf.org" | ||||||
| <div class="card widget tags ${settings.hide_tags!}"> |      th:fragment="widget (hide)" | ||||||
|     <@tagTag method="list"> |      th:class="'card widget tags ' + ${hide}" | ||||||
|         <div class="card-title"> |      th:with="num = ${#strings.isEmpty(theme.config.sidebar.tags_num)? 18 : #numbers.sequence(theme.config.sidebar.tags_num,theme.config.sidebar.tags_num)[0]}, tags = ${tagFinder.list(1,num)}, isEmpty = ${#lists.isEmpty(tags)}"> | ||||||
|             <i class="fa fa-tags card-title-label"></i><span>标签</span> |     <div class="card-title"> | ||||||
|             <#if settings.tags_more?? && settings.tags_more== true && tags?size gt num?number> |         <i class="fa fa-tags card-title-label"></i><span>标签</span> | ||||||
|                 <a class="card-more" href="${tags_url!}">更多<i class="fa fa-angle-double-right"></i></a> |         <a th:if="${tags.hasNext}" class="card-more" th:href="@{/tags}">更多<i class="fa fa-angle-double-right"></i></a> | ||||||
|             </#if> |     </div> | ||||||
|         </div> |     <div th:if="${isEmpty}" class="card-empty">暂无标签</div> | ||||||
|         <#if tags?? && tags?size gt 0> |     <div th:unless="${isEmpty}" class="card-content"> | ||||||
|             <div class="card-content"> |         <a | ||||||
|                 <#assign size= (tags?size > num?number)?string(num, tags?size)?number - 1 /> |           th:each="tag : ${tags}" | ||||||
|                 <#list 0..size as i> |           th:href="@{${tag.status.permalink}}" | ||||||
|                     <#assign tag= tags[i] /> |           th:text="${tag.spec.displayName}"></a> | ||||||
|                     <a href="${tag.fullPath!}"<#if settings.enable_tags_color!false > style="color: ${tag.color}; border-color: ${tag.color}; background: ${tag.color!}20" </#if>>${tag.name!}</a> | <!--        <#if settings.enable_tags_color!false > style="color: ${tag.color}; border-color: ${tag.color}; background: ${tag.color!}20" </#if>--> | ||||||
|                 </#list> |     </div> | ||||||
|             </div> |  | ||||||
|         <#else> |  | ||||||
|             <div class="card-empty">暂无标签</div> |  | ||||||
|         </#if> |  | ||||||
|     </@tagTag> |  | ||||||
| </div> | </div> | ||||||
| @ -1,4 +1,6 @@ | |||||||
| <div class="card widget toc ${settings.hide_toc!} is-hidden-all"> | <div xmlns:th="https://www.thymeleaf.org" | ||||||
|  |      th:fragment="widget (hide)" | ||||||
|  |     th:class="'card widget toc ' + ${hide} + ' is-hidden-all'"> | ||||||
|     <div class="card-title"> |     <div class="card-title"> | ||||||
|         <i class="fa fa-file-text-o card-title-label"></i><span>目录</span> |         <i class="fa fa-file-text-o card-title-label"></i><span>目录</span> | ||||||
|     </div> |     </div> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user