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", | ||||
|     "release": "eslint **/*.js && gulp release", | ||||
|     "push": "eslint **/*.js && gulp push", | ||||
|     "zip": "eslint **/*.js && gulp zip", | ||||
|     "zip": "gulp zip", | ||||
|     "build": "eslint **/*.js && gulp", | ||||
|     "lint": "eslint **/*.js" | ||||
|   }, | ||||
|  | ||||
							
								
								
									
										204
									
								
								settings.yaml
									
									
									
									
									
								
							
							
						
						
									
										204
									
								
								settings.yaml
									
									
									
									
									
								
							| @ -468,16 +468,15 @@ spec: | ||||
|           label: 侧边栏展示 | ||||
|           help: 配置侧边栏展示方式,三列布局时不能在右侧显示音乐模块。 | ||||
|           value: | ||||
|             - name: QQ | ||||
|               icon: <i class="fa-brands fa-qq"></i> | ||||
|               url: https://api.sumt.cn/api/qq.talk.php?qq=自己的QQ号&format=card | ||||
|               delete: true | ||||
|             - name: Github | ||||
|               icon: <i class="fa-brands fa-github"></i> | ||||
|               url: | ||||
|             - name: Email | ||||
|               icon: <i class="fa-solid fa-envelope"></i> | ||||
|               url: mailto:邮箱地址 | ||||
|             - name: notice | ||||
|               position: left | ||||
|               hide: is-not-hidden | ||||
|             - name: notice | ||||
|               position: right | ||||
|               hide: is-not-hidden | ||||
|             - name: notice | ||||
|               position: right | ||||
|               hide: is-not-hidden | ||||
|           children: | ||||
|             - $formkit: select | ||||
|               name: type | ||||
| @ -506,8 +505,8 @@ spec: | ||||
|                   label:  文章标签模块 | ||||
|                 - value: 'tagcloud' | ||||
|                   label:  文章标签云模块 | ||||
|                 - value: 'links' | ||||
|                   label:  友链模块 | ||||
| #                - value: 'links' | ||||
| #                  label:  友链模块 | ||||
|             - $formkit: select | ||||
|               name: position | ||||
|               label: 模块位置 | ||||
| @ -643,16 +642,15 @@ spec: | ||||
|           label: 侧边栏音乐-自建API | ||||
|           placeholder: '请输入 API 地址' | ||||
|           help: '自建 API 方法见文档:<a href="https://github.com/metowolf/Meting" target="_blank">Meting</a>。' | ||||
| #        - $formkit: text | ||||
| #          name: music_mode | ||||
| #              label:  侧边栏音乐-音乐播放器配置方式 | ||||
| #      type: radio | ||||
| #          value: 'playlist' | ||||
| #          options: | ||||
| #            - value: 'playlist' | ||||
| #              label:  '网易云歌单 ID' | ||||
| #            - value: 'config' | ||||
| #              label:  参数进阶配置 | ||||
|         - $formkit: radio | ||||
|           name: music_mode | ||||
|           label:  侧边栏音乐-音乐播放器配置方式 | ||||
|           value: 'playlist' | ||||
|           options: | ||||
|             - value: 'playlist' | ||||
|               label:  '网易云歌单 ID' | ||||
|             - value: 'config' | ||||
|               label:  参数进阶配置 | ||||
|         - $formkit: text | ||||
|           name: netease_playlist_id | ||||
|           label: '侧边栏音乐-网易云歌单 ID' | ||||
| @ -679,17 +677,15 @@ spec: | ||||
| #              label:  显示 | ||||
| #            - value: false | ||||
| #              label:  不显示 | ||||
| #        - $formkit: text | ||||
| #          name: ad_tag_close | ||||
| #              label:  侧边栏广告-点击“广告”标签可关闭广告 | ||||
| #      type: radio | ||||
| #      data-type: bool | ||||
| #          value: true | ||||
| #          options: | ||||
| #            - value: true | ||||
| #              label:  是 | ||||
| #            - value: false | ||||
| #              label:  否 | ||||
|         - $formkit: radio | ||||
|           name: ad_tag_close | ||||
|           label:  侧边栏广告-点击“广告”标签可关闭广告 | ||||
|           value: true | ||||
|           options: | ||||
|             - value: true | ||||
|               label:  是 | ||||
|             - value: false | ||||
|               label:  否 | ||||
| #        - $formkit: text | ||||
| #          name: ad_mode | ||||
| #              label:  侧边栏广告-广告展示方法 | ||||
| @ -718,16 +714,16 @@ spec: | ||||
| #      type: textarea | ||||
| #          placeholder: '请输入广告代码' | ||||
| #          help: '在这里黏贴广告联盟提供的广告代码,<u>自定义广告代码模式时不能为空。' | ||||
| #        - $formkit: text | ||||
| #          name: recent_posts_num | ||||
| #              label:  侧边栏最近文章-展示文章数量 | ||||
| #          placeholder: 请输入数量数值 | ||||
| #          value: 5 | ||||
| #        - $formkit: text | ||||
| #          name: recent_comments_num | ||||
| #              label:  侧边栏最近评论-展示评论数量 | ||||
| #          placeholder: 请输入数量数值 | ||||
| #          value: 5 | ||||
|         - $formkit: text | ||||
|           name: recent_posts_num | ||||
|           label:  侧边栏最近文章-展示文章数量 | ||||
|           placeholder: 请输入数量数值 | ||||
|           value: 5 | ||||
|         - $formkit: text | ||||
|           name: recent_comments_num | ||||
|           label:  侧边栏最近评论-展示评论数量 | ||||
|           placeholder: 请输入数量数值 | ||||
|           value: 5 | ||||
| #        - $formkit: text | ||||
| #          name: categories_more | ||||
| #              label:  侧边栏分类-显示”更多”按钮 | ||||
| @ -740,72 +736,62 @@ spec: | ||||
| #              label:  显示 | ||||
| #            - value: false | ||||
| #              label:  不显示 | ||||
| #        - $formkit: text | ||||
| #          name: categories_num | ||||
| #              label:  侧边栏分类-展示分类数量 | ||||
| #          placeholder: 请输入数量数值 | ||||
| #          value: 10 | ||||
| #        - $formkit: text | ||||
| #          name: tags_more | ||||
| #              label:  侧边栏标签-显示”更多”按钮 | ||||
| #      type: radio | ||||
| #      data-type: bool | ||||
| #          value: true | ||||
| #          help: '超出展示的标签数量后是否显示更多按钮。' | ||||
| #          options: | ||||
| #            - value: true | ||||
| #              label:  显示 | ||||
| #            - value: false | ||||
| #              label:  不显示 | ||||
| #        - $formkit: text | ||||
| #          name: tags_num | ||||
| #              label:  侧边栏标签-展示标签数量 | ||||
| #          placeholder: 请输入数量数值 | ||||
| #          value: 18 | ||||
| #        - $formkit: text | ||||
| #          name: enable_tag_color | ||||
| #              label:  侧边栏标签-开启标签颜色 | ||||
| #      type: switch | ||||
| #      data-type: bool | ||||
| #          value: false | ||||
| #          options: | ||||
| #            - value: true | ||||
| #              label:  开启 | ||||
| #            - value: false | ||||
| #              label:  关闭 | ||||
| #        - $formkit: text | ||||
| #          name: tagcloud_more | ||||
| #              label:  侧边栏标签云-显示”更多”按钮 | ||||
| #      type: radio | ||||
| #      data-type: bool | ||||
| #          value: true | ||||
| #          help: '超出展示的标签数量后是否显示更多按钮。' | ||||
| #          options: | ||||
| #            - value: true | ||||
| #              label:  显示 | ||||
| #            - value: false | ||||
| #              label:  不显示 | ||||
| #        - $formkit: text | ||||
| #          name: tagcloud_num | ||||
| #              label:  侧边栏标签云-展示标签数量 | ||||
| #          placeholder: 请输入数量数值 | ||||
| #          value: 32 | ||||
| #        - $formkit: text | ||||
| #          name: enable_tagcloud_color | ||||
| #              label:  侧边栏标签云-开启标签颜色 | ||||
| #      type: switch | ||||
| #      data-type: bool | ||||
| #          value: false | ||||
| #          options: | ||||
| #            - value: true | ||||
| #              label:  开启 | ||||
| #            - value: false | ||||
| #              label:  关闭 | ||||
| #        - $formkit: text | ||||
|         - $formkit: text | ||||
|           name: categories_num | ||||
|           label:  侧边栏分类-展示分类数量 | ||||
|           placeholder: 请输入数量数值 | ||||
|           value: 10 | ||||
|         - $formkit: radio | ||||
|           name: tags_more | ||||
|           label:  侧边栏标签-显示”更多”按钮 | ||||
|           value: true | ||||
|           help: '超出展示的标签数量后是否显示更多按钮。' | ||||
|           options: | ||||
|             - value: true | ||||
|               label:  显示 | ||||
|             - value: false | ||||
|               label:  不显示 | ||||
|         - $formkit: text | ||||
|           name: tags_num | ||||
|           label:  侧边栏标签-展示标签数量 | ||||
|           placeholder: 请输入数量数值 | ||||
|           value: 18 | ||||
|         - $formkit: radio | ||||
|           name: enable_tag_color | ||||
|           label:  侧边栏标签-开启标签颜色 | ||||
|           value: false | ||||
|           options: | ||||
|             - value: true | ||||
|               label:  开启 | ||||
|             - value: false | ||||
|               label:  关闭 | ||||
|         - $formkit: radio | ||||
|           name: tagcloud_more | ||||
|           label:  侧边栏标签云-显示”更多”按钮 | ||||
|           value: true | ||||
|           help: '超出展示的标签数量后是否显示更多按钮。' | ||||
|           options: | ||||
|             - value: true | ||||
|               label:  显示 | ||||
|             - value: false | ||||
|               label:  不显示 | ||||
|         - $formkit: text | ||||
|           name: tagcloud_num | ||||
|           label:  侧边栏标签云-展示标签数量 | ||||
|           placeholder: 请输入数量数值 | ||||
|           value: 32 | ||||
|         - $formkit: radio | ||||
|           name: enable_tagcloud_color | ||||
|           label:  侧边栏标签云-开启标签颜色 | ||||
|           value: false | ||||
|           options: | ||||
|             - value: true | ||||
|               label:  开启 | ||||
|             - value: false | ||||
|               label:  关闭 | ||||
| #        - $formkit: radio | ||||
| #          name: links_more | ||||
| #              label:  侧边栏友链-显示”更多”按钮 | ||||
| #      type: radio | ||||
| #      data-type: bool | ||||
| #          label:  侧边栏友链-显示”更多”按钮 | ||||
| #          value: true | ||||
| #          help: '超出展示的友链数量后是否显示更多按钮。' | ||||
| #          options: | ||||
| @ -815,7 +801,7 @@ spec: | ||||
| #              label:  不显示 | ||||
| #        - $formkit: text | ||||
| #          name: links_num | ||||
| #              label:  侧边栏友链-展示友链数量 | ||||
| #          label:  侧边栏友链-展示友链数量 | ||||
| #          placeholder: 请输入数量数值 | ||||
| #          value: 10 | ||||
|     - group: page_config | ||||
|  | ||||
| @ -91,86 +91,60 @@ | ||||
|     // </#if> | ||||
|     /** 主题配置 */ | ||||
|     const DreamConfig = {}; | ||||
|     DreamConfig["theme_version"] = '${theme_version!}'; | ||||
|     DreamConfig["theme_base"] = '${theme_base!}'; | ||||
|     DreamConfig["access_key"] = '${settings.access_key!'dream'}' | ||||
|     DreamConfig["code_fold_line"] = [[${theme.config.post.code_fold_line}]] | ||||
|     DreamConfig["document_hidden_title"] = [[${theme.config.basic_info.document_hidden_title}]] | ||||
|     <#if settings.document_visible_title?? && settings.document_visible_title!=''> | ||||
|     DreamConfig["document_visible_title"] = '${settings.document_visible_title}'; | ||||
|     </#if> | ||||
|     <#if settings.enable_color_character!false> | ||||
|     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> | ||||
|     <#if settings.website_time?? && settings.website_time!=''> | ||||
|     DreamConfig["website_time"] = '${settings.website_time}'; | ||||
|     </#if> | ||||
|     <#if settings.sidebar_notice?? && settings.sidebar_notice!='none'> | ||||
|     DreamConfig["notice_show_mode"] = '${settings.notice_show_mode!'index'}'; | ||||
|     </#if> | ||||
|     <#if settings.img_fold_height?? && settings.img_fold_height?number gte 400> | ||||
|     DreamConfig["img_fold_height"] = ${settings.img_fold_height}; | ||||
|     </#if> | ||||
|     <#if settings.journals_fold_height?? && settings.journals_fold_height?number gte 260> | ||||
|     DreamConfig["journals_fold_height"] = ${settings.journals_fold_height}; | ||||
|     </#if> | ||||
|     <#if settings.cursor_move?? && settings.cursor_move!='none'> | ||||
|     DreamConfig["cursor_move"] = '${settings.cursor_move}'; | ||||
|     </#if> | ||||
|     <#if settings.cursor_click?? && settings.cursor_click!='none'> | ||||
|     DreamConfig["cursor_click"] = '${settings.cursor_click}'; | ||||
|     </#if> | ||||
|     <#if settings.effects_sakura_mode?? && settings.effects_sakura_mode!='none'> | ||||
|     DreamConfig["effects_sakura_mode"] = '${settings.effects_sakura_mode}'; | ||||
|     </#if> | ||||
|     <#if settings.effects_universe_mode?? && settings.effects_universe_mode!='none'> | ||||
|     DreamConfig["effects_universe_mode"] = '${settings.effects_universe_mode}'; | ||||
|     </#if> | ||||
|     <#if settings.effects_circle_magic_mode?? && settings.effects_circle_magic_mode!='none'> | ||||
|     DreamConfig["effects_circle_magic_mode"] = '${settings.effects_circle_magic_mode}'; | ||||
|     </#if> | ||||
|     <#if settings.enable_baidu_push!false> | ||||
|     DreamConfig["enable_baidu_push"] = true; | ||||
|     </#if> | ||||
|     <#if settings.enable_toutiao_push!false> | ||||
|     DreamConfig["enable_toutiao_push"] = true; | ||||
|     </#if> | ||||
|     <#if settings.load_progress?? && settings.load_progress != 'none'> | ||||
|     DreamConfig["load_progress"] = '${settings.load_progress}'; | ||||
|     </#if> | ||||
|     <#if settings.journals_share_image?? && settings.journals_share_image != 'none'> | ||||
|     DreamConfig["journals_share_image"] = '${settings.journals_share_image}'; | ||||
|     </#if> | ||||
|     <#if settings.meting_api?? && settings.meting_api != ''> | ||||
|     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["theme_version"] = [[${theme.spec.version}]]; | ||||
|     DreamConfig["theme_base"] = "[(${#theme.assets('/')})]"; | ||||
|     [(${!#strings.isEmpty(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 + '";': ''})] | ||||
|     [(${!#strings.isEmpty(theme.config.basic_info.document_visible_title)?'DreamConfig["document_visible_title"] = "' + theme.config.basic_info.document_visible_title + '";' : ''})] | ||||
|     [(${!#strings.isEmpty(theme.config.basic_info.website_time)?'DreamConfig["website_time"] = "' + theme.config.basic_info.website_time + '";' : ''})] | ||||
|     // <#if settings.enable_color_character!false> | ||||
|     // 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> | ||||
|     // <#if settings.sidebar_notice?? && settings.sidebar_notice!='none'> | ||||
|     // DreamConfig["notice_show_mode"] = '${settings.notice_show_mode!'index'}'; | ||||
|     // </#if> | ||||
|     [(${(!#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 settings.journals_fold_height?? && settings.journals_fold_height?number gte 260> | ||||
|     // DreamConfig["journals_fold_height"] = ${settings.journals_fold_height}; | ||||
|     // </#if> | ||||
|     [(${theme.config.enhance.cursor_move != 'none'?'DreamConfig["cursor_move"] = "' + theme.config.enhance.cursor_move + '";': ''})] | ||||
|     [(${theme.config.enhance.cursor_click != 'none'?'DreamConfig["cursor_click"] = "' + theme.config.enhance.cursor_click + '";': ''})] | ||||
|     [(${theme.config.enhance.effects_sakura_mode != 'none'?'DreamConfig["effects_sakura_mode"] = "' + theme.config.enhance.effects_sakura_mode + '";': ''})] | ||||
|     [(${theme.config.enhance.effects_universe_mode != 'none'?'DreamConfig["effects_universe_mode"] = "' + theme.config.enhance.effects_universe_mode + '";': ''})] | ||||
|       [(${theme.config.enhance.effects_circle_magic_mode != 'none'?'DreamConfig["effects_circle_magic_mode"] = "' + theme.config.enhance.effects_circle_magic_mode + '";': ''})] | ||||
|       [(${theme.config.enhance.enable_baidu_push?'DreamConfig["enable_baidu_push"] = true;': ''})] | ||||
|       [(${theme.config.enhance.enable_toutiao_push?'DreamConfig["enable_toutiao_push"] = true;': ''})] | ||||
|       [(${theme.config.basic_style.load_progress != 'none'?'DreamConfig["load_progress"] = "' + theme.config.basic_style.load_progress + '";': ''})] | ||||
|     // <#if settings.journals_share_image?? && settings.journals_share_image != 'none'> | ||||
|     // DreamConfig["journals_share_image"] = '${settings.journals_share_image}'; | ||||
|     // </#if> | ||||
|       [(${!#strings.isEmpty(theme.config.sidebar.meting_api)?'var meting_api = "' + theme.config.sidebar.meting_api + '";': ''})] | ||||
|     // /** 看板娘相关配置 */ | ||||
|     // <#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(){ | ||||
|         let isNight = DreamConfig.default_theme === 'system'? matchMedia('(prefers-color-scheme: dark)').matches : localStorage.getItem('night') || DreamConfig.default_theme === 'night'; | ||||
|         if (isNight.toString() === 'true') { | ||||
|  | ||||
| @ -55,19 +55,13 @@ | ||||
| 
 | ||||
|   <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> | ||||
|   <!--<#if settings.external_css?? && settings.external_css!=''>--> | ||||
|   <!--    <link rel="stylesheet" th:href="${settings.external_css!}">--> | ||||
|   <!--</#if>--> | ||||
|   <!--<#if settings.inline_css?? && settings.inline_css!=''>--> | ||||
|   <!--    <style type="text/css">${settings.inline_css!}</style>--> | ||||
|   <!--</#if>--> | ||||
|   <!--${settings.external_js_head!}--> | ||||
|   <!--<#if settings.inline_js_head?? && settings.inline_js_head!=''>--> | ||||
|   <!--    <script type="text/javascript">--> | ||||
|   <!--        ${settings.inline_js_head!}--> | ||||
|   <!--    </script>--> | ||||
|   <!--</#if>--> | ||||
|   <link th:if="${!#strings.isEmpty(theme.config.custom.external_css)}" rel="stylesheet" th:href="${theme.config.custom.external_css}"> | ||||
| 
 | ||||
|   <style th:if="${!#strings.isEmpty(theme.config.custom.inline_css)}" type="text/css" th:text="${theme.config.custom.inline_css}"></style> | ||||
|   [(${theme.config.custom.external_js_head})] | ||||
|   <script th:if="${!#strings.isEmpty(theme.config.custom.inline_js_head)}" type="text/javascript" th:text="${theme.config.custom.inline_js_head}"> | ||||
|   </script> | ||||
| </head> | ||||
| @ -1,6 +1,7 @@ | ||||
| <html lang="zh" xmlns:th="https://www.thymeleaf.org" | ||||
|       th:fragment="layout (title, canonical, content, isPost)"> | ||||
| <th:block th:if="${#strings.equals('',param._pjax) == false}"> | ||||
|       th:fragment="layout (title, canonical, content, isPost)" | ||||
|       th:with="isPjax = ${#strings.equals('',param._pjax)}"> | ||||
| <th:block th:if="${isPjax}"> | ||||
|   <th:block th:replace="~{common/head :: head}"/> | ||||
|   <body> | ||||
|   <div class="column-main"> | ||||
| @ -9,7 +10,7 @@ | ||||
|   <th:block th:replace="~{common/scripts}"/> | ||||
|   </body> | ||||
| </th:block> | ||||
| <th:block th:if="${#strings.equals('',param._pjax)}"> | ||||
| <th:block th:unless="${isPjax}"> | ||||
|   <th:block th:replace="~{common/head :: head}"/> | ||||
|   <body> | ||||
|   <th:block th:replace="~{common/navbar}"/> | ||||
| @ -17,12 +18,11 @@ | ||||
|     <th:block th:replace="~{common/banner :: banner}"/> | ||||
|   </th:block> | ||||
|   <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="column column-main"> | ||||
|           <th:block th:insert="${content}"/> | ||||
|         </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:replace="~{common/widget :: widget('left')}"/> | ||||
|         </th:block> | ||||
|  | ||||
| @ -1,9 +1,9 @@ | ||||
| <aside xmlns:th="https://www.thymeleaf.org" | ||||
|        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: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> | ||||
|   <div th:if="${position == 'left'}" class="column-right-shadow is-hidden-desktop"> | ||||
|  | ||||
| @ -1,22 +1,17 @@ | ||||
| <!DOCTYPE html> | ||||
| <html xmlns:th="https://www.thymeleaf.org" | ||||
|   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> | ||||
| </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> | ||||
|     <#if content == ''> | ||||
|       <#return> | ||||
|     </#if> | ||||
|     <#local content_option=content?split('|')> | ||||
|     <#local tag=(content_option[0]!'')?trim> | ||||
|     <#local content=((content_option[1]!'')?trim != '')?then('<div class="title">${content_option[1]?trim}</div>', '')> | ||||
|     <#local target=((content_option[2]!'false')?trim == 'true')?then('target="_blank"', '')> | ||||
|     <#local imageUrl=((content_option[3]!'')?trim != '')?then('style="background-image: url(${content_option[3]?trim})"', '')> | ||||
|     <#local targetUrl=((content_option[4]!'')?trim != '')?then('href="${content_option[4]?trim}"', '')> | ||||
|   <a class="card widget brightness ${(content!='')?then('bg-shadow', '')}" ${target} ${imageUrl} ${targetUrl}>${content}<div class="tag">${tag}</div></a> | ||||
| </#macro> | ||||
| <#macro article_list posts> | ||||
|     <#if is_first_index!false> | ||||
|         <#local carousel_content> | ||||
|           <#list posts as post> | ||||
|               <#if post.topPriority!=1> | ||||
|                   <#break> | ||||
|               </#if> | ||||
|               <#if !post.metas?? || (post.metas.index_carousel!'false')=='false'> | ||||
|                   <#continue> | ||||
|               </#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, ''))> | ||||
|               <#if thumbnail != ''> | ||||
|                 <a class="swiper-slide bg-shadow cover-image" style="background-image: url(${thumbnail})" href="${post.fullPath!}"> | ||||
|                     <div class="swiper-slide-details" data-swiper-parallax="200" data-swiper-parallax-duration="600"> | ||||
|                         <p class="swiper-slide-details-title">${post.title!}</p> | ||||
|                         <ul class="breadcrumb"> | ||||
|                             <li><@global.timeline datetime=post.createTime/></li> | ||||
|                             <li><i class="fa fa-eye"></i>${post.visits?c}</li> | ||||
|                             <#if !post.disallowComment!false> | ||||
|                                 <li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if> | ||||
|                             <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li> | ||||
|                             <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) /> | ||||
|                             <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) /> | ||||
|                             <li style="color: ${heatColor}">${heat}℃</li> | ||||
|                         </ul> | ||||
|                     </div> | ||||
|                 </a> | ||||
|               </#if> | ||||
|           </#list> | ||||
|         </#local> | ||||
|         <#if settings.sidebar_column=='module-left' || settings.sidebar_column=='module-right'> | ||||
|           <#if settings.module_links?? && settings.module_links?trim != ''> | ||||
|               <#local module_links=settings.module_links?split('\n')> | ||||
|           <#else> | ||||
|               <#local module_links=[]> | ||||
|               <#list 0..1 as i> | ||||
|                 <#local post=posts[i]> | ||||
|                 <#local module_links=module_links+["推荐|${post.title!}|false|${post.thumbnail!}|${post.fullPath!}"]> | ||||
|               </#list> | ||||
|           </#if> | ||||
|           <div class="model model-index"> | ||||
|             <div class="card widget swiper"> | ||||
|               <div class="swiper-wrapper">${carousel_content}</div> | ||||
|               <div class="swiper-pagination"></div> | ||||
|               <div class="swiper-button-prev"></div> | ||||
|               <div class="swiper-button-next"></div> | ||||
|             </div> | ||||
|             <div class="model model-index-side"> | ||||
|               <#list 0..1 as i> | ||||
|                 <#if i < module_links?size > | ||||
|                     <@model_build module_links[i]/> | ||||
|                 </#if> | ||||
|               </#list> | ||||
|             </div> | ||||
|           </div> | ||||
|             <#if module_links?size > 2 && module_links?size<=6> | ||||
|               <div class="model model-attach model-attach-${module_links?size-2}"> | ||||
|                 <#list 2..5 as i> | ||||
|                     <#if i < module_links?size > | ||||
|                         <@model_build module_links[i]/> | ||||
|                     </#if> | ||||
|                 </#list> | ||||
|               </div> | ||||
|             </#if> | ||||
|           <#assign is_carousel=true /> | ||||
|         <#elseif carousel_content != ''> | ||||
|           <div class="card widget swiper"> | ||||
|             <div class="swiper-wrapper">${carousel_content}</div> | ||||
|             <div class="swiper-pagination"></div> | ||||
|             <div class="swiper-button-prev"></div> | ||||
|             <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> | ||||
|     <#list posts as post> | ||||
|         <#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, ''))> | ||||
|         <#if is_first_index?? && thumbnail != '' && !(post.topPriority!=1 || !post.metas?? || (post.metas.index_carousel!'false')=='false')> | ||||
|             <#continue> | ||||
|         </#if> | ||||
|         <#local thumbnail_mode = ((settings.top_thumbnail_mode!'default')=='grid' || (post.topPriority==0 && (settings.thumbnail_mode!'default')=='grid'))?then( | ||||
|         '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')))> | ||||
|         <#if thumbnail != '' && thumbnail_mode == "back"> | ||||
|             <div class="card widget card-cover"> | ||||
|                 <a href="${post.fullPath!}"> | ||||
|                     <div class="cover-image" style="background-image: url(${thumbnail!})"> | ||||
|                     </div> | ||||
|                     <div class="details"> | ||||
|                         <h2 class="title"><#if post.topPriority==1><span class="top">置顶</span></#if>${post.title!} | ||||
|                         </h2> | ||||
|                         <ul class="breadcrumb"> | ||||
|                             <li><@global.timeline datetime=post.createTime/></li> | ||||
|                             <li><i class="fa fa-eye"></i>${post.visits?c}</li> | ||||
|                             <#if !post.disallowComment!false> | ||||
|                                 <li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if> | ||||
|                             <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li> | ||||
|                             <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) /> | ||||
|                             <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) /> | ||||
|                             <li style="color: ${heatColor}">${heat}℃</li> | ||||
|                         </ul> | ||||
|                     </div> | ||||
|                 </a> | ||||
|                 <#if post.categories?? && post.categories?size gt 0> | ||||
|                     <div class="category"> | ||||
|                         <#list post.categories as category> | ||||
|                             <a href="${category.fullPath!}">${category.name!}</a> | ||||
|                         </#list> | ||||
|                     </div> | ||||
|                 </#if> | ||||
|             </div> | ||||
|         <#elseif thumbnail != '' && (thumbnail_mode == "small" || (thumbnail_mode == "small-alter" && post_index%2 == 0))> | ||||
|             <div class="card widget card-small"> | ||||
|                 <a href="${post.fullPath!}"> | ||||
|                     <div class="small-image" style="background-image: url(${thumbnail!})"></div> | ||||
|                 </a> | ||||
|                 <div class="card-content main"> | ||||
|                     <h2 class="title"> | ||||
|                         <#if post.topPriority==1><span class="top">置顶</span></#if><a | ||||
|                                 href="${post.fullPath!}">${post.title!}</a> | ||||
|                     </h2> | ||||
|                     <div class="main-content">${post.summary!}</div> | ||||
|                     <hr/> | ||||
|                     <div class="meta"> | ||||
|                         <ul class="breadcrumb"> | ||||
|                             <li><@global.timeline datetime=post.createTime/></li> | ||||
|                             <li><i class="fa fa-eye"></i>${post.visits?c}</li> | ||||
|                             <#if !post.disallowComment!false><li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if> | ||||
|                             <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li> | ||||
|                             <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) /> | ||||
|                             <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) /> | ||||
|                             <li style="color: ${heatColor}">${heat}℃</li> | ||||
|                         </ul> | ||||
|                         <#if post.categories?? && post.categories?size gt 0> | ||||
|                             <div class="level-item is-hidden-mobile"> | ||||
|                                 <#list post.categories as category> | ||||
|                                     <a href="${category.fullPath!}">${category.name!}</a>  | ||||
|                                 </#list> | ||||
|                             </div> | ||||
|                         </#if> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </div> | ||||
|         <#elseif thumbnail != '' && (thumbnail_mode == "small-right" || (thumbnail_mode == "small-alter" && post_index%2 == 1))> | ||||
|             <div class="card widget card-small"> | ||||
|                 <div class="card-content main"> | ||||
|                     <h2 class="title"> | ||||
|                         <#if post.topPriority==1><span class="top">置顶</span></#if><a | ||||
|                                 href="${post.fullPath!}">${post.title!}</a> | ||||
|                     </h2> | ||||
|                     <div class="main-content">${post.summary!}</div> | ||||
|                     <hr/> | ||||
|                     <div class="meta"> | ||||
|                         <ul class="breadcrumb"> | ||||
|                             <li><@global.timeline datetime=post.createTime/></li> | ||||
|                             <li><i class="fa fa-eye"></i>${post.visits?c}</li> | ||||
|                             <#if !post.disallowComment!false><li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if> | ||||
|                             <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li> | ||||
|                             <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) /> | ||||
|                             <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) /> | ||||
|                             <li style="color: ${heatColor}">${heat}℃</li> | ||||
|                         </ul> | ||||
|                         <#if post.categories?? && post.categories?size gt 0> | ||||
|                             <div class="level-item is-hidden-mobile"> | ||||
|                                 <#list post.categories as category> | ||||
|                                     <a href="${category.fullPath!}">${category.name!}</a>  | ||||
|                                 </#list> | ||||
|                             </div> | ||||
|                         </#if> | ||||
|                     </div> | ||||
|                 </div> | ||||
|                 <a href="${post.fullPath!}"><div class="small-image" style="background-image: url(${thumbnail!})"></div></a> | ||||
|             </div> | ||||
|         <#elseif post.topPriority==1 && thumbnail_mode == "fold"> | ||||
|             <a class="card widget card-fold" href="${post.fullPath!}"> | ||||
|                 <h2 class="title"><span class="top">置顶</span><p>${post.title!}</p></h2> | ||||
|                 <p><@global.timeline datetime=post.createTime/></p> | ||||
|             </a> | ||||
|         <#elseif thumbnail_mode == "grid"> | ||||
|             <div class="column-main-grid"> | ||||
|             <#list post_index..(posts?size-1) as i> | ||||
|                 <#local gradPost=posts[i]> | ||||
|                 <#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 is_first_index?? && thumbnail != '' && !(gradPost.topPriority!=1 || !gradPost.metas?? || (gradPost.metas.index_carousel!'false')=='false')> | ||||
|                     <#continue> | ||||
|                 </#if> | ||||
|                 <div class="card widget"> | ||||
|                   <a class="thumbnail" href="${gradPost.fullPath!}"> | ||||
|                     <div class="thumbnail-image" style="background-image: url(${thumbnail!})"> | ||||
|                     </div> | ||||
|                   </a> | ||||
|                   <ul class="breadcrumb"> | ||||
|                     <li><@global.timeline datetime=gradPost.createTime/></li> | ||||
|                     <li><i class="fa fa-eye"></i>${gradPost.visits?c}</li> | ||||
|                       <#if !gradPost.disallowComment!false><li class="is-hidden-mobile"><i class="fa fa-comments-o"></i>${gradPost.commentCount?c}</li></#if> | ||||
|                     <li class="is-hidden-mobile"><i class="fa fa-thumbs-o-up"></i>${gradPost.likes?c}</li> | ||||
|                       <#local heat= (24+gradPost.visits*0.1+gradPost.likes*2+gradPost.commentCount*3) /> | ||||
|                       <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) /> | ||||
|                     <li style="color: ${heatColor}">${heat}℃</li> | ||||
|                   </ul> | ||||
|                   <h2 class="title"> | ||||
|                       <#if gradPost.topPriority==1><span class="top">置顶</span></#if><a | ||||
|                             href="${gradPost.fullPath!}">${gradPost.title!}</a> | ||||
|                   </h2> | ||||
|               </div> | ||||
|             </#list> | ||||
|             </div> | ||||
|             <#break/> | ||||
|         <#else> | ||||
|             <div class="card widget"> | ||||
|                 <#if thumbnail?? && thumbnail!=''> | ||||
|                     <a class="thumbnail" href="${post.fullPath!}"> | ||||
|                         <div class="thumbnail-image" style="background-image: url(${thumbnail!})"> | ||||
|                         </div> | ||||
|                     </a> | ||||
|                 </#if> | ||||
|                 <div class="card-content main"> | ||||
|                     <h2 class="title"> | ||||
|                         <#if post.topPriority==1><span class="top">置顶</span></#if><a | ||||
|                                 href="${post.fullPath!}">${post.title!}</a> | ||||
|                     </h2> | ||||
|                     <div class="meta"> | ||||
|                         <ul class="breadcrumb"> | ||||
|                             <li><@global.timeline datetime=post.createTime/></li> | ||||
|                             <li><i class="fa fa-eye"></i>${post.visits?c}</li> | ||||
|                             <#if !post.disallowComment!false><li class="is-hidden-mobile"><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>${post.likes?c}</li> | ||||
|                             <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) /> | ||||
|                             <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) /> | ||||
|                             <li style="color: ${heatColor}">${heat}℃</li> | ||||
|                         </ul> | ||||
|                         <#if post.categories?? && post.categories?size gt 0> | ||||
|                             <div class="level-item"> | ||||
|                                 <#list post.categories as category> | ||||
|                                     <a href="${category.fullPath!}">${category.name!}</a>  | ||||
|                                 </#list> | ||||
|                             </div> | ||||
|                         </#if> | ||||
|                     </div> | ||||
|                     <hr/> | ||||
|                     <div class="main-content">${post.summary!}</div> | ||||
|                 </div> | ||||
|             </div> | ||||
|         </#if> | ||||
|     </#list> | ||||
| </#macro> | ||||
| <div xmlns:th="https://www.thymeleaf.org" | ||||
|      th:fragment="articleList (posts, isFirstIndex)"> | ||||
|   <th:block th:each="post : ${posts}" | ||||
|             th:with="thumbnail = ${#strings.isEmpty(post.spec.cover) ? theme.config.post.default_thumbnail + '?id=' + postStat.index : post.spec.cover}"> | ||||
|     [(${thumbnail})] | ||||
|   </th:block> | ||||
| </div> | ||||
| <!--  <#list posts as post>--> | ||||
| <!--  <#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, ''))>--> | ||||
| <!--  <#if is_first_index?? && thumbnail != '' && !(post.topPriority!=1 || !post.metas?? || (post.metas.index_carousel!'false')=='false')>--> | ||||
| <!--  <#continue>--> | ||||
| <!--</#if>--> | ||||
| <!--<#local thumbnail_mode = ((settings.top_thumbnail_mode!'default')=='grid' || (post.topPriority==0 && (settings.thumbnail_mode!'default')=='grid'))?then(--> | ||||
| <!--'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')))>--> | ||||
| <!--<#if thumbnail != '' && thumbnail_mode == "back">--> | ||||
| <!--<div class="card widget card-cover">--> | ||||
| <!--  <a href="${post.fullPath!}">--> | ||||
| <!--    <div class="cover-image" style="background-image: url(${thumbnail!})">--> | ||||
| <!--    </div>--> | ||||
| <!--    <div class="details">--> | ||||
| <!--      <h2 class="title"><#if post.topPriority==1><span class="top">置顶</span></#if>${post.title!}--> | ||||
| <!--      </h2>--> | ||||
| <!--      <ul class="breadcrumb">--> | ||||
| <!--        <li><@global.timeline datetime=post.createTime/></li>--> | ||||
| <!--        <li><i class="fa fa-eye"></i>${post.visits?c}</li>--> | ||||
| <!--        <#if !post.disallowComment!false>--> | ||||
| <!--        <li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>--> | ||||
| <!--      <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>--> | ||||
| <!--      <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />--> | ||||
| <!--      <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> | ||||
| <!--      <li style="color: ${heatColor}">${heat}℃</li>--> | ||||
| <!--      </ul>--> | ||||
| <!--    </div>--> | ||||
| <!--  </a>--> | ||||
| <!--  <#if post.categories?? && post.categories?size gt 0>--> | ||||
| <!--  <div class="category">--> | ||||
| <!--    <#list post.categories as category>--> | ||||
| <!--    <a href="${category.fullPath!}">${category.name!}</a>--> | ||||
| <!--  </#list>--> | ||||
| <!--</div>--> | ||||
| <!--</#if>--> | ||||
| <!--</div>--> | ||||
| <!--<#elseif thumbnail != '' && (thumbnail_mode == "small" || (thumbnail_mode == "small-alter" && post_index%2 == 0))>--> | ||||
| <!--<div class="card widget card-small">--> | ||||
| <!--  <a href="${post.fullPath!}">--> | ||||
| <!--    <div class="small-image" style="background-image: url(${thumbnail!})"></div>--> | ||||
| <!--  </a>--> | ||||
| <!--  <div class="card-content main">--> | ||||
| <!--    <h2 class="title">--> | ||||
| <!--      <#if post.topPriority==1><span class="top">置顶</span></#if><a--> | ||||
| <!--    href="${post.fullPath!}">${post.title!}</a>--> | ||||
| <!--    </h2>--> | ||||
| <!--    <div class="main-content">${post.summary!}</div>--> | ||||
| <!--    <hr/>--> | ||||
| <!--    <div class="meta">--> | ||||
| <!--      <ul class="breadcrumb">--> | ||||
| <!--        <li><@global.timeline datetime=post.createTime/></li>--> | ||||
| <!--        <li><i class="fa fa-eye"></i>${post.visits?c}</li>--> | ||||
| <!--        <#if !post.disallowComment!false><li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>--> | ||||
| <!--      <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>--> | ||||
| <!--      <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />--> | ||||
| <!--      <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> | ||||
| <!--      <li style="color: ${heatColor}">${heat}℃</li>--> | ||||
| <!--      </ul>--> | ||||
| <!--      <#if post.categories?? && post.categories?size gt 0>--> | ||||
| <!--      <div class="level-item is-hidden-mobile">--> | ||||
| <!--        <#list post.categories as category>--> | ||||
| <!--        <a href="${category.fullPath!}">${category.name!}</a> --> | ||||
| <!--      </#list>--> | ||||
| <!--    </div>--> | ||||
| <!--  </#if>--> | ||||
| <!--</div>--> | ||||
| <!--</div>--> | ||||
| <!--</div>--> | ||||
| <!--<#elseif thumbnail != '' && (thumbnail_mode == "small-right" || (thumbnail_mode == "small-alter" && post_index%2 == 1))>--> | ||||
| <!--<div class="card widget card-small">--> | ||||
| <!--  <div class="card-content main">--> | ||||
| <!--    <h2 class="title">--> | ||||
| <!--      <#if post.topPriority==1><span class="top">置顶</span></#if><a--> | ||||
| <!--    href="${post.fullPath!}">${post.title!}</a>--> | ||||
| <!--    </h2>--> | ||||
| <!--    <div class="main-content">${post.summary!}</div>--> | ||||
| <!--    <hr/>--> | ||||
| <!--    <div class="meta">--> | ||||
| <!--      <ul class="breadcrumb">--> | ||||
| <!--        <li><@global.timeline datetime=post.createTime/></li>--> | ||||
| <!--        <li><i class="fa fa-eye"></i>${post.visits?c}</li>--> | ||||
| <!--        <#if !post.disallowComment!false><li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>--> | ||||
| <!--      <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>--> | ||||
| <!--      <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />--> | ||||
| <!--      <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> | ||||
| <!--      <li style="color: ${heatColor}">${heat}℃</li>--> | ||||
| <!--      </ul>--> | ||||
| <!--      <#if post.categories?? && post.categories?size gt 0>--> | ||||
| <!--      <div class="level-item is-hidden-mobile">--> | ||||
| <!--        <#list post.categories as category>--> | ||||
| <!--        <a href="${category.fullPath!}">${category.name!}</a> --> | ||||
| <!--      </#list>--> | ||||
| <!--    </div>--> | ||||
| <!--  </#if>--> | ||||
| <!--</div>--> | ||||
| <!--</div>--> | ||||
| <!--<a href="${post.fullPath!}"><div class="small-image" style="background-image: url(${thumbnail!})"></div></a>--> | ||||
| <!--</div>--> | ||||
| <!--<#elseif post.topPriority==1 && thumbnail_mode == "fold">--> | ||||
| <!--<a class="card widget card-fold" href="${post.fullPath!}">--> | ||||
| <!--  <h2 class="title"><span class="top">置顶</span><p>${post.title!}</p></h2>--> | ||||
| <!--  <p><@global.timeline datetime=post.createTime/></p>--> | ||||
| <!--</a>--> | ||||
| <!--<#elseif thumbnail_mode == "grid">--> | ||||
| <!--<div class="column-main-grid">--> | ||||
| <!--  <#list post_index..(posts?size-1) as i>--> | ||||
| <!--  <#local gradPost=posts[i]>--> | ||||
| <!--  <#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 is_first_index?? && thumbnail != '' && !(gradPost.topPriority!=1 || !gradPost.metas?? || (gradPost.metas.index_carousel!'false')=='false')>--> | ||||
| <!--  <#continue>--> | ||||
| <!--</#if>--> | ||||
| <!--<div class="card widget">--> | ||||
| <!--  <a class="thumbnail" href="${gradPost.fullPath!}">--> | ||||
| <!--    <div class="thumbnail-image" style="background-image: url(${thumbnail!})">--> | ||||
| <!--    </div>--> | ||||
| <!--  </a>--> | ||||
| <!--  <ul class="breadcrumb">--> | ||||
| <!--    <li><@global.timeline datetime=gradPost.createTime/></li>--> | ||||
| <!--    <li><i class="fa fa-eye"></i>${gradPost.visits?c}</li>--> | ||||
| <!--    <#if !gradPost.disallowComment!false><li class="is-hidden-mobile"><i class="fa fa-comments-o"></i>${gradPost.commentCount?c}</li></#if>--> | ||||
| <!--  <li class="is-hidden-mobile"><i class="fa fa-thumbs-o-up"></i>${gradPost.likes?c}</li>--> | ||||
| <!--  <#local heat= (24+gradPost.visits*0.1+gradPost.likes*2+gradPost.commentCount*3) />--> | ||||
| <!--  <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> | ||||
| <!--  <li style="color: ${heatColor}">${heat}℃</li>--> | ||||
| <!--  </ul>--> | ||||
| <!--  <h2 class="title">--> | ||||
| <!--    <#if gradPost.topPriority==1><span class="top">置顶</span></#if><a--> | ||||
| <!--  href="${gradPost.fullPath!}">${gradPost.title!}</a>--> | ||||
| <!--  </h2>--> | ||||
| <!--</div>--> | ||||
| <!--</#list>--> | ||||
| <!--</div>--> | ||||
| <!--<#break/>--> | ||||
| <!--<#else>--> | ||||
| <!--<div class="card widget">--> | ||||
| <!--  <#if thumbnail?? && thumbnail!=''>--> | ||||
| <!--  <a class="thumbnail" href="${post.fullPath!}">--> | ||||
| <!--    <div class="thumbnail-image" style="background-image: url(${thumbnail!})">--> | ||||
| <!--    </div>--> | ||||
| <!--  </a>--> | ||||
| <!--</#if>--> | ||||
| <!--<div class="card-content main">--> | ||||
| <!--  <h2 class="title">--> | ||||
| <!--    <#if post.topPriority==1><span class="top">置顶</span></#if><a--> | ||||
| <!--  href="${post.fullPath!}">${post.title!}</a>--> | ||||
| <!--  </h2>--> | ||||
| <!--  <div class="meta">--> | ||||
| <!--    <ul class="breadcrumb">--> | ||||
| <!--      <li><@global.timeline datetime=post.createTime/></li>--> | ||||
| <!--      <li><i class="fa fa-eye"></i>${post.visits?c}</li>--> | ||||
| <!--      <#if !post.disallowComment!false><li class="is-hidden-mobile"><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>${post.likes?c}</li>--> | ||||
| <!--    <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />--> | ||||
| <!--    <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> | ||||
| <!--    <li style="color: ${heatColor}">${heat}℃</li>--> | ||||
| <!--    </ul>--> | ||||
| <!--    <#if post.categories?? && post.categories?size gt 0>--> | ||||
| <!--    <div class="level-item">--> | ||||
| <!--      <#list post.categories as category>--> | ||||
| <!--      <a href="${category.fullPath!}">${category.name!}</a> --> | ||||
| <!--    </#list>--> | ||||
| <!--  </div>--> | ||||
| <!--</#if>--> | ||||
| <!--</div>--> | ||||
| <!--<hr/>--> | ||||
| <!--<div class="main-content">${post.summary!}</div>--> | ||||
| <!--</div>--> | ||||
| <!--</div>--> | ||||
| <!--</#if>--> | ||||
| <!--</#list>--> | ||||
| <!--</div>--> | ||||
| <!--<#macro model_build content>--> | ||||
| <!--    <#if content == ''>--> | ||||
| <!--      <#return>--> | ||||
| <!--    </#if>--> | ||||
| <!--    <#local content_option=content?split('|')>--> | ||||
| <!--    <#local tag=(content_option[0]!'')?trim>--> | ||||
| <!--    <#local content=((content_option[1]!'')?trim != '')?then('<div class="title">${content_option[1]?trim}</div>', '')>--> | ||||
| <!--    <#local target=((content_option[2]!'false')?trim == 'true')?then('target="_blank"', '')>--> | ||||
| <!--    <#local imageUrl=((content_option[3]!'')?trim != '')?then('style="background-image: url(${content_option[3]?trim})"', '')>--> | ||||
| <!--    <#local targetUrl=((content_option[4]!'')?trim != '')?then('href="${content_option[4]?trim}"', '')>--> | ||||
| <!--  <a class="card widget brightness ${(content!='')?then('bg-shadow', '')}" ${target} ${imageUrl} ${targetUrl}>${content}<div class="tag">${tag}</div></a>--> | ||||
| <!--</#macro>--> | ||||
| <!--<#macro article_list posts>--> | ||||
| <!--    <#if is_first_index!false>--> | ||||
| <!--        <#local carousel_content>--> | ||||
| <!--          <#list posts as post>--> | ||||
| <!--              <#if post.topPriority!=1>--> | ||||
| <!--                  <#break>--> | ||||
| <!--              </#if>--> | ||||
| <!--              <#if !post.metas?? || (post.metas.index_carousel!'false')=='false'>--> | ||||
| <!--                  <#continue>--> | ||||
| <!--              </#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, ''))>--> | ||||
| <!--              <#if thumbnail != ''>--> | ||||
| <!--                <a class="swiper-slide bg-shadow cover-image" style="background-image: url(${thumbnail})" href="${post.fullPath!}">--> | ||||
| <!--                    <div class="swiper-slide-details" data-swiper-parallax="200" data-swiper-parallax-duration="600">--> | ||||
| <!--                        <p class="swiper-slide-details-title">${post.title!}</p>--> | ||||
| <!--                        <ul class="breadcrumb">--> | ||||
| <!--                            <li><@global.timeline datetime=post.createTime/></li>--> | ||||
| <!--                            <li><i class="fa fa-eye"></i>${post.visits?c}</li>--> | ||||
| <!--                            <#if !post.disallowComment!false>--> | ||||
| <!--                                <li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>--> | ||||
| <!--                            <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>--> | ||||
| <!--                            <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />--> | ||||
| <!--                            <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> | ||||
| <!--                            <li style="color: ${heatColor}">${heat}℃</li>--> | ||||
| <!--                        </ul>--> | ||||
| <!--                    </div>--> | ||||
| <!--                </a>--> | ||||
| <!--              </#if>--> | ||||
| <!--          </#list>--> | ||||
| <!--        </#local>--> | ||||
| <!--        <#if settings.sidebar_column=='module-left' || settings.sidebar_column=='module-right'>--> | ||||
| <!--          <#if settings.module_links?? && settings.module_links?trim != ''>--> | ||||
| <!--              <#local module_links=settings.module_links?split('\n')>--> | ||||
| <!--          <#else>--> | ||||
| <!--              <#local module_links=[]>--> | ||||
| <!--              <#list 0..1 as i>--> | ||||
| <!--                <#local post=posts[i]>--> | ||||
| <!--                <#local module_links=module_links+["推荐|${post.title!}|false|${post.thumbnail!}|${post.fullPath!}"]>--> | ||||
| <!--              </#list>--> | ||||
| <!--          </#if>--> | ||||
| <!--          <div class="model model-index">--> | ||||
| <!--            <div class="card widget swiper">--> | ||||
| <!--              <div class="swiper-wrapper">${carousel_content}</div>--> | ||||
| <!--              <div class="swiper-pagination"></div>--> | ||||
| <!--              <div class="swiper-button-prev"></div>--> | ||||
| <!--              <div class="swiper-button-next"></div>--> | ||||
| <!--            </div>--> | ||||
| <!--            <div class="model model-index-side">--> | ||||
| <!--              <#list 0..1 as i>--> | ||||
| <!--                <#if i < module_links?size >--> | ||||
| <!--                    <@model_build module_links[i]/>--> | ||||
| <!--                </#if>--> | ||||
| <!--              </#list>--> | ||||
| <!--            </div>--> | ||||
| <!--          </div>--> | ||||
| <!--            <#if module_links?size > 2 && module_links?size<=6>--> | ||||
| <!--              <div class="model model-attach model-attach-${module_links?size-2}">--> | ||||
| <!--                <#list 2..5 as i>--> | ||||
| <!--                    <#if i < module_links?size >--> | ||||
| <!--                        <@model_build module_links[i]/>--> | ||||
| <!--                    </#if>--> | ||||
| <!--                </#list>--> | ||||
| <!--              </div>--> | ||||
| <!--            </#if>--> | ||||
| <!--          <#assign is_carousel=true />--> | ||||
| <!--        <#elseif carousel_content != ''>--> | ||||
| <!--          <div class="card widget swiper">--> | ||||
| <!--            <div class="swiper-wrapper">${carousel_content}</div>--> | ||||
| <!--            <div class="swiper-pagination"></div>--> | ||||
| <!--            <div class="swiper-button-prev"></div>--> | ||||
| <!--            <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!='')> | ||||
| <#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> | ||||
|             <a target="_blank" href="${settings.ad_target_url!}"> | ||||
|                 <img width="100%" src="${settings.ad_image}" alt="广告"/> | ||||
|  | ||||
| @ -18,7 +18,9 @@ | ||||
|     </#list> | ||||
| </#macro> | ||||
| <#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 = {}> | ||||
|     <@categoryTag method="list"> | ||||
|         <div class="card-title"> | ||||
|  | ||||
| @ -1,5 +1,7 @@ | ||||
| <#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"> | ||||
|         <div class="card-title"> | ||||
|             <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"> | ||||
|     <i class="fa fa-heart card-title-label"></i><span>恋爱墙</span> | ||||
|   </div> | ||||
| @ -13,8 +15,7 @@ | ||||
|           </a> | ||||
|         </div> | ||||
|         <div class="level-item"> | ||||
|           <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" | ||||
|                xmlns:xlink="http://www.w3.org/1999/xlink"> | ||||
|           <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"> | ||||
|             <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"/> | ||||
|             <path fill="#ffa2b2" | ||||
|  | ||||
| @ -1,6 +1,8 @@ | ||||
| <#if ((settings.music_mode!'playlist') == 'playlist' && settings.netease_playlist_id?? && settings.netease_playlist_id!='') | ||||
| || (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"> | ||||
|             <i class="fa fa-music card-title-label"></i><span>音乐</span> | ||||
|         </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"> | ||||
|         <i class="fa fa-volume-up card-title-label"></i><span>公告</span> | ||||
|     </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"> | ||||
|         <nav class="level"> | ||||
|             <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"> | ||||
|         <i class="fa fa-commenting-o card-title-label"></i><span>最新评论</span> | ||||
|     </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"> | ||||
|         <i class="fa fa-history card-title-label"></i><span>最新文章</span> | ||||
|     </div> | ||||
|     <@postTag method="latest" top="${settings.recent_posts_num!5}"> | ||||
|         <#if posts?size gt 0> | ||||
|             <div class="card-content"> | ||||
|                 <ul class="list"> | ||||
|                     <#list posts as post> | ||||
|                         <li class="item"> | ||||
|                             <a class="link" href="${post.fullPath!}" title="${post.title!}">${post.title!}</a> | ||||
|                             <i class="fa fa-link"></i> | ||||
|                         </li> | ||||
|                     </#list> | ||||
|                 </ul> | ||||
|             </div> | ||||
|         <#else> | ||||
|             <div class="card-empty">暂无文章</div> | ||||
|         </#if> | ||||
|     </@postTag> | ||||
|     <div th:if="${isEmpty}" class="card-empty">暂无文章</div> | ||||
|     <div th:unless="${isEmpty}" class="card-content"> | ||||
|         <ul class="list"> | ||||
|             <li class="item" th:each="post : ${posts}"> | ||||
|                 <a class="link" th:href="@{${ps.status.permalink}}" th:title="${ps.spec.title}" th:text="${ps.spec.title}"></a> | ||||
|                 <i class="fa fa-link"></i> | ||||
|             </li> | ||||
|         </ul> | ||||
|     </div> | ||||
| </div> | ||||
| @ -1,24 +1,26 @@ | ||||
| <#assign num= settings.tagcloud_num!32 /> | ||||
| <div class="card widget tagcloud ${settings.hide_tagcloud!}"> | ||||
|     <@tagTag method="list"> | ||||
|         <div class="card-title"> | ||||
|             <i class="fa fa-cloud card-title-label"></i><span>标签云</span> | ||||
|             <#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> | ||||
|             </#if> | ||||
|         </div> | ||||
|         <#if tags?? && tags?size gt 0> | ||||
|             <div class="card-content"> | ||||
|                 <#assign size= (tags?size > num?number)?string(num, tags?size)?number - 1 /> | ||||
|                 <#list 0..size as i> | ||||
|                     <#assign tag= tags[i] /> | ||||
|                     <#assign size= tag.name?length + tag.slug?length + tag.postCount /> | ||||
|                     <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> | ||||
|         <#else> | ||||
|             <div class="card-empty">暂无标签</div> | ||||
|         </#if> | ||||
|     </@tagTag> | ||||
| <div xmlns:th="https://www.thymeleaf.org" | ||||
|      th:fragment="widget (hide)" | ||||
|      th:class="'card widget tagcloud ' + ${hide}" | ||||
|      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)}"> | ||||
| 
 | ||||
|     <div class="card-title"> | ||||
|         <i class="fa fa-cloud card-title-label"></i><span>标签云</span> | ||||
|         <a th:if="${tags.hasNext}" class="card-more" th:href="@{/tags}">更多<i class="fa fa-angle-double-right"></i></a> | ||||
|     </div> | ||||
|     <div th:if="${isEmpty}" class="card-empty">暂无标签</div> | ||||
|     <div th:unless="${isEmpty}" class="card-content"> | ||||
|         <a | ||||
|           th:each="tag : ${tags}" | ||||
|           th:href="@{${tag.status.permalink}}" | ||||
|           th:text="${tag.spec.displayName}"></a> | ||||
|         <!--        <#if settings.enable_tags_color!false > style="color: ${tag.color}; border-color: ${tag.color}; background: ${tag.color!}20" </#if>--> | ||||
|     </div> | ||||
| <!--    <#assign size= (tags?size > num?number)?string(num, tags?size)?number - 1 />--> | ||||
| <!--    <#list 0..size as i>--> | ||||
| <!--    <#assign tag= tags[i] />--> | ||||
| <!--    <#assign size= tag.name?length + tag.slug?length + tag.postCount />--> | ||||
| <!--    <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> | ||||
| @ -1,22 +1,17 @@ | ||||
| <#assign num= settings.tags_num!18 /> | ||||
| <div class="card widget tags ${settings.hide_tags!}"> | ||||
|     <@tagTag method="list"> | ||||
|         <div class="card-title"> | ||||
|             <i class="fa fa-tags card-title-label"></i><span>标签</span> | ||||
|             <#if settings.tags_more?? && settings.tags_more== true && tags?size gt num?number> | ||||
|                 <a class="card-more" href="${tags_url!}">更多<i class="fa fa-angle-double-right"></i></a> | ||||
|             </#if> | ||||
|         </div> | ||||
|         <#if tags?? && tags?size gt 0> | ||||
|             <div class="card-content"> | ||||
|                 <#assign size= (tags?size > num?number)?string(num, tags?size)?number - 1 /> | ||||
|                 <#list 0..size as i> | ||||
|                     <#assign tag= tags[i] /> | ||||
|                     <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> | ||||
|                 </#list> | ||||
|             </div> | ||||
|         <#else> | ||||
|             <div class="card-empty">暂无标签</div> | ||||
|         </#if> | ||||
|     </@tagTag> | ||||
| <div xmlns:th="https://www.thymeleaf.org" | ||||
|      th:fragment="widget (hide)" | ||||
|      th:class="'card widget tags ' + ${hide}" | ||||
|      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)}"> | ||||
|     <div class="card-title"> | ||||
|         <i class="fa fa-tags card-title-label"></i><span>标签</span> | ||||
|         <a th:if="${tags.hasNext}" class="card-more" th:href="@{/tags}">更多<i class="fa fa-angle-double-right"></i></a> | ||||
|     </div> | ||||
|     <div th:if="${isEmpty}" class="card-empty">暂无标签</div> | ||||
|     <div th:unless="${isEmpty}" class="card-content"> | ||||
|         <a | ||||
|           th:each="tag : ${tags}" | ||||
|           th:href="@{${tag.status.permalink}}" | ||||
|           th:text="${tag.spec.displayName}"></a> | ||||
| <!--        <#if settings.enable_tags_color!false > style="color: ${tag.color}; border-color: ${tag.color}; background: ${tag.color!}20" </#if>--> | ||||
|     </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"> | ||||
|         <i class="fa fa-file-text-o card-title-label"></i><span>目录</span> | ||||
|     </div> | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user