diff --git a/annotation-setting.yaml b/annotation-setting.yaml index 374a308..7757772 100644 --- a/annotation-setting.yaml +++ b/annotation-setting.yaml @@ -12,13 +12,15 @@ spec: label: 开启文章版权声明 help: '当前配置将覆盖主题中的默认配置。' options: - - value: true + - value: "true" label: 开启 - - value: false + - value: "false" label: 关闭 + - value: "" + label: 跟随默认配置 - $formkit: select - name: top_thumbnail_mode - label: 置顶文章列表缩略图模式 + name: thumbnail_mode + label: 文章列表缩略图模式 help: '文章在列表的缩略图模式,除网格布局外,当前配置将覆盖主题中的默认配置。' options: - value: default @@ -33,6 +35,8 @@ spec: label: 小图模式(交替) - value: fold label: 折叠模式 + - value: "" + label: 跟随默认配置 - $formkit: text name: tips label: 文章提示 @@ -41,33 +45,38 @@ spec: - $formkit: radio name: enable_katex label: KaTeX 公式支持 - value: false help: '博客通过 KaTeX 做数学公式渲染,当前配置将覆盖主题中的默认配置。' options: - - value: true + - value: "true" label: 开启 - - value: false + - value: "false" label: 关闭 + - value: "" + label: 跟随默认配置 - $formkit: radio name: enable_share label: 开启文章分享 value: true help: '当前配置将覆盖主题中的默认配置。' options: - - value: true + - value: "true" label: 开启 - - value: false + - value: "false" label: 关闭 + - value: "" + label: 跟随默认配置 - $formkit: radio name: index_carousel label: 开启置顶轮播 value: true help: '如果该文章被置顶,在此处可开启文章置顶轮播。' options: - - value: true + - value: "true" label: 开启 - - value: false + - value: "false" label: 关闭 + - value: "" + label: 跟随默认配置 --- @@ -86,10 +95,12 @@ spec: value: true help: '当前配置将覆盖主题中的默认配置。' options: - - value: true + - value: "true" label: 开启 - - value: false + - value: "false" label: 关闭 + - value: "" + label: 跟随默认配置 - $formkit: text name: tips label: 文章提示 @@ -101,17 +112,21 @@ spec: value: false help: '博客通过 KaTeX 做数学公式渲染,当前配置将覆盖主题中的默认配置。' options: - - value: true + - value: "true" label: 开启 - - value: false + - value: "false" label: 关闭 + - value: "" + label: 跟随默认配置 - $formkit: radio name: enable_share label: 开启文章分享 value: true help: '当前配置将覆盖主题中的默认配置。' options: - - value: true + - value: "true" label: 开启 - - value: false - label: 关闭 \ No newline at end of file + - value: "false" + label: 关闭 + - value: "" + label: 跟随默认配置 \ No newline at end of file diff --git a/settings.yaml b/settings.yaml index e3f0cda..37ce51f 100644 --- a/settings.yaml +++ b/settings.yaml @@ -152,16 +152,14 @@ spec: label: 黑暗模式 - value: 'system' label: 跟随系统 -# - $formkit: text -# name: theme_color -# label: 明亮模式主题色 -# type: color -# value: '#50bfff' -# - $formkit: text -# name: night_theme_color -# label: 黑暗模式主题色 -# type: color -# value: '#5d93db' + - $formkit: color + name: theme_color + label: 明亮模式主题色 + value: '#50bfff' + - $formkit: color + name: night_theme_color + label: 黑暗模式主题色 + value: '#5d93db' - $formkit: select name: web_font label: 博客字体 @@ -505,8 +503,6 @@ spec: label: 文章标签模块 - value: 'tagcloud' label: 文章标签云模块 -# - value: 'links' -# label: 友链模块 - $formkit: select name: position label: 模块位置 @@ -531,6 +527,12 @@ spec: label: 桌面设备隐藏 - value: 'is-not-hidden' label: 不隐藏 + - $formkit: text + name: metadata_name + label: 作者用户名 + placeholder: 请输入用户名 + value: admin + help: 后台用户管理中作者的用户名,填写错误将导致个人资料显示异常(示例:admin) - $formkit: radio name: enable_color_character label: 侧边栏信息-开启彩字切换 @@ -582,17 +584,6 @@ spec: name: social_telegram label: 侧边栏信息-Telegram placeholder: '请输入 Telegram 用户名' -# - $formkit: text -# name: social_rss -# label: '侧边栏信息-RSS 订阅' -# type: select -# data-type: bool -# value: true -# options: -# - value: true -# label: 开启 -# - value: false -# label: 关闭 - $formkit: textarea name: custom_social_options label: 侧边栏信息-自定义社交渠道选项 @@ -603,19 +594,18 @@ spec: label: 侧边栏公告-博客公告 placeholder: 请输入公告内容 help: 公告内容支持 HTML 标签。 -# - $formkit: text -# name: notice_show_mode -# label: 侧边栏公告-显示模式 -# type: radio -# value: index -# help: 当满足指定的条件时公告模块才会显示。 -# options: -# - value: none -# label: 无条件 -# - value: toc -# label: 目录模块不显示时 -# - value: index -# label: 仅首页 + - $formkit: radio + name: notice_show_mode + label: 侧边栏公告-显示模式 + value: index + help: 当满足指定的条件时公告模块才会显示。 + options: + - value: none + label: 无条件 + - value: toc + label: 目录模块不显示时 + - value: index + label: 仅首页 - $formkit: attachment name: love_oneself_avatar label: 侧边栏恋爱墙-自己的头像 @@ -641,7 +631,7 @@ spec: name: meting_api label: 侧边栏音乐-自建API placeholder: '请输入 API 地址' - help: '自建 API 方法见文档:Meting。' + help: '自建 API 方法见文档:https://github.com/metowolf/Meting' - $formkit: radio name: music_mode label: 侧边栏音乐-音乐播放器配置方式 @@ -656,27 +646,24 @@ spec: label: '侧边栏音乐-网易云歌单 ID' placeholder: '请输入歌单 ID' help: '填写网易云歌单的 ID。' -# - $formkit: text -# name: music_config -# label: 侧边栏音乐-参数进阶配置 -# type: textarea -# placeholder: '请输入音乐参数配置' -# value: 'list-folded="true" -# server="netease" -# type="playlist" -# id="7355014621"' -# help: '输入音乐参数配置(id / server / type必填),详细配置方式见官方文档:MetingJS 2.0。' -# - $formkit: text -# name: show_ad_tag -# label: 侧边栏广告-显示“广告”标签 -# type: radio -# data-type: bool -# value: true -# options: -# - value: true -# label: 显示 -# - value: false -# label: 不显示 + - $formkit: textarea + name: music_config + label: 侧边栏音乐-参数进阶配置 + placeholder: '请输入音乐参数配置' + value: 'list-folded="true" + server="netease" + type="playlist" + id="7355014621"' + help: '输入音乐参数配置(id / server / type必填),详细配置方式见官方文档:https://github.com/metowolf/MetingJS/' + - $formkit: radio + name: show_ad_tag + label: 侧边栏广告-显示“广告”标签 + value: true + options: + - value: true + label: 显示 + - value: false + label: 不显示 - $formkit: radio name: ad_tag_close label: 侧边栏广告-点击“广告”标签可关闭广告 @@ -686,34 +673,30 @@ spec: label: 是 - value: false label: 否 -# - $formkit: text -# name: ad_mode -# label: 侧边栏广告-广告展示方法 -# type: radio -# data-type: bool -# value: true -# options: -# - value: true -# label: 图片+链接 -# - value: false -# label: 自定义广告代码 -# - $formkit: text -# name: ad_target_url -# label: 侧边栏广告-广告目标地址 -# placeholder: '请输入链接地址' -# help: '填写广告跳转的目标路径。' -# - $formkit: text -# name: ad_image -# label: 侧边栏广告-广告图片链接 -# type: attachment -# placeholder: '请输入/选择图片路径' -# help: '图片+链接模式时不能为空。' -# - $formkit: text -# name: ad_custom_code -# label: 侧边栏广告-自定义广告代码 -# type: textarea -# placeholder: '请输入广告代码' -# help: '在这里黏贴广告联盟提供的广告代码,自定义广告代码模式时不能为空。' + - $formkit: radio + name: ad_mode + label: 侧边栏广告-广告展示方法 + value: true + options: + - value: true + label: 图片+链接 + - value: false + label: 自定义广告代码 + - $formkit: text + name: ad_target_url + label: 侧边栏广告-广告目标地址 + placeholder: '请输入链接地址' + help: '填写广告跳转的目标路径。' + - $formkit: attachment + name: ad_image + label: 侧边栏广告-广告图片链接 + placeholder: '请输入/选择图片路径' + help: '图片+链接模式时不能为空。' + - $formkit: textarea + name: ad_custom_code + label: 侧边栏广告-自定义广告代码 + placeholder: '请输入广告代码' + help: '在这里黏贴广告联盟提供的广告代码,自定义广告代码模式时不能为空。' - $formkit: text name: recent_posts_num label: 侧边栏最近文章-展示文章数量 @@ -724,18 +707,16 @@ spec: label: 侧边栏最近评论-展示评论数量 placeholder: 请输入数量数值 value: 5 -# - $formkit: text -# name: categories_more -# label: 侧边栏分类-显示”更多”按钮 -# type: radio -# data-type: bool -# value: true -# help: '超出展示的分类数量后是否显示更多按钮。' -# options: -# - value: true -# label: 显示 -# - value: false -# label: 不显示 + - $formkit: radio + name: categories_more + label: 侧边栏分类-显示”更多”按钮 + value: true + help: '超出展示的分类数量后是否显示更多按钮。' + options: + - value: true + label: 显示 + - value: false + label: 不显示 - $formkit: text name: categories_num label: 侧边栏分类-展示分类数量 @@ -789,265 +770,18 @@ spec: label: 开启 - value: false label: 关闭 -# - $formkit: radio -# name: links_more -# label: 侧边栏友链-显示”更多”按钮 -# value: true -# help: '超出展示的友链数量后是否显示更多按钮。' -# options: -# - value: true -# label: 显示 -# - value: false -# label: 不显示 -# - $formkit: text -# name: links_num -# label: 侧边栏友链-展示友链数量 -# placeholder: 请输入数量数值 -# value: 10 - group: page_config label: '页面设置' formSchema: - - $formkit: attachment - name: links_thumbnail - label: 友链页面-缩略图 - placeholder: '请输入/选择图片路径' - - $formkit: attachment - name: links_default_avatar - label: '友链页面-默认 Logo' - placeholder: '请输入/选择 Logo 路径' - help: "在加载用户 Logo 时、友链未设置 Logo 时、友链 Logo 加载失败时显示。" -# - $formkit: text -# name: show_exchange_info -# label: 友链页面-显示友链交换信息 -# type: switch -# data-type: bool -# value: true -# options: -# - value: true -# label: 显示 -# - value: false -# label: 关闭 -# - $formkit: text -# name: links_blogger_avatar -# label: '友链页面-交换信息自定义 Logo 链接' -# type: attachment -# placeholder: '请输入/选择 Logo 路径' -# help: '用于交换友链的 Logo 链接。' -# - $formkit: text -# name: links_info -# label: 友链页面-补充信息 -# type: textarea -# placeholder: '请输入补充信息' -# help: '友链页面最低部的补充说明信息,支持 HTML 格式。' -# - $formkit: text -# name: link_comment_id -# label: 友链页面-评论区ID -# placeholder: '请输入 ID' -# help: '友链页面没有 ID,需要指定一个自定义页面的 ID 用于评论,被指定的文章评论区将作为友链的评论区, 放空则不显示评论区。 ' -# - $formkit: text -# name: journals_fold_height -# label: 日志页面-动态内容折叠 -# placeholder: '请输入高度数值(px)' -# help: '动态内容高度超出指定高度后默认进行折叠,指定的高度需大于等于 260px。' -# - $formkit: text -# name: enable_journals_comment -# label: 日志页面-开启评论区 -# type: switch -# data-type: bool -# value: true -# options: -# - value: true -# label: 开启 -# - value: false -# label: 关闭 -# - $formkit: text -# name: enable_journals_share -# label: 日志页面-开启日志分享 -# type: switch -# data-type: bool -# value: true -# options: -# - value: true -# label: 开启 -# - value: false -# label: 关闭 - - $formkit: attachment - name: journals_share_image - label: 日志页面-日志分享背景图 - placeholder: '请输入/选择图片路径' -# - $formkit: text -# name: enable_tags_tag_color -# label: 标签页面-开启标签颜色 -# type: switch -# data-type: bool -# value: false -# options: -# - value: true -# label: 开启 -# - value: false -# label: 关闭 -#live2d: -# label: 看板娘 -# items: -# - $formkit: text -# name: enable_live2d -# label: 启用看板娘 -# type: switch -# data-type: bool -# value: true -# options: -# - value: true -# label: 开启 -# - value: false -# label: 关闭 -# - $formkit: text -# name: live2d_model_url -# label: 模型地址 -# value: 'https://unpkg.com/live2d-widget-model@1.0.1/' -# placeholder: '请输入 API 地址' -# help: "Live2D 模型 API 地址,可直接克隆 live2d-widget-model 模型仓库实现自建地址。" -# - $formkit: text -# name: live2d_tips_url -# label: 自定义提示语文件地址 -# type: attachment -# placeholder: '请输入/选择文件地址' -# help: '提示语 JSON 文件。' -# - $formkit: text -# name: live2d_about_page -# label: “关于”按钮的 URL 地址 -# placeholder: '请输入链接地址' -# help: '放空则不显示关于按钮。' -# - $formkit: text -# name: live2d_model_id -# label: '默认模型 ID' -# value: '0' -# placeholder: '请输入模型 ID' -# help: '默认模型 ID,参见 可用model列表。' -# - $formkit: text -# name: live2d_model_textures_id -# label: '默认材质 ID' -# value: '0' -# placeholder: '请输入材质 ID' -# help: '默认材质 ID,参见 可用model列表。' -# - $formkit: text -# name: live2d_waifu_size -# label: 看板娘大小 -# value: '280x260' -# placeholder: '请输入宽度(px)x高度(px)' -# help: '看板娘的(宽度x高度),单位为px。' -# - $formkit: text -# name: live2d_edge_side -# label: 看板娘贴边方向与距离 -# value: 'right:50' -# placeholder: '请输入位置:距离(px)' -# - $formkit: text -# name: live2d_model_rand_mode -# label: 模型切换方式 -# type: radio -# value: switch -# options: -# - value: switch -# label: 顺序 -# - value: rand -# label: 随机 -# - $formkit: text -# name: live2d_model_textures_rand_mode -# label: 材质切换方式 -# type: radio -# value: rand -# options: -# - value: switch -# label: 顺序 -# - value: rand -# label: 随机 -# - $formkit: text -# name: live2d_show_tool_menu -# label: 显示工具栏 -# type: switch -# data-type: bool -# value: true -# options: -# - value: true -# label: 显示 -# - value: false -# label: 关闭 -# - $formkit: text -# name: live2d_can_turn_to_home_page -# label: 显示「返回首页」按钮 -# type: switch -# data-type: bool -# value: true -# options: -# - value: true -# label: 显示 -# - value: false -# label: 关闭 -# - $formkit: text -# name: live2d_can_switch_hitokoto -# label: 显示「一言」按钮 -# type: switch -# data-type: bool -# value: true -# options: -# - value: true -# label: 显示 -# - value: false -# label: 关闭 -# - $formkit: text -# name: live2d_can_switch_model -# label: 显示「切换模型」按钮 -# type: switch -# data-type: bool -# value: true -# options: -# - value: true -# label: 显示 -# - value: false -# label: 关闭 -# - $formkit: text -# name: live2d_can_switch_textures -# label: 显示「切换材质」按钮 -# type: switch -# data-type: bool -# value: true -# options: -# - value: true -# label: 显示 -# - value: false -# label: 关闭 -# - $formkit: text -# name: live2d_can_take_screenshot -# label: 显示「截图」按钮 -# type: switch -# data-type: bool -# value: true -# options: -# - value: true -# label: 显示 -# - value: false -# label: 关闭 -# - $formkit: text -# name: live2d_can_turn_to_about_page -# label: 显示「关于」按钮 -# type: switch -# data-type: bool -# value: true -# options: -# - value: true -# label: 显示 -# - value: false -# label: 关闭 -# - $formkit: text -# name: live2d_can_close_live2d -# label: 显示「关闭看板娘」按钮 -# type: switch -# data-type: bool -# value: true -# options: -# - value: true -# label: 显示 -# - value: false -# label: 关闭 + - $formkit: radio + name: enable_tags_tag_color + label: 标签页面-开启标签颜色 + value: false + options: + - value: true + label: 开启 + - value: false + label: 关闭 - group: enhance label: '增强功能' formSchema: @@ -1094,22 +828,20 @@ spec: label: 烟花特效 - value: granule label: 粒子爆炸 -# - $formkit: text -# name: enable_sw -# label: "启用 Service Worker 优化" -# type: radio -# data-type: text -# value: "false" -# help: "需要在 Nginx 中添加代理配置方可启用,配置方法见 Dream 2.0.5起移除FreeCDN,以及SW配置方法。" -# options: -# - value: "false" -# label: 关闭 -# - value: "&install=true" -# label: 开启CDN并发请求 -# - value: "&install=true&offLine=true" -# label: 开启全站离线 -# - value: "uninstall" -# label: 卸载 + - $formkit: radio + name: enable_sw + label: "启用 Service Worker 优化" + value: "false" + help: "需要在 Nginx 中添加代理配置方可启用,配置方法见:https://blog.nineya.com/archives/104.html" + options: + - value: "false" + label: 关闭 + - value: "&install=true" + label: 开启CDN并发请求 + - value: "&install=true&offLine=true" + label: 开启全站离线 + - value: "uninstall" + label: 卸载 - $formkit: radio name: effects_sakura_mode label: 樱花飘落特效显示模式 diff --git a/src/js/autoload.js b/src/js/autoload.js deleted file mode 100644 index 47e6814..0000000 --- a/src/js/autoload.js +++ /dev/null @@ -1,36 +0,0 @@ -try { - ($('').attr({href: '/themes/dream/source/lib/live2d@1.0.1/waifu.min.css', rel: 'stylesheet', type: 'text/css'}).appendTo('head'), - $('body').append('
'), - $.ajax({url: '/themes/dream/source/lib/live2d@1.0.1/waifu-tips.min.js', dataType:'script', cache: true, success: function() { - $.ajax({url: '/themes/dream/source/lib/live2d@1.0.1/live2d.min.js', dataType:'script', cache: true, success: function() { - live2d_settings['hitokotoAPI'] = 'hitokoto.cn' // 一言 API - live2d_settings['modelId'] = DreamConfig['live2d_model_id'] // 默认模型 ID - live2d_settings['modelTexturesId'] = DreamConfig['live2d_model_textures_id'] // 默认材质 ID - live2d_settings['waifuSize'] = DreamConfig['live2d_waifu_size'], - live2d_settings['waifuTipsSize'] = '230x75', - live2d_settings['waifuFontSize'] = '16px', - live2d_settings['waifuToolFont'] = '16px', - live2d_settings['waifuToolLine'] = '26px', - live2d_settings['waifuEdgeSide'] = DreamConfig['live2d_edge_side'], - live2d_settings['homePageUrl'] = '/' - live2d_settings['modelCdnUrl'] = DreamConfig['live2d_model_url'] - live2d_settings['showToolMenu'] = DreamConfig['live2d_show_tool_menu'] - live2d_settings['canTurnToHomePage'] = DreamConfig['live2d_can_turn_to_home_page'] - live2d_settings['canSwitchHitokoto'] = DreamConfig['live2d_can_switch_hitokoto'] - live2d_settings['canSwitchModel'] = DreamConfig['live2d_can_switch_model'] - live2d_settings['canSwitchTextures'] = DreamConfig['live2d_can_switch_textures'] - live2d_settings['canTakeScreenshot'] = DreamConfig['live2d_can_take_screenshot'] - if (DreamConfig['live2d_about_page']) { - live2d_settings['canTurnToAboutPage'] = DreamConfig['live2d_can_turn_to_about_page'] - live2d_settings['aboutPageUrl'] = DreamConfig['live2d_about_page'] - } else { - live2d_settings['canTurnToAboutPage'] = false - } - live2d_settings['canCloseLive2d'] = DreamConfig['live2d_can_close_live2d'] - live2d_settings['modelRandMode'] = DreamConfig['live2d_model_rand_mode'] - live2d_settings['modelTexturesRandMode'] = DreamConfig['live2d_model_textures_rand_mode'] - /* 在 initModel 前添加 */ - initModel(DreamConfig['live2d_tips_url']) - }}) - }})) -} catch(err) { console.log('[Error] JQuery is not defined.') } diff --git a/src/js/common.js b/src/js/common.js index 94defb9..a058fae 100644 --- a/src/js/common.js +++ b/src/js/common.js @@ -476,12 +476,12 @@ const commonContext = { /* 初始化特效,只需要初始化一次,移动端设备不初始化 */ initEffects() { if (Utils.isMobile()) return - DreamConfig.cursor_move && Utils.cachedScript(`${DreamConfig.theme_base}/source/js/cursor/move/${DreamConfig.cursor_move}.min.js?mew=${DreamConfig.theme_version}`) - DreamConfig.cursor_click && Utils.cachedScript(`${DreamConfig.theme_base}/source/js/cursor/click/${DreamConfig.cursor_click}.min.js?mew=${DreamConfig.theme_version}`) - DreamConfig.enable_live2d && Utils.cachedScript(`${DreamConfig.theme_base}/source/js/autoload.min.js?mew=${DreamConfig.theme_version}`) - DreamConfig.effects_sakura_mode && Utils.cachedScript(`${DreamConfig.theme_base}/source/js/effects/sakura.min.js?mew=${DreamConfig.theme_version}`) - DreamConfig.effects_universe_mode && Utils.cachedScript(`${DreamConfig.theme_base}/source/js/effects/universe.min.js?mew=${DreamConfig.theme_version}`) - DreamConfig.effects_circle_magic_mode && Utils.cachedScript(`${DreamConfig.theme_base}/source/js/effects/circleMagic.min.js?mew=${DreamConfig.theme_version}`) + DreamConfig.cursor_move && Utils.cachedScript(`${DreamConfig.theme_base}/js/cursor/move/${DreamConfig.cursor_move}.min.js?mew=${DreamConfig.theme_version}`) + DreamConfig.cursor_click && Utils.cachedScript(`${DreamConfig.theme_base}/js/cursor/click/${DreamConfig.cursor_click}.min.js?mew=${DreamConfig.theme_version}`) + DreamConfig.enable_live2d && Utils.cachedScript(`${DreamConfig.theme_base}/js/autoload.min.js?mew=${DreamConfig.theme_version}`) + DreamConfig.effects_sakura_mode && Utils.cachedScript(`${DreamConfig.theme_base}/js/effects/sakura.min.js?mew=${DreamConfig.theme_version}`) + DreamConfig.effects_universe_mode && Utils.cachedScript(`${DreamConfig.theme_base}/js/effects/universe.min.js?mew=${DreamConfig.theme_version}`) + DreamConfig.effects_circle_magic_mode && Utils.cachedScript(`${DreamConfig.theme_base}/js/effects/circleMagic.min.js?mew=${DreamConfig.theme_version}`) }, /* 加载主动推送、统计脚本等参数 */ loadMaintain() { diff --git a/src/js/photos.js b/src/js/photos.js deleted file mode 100644 index ac62a03..0000000 --- a/src/js/photos.js +++ /dev/null @@ -1,149 +0,0 @@ -let photoContextInitial = false -let dataPromise = {} -let isLoading = false -let isEnd = false - -let queryParams = { - page: 0, - size: 15, - sort: 'createTime,desc', -} - -// 渲染与设置画廊 -const renderPhotos = ($photosGallery, data) => { - const photosHtml = data.reduce((result, item, index) => { - return `${result}
${item.name || ''
-    }

${item.name}

${ - item.location ? `

${item.location}

` : '' - }

${Utils.formatDate(item.takeTime) - }

${item.description ? `

${item.description}

` : ''}
` - }, '') - $photosGallery.append(photosHtml) - - $photosGallery - .justifiedGallery({ - rowHeight: 200, - maxRowHeight: false, - maxRowsCount: 0, - sizeRangeSuffixes: {}, - lastRow: 'nojustify', - captions: false, - waitThumbnailsLoad: true, //等待图片加载完,这样就可以根据图片比例展示,如果为false,则都是统一比例 - margins: 10, - extension: /\.(jpe?g|png|gif|bmp|webp)$/, - cssAnimation: false, - }) -} - -/* 获取相册数据 */ -const getData = ($photosGallery, param) => { - isLoading = true - $photosGallery.addClass('loading') - param && param.team && (param.team = param.team.substring(2)) - const params = {...queryParams, ...(param || {})} - dataPromise.promise = new Promise((resolve, reject) => { - dataPromise.abort = reject - Utils.request({ - url: '/api/content/photos', - method: 'GET', - data: params, - }) - .then((res) => resolve(res)) - .catch((err) => reject(err)) - }) - .then((res) => { - const photoContents = res.content || [] - if (photoContents.length !== 0) { - renderPhotos($photosGallery, photoContents) - isEnd = res.isLast - } else { - isEnd = true - } - }) - .catch((err) => console.log(err)) - .finally(() => { - $photosGallery.removeClass('loading') - dataPromise = {} - isLoading = false - }) -} - -// 重置列表 -const reset = async ($photosGallery, param) => { - if (dataPromise) { - dataPromise.abort && dataPromise.abort('abort') - await dataPromise.promise - } - $photosGallery.empty() - isEnd = false - isLoading = false - queryParams.page = 0 - location.hash = param.team - getData($photosGallery, param) -} - -const photoContext = { - /* 初始化事件 */ - initEvent() { - if (photoContextInitial) return - - // 分组过滤 - $('body').on('click', '.photos-teams .item', function (e) { - e.stopPropagation() - const $this = $(this) - if ($this.hasClass('active')) return - $this.addClass('active').siblings('li').removeClass('active') - reset($('.photos-gallery'), {team: $this.attr('data-team')}) - }) - - // 滚动加载 - window.addEventListener( - 'scroll', - function () { - let $photosGallery = $('.photos-gallery') - if ($photosGallery.length !== 0 && $(window).scrollTop() + $(window).height() >= $photosGallery.height()) { - if (isLoading || isEnd) return - queryParams.page++ - getData($photosGallery,{ - team: $('.photos-teams li.active').attr('data-team') - }) - } - } - ) - photoContextInitial = true - }, - /* 初始化相册列表 */ - initPhotos() { - const $photosGallery = $('.photos-gallery') - // 从新初始化参数 - dataPromise = {} - isLoading = false - isEnd = false - queryParams = { - page: 0, - size: 15, - sort: 'createTime,desc', - } - // 读取变量 - if (location.hash) { - let team = decodeURI(location.hash.substring(1)) - let teamElem = $('.photos-teams li[data-team=' + team + ']') - teamElem.length > 0 ? teamElem.click() : $('.photos-teams li:not([data-team])').addClass('active') && getData($photosGallery) - } else { - $('.photos-teams li:not([data-team])').addClass('active') - getData($photosGallery) - } - - }, -} -window.photoPjax = function (serialNumber) { - if ($('.photos-gallery').length === 0) return - Object.keys(photoContext).forEach( - (c) => window.pjaxSerialNumber === serialNumber && photoContext[c]() - ) -} -!(function () { - !window.pjaxSerialNumber && photoContext.initEvent() - !window.pjaxSerialNumber && photoContext.initPhotos() -})() \ No newline at end of file diff --git a/templates/404.html b/templates/404.html deleted file mode 100644 index aa5e7ae..0000000 --- a/templates/404.html +++ /dev/null @@ -1,2 +0,0 @@ -<#include "templates/errorpage.ftl"> -<@errorpage "找不到网页","无法找到该文章或分类,可能已被删除,去首页看看吧。","${status!}","${error!}","${message!}" /> \ No newline at end of file diff --git a/templates/500.html b/templates/500.html deleted file mode 100644 index 1b71317..0000000 --- a/templates/500.html +++ /dev/null @@ -1,2 +0,0 @@ -<#include "templates/errorpage.ftl"> -<@errorpage "服务器繁忙","围观群众太过热情,服务器繁忙,请稍后访问。","${status!}","${error!}","${message!}" /> \ No newline at end of file diff --git a/templates/assets/js/autoload.min.js b/templates/assets/js/autoload.min.js deleted file mode 100644 index 00a0987..0000000 --- a/templates/assets/js/autoload.min.js +++ /dev/null @@ -1 +0,0 @@ -try{$("").attr({href:"/themes/dream/source/lib/live2d@1.0.1/waifu.min.css",rel:"stylesheet",type:"text/css"}).appendTo("head"),$("body").append('
'),$.ajax({url:"/themes/dream/source/lib/live2d@1.0.1/waifu-tips.min.js",dataType:"script",cache:!0,success:function(){$.ajax({url:"/themes/dream/source/lib/live2d@1.0.1/live2d.min.js",dataType:"script",cache:!0,success:function(){live2d_settings.hitokotoAPI="hitokoto.cn",live2d_settings.modelId=DreamConfig.live2d_model_id,live2d_settings.modelTexturesId=DreamConfig.live2d_model_textures_id,live2d_settings.waifuSize=DreamConfig.live2d_waifu_size,live2d_settings.waifuTipsSize="230x75",live2d_settings.waifuFontSize="16px",live2d_settings.waifuToolFont="16px",live2d_settings.waifuToolLine="26px",live2d_settings.waifuEdgeSide=DreamConfig.live2d_edge_side,live2d_settings.homePageUrl="/",live2d_settings.modelCdnUrl=DreamConfig.live2d_model_url,live2d_settings.showToolMenu=DreamConfig.live2d_show_tool_menu,live2d_settings.canTurnToHomePage=DreamConfig.live2d_can_turn_to_home_page,live2d_settings.canSwitchHitokoto=DreamConfig.live2d_can_switch_hitokoto,live2d_settings.canSwitchModel=DreamConfig.live2d_can_switch_model,live2d_settings.canSwitchTextures=DreamConfig.live2d_can_switch_textures,live2d_settings.canTakeScreenshot=DreamConfig.live2d_can_take_screenshot,DreamConfig.live2d_about_page?(live2d_settings.canTurnToAboutPage=DreamConfig.live2d_can_turn_to_about_page,live2d_settings.aboutPageUrl=DreamConfig.live2d_about_page):live2d_settings.canTurnToAboutPage=!1,live2d_settings.canCloseLive2d=DreamConfig.live2d_can_close_live2d,live2d_settings.modelRandMode=DreamConfig.live2d_model_rand_mode,live2d_settings.modelTexturesRandMode=DreamConfig.live2d_model_textures_rand_mode,initModel(DreamConfig.live2d_tips_url)}})}})}catch(e){console.log("[Error] JQuery is not defined.")} \ No newline at end of file diff --git a/templates/assets/js/common.min.js b/templates/assets/js/common.min.js index e4feb23..c8d1f71 100644 --- a/templates/assets/js/common.min.js +++ b/templates/assets/js/common.min.js @@ -1 +1 @@ -(()=>{window.encrypt=e=>window.btoa(unescape(encodeURIComponent(e))),window.decrypt=e=>decodeURIComponent(escape(window.atob(e)));const t={initWidget(){var e=$(".columns .column-right"),t=$(".columns .column-right-shadow");if($(".widget.recent-comments .reply .link").html((e,t)=>Utils.renderedEmojiHtml(t)),e.length&&t.length&&!t[0].children.length)for(const a of e[0].children)t[0].append(a.cloneNode(!0))},initActions(){const a=$(".actions>.bullet-screen");"true"===localStorage.getItem("stop-bullet-screen")&&a.addClass("stop-bullet-screen"),0!==$("halo-comment[bullet-screen]").length&&a.removeClass("is-hidden-all");a.on("click",()=>{var t,e=localStorage.getItem("stop-bullet-screen")||!1;t="true"!==e.toString(),$("halo-comment[bullet-screen]").each(function(){var e=this.shadowRoot.getElementById("halo-comment");t?$(e).attr("stop-bullet-screen","true"):$(e).removeAttr("stop-bullet-screen")}),t?a.addClass("stop-bullet-screen"):a.removeClass("stop-bullet-screen"),localStorage.setItem("stop-bullet-screen",t)})},initTocAndNotice(){var e=location["pathname"],t=(window.tocPjax&&window.tocPjax(),0===$(".widget.toc .card-content ul").length),e="toc"===DreamConfig.notice_show_mode&&!t||"index"===DreamConfig.notice_show_mode&&"/"!==e;t?$(".widget.toc,.action-toc").addClass("is-hidden-all"):$(".widget.toc,.action-toc").removeClass("is-hidden-all"),e?$(".widget.notice").addClass("is-hidden-all"):$(".widget.notice").removeClass("is-hidden-all")},initBanner(){const o=$(".banner-info-desc");if(0!==o.length){const s=o.text();o.text("");let t,a="",n=!0;const i=function(){var e=a.length;n&&e
${this.alt?`

${this.alt}

`:""}`)})},initMode(){let e=localStorage.getItem("night")||!1;const t=t=>{t?document.documentElement.classList.add("night"):document.documentElement.classList.remove("night"),$("halo-comment").each(function(){var e=this.shadowRoot.getElementById("halo-comment");$(e)[(t?"add":"remove")+"Class"]("night")}),localStorage.setItem("night",t),e=t};$("#toggle-mode").on("click",()=>t("true"!==e.toString())),"system"===DreamConfig.default_theme&&window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>t(e.matches))},initNavbar(){var t=$(".navbar-nav a"),e=$(".panel-side-menu .link");let a=0;var{href:n,pathname:o}=location;if(o&&"/"!==o)for(let e=0;e$(this).addClass("active"),()=>$(this).removeClass("active")):($(this).on("click",function(e){e.stopPropagation(),$(this).toggleClass("active"),$(document).one("click",()=>$(this).removeClass("active")),e.stopPropagation()}),a.on("click",e=>e.stopPropagation()))})},initScroll(){let o=0;document.addEventListener("scroll",()=>{var e=$(document).scrollTop(),t=(a=(t=e)>o,o=t,a),a=$("body"),n=$(".actions");50e.preventDefault),$(".navbar .toc-content").on("click",function(e){e.stopPropagation(),$("html").removeClass("disable-scroll"),$(".navbar-mask").removeClass("active slideout"),$(".navbar-slideout").removeClass("active slideout-toc")})},sideMenuMobile(){$(".navbar-slideout-menu .current").parents(".panel-body").show().siblings(".panel").addClass("in"),$(".navbar-slideout-menu .panel").on("click",function(e){e.stopPropagation();var e=$(this),t=e.parent().parent();t.find(".panel").not(e).removeClass("in"),t.find(".panel-body").not(e.siblings(".panel-body")).stop().hide("fast"),e.toggleClass("in").siblings(".panel-body").stop().toggle("fast")})},initEvent(){var e=$("body");function a(e){var e=$(e),t=e.attr("data-close");return t&&""!==t.trim()?e.closest(t.trim()):e}e.on("click",".click-close",function(e){e.stopPropagation(),a(this).remove()}),e.on("click",".click-animation-close",function(e){e.stopPropagation();let t=a(this);t.addClass("close-animation"),setTimeout(()=>t.remove(),300)})},offscreenTip(){if(!Utils.isMobile()&&(DreamConfig.document_hidden_title||DreamConfig.document_visible_title)){const t=document.title;let e=null;document.addEventListener("visibilitychange",function(){document.hidden?(DreamConfig.document_hidden_title&&(document.title=DreamConfig.document_hidden_title),clearTimeout(e)):(document.title=DreamConfig.document_visible_title||t,DreamConfig.document_visible_title&&(e=setTimeout(function(){document.title=t},2e3)))})}},initCarousel(){window.Swiper&&new Swiper(".swiper",{loop:!0,parallax:!0,effect:"slide",spaceBetween:10,speed:600,autoplay:{delay:3e3,disableOnInteraction:!1,pauseOnMouseEnter:!0},pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})},sparkInput(){const a=DreamConfig.spark_input_content&&DreamConfig.spark_input_content.filter(e=>0sparkInput(t,a))})},loveTime(){let r=$(".love .love-time");if(0!==r.length){var e=r.attr("data-time");if(/^\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}$/.test(e)){const c=new Date,d=new Date(e);setInterval(function(){c.setTime(c.getTime()+1e3);var e=parseInt((c-d)/1e3),t=e%60,a=(e=parseInt(e/60))%60;let n=(e=parseInt(e/60))%24,o=parseInt(e/24),s=0,i=d.getFullYear(),l=c.getFullYear();for(;i${o}天${n}${a}${t}秒`},1e3)}else s.innerText=DreamConfig.website_time}},initEffects(){Utils.isMobile()||(DreamConfig.cursor_move&&Utils.cachedScript(`${DreamConfig.theme_base}/source/js/cursor/move/${DreamConfig.cursor_move}.min.js?mew=`+DreamConfig.theme_version),DreamConfig.cursor_click&&Utils.cachedScript(`${DreamConfig.theme_base}/source/js/cursor/click/${DreamConfig.cursor_click}.min.js?mew=`+DreamConfig.theme_version),DreamConfig.enable_live2d&&Utils.cachedScript(DreamConfig.theme_base+"/source/js/autoload.min.js?mew="+DreamConfig.theme_version),DreamConfig.effects_sakura_mode&&Utils.cachedScript(DreamConfig.theme_base+"/source/js/effects/sakura.min.js?mew="+DreamConfig.theme_version),DreamConfig.effects_universe_mode&&Utils.cachedScript(DreamConfig.theme_base+"/source/js/effects/universe.min.js?mew="+DreamConfig.theme_version),DreamConfig.effects_circle_magic_mode&&Utils.cachedScript(DreamConfig.theme_base+"/source/js/effects/circleMagic.min.js?mew="+DreamConfig.theme_version))},loadMaintain(){DreamConfig.enable_baidu_push&&Utils.baiduPush(),DreamConfig.enable_toutiao_push&&Utils.toutiaoPush()},showThemeVersion(){window.logger(`%c页面加载耗时:${Math.round(performance.now())}ms | Theme By Dream `+DreamConfig.theme_version,"color:#fff; background: linear-gradient(270deg, #986fee, #8695e6, #68b7dd, #18d7d3); padding: 8px 15px; border-radius: 0 15px 0 15px")}};window.commonContext=t;{const a=["initCarousel","sparkInput","websiteTime"],n=["initEffects","loadMaintain","showThemeVersion"];Object.keys(t).forEach(e=>!a.includes(e)&&!n.includes(e)&&t[e]()),document.addEventListener("DOMContentLoaded",function(){$("html").addClass("loaded"),a.forEach(e=>t[e]&&t[e]())}),window.addEventListener("load",function(){n.forEach(e=>t[e]&&t[e]()),$("html").addClass("ready")})}})(); \ No newline at end of file +(()=>{window.encrypt=e=>window.btoa(unescape(encodeURIComponent(e))),window.decrypt=e=>decodeURIComponent(escape(window.atob(e)));const t={initWidget(){var e=$(".columns .column-right"),t=$(".columns .column-right-shadow");if($(".widget.recent-comments .reply .link").html((e,t)=>Utils.renderedEmojiHtml(t)),e.length&&t.length&&!t[0].children.length)for(const a of e[0].children)t[0].append(a.cloneNode(!0))},initActions(){const a=$(".actions>.bullet-screen");"true"===localStorage.getItem("stop-bullet-screen")&&a.addClass("stop-bullet-screen"),0!==$("halo-comment[bullet-screen]").length&&a.removeClass("is-hidden-all");a.on("click",()=>{var t,e=localStorage.getItem("stop-bullet-screen")||!1;t="true"!==e.toString(),$("halo-comment[bullet-screen]").each(function(){var e=this.shadowRoot.getElementById("halo-comment");t?$(e).attr("stop-bullet-screen","true"):$(e).removeAttr("stop-bullet-screen")}),t?a.addClass("stop-bullet-screen"):a.removeClass("stop-bullet-screen"),localStorage.setItem("stop-bullet-screen",t)})},initTocAndNotice(){var e=location["pathname"],t=(window.tocPjax&&window.tocPjax(),0===$(".widget.toc .card-content ul").length),e="toc"===DreamConfig.notice_show_mode&&!t||"index"===DreamConfig.notice_show_mode&&"/"!==e;t?$(".widget.toc,.action-toc").addClass("is-hidden-all"):$(".widget.toc,.action-toc").removeClass("is-hidden-all"),e?$(".widget.notice").addClass("is-hidden-all"):$(".widget.notice").removeClass("is-hidden-all")},initBanner(){const o=$(".banner-info-desc");if(0!==o.length){const s=o.text();o.text("");let t,a="",n=!0;const i=function(){var e=a.length;n&&e
${this.alt?`

${this.alt}

`:""}`)})},initMode(){let e=localStorage.getItem("night")||!1;const t=t=>{t?document.documentElement.classList.add("night"):document.documentElement.classList.remove("night"),$("halo-comment").each(function(){var e=this.shadowRoot.getElementById("halo-comment");$(e)[(t?"add":"remove")+"Class"]("night")}),localStorage.setItem("night",t),e=t};$("#toggle-mode").on("click",()=>t("true"!==e.toString())),"system"===DreamConfig.default_theme&&window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>t(e.matches))},initNavbar(){var t=$(".navbar-nav a"),e=$(".panel-side-menu .link");let a=0;var{href:n,pathname:o}=location;if(o&&"/"!==o)for(let e=0;e$(this).addClass("active"),()=>$(this).removeClass("active")):($(this).on("click",function(e){e.stopPropagation(),$(this).toggleClass("active"),$(document).one("click",()=>$(this).removeClass("active")),e.stopPropagation()}),a.on("click",e=>e.stopPropagation()))})},initScroll(){let o=0;document.addEventListener("scroll",()=>{var e=$(document).scrollTop(),t=(a=(t=e)>o,o=t,a),a=$("body"),n=$(".actions");50e.preventDefault),$(".navbar .toc-content").on("click",function(e){e.stopPropagation(),$("html").removeClass("disable-scroll"),$(".navbar-mask").removeClass("active slideout"),$(".navbar-slideout").removeClass("active slideout-toc")})},sideMenuMobile(){$(".navbar-slideout-menu .current").parents(".panel-body").show().siblings(".panel").addClass("in"),$(".navbar-slideout-menu .panel").on("click",function(e){e.stopPropagation();var e=$(this),t=e.parent().parent();t.find(".panel").not(e).removeClass("in"),t.find(".panel-body").not(e.siblings(".panel-body")).stop().hide("fast"),e.toggleClass("in").siblings(".panel-body").stop().toggle("fast")})},initEvent(){var e=$("body");function a(e){var e=$(e),t=e.attr("data-close");return t&&""!==t.trim()?e.closest(t.trim()):e}e.on("click",".click-close",function(e){e.stopPropagation(),a(this).remove()}),e.on("click",".click-animation-close",function(e){e.stopPropagation();let t=a(this);t.addClass("close-animation"),setTimeout(()=>t.remove(),300)})},offscreenTip(){if(!Utils.isMobile()&&(DreamConfig.document_hidden_title||DreamConfig.document_visible_title)){const t=document.title;let e=null;document.addEventListener("visibilitychange",function(){document.hidden?(DreamConfig.document_hidden_title&&(document.title=DreamConfig.document_hidden_title),clearTimeout(e)):(document.title=DreamConfig.document_visible_title||t,DreamConfig.document_visible_title&&(e=setTimeout(function(){document.title=t},2e3)))})}},initCarousel(){window.Swiper&&new Swiper(".swiper",{loop:!0,parallax:!0,effect:"slide",spaceBetween:10,speed:600,autoplay:{delay:3e3,disableOnInteraction:!1,pauseOnMouseEnter:!0},pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})},sparkInput(){const a=DreamConfig.spark_input_content&&DreamConfig.spark_input_content.filter(e=>0sparkInput(t,a))})},loveTime(){let r=$(".love .love-time");if(0!==r.length){var e=r.attr("data-time");if(/^\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}$/.test(e)){const c=new Date,d=new Date(e);setInterval(function(){c.setTime(c.getTime()+1e3);var e=parseInt((c-d)/1e3),t=e%60,a=(e=parseInt(e/60))%60;let n=(e=parseInt(e/60))%24,o=parseInt(e/24),s=0,i=d.getFullYear(),l=c.getFullYear();for(;i${o}天${n}${a}${t}秒`},1e3)}else s.innerText=DreamConfig.website_time}},initEffects(){Utils.isMobile()||(DreamConfig.cursor_move&&Utils.cachedScript(`${DreamConfig.theme_base}/js/cursor/move/${DreamConfig.cursor_move}.min.js?mew=`+DreamConfig.theme_version),DreamConfig.cursor_click&&Utils.cachedScript(`${DreamConfig.theme_base}/js/cursor/click/${DreamConfig.cursor_click}.min.js?mew=`+DreamConfig.theme_version),DreamConfig.enable_live2d&&Utils.cachedScript(DreamConfig.theme_base+"/js/autoload.min.js?mew="+DreamConfig.theme_version),DreamConfig.effects_sakura_mode&&Utils.cachedScript(DreamConfig.theme_base+"/js/effects/sakura.min.js?mew="+DreamConfig.theme_version),DreamConfig.effects_universe_mode&&Utils.cachedScript(DreamConfig.theme_base+"/js/effects/universe.min.js?mew="+DreamConfig.theme_version),DreamConfig.effects_circle_magic_mode&&Utils.cachedScript(DreamConfig.theme_base+"/js/effects/circleMagic.min.js?mew="+DreamConfig.theme_version))},loadMaintain(){DreamConfig.enable_baidu_push&&Utils.baiduPush(),DreamConfig.enable_toutiao_push&&Utils.toutiaoPush()},showThemeVersion(){window.logger(`%c页面加载耗时:${Math.round(performance.now())}ms | Theme By Dream `+DreamConfig.theme_version,"color:#fff; background: linear-gradient(270deg, #986fee, #8695e6, #68b7dd, #18d7d3); padding: 8px 15px; border-radius: 0 15px 0 15px")}};window.commonContext=t;{const a=["initCarousel","sparkInput","websiteTime"],n=["initEffects","loadMaintain","showThemeVersion"];Object.keys(t).forEach(e=>!a.includes(e)&&!n.includes(e)&&t[e]()),document.addEventListener("DOMContentLoaded",function(){$("html").addClass("loaded"),a.forEach(e=>t[e]&&t[e]())}),window.addEventListener("load",function(){n.forEach(e=>t[e]&&t[e]()),$("html").addClass("ready")})}})(); \ No newline at end of file diff --git a/templates/assets/js/photos.min.js b/templates/assets/js/photos.min.js deleted file mode 100644 index 27e80fb..0000000 --- a/templates/assets/js/photos.min.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{let t=!1,s={},e=!1,n=!1,c={page:0,size:15,sort:"createTime,desc"};const i=(i,t)=>{e=!0,i.addClass("loading"),t&&t.team&&(t.team=t.team.substring(2));const o={...c,...t||{}};s.promise=new Promise((a,e)=>{s.abort=e,Utils.request({url:"/api/content/photos",method:"GET",data:o}).then(t=>a(t)).catch(t=>e(t))}).then(t=>{var a,e=t.content||[];n=0===e.length||(a=i,e=e.reduce((t,a,e)=>`${t}
${a.name||

${a.name}

${a.location?`

${a.location}

`:""}

${Utils.formatDate(a.takeTime)}

${a.description?`

${a.description}

`:""}
`,""),a.append(e),a.justifiedGallery({rowHeight:200,maxRowHeight:!1,maxRowsCount:0,sizeRangeSuffixes:{},lastRow:"nojustify",captions:!1,waitThumbnailsLoad:!0,margins:10,extension:/\.(jpe?g|png|gif|bmp|webp)$/,cssAnimation:!1}),t.isLast)}).catch(t=>console.log(t)).finally(()=>{i.removeClass("loading"),s={},e=!1})},o={initEvent(){t||($("body").on("click",".photos-teams .item",function(t){t.stopPropagation();t=$(this);t.hasClass("active")||(t.addClass("active").siblings("li").removeClass("active"),(async(t,a)=>{s&&(s.abort&&s.abort("abort"),await s.promise),t.empty(),n=!1,e=!1,c.page=0,location.hash=a.team,i(t,a)})($(".photos-gallery"),{team:t.attr("data-team")}))}),window.addEventListener("scroll",function(){var t=$(".photos-gallery");0!==t.length&&$(window).scrollTop()+$(window).height()>=t.height()&&(e||n||(c.page++,i(t,{team:$(".photos-teams li.active").attr("data-team")})))}),t=!0)},initPhotos(){var t,a=$(".photos-gallery");s={},e=!1,n=!1,c={page:0,size:15,sort:"createTime,desc"},location.hash?(t=decodeURI(location.hash.substring(1)),0<(t=$(".photos-teams li[data-team="+t+"]")).length?t.click():$(".photos-teams li:not([data-team])").addClass("active")&&i(a)):($(".photos-teams li:not([data-team])").addClass("active"),i(a))}};window.photoPjax=function(a){0!==$(".photos-gallery").length&&Object.keys(o).forEach(t=>window.pjaxSerialNumber===a&&o[t]())},window.pjaxSerialNumber||o.initEvent(),window.pjaxSerialNumber||o.initPhotos()})(); \ No newline at end of file diff --git a/templates/assets/lib/live2d@1.0.1/flat-ui-icons-regular.eot b/templates/assets/lib/live2d@1.0.1/flat-ui-icons-regular.eot deleted file mode 100644 index 536680e..0000000 Binary files a/templates/assets/lib/live2d@1.0.1/flat-ui-icons-regular.eot and /dev/null differ diff --git a/templates/assets/lib/live2d@1.0.1/flat-ui-icons-regular.svg b/templates/assets/lib/live2d@1.0.1/flat-ui-icons-regular.svg deleted file mode 100644 index cb2727c..0000000 --- a/templates/assets/lib/live2d@1.0.1/flat-ui-icons-regular.svg +++ /dev/null @@ -1,126 +0,0 @@ - - - - - -{ - "fontFamily": "flat-ui-icons", - "majorVersion": 1, - "minorVersion": 1, - "fontURL": "http://designmodo.com/flat", - "designer": "Sergey Shmidt", - "designerURL": "http://designmodo.com", - "license": "Attribution-NonCommercial-NoDerivs 3.0 Unported", - "licenseURL": "http://creativecommons.org/licenses/by-nc-nd/3.0/", - "version": "Version 1.1", - "fontId": "flat-ui-icons", - "psName": "flat-ui-icons", - "subFamily": "Regular", - "fullName": "flat-ui-icons", - "description": "Generated by IcoMoon" -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/templates/assets/lib/live2d@1.0.1/flat-ui-icons-regular.ttf b/templates/assets/lib/live2d@1.0.1/flat-ui-icons-regular.ttf deleted file mode 100644 index f4933ff..0000000 Binary files a/templates/assets/lib/live2d@1.0.1/flat-ui-icons-regular.ttf and /dev/null differ diff --git a/templates/assets/lib/live2d@1.0.1/flat-ui-icons-regular.woff b/templates/assets/lib/live2d@1.0.1/flat-ui-icons-regular.woff deleted file mode 100644 index f9e9805..0000000 Binary files a/templates/assets/lib/live2d@1.0.1/flat-ui-icons-regular.woff and /dev/null differ diff --git a/templates/assets/lib/live2d@1.0.1/live2d.min.js b/templates/assets/lib/live2d@1.0.1/live2d.min.js deleted file mode 100644 index f8ab7e6..0000000 --- a/templates/assets/lib/live2d@1.0.1/live2d.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(i){function r(t){var e;return(o[t]||(e=o[t]={i:t,l:!1,exports:{}},i[t].call(e.exports,e,e.exports,r),e.l=!0,e)).exports}var o={};r.m=i,r.c=o,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=4)}([function(t,e,i){"use strict";function r(){this.live2DModel=null,this.modelMatrix=null,this.eyeBlink=null,this.physics=null,this.pose=null,this.debugMode=!1,this.initialized=!1,this.updating=!1,this.alpha=1,this.accAlpha=0,this.lipSync=!1,this.lipSyncValue=0,this.accelX=0,this.accelY=0,this.accelZ=0,this.dragX=0,this.dragY=0,this.startTimeMSec=null,this.mainMotionManager=new _,this.expressionManager=new _,this.motions={},this.expressions={},this.isTexLoaded=!1}function l(){AMotion.prototype.constructor.call(this),this.paramList=new Array}function $(){this.id="",this.type=-1,this.value=null}function o(){this.nextBlinkTime=null,this.stateStartTime=null,this.blinkIntervalMsec=null,this.eyeState=p.STATE_FIRST,this.blinkIntervalMsec=4e3,this.closingMotionMsec=100,this.closedMotionMsec=50,this.openingMotionMsec=150,this.closeIfZero=!0,this.eyeID_L="PARAM_EYE_L_OPEN",this.eyeID_R="PARAM_EYE_R_OPEN"}function n(){this.tr=new Float32Array(16),this.identity()}function s(t,e){n.prototype.constructor.call(this),this.width=t,this.height=e}function _(){MotionQueueManager.prototype.constructor.call(this),this.currentPriority=null,this.reservePriority=null,this.super=MotionQueueManager.prototype}function P(){this.physicsList=new Array,this.startTimeMSec=UtSystem.getUserTimeMSec()}function f(){this.lastTime=0,this.lastModel=null,this.partsGroups=new Array}function d(t){this.paramIndex=-1,this.partsIndex=-1,this.link=null,this.id=t}function a(){this.EPSILON=.01,this.faceTargetX=0,this.faceTargetY=0,this.faceX=0,this.faceY=0,this.faceVX=0,this.faceVY=0,this.lastTimeSec=0}function h(){n.prototype.constructor.call(this),this.screenLeft=null,this.screenRight=null,this.screenTop=null,this.screenBottom=null,this.maxLeft=null,this.maxRight=null,this.maxTop=null,this.maxBottom=null,this.max=Number.MAX_VALUE,this.min=0}function L(){}var u=0,p=(r.prototype.getModelMatrix=function(){return this.modelMatrix},r.prototype.setAlpha=function(t){this.alpha=t=(t=.999=t[0]&&i<=e[0]&&r<=t[1]&&r>=e[1]},l.prototype=new AMotion,l.EXPRESSION_DEFAULT="DEFAULT",l.TYPE_SET=0,l.TYPE_ADD=1,l.TYPE_MULT=2,l.loadJson=function(t){var e=new l,t=L.getPlatformManager().jsonParseFromBytes(t);if(e.setFadeIn(0=t||this.currentPriority>=t||(this.reservePriority=t,0))},_.prototype.setReservePriority=function(t){this.reservePriority=t},_.prototype.updateParam=function(t){t=MotionQueueManager.prototype.updateParam.call(this,t);return this.isFinished()&&(this.currentPriority=0),t},_.prototype.startMotionPrio=function(t,e){return e==this.reservePriority&&(this.reservePriority=0),this.currentPriority=e,this.startMotion(t,!1)},P.load=function(t){for(var e=new P,i=L.getPlatformManager().jsonParseFromBytes(t).physics_hair,r=i.length,o=0;othis.screenLeft&&(t=this.screenLeft-this.tr[0]*this.maxLeft-this.tr[12]),this.tr[0]*this.maxRight+(this.tr[12]+t)this.screenBottom&&(e=this.screenBottom-this.tr[5]*this.maxBottom-this.tr[13]),n.mul([1,0,0,0,0,1,0,0,0,0,1,0,t,e,0,1],this.tr,this.tr)},h.prototype.adjustScale=function(t,e,i){var r=i*this.tr[0],r=(rthis.max&&0i.left&&e.y>i.top?e:(o=r(_=t.x-e.x,s=t.y-e.y),e.xot.frameBuffers.length&&(this.curFrameNo=this.getMaskRenderTexture()),this.tmpModelToViewMatrix=new i,this.tmpMatrix2=new i,this.tmpMatrixForMask=new i,this.tmpMatrixForDraw=new i,this.CHANNEL_COLORS=new Array;t=new j;(t=new j).r=0,t.g=0,t.b=0,t.a=1,this.CHANNEL_COLORS.push(t),(t=new j).r=1,t.g=0,t.b=0,t.a=0,this.CHANNEL_COLORS.push(t),(t=new j).r=0,t.g=1,t.b=0,t.a=0,this.CHANNEL_COLORS.push(t),(t=new j).r=0,t.g=0,t.b=1,t.a=0,this.CHANNEL_COLORS.push(t);for(var e=0;e=this._$5S._$aS.length)&&null!=(t=this._$5S._$aS[t])&&t.getType()==y._$wb&&t instanceof M?t.getIndexArray():null},L.CHANNEL_COUNT=4,L.RENDER_TEXTURE_USE_MIPMAP=!1,L.NOT_USED_FRAME=-100,L.prototype._$L7=function(){if(this.tmpModelToViewMatrix&&(this.tmpModelToViewMatrix=null),this.tmpMatrix2&&(this.tmpMatrix2=null),this.tmpMatrixForMask&&(this.tmpMatrixForMask=null),this.tmpMatrixForDraw&&(this.tmpMatrixForDraw=null),this.tmpBoundsOnModel&&(this.tmpBoundsOnModel=null),this.CHANNEL_COLORS){for(var t=this.CHANNEL_COLORS.length-1;0<=t;--t)this.CHANNEL_COLORS.splice(t,1);this.CHANNEL_COLORS=[]}this.releaseShader()},L.prototype.releaseShader=function(){for(var t=ot.frameBuffers.length,e=0;e=u.LIVE2D_FORMAT_VERSION_V2_10_SDK2&&(this.reflectX=t._$po(),this.reflectY=t._$po())},X.prototype._$e=function(){},St._$ni=function(t,e,i,r,o,n,s,_,a){var h,l=s*n-_*o;return 0==l?null:(l=((t-i)*n-(e-r)*o)/l,h=0!=o?(t-i-l*s)/o:(e-r-l*_)/n,isNaN(h)&&(h=(t-i-l*s)/o,isNaN(h)&&(h=(e-r-l*_)/n),isNaN(h))&&(console.log("a is NaN @UtVector#_$ni() "),console.log("v1x : "+o),console.log("v1x != 0 ? "+(0!=o))),null==a?new Array(h,l):(a[0]=h,a[1]=l,a))},H.prototype._$8P=function(){return this.x+.5*this.width},H.prototype._$6P=function(){return this.y+.5*this.height},H.prototype._$EL=function(){return this.x+this.width},H.prototype._$5T=function(){return this.y+this.height},H.prototype._$jL=function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r},H.prototype._$jL=function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},H.prototype.contains=function(t,e){return this.x<=this.x&&this.y<=this.y&&this.x<=this.x+this.width&&this.y<=this.y+this.height},H.prototype.expand=function(t,e){this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e},W._$Z2=function(t,e,i,r){var o,n,s,_,a,h,C,l,N,$,B,u,U,p,c,f,d,g,y,m,T,S,P,L,M,E,v,A,x,I=e._$Q2(t,i),w=t._$vs(),O=t._$Tr();if(e._$zr(w,O,I),I<=0)return r[w[0]];if(1==I)return(M=r[w[0]])+((E=r[w[1]])-M)*(p=O[0])|0;if(2==I)return M=r[w[0]],E=r[w[1]],v=r[w[2]],A=r[w[3]],(x=M+(E-M)*(p=O[0])|0)+((v+(A-v)*p|0)-x)*(c=O[1])|0;if(3==I)return d=r[w[0]],g=r[w[1]],y=r[w[2]],m=r[w[3]],T=r[w[4]],S=r[w[5]],P=r[w[6]],L=r[w[7]],(x=(M=d+(g-d)*(p=O[0])|0)+((E=y+(m-y)*p|0)-M)*(c=O[1])|0)+(((v=T+(S-T)*p|0)+((A=P+(L-P)*p|0)-v)*c|0)-x)*(f=O[2])|0;if(4==I)return i=r[w[0]],t=r[w[1]],e=r[w[2]],o=r[w[3]],n=r[w[4]],s=r[w[5]],_=r[w[6]],a=r[w[7]],h=r[w[8]],C=r[w[9]],l=r[w[10]],N=r[w[11]],$=r[w[12]],B=r[w[13]],u=r[w[14]],U=r[w[15]],(x=(M=(d=i+(t-i)*(p=O[0])|0)+((g=e+(o-e)*p|0)-d)*(c=O[1])|0)+((E=(y=n+(s-n)*p|0)+((m=_+(a-_)*p|0)-y)*c|0)-M)*(f=O[2])|0)+(((v=(T=h+(C-h)*p|0)+((S=l+(N-l)*p|0)-T)*c|0)+((A=(P=$+(B-$)*p|0)+((L=u+(U-u)*p|0)-P)*c|0)-v)*f|0)-x)*O[3]|0;for(var D=1<=u._$T7?(this.clipID=t._$nP(),this.clipIDList=this.convertClipIDForV2_11(this.clipID)):this.clipIDList=[],this._$MS(this._$Lb)},r.prototype.getClipIDList=function(){return this.clipIDList},r.prototype.init=function(t){},r.prototype._$Nr=function(t,e){e._$IS[0]=!1,e._$Us=W._$Z2(t,this._$GS,e._$IS,this._$Lb),!ot._$Zs&&e._$IS[0]||(e._$7s=W._$br(t,this._$GS,e._$IS,this._$mS))},r.prototype._$2b=function(t,e){},r.prototype.getDrawDataID=function(){return this._$gP},r.prototype._$j2=function(t){this._$gP=t},r.prototype.getOpacity=function(t,e){return e._$7s},r.prototype._$zS=function(t,e){return e._$Us},r.prototype._$MS=function(t){for(var e=t.length-1;0<=e;--e){var i=t[e];i=u.LIVE2D_FORMAT_VERSION_V2_10_SDK2&&(this._$mS=t._$Tb())},a.prototype.init=function(t){},a.prototype._$Nr=function(t,e){},a.prototype.interpolateOpacity=function(t,e,i,r){null==this._$mS?i.setInterpolatedOpacity(1):i.setInterpolatedOpacity(W._$br(t,e,r,this._$mS))},a.prototype._$2b=function(t,e){},a.prototype._$nb=function(t,e,i,r,o,n,s){},a.prototype.getType=function(){},a.prototype._$gs=function(t){this._$dr=t},a.prototype._$a2=function(t){this._$kP=t},a.prototype.getTargetBaseDataID=function(){return this._$dr},a.prototype.getBaseDataID=function(){return this._$kP},a.prototype._$32=function(){return null!=this._$dr&&this._$dr!=v._$2o()},Rt._$CS=Rt._$W2=0,Rt._$Mo=function(){return!0},Rt._$XP=function(t){try{for(var e=getTimeMSec();getTimeMSec()-e=t.length)return!1;for(var o=e;o=this._$pb.length&&(o=this._$pb.length,n=new Array(2*o),Rt._$jT(this._$pb,0,n,0,o),this._$pb=n,this._$_2=this._$UT(this._$_2,2*o),this._$vr=this._$UT(this._$vr,2*o),this._$Rr=this._$UT(this._$Rr,2*o),this._$Or=this._$UT(this._$Or,2*o),n=new Array,Rt._$jT(this._$Js,0,n,0,o),this._$Js=n),this._$pb[this._$qo]=t,this._$_2[this._$qo]=e,this._$vr[this._$qo]=e,this._$Rr[this._$qo]=i,this._$Or[this._$qo]=r,this._$Js[this._$qo]=d._$ZS,this._$qo++},d.prototype._$Zo=function(t,e){this._$3S[t]=e},d.prototype.setParamFloat=function(t,e){(e=ethis._$Or[t]&&(e=this._$Or[t]),this._$_2[t]=e},d.prototype.loadParam=function(){var t=this._$_2.length;t>this._$fs.length&&(t=this._$fs.length),Rt._$jT(this._$fs,0,this._$_2,0,t)},d.prototype.saveParam=function(){var t=this._$_2.length;t>this._$fs.length&&(this._$fs=new Float32Array(t)),Rt._$jT(this._$_2,0,this._$fs,0,t)},d.prototype._$v2=function(){return this._$co},d.prototype._$WS=function(){return this._$QT},d.prototype._$Xb=function(t){return this._$Js[t]==d._$ZS},d.prototype._$vs=function(){return this._$Es},d.prototype._$Tr=function(){return this._$ZP},d.prototype.getBaseData=function(t){return this._$3S[t]},d.prototype.getParamFloat=function(t){return this._$_2[t]},d.prototype.getParamMax=function(t){return this._$Or[t]},d.prototype.getParamMin=function(t){return this._$Rr[t]},d.prototype.setPartsOpacity=function(t,e){this._$Hr[t].setPartsOpacity(e)},d.prototype.getPartsOpacity=function(t){return this._$Hr[t].getPartsOpacity()},d.prototype.getPartsDataIndex=function(t){for(var e=this._$F2.length-1;0<=e;--e)if(null!=this._$F2[e]&&this._$F2[e]._$p2()==t)return e;return-1},d.prototype._$q2=function(t){return this._$db[t]},d.prototype._$C2=function(t){return this._$8b[t]},d.prototype._$Bb=function(t){return this._$Hr[t]},d.prototype._$5s=function(t,e){for(var i=this._$Ws.length,r=t,o=0;o=u._$T7?(this.clipID=t._$nP(),this.clipIDList=this.convertClipIDForV2_11(this.clipID)):this.clipIDList=null,y._$Sb(this._$Lb)},y.prototype.getClipIDList=function(){return this.clipIDList},y.prototype._$Nr=function(t,e){e._$IS[0]=!1,e._$Us=W._$Z2(t,this._$GS,e._$IS,this._$Lb),!ot._$Zs&&e._$IS[0]||(e._$7s=W._$br(t,this._$GS,e._$IS,this._$mS))},y.prototype._$2b=function(t){},y.prototype.getDrawDataID=function(){return this._$gP},y.prototype._$j2=function(t){this._$gP=t},y.prototype.getOpacity=function(t,e){return e._$7s},y.prototype._$zS=function(t,e){return e._$Us},y.prototype.getTargetBaseDataID=function(){return this._$dr},y.prototype._$gs=function(t){this._$dr=t},y.prototype._$32=function(){return null!=this._$dr&&this._$dr!=v._$2o()},y.prototype.getType=function(){},tt._$42=0,tt.prototype._$1b=function(){return this._$3S},tt.prototype.getDrawDataList=function(){return this._$aS},tt.prototype._$F0=function(t){this._$NL=t._$nP(),this._$aS=t._$nP(),this._$3S=t._$nP()},tt.prototype._$kr=function(t){t._$Zo(this._$3S),t._$xo(this._$aS),this._$3S=null,this._$aS=null},h.prototype=new $,h.loadModel=function(t){var e=new h;return $._$62(e,t),e},h.loadModel=function(t){var e=new h;return $._$62(e,t),e},h._$to=function(){return new h},h._$er=function(t){var e=new _$5("../_$_r/_$t0/_$Ri/_$_P._$d");if(0==e.exists())throw new _$ls("_$t0 _$_ _$6 _$Ui :: "+e._$PL());for(var i=["../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1"],r=h.loadModel(e._$3b()),o=0;oe._$yT&&(e._$yT=h)}}}else{for(_=o,a=-1;o=this._$yT&&(this._$E?(r._$z2=e,this.loopFadeIn&&(r._$bs=e)):r._$9L=!0),this._$eP=i},S.prototype._$r0=function(){return this._$E},S.prototype._$aL=function(t){this._$E=t},S.prototype._$S0=function(){return this._$D0},S.prototype._$U0=function(t){this._$D0=t},S.prototype.isLoopFadeIn=function(){return this.loopFadeIn},S.prototype.setLoopFadeIn=function(t){this.loopFadeIn=t},f._$Fr=0,f._$hs=1,f._$ws=100,f._$Ns=101,f._$xs=102,f._$us=103,f._$qs=104,f._$Ys=105,nt.prototype=new a,nt._$gT=new Array,nt.prototype._$zP=function(){this._$GS=new J,this._$GS._$zP()},nt.prototype._$F0=function(t){a.prototype._$F0.call(this,t),this._$A=t._$6L(),this._$o=t._$6L(),this._$GS=t._$nP(),this._$Eo=t._$nP(),a.prototype.readV2_opacity.call(this,t)},nt.prototype.init=function(t){var e=new st(this),i=(this._$o+1)*(this._$A+1);return null!=e._$Cr&&(e._$Cr=null),e._$Cr=new Float32Array(2*i),null!=e._$hr&&(e._$hr=null),this._$32()?e._$hr=new Float32Array(2*i):e._$hr=null,e},nt.prototype._$Nr=function(t,e){var i,r,o=e;this._$GS._$Ur(t)&&(i=this._$VT(),(r=nt._$gT)[0]=!1,W._$Vr(t,this._$GS,r,i,this._$Eo,o._$Cr,0,2),e._$Ib(r[0]),this.interpolateOpacity(t,this._$GS,e,r))},nt.prototype._$2b=function(t,e){var i,r,o;e._$hS(!0),this._$32()?(i=this.getTargetBaseDataID(),e._$8r==a._$ur&&(e._$8r=t.getBaseDataIndex(i)),e._$8r<0?(ot._$so&&it._$li("_$L _$0P _$G :: %s",i),e._$hS(!1)):(i=t.getBaseData(e._$8r),r=t._$q2(e._$8r),null!=i&&r._$yo()?(o=r.getTotalScale(),e.setTotalScale_notForClient(o),o=r.getTotalOpacity(),e.setTotalOpacity(o*e.getInterpolatedOpacity()),i._$nb(t,r,e._$Cr,e._$hr,this._$VT(),0,2),e._$hS(!0)):e._$hS(!1))):e.setTotalOpacity(e.getInterpolatedOpacity())},nt.prototype._$nb=function(t,e,i,r,o,n,s){e=null!=e._$hr?e._$hr:e._$Cr;nt.transformPoints_sdk2(i,r,o,n,s,e,this._$o,this._$A)},nt.transformPoints_sdk2=function(t,e,C,N,B,i,r,o){for(var U=C*B,n=0,s=0,_=0,a=0,h=0,l=0,G=!1,$=N;$=u._$s7?(this._$JP=t._$6L(),0!=this._$JP&&(0!=(1&this._$JP)&&(t=t._$6L(),null==this._$5P&&(this._$5P=new Object),this._$5P._$Hb=parseInt(t)),0!=(this._$JP&M._$Os)?this._$6s=(this._$JP&M._$Os)>>1:this._$6s=M._$ms,0!=(32&this._$JP))&&(this.culling=!1)):this._$JP=0},M.prototype.init=function(t){var e=new pt(this),i=this._$d0*T._$No,r=this._$32();switch(null!=e._$Cr&&(e._$Cr=null),e._$Cr=new Float32Array(i),null!=e._$hr&&(e._$hr=null),e._$hr=r?new Float32Array(i):null,T._$do){default:case T._$Ms:if(T._$Ls)for(var o=this._$d0-1;0<=o;--o){var n=o<<1;this._$Qi[n+1]=1-this._$Qi[n+1]}break;case T._$Qs:for(o=this._$d0-1;0<=o;--o){var n=o<<1,s=o*T._$No,_=this._$Qi[n],a=this._$Qi[n+1];e._$Cr[s]=_,e._$Cr[1+s]=a,e._$Cr[4+s]=0,r&&(e._$hr[s]=_,e._$hr[1+s]=a,e._$hr[4+s]=0)}}return e},M.prototype._$Nr=function(t,e){var i;this!=e._$GT()&&console.log("### assert!! ### "),this._$GS._$Ur(t)&&(y.prototype._$Nr.call(this,t,e),!e._$IS[0])&&((i=M._$gT)[0]=!1,W._$Vr(t,this._$GS,i,this._$d0,this._$Eo,e._$Cr,T._$i2,T._$No))},M.prototype._$2b=function(t,e){try{this!=e._$GT()&&console.log("### assert!! ### ");var i,r,o,n=!1,s=(e._$IS[0]&&(n=!0),e);!n&&(y.prototype._$2b.call(this,t),this._$32())&&(i=this.getTargetBaseDataID(),s._$8r==y._$ur&&(s._$8r=t.getBaseDataIndex(i)),s._$8r<0?ot._$so&&it._$li("_$L _$0P _$G :: %s",i):(r=t.getBaseData(s._$8r),o=t._$q2(s._$8r),null==r||o._$x2()?s._$AT=!1:(r._$nb(t,o,s._$Cr,s._$hr,this._$d0,T._$i2,T._$No),s._$AT=!0),s.baseOpacity=o.getTotalOpacity()))}catch(t){throw t}},M.prototype.draw=function(t,e,i){var r,o,n;this!=i._$GT()&&console.log("### assert!! ### "),i._$IS[0]||((r=this._$LP)<0&&(r=1),o=this.getOpacity(e,e=i)*i._$VS*i.baseOpacity,n=null!=e._$hr?e._$hr:e._$Cr,t.setClipBufPre_clipContextForDraw(i.clipBufPre_clipContext),t._$WP(this.culling),t._$Uo(r,3*this._$Yo,this._$BP,n,this._$Qi,o,this._$6s,e))},M.prototype.dump=function(){console.log(" _$yi( %d ) , _$d0( %d ) , _$Yo( %d ) \n",this._$LP,this._$d0,this._$Yo),console.log(" _$Oi _$di = { ");for(var t=0;tstartMotion() / start _$K _$3 (m%d)\n",r,i._$sr);if(null==t)return-1;(i=new dt)._$w0=t,this.motions.push(i);t=i._$sr;return this._$eb&&it._$Ji("MotionQueueManager[size:%2d]->startMotion() / new _$w0 (m%d)\n",r,t),t},ft.prototype.updateParam=function(t){try{for(var e=!1,i=0;iupdateParam() / _$T0 _$w0 (m%d)\n",this.motions.length-1,o._$sr),this.motions.splice(i,1),i--)):(this.motions=this.motions.splice(i,1),i--):(this.motions.splice(i,1),i--)}return e}catch(t){return it._$li(t),!0}},ft.prototype.isFinished=function(t){if(1<=arguments.length){for(var e=0;e>7-this._$hL++&1)},x.prototype._$zT=function(){0!=this._$hL&&(this._$hL=0)},I._$2S=Math.PI/180,I._$bS=Math.PI/180,I._$wS=180/Math.PI,I._$NS=180/Math.PI,I.PI_F=Math.PI,I._$kT=[0,.012368,.024734,.037097,.049454,.061803,.074143,.086471,.098786,.111087,.12337,.135634,.147877,.160098,.172295,.184465,.196606,.208718,.220798,.232844,.244854,.256827,.268761,.280654,.292503,.304308,.316066,.327776,.339436,.351044,.362598,.374097,.385538,.396921,.408243,.419502,.430697,.441826,.452888,.463881,.474802,.485651,.496425,.507124,.517745,.528287,.538748,.549126,.559421,.56963,.579752,.589785,.599728,.609579,.619337,.629,.638567,.648036,.657406,.666676,.675843,.684908,.693867,.70272,.711466,.720103,.72863,.737045,.745348,.753536,.76161,.769566,.777405,.785125,.792725,.800204,.807561,.814793,.821901,.828884,.835739,.842467,.849066,.855535,.861873,.868079,.874153,.880093,.885898,.891567,.897101,.902497,.907754,.912873,.917853,.922692,.92739,.931946,.936359,.940629,.944755,.948737,.952574,.956265,.959809,.963207,.966457,.96956,.972514,.97532,.977976,.980482,.982839,.985045,.987101,.989006,.990759,.992361,.993811,.995109,.996254,.997248,.998088,.998776,.999312,.999694,.999924,1],I._$92=function(t,e){t=Math.atan2(t[1],t[0]),e=Math.atan2(e[1],e[0]);return I._$tS(t,e)},I._$tS=function(t,e){for(var i=t-e;i<-Math.PI;)i+=2*Math.PI;for(;i>Math.PI;)i-=2*Math.PI;return i},I._$9=function(t){return Math.sin(t)},I.fcos=function(t){return Math.cos(t)},Tt.prototype._$u2=function(){return this._$IS[0]},Tt.prototype._$yo=function(){return this._$AT&&!this._$IS[0]},Tt.prototype._$GT=function(){return this._$e0},w._$W2=0,w.SYSTEM_INFO=null,w.USER_AGENT=navigator.userAgent,w.isIPhone=function(){return w.SYSTEM_INFO||w.setup(),w.SYSTEM_INFO._isIPhone},w.isIOS=function(){return w.SYSTEM_INFO||w.setup(),w.SYSTEM_INFO._isIPhone||w.SYSTEM_INFO._isIPad},w.isAndroid=function(){return w.SYSTEM_INFO||w.setup(),w.SYSTEM_INFO._isAndroid},w.getOSVersion=function(){return w.SYSTEM_INFO||w.setup(),w.SYSTEM_INFO.version},w.getOS=function(){return w.SYSTEM_INFO||w.setup(),w.SYSTEM_INFO._isIPhone||w.SYSTEM_INFO._isIPad?"iOS":w.SYSTEM_INFO._isAndroid?"Android":"_$Q0 OS"},w.setup=function(){function t(t,e){for(var i=t.substring(e).split(/[ _,;\.]/),r=0,o=0;o<=2&&!isNaN(i[o]);o++){var n=parseInt(i[o]);if(n<0||999=this.models.length?null:this.models[t]},o.prototype.releaseModel=function(t,e){this.models.length<=t||(this.models[t].release(e),delete this.models[t],this.models.splice(t,1))},o.prototype.numModels=function(){return this.models.length},o.prototype.setDrag=function(t,e){for(var i=0;i『", "』", " - "], - "baidu": ["Hello! 来自 百度搜索 的朋友
你是搜索 ", " 找到的我吗?"], - "so": ["Hello! 来自 360搜索 的朋友
你是搜索 ", " 找到的我吗?"], - "google": ["Hello! 来自 谷歌搜索 的朋友
欢迎阅读『", "』", " - "], - "default": ["Hello! 来自 ", " 的朋友"], - "none": ["欢迎阅读『", "』", " - "] - }, - "referrer_hostname": { - "blog.nineya.com": ["玖涯博客"], - "www.fghrsh.net": ["FGHRSH 的博客"] - }, - "model_message": { - "1": ["来自 Potion Maker 的 Pio 酱 ~"], - "2": ["来自 Potion Maker 的 Tia 酱 ~"] - }, - "hitokoto_api_message": { - "lwl12.com": ["这句一言来自 『{source}』", ",是 {creator} 投稿的", "。"], - "fghrsh.net": ["这句一言出处是 『{source}』,是 FGHRSH 在 {date} 收藏的!"], - "jinrishici.com": ["这句诗词出自 《{title}》,是 {dynasty}诗人 {author} 创作的!"], - "hitokoto.cn": ["这句一言来自 『{source}』,是 {creator} 在 hitokoto.cn 投稿的。"] - } - }, - "mouseover": [ - { "selector": ".fui-home", "text": ["点击前往首页,想回到上一页可以使用浏览器的后退功能哦"] }, - { "selector": ".fui-chat", "text": ["一言一语,一颦一笑。一字一句,一颗赛艇。"] }, - { "selector": ".fui-eye", "text": ["嗯··· 要切换 看板娘 吗?"] }, - { "selector": ".fui-user", "text": ["喜欢换装 Play 吗?"] }, - { "selector": ".fui-photo", "text": ["要拍张纪念照片吗?"] }, - { "selector": ".fui-info-circle", "text": ["这里有关于我的信息呢"] }, - { "selector": ".fui-cross", "text": ["你不喜欢我了吗..."] }, - { "selector": ".has-link-black-ter", "text": ["要看看 {text} 么?"] }, - { "selector": ".widget.toc", "text": ["翻页比较麻烦吗,点击可以显示这篇文章的目录呢"] }, - { "selector": "#night-nav", "text": ["深夜时要爱护眼睛呀"] }, - { "selector": "#comment-wrapper", "text": ["要吐槽些什么呢"] }, - { "selector": "#back-to-top", "text": ["回到开始的地方吧"] }, - { "selector": ".widget.links", "text": ["想要和我交个朋友吗?"] }, - { "selector": ".widget.love", "text": ["你也期待烂漫不渝的爱情嘛?"] }, - { "selector": ".widget.music", "text": ["一起来听音乐吧!"] }, - { "selector": ".widget.notice", "text": ["看看博主又发了什么公告"] }, - { "selector": ".widget.profile", "text": ["该怎么称呼你呢"] }, - { "selector": ".widget.recent-comments", "text": ["想要去评论些什么吗?"] }, - { "selector": ".widget.recent-posts", "text": ["博主又新发了什么文章"] }, - { "selector": ".actions .bullet-screen", "text": ["关闭/开启评论弹幕试试"] }, - { "selector": ".pagination-previous", "text": ["去上一页看看吧"] }, - { "selector": ".pagination-next", "text": ["去下一页看看吧"] }, - { "selector": ".gallery-item", "text": ["点击图片可以放大呢"] }, - { "selector": "input[name=keyword]", "text": ["找不到想看的内容?搜索看看吧"] }, - { "selector": ".btn-clipboard", "text": ["点击快速复制代码"] }, - { "selector": ".waifu #live2d", "text": ["干嘛呢你,快把手拿开", "鼠…鼠标放错地方了!"] } - ], - "click": [ - { - "selector": ".waifu #live2d", - "text": [ - "是…是不小心碰到了吧", - "萝莉控是什么呀", - "你看到我的小熊了吗", - "再摸的话我可要报警了!⌇●﹏●⌇", - "110吗,这里有个变态一直在摸我(ó﹏ò。)" - ] - } - ], - "seasons": [ - { "date": "01/01", "text": ["元旦了呢,新的一年又开始了,今年是{year}年~"] }, - { "date": "02/14", "text": ["又是一年情人节,{year}年找到对象了嘛~"] }, - { "date": "03/08", "text": ["今天是妇女节!"] }, - { "date": "03/12", "text": ["今天是植树节,要保护环境呀"] }, - { "date": "04/01", "text": ["悄悄告诉你一个秘密~今天是愚人节,不要被骗了哦~"] }, - { "date": "05/01", "text": ["今天是五一劳动节,计划好假期去哪里了吗~"] }, - { "date": "06/01", "text": ["儿童节了呢,快活的时光总是短暂,要是永远长不大该多好啊…"] }, - { "date": "09/03", "text": ["中国人民抗日战争胜利纪念日,铭记历史、缅怀先烈、珍爱和平、开创未来。"] }, - { "date": "09/10", "text": ["教师节,在学校要给老师问声好呀~"] }, - { "date": "10/01", "text": ["国庆节,新中国已经成立69年了呢"] }, - { "date": "11/05-11/12", "text": ["今年的双十一是和谁一起过的呢~"] }, - { "date": "12/20-12/31", "text": ["这几天是圣诞节,主人肯定又去剁手买买买了~"] } - ] -} \ No newline at end of file diff --git a/templates/assets/lib/live2d@1.0.1/waifu-tips.min.js b/templates/assets/lib/live2d@1.0.1/waifu-tips.min.js deleted file mode 100644 index 22847d0..0000000 --- a/templates/assets/lib/live2d@1.0.1/waifu-tips.min.js +++ /dev/null @@ -1 +0,0 @@ -window.live2d_settings=Array(),live2d_settings.tipsMessage="waifu-tips.json",live2d_settings.hitokotoAPI="lwl12.com",live2d_settings.modelCdnUrl="https://unpkg.com/live2d-widget-model@latest/",live2d_settings.models=[[0,87],[1,63],[2,156],[3,156],[4,2],[5,20],[6,1]],live2d_settings.modelId=0,live2d_settings.modelTexturesId=0,live2d_settings.showToolMenu=!0,live2d_settings.canCloseLive2d=!0,live2d_settings.canSwitchModel=!0,live2d_settings.canSwitchTextures=!0,live2d_settings.canSwitchHitokoto=!0,live2d_settings.canTakeScreenshot=!0,live2d_settings.canTurnToHomePage=!0,live2d_settings.canTurnToAboutPage=!0,live2d_settings.modelStorage=!0,live2d_settings.modelRandMode="switch",live2d_settings.modelTexturesRandMode="rand",live2d_settings.showHitokoto=!0,live2d_settings.showF12Status=!0,live2d_settings.showF12Message=!1,live2d_settings.showF12OpenMsg=!0,live2d_settings.showCopyMessage=!0,live2d_settings.showWelcomeMessage=!0,live2d_settings.waifuSize="280x250",live2d_settings.waifuTipsSize="250x70",live2d_settings.waifuFontSize="12px",live2d_settings.waifuToolFont="14px",live2d_settings.waifuToolLine="20px",live2d_settings.waifuToolTop="0px",live2d_settings.waifuMinWidth="768px",live2d_settings.waifuEdgeSide="left:0",live2d_settings.waifuDraggable="disable",live2d_settings.waifuDraggableRevert=!0,live2d_settings.l2dVersion="1.0.1",live2d_settings.l2dVerDate="2022.11.09",live2d_settings.homePageUrl="auto",live2d_settings.aboutPageUrl="https://github.com/nineya/live2d-widget-model",live2d_settings.screenshotCaptureName="live2d.png",String.prototype.render=function(d){return this.replace(/(\\)?\{([^\{\}\\]+)(\\)?\}/g,function(e,t,i,s){if(t||s)return e.replace("\\","");for(var o=i.replace(/\s/g,"").split("."),n=d,a=0,l=o.length;a]+>/g,"")),i&&sessionStorage.setItem("waifu-text",e),$(".waifu-tips").stop(),$(".waifu-tips").html(e).fadeTo(200,1),hideMessage(t=void 0===t?5e3:t))}function hideMessage(e){$(".waifu-tips").stop().css("opacity",1),void 0===e&&(e=5e3),window.setTimeout(function(){sessionStorage.removeItem("waifu-text")},e),$(".waifu-tips").delay(e).fadeTo(200,0)}function initModel(waifuPath,type){eval(function(e,t,i,s,o,n){if(o=function(e){return(e\\2\\9 \\1 o,.\\6\\2 \\1 /\\2!\\n\\1\\1\\1\\1\\1\\1 !'\\m//\\4\\I\\g', \\b \\4'7'\\J'\\n\\1\\1\\1\\1\\1\\1 \\3'\\K|M,p,\\O\\3|\\P\\n\\1\\1\\1\\1\\1 \\1\\1\\1\\c-,/\\1|p./\\n\\1\\1\\1\\1\\1 \\1\\1\\1'\\f'\\1\\1!o,.:\\Q \\R\\S\\T v\"+e.V+\" / W \"+e.N);8.d(\" \");",60,60,"|u3000|uff64|uff9a|uff40|u30fd|uff8d||console|uff8a|uff0f|uff3c|uff84|log|live2d_settings|uff70|u00b4|uff49||u2010||u3000_|u3008||_|___|uff72|u2500|uff67|u30cf|u30fc||u30bd|u4ece|u30d8|uff1e|__|u30a4|k_|uff17_|u3000L_|u3000i|uff1a|u3009|uff34|uff70r|u30fdL__||___i|l2dVerDate|u30f3|u30ce|nLive2D|u770b|u677f|u5a18|u304f__|l2dVersion|FGHRSH|u00b40i".split("|"),0,{})),"function"!=typeof $.ajax&&("function"==typeof jQuery.ajax?window.$=jQuery:console.log("[Error] JQuery is not defined.")),live2d_settings.waifuSize=live2d_settings.waifuSize.split("x"),live2d_settings.waifuTipsSize=live2d_settings.waifuTipsSize.split("x"),live2d_settings.waifuEdgeSide=live2d_settings.waifuEdgeSide.split(":"),$("#live2d").attr("width",live2d_settings.waifuSize[0]),$("#live2d").attr("height",live2d_settings.waifuSize[1]),$(".waifu-tips").width(live2d_settings.waifuTipsSize[0]),$(".waifu-tips").height(live2d_settings.waifuTipsSize[1]),$(".waifu-tips").css("top",live2d_settings.waifuToolTop),$(".waifu-tips").css("font-size",live2d_settings.waifuFontSize),$(".waifu-tool").css("font-size",live2d_settings.waifuToolFont),$(".waifu-tool span").css("line-height",live2d_settings.waifuToolLine),"left"==live2d_settings.waifuEdgeSide[0]?$(".waifu").css("left",live2d_settings.waifuEdgeSide[1]+"px"):"right"==live2d_settings.waifuEdgeSide[0]&&$(".waifu").css("right",live2d_settings.waifuEdgeSide[1]+"px"),window.waifuResize=function(){$(window).width()<=Number(live2d_settings.waifuMinWidth.replace("px",""))?$(".waifu").hide():$(".waifu").show()},"disable"!=live2d_settings.waifuMinWidth&&(waifuResize(),$(window).resize(function(){waifuResize()}));try{"axis-x"==live2d_settings.waifuDraggable?$(".waifu").draggable({axis:"x",revert:live2d_settings.waifuDraggableRevert}):"unlimited"==live2d_settings.waifuDraggable?$(".waifu").draggable({revert:live2d_settings.waifuDraggableRevert}):$(".waifu").css("transition","all .3s ease-in-out")}catch(err){console.log("[Error] JQuery UI is not defined.")}live2d_settings.homePageUrl="auto"==live2d_settings.homePageUrl?window.location.protocol+"//"+window.location.hostname+"/":live2d_settings.homePageUrl,$(".waifu-tool .fui-home").click(function(){window.location=live2d_settings.homePageUrl}),$(".waifu-tool .fui-info-circle").click(function(){window.open(live2d_settings.aboutPageUrl)}),"object"==typeof waifuPath?loadTipsMessage(waifuPath):$.ajax({cache:!0,url:""==waifuPath?live2d_settings.tipsMessage:"waifu-tips.json"==waifuPath.substr(waifuPath.length-15)?waifuPath:waifuPath+"waifu-tips.json",dataType:"json",success:function(e){loadTipsMessage(e)}}),live2d_settings.showToolMenu||$(".waifu-tool").hide(),live2d_settings.canCloseLive2d||$(".waifu-tool .fui-cross").hide(),live2d_settings.canSwitchModel||$(".waifu-tool .fui-eye").hide(),live2d_settings.canSwitchTextures||$(".waifu-tool .fui-user").hide(),live2d_settings.canSwitchHitokoto||$(".waifu-tool .fui-chat").hide(),live2d_settings.canTakeScreenshot||$(".waifu-tool .fui-photo").hide(),live2d_settings.canTurnToHomePage||$(".waifu-tool .fui-home").hide(),live2d_settings.canTurnToAboutPage||$(".waifu-tool .fui-info-circle").hide(),void 0===waifuPath&&(waifuPath="");var modelId=localStorage.getItem("modelId"),modelTexturesId=localStorage.getItem("modelTexturesId"),modelId,modelTexturesId;live2d_settings.modelStorage&&null!=modelId||(modelId=live2d_settings.modelId,modelTexturesId=live2d_settings.modelTexturesId),loadModel(modelId,modelTexturesId)}function loadModel(e,t=0){(live2d_settings.modelStorage?(localStorage.setItem("modelId",e),localStorage):(sessionStorage.setItem("modelId",e),sessionStorage)).setItem("modelTexturesId",t),loadlive2d("live2d",live2d_settings.modelCdnUrl+"api/"+e+"-"+t+".json",live2d_settings.showF12Status?console.log("[Status]","live2d","模型",e+"-"+t,"加载完成"):null)}function loadTipsMessage(e){window.waifu_tips=e,$.each(e.mouseover,function(e,t){$(document).on("mouseover",t.selector,function(){showMessage(getRandText(t.text).render({text:$(this).text()}),3e3)})}),$.each(e.click,function(e,t){$(document).on("click",t.selector,function(){showMessage(getRandText(t.text).render({text:$(this).text()}),3e3,!0)})}),$.each(e.seasons,function(e,t){var i=new Date,s=t.date.split("-")[0],o=t.date.split("-")[1]||s;s.split("/")[0]<=i.getMonth()+1&&i.getMonth()+1<=o.split("/")[0]&&s.split("/")[1]<=i.getDate()&&i.getDate()<=o.split("/")[1]&&showMessage(getRandText(t.text).render({year:i.getFullYear()}),6e3,!0)}),live2d_settings.showF12OpenMsg&&(re.toString=function(){return showMessage(getRandText(e.waifu.console_open_msg),5e3,!0),""}),live2d_settings.showCopyMessage&&$(document).on("copy",function(){showMessage(getRandText(e.waifu.copy_message),5e3,!0)}),$(".waifu-tool .fui-photo").click(function(){showMessage(getRandText(e.waifu.screenshot_message),5e3,!0),window.Live2D.captureName=live2d_settings.screenshotCaptureName,window.Live2D.captureFrame=!0}),$(".waifu-tool .fui-cross").click(function(){sessionStorage.setItem("waifu-dsiplay","none"),showMessage(getRandText(e.waifu.hidden_message),1300,!0),window.setTimeout(function(){$(".waifu").hide()},1300)}),window.showWelcomeMessage=function(e){var t,i,s;showMessage(window.location.href==live2d_settings.homePageUrl?getRandText(23<(t=(new Date).getHours())||t<=5?e.waifu.hour_tips["t23-5"]:5 + + - \ No newline at end of file + + \ No newline at end of file diff --git a/templates/common/head.html b/templates/common/head.html index 3988f8d..33ee9a9 100644 --- a/templates/common/head.html +++ b/templates/common/head.html @@ -1,59 +1,46 @@ - + - - - + - - - - - + + + + - - - - + + + + - + - - - - - + + + + - - - - - - - - - - - - - + + + + + + - - - + - - - + - + diff --git a/templates/common/layout.html b/templates/common/layout.html index 5a9cc07..d91da8f 100644 --- a/templates/common/layout.html +++ b/templates/common/layout.html @@ -1,7 +1,6 @@ - - + +
@@ -10,7 +9,7 @@ - + diff --git a/templates/common/scripts.html b/templates/common/scripts.html index 1536d90..0791228 100644 --- a/templates/common/scripts.html +++ b/templates/common/scripts.html @@ -1,36 +1,18 @@ - - - - + + - - - + - - - - + - - - - - - - - - - - - + @@ -39,12 +21,7 @@ - - - - - - + \ No newline at end of file diff --git a/templates/errorpage.ftl b/templates/errorpage.ftl deleted file mode 100644 index b1d5a5a..0000000 --- a/templates/errorpage.ftl +++ /dev/null @@ -1,29 +0,0 @@ -<#include "layout.ftl"> -<#include "templates/main/article_list.html"> -<#global is_error = true> -<#macro errorpage etitle,desc,status,content,message> - <@layout title="${status!}错误 - ${blog_title!}" canonical="${blog_url!}/${status!}"> -
-
${status!}错误 - ${etitle!}
-
-
-
-
-
- ${status!} -

${desc!}

-
-
${content!}: ${message!}
-
-
-
- <@postTag method="latest" top="6"> - <#if posts?? && posts?size gt 0> -
-
最新文章推荐
-
- <@article_list posts /> - - - - \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index a9f7835..d4cabd2 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,17 +1,14 @@ - +
还没有发表过文章
- - - - - + + \ No newline at end of file diff --git a/templates/journals.html b/templates/journals.html deleted file mode 100644 index f1fcd4b..0000000 --- a/templates/journals.html +++ /dev/null @@ -1,47 +0,0 @@ -<#include "templates/layout_pjax.ftl"> -<@layout title="动态 - ${blog_title!}" canonical="${journals_url!}"> - <#if journals.content?? && journals.content?size gt 0> - <#list journals.content as journal> -
-

- - ${journal.createTime?string('yyyy年MM月dd日 HH:mm:ss')} -

-
-
${journal.content}
-
-
- - - - - <#if settings.enable_journals_comment!true> - - <#if journal.commentCount==0>评论<#else>${journal.commentCount} - - - <#if enable_share> - - - - -
- <#if settings.enable_journals_comment!true> -
- <#include "templates/main/comment.ftl"> - <@comment journal.id?c, "journal" /> -
- -
- - <#include "templates/main/pagination.ftl"> - <@pagination method="journals" datas=journals display="${settings.page_number!5}" /> - <#else> -
- - 还没有发表过动态,回主页看看吧 -
- - \ No newline at end of file diff --git a/templates/links.html b/templates/links.html deleted file mode 100644 index a973f3a..0000000 --- a/templates/links.html +++ /dev/null @@ -1,71 +0,0 @@ -<#include "templates/layout_pjax.ftl"> -<@layout title="友链 - ${blog_title!}" canonical="${links_url!}"> -
- <#if settings.links_thumbnail?? && settings.links_thumbnail!=''> -
-
- -
-

友情链接 - ${user.nickname!}的小伙伴们

-
- <@linkTag method="listTeams"> - <#assign defaultAvatar= (settings.links_default_avatar?? && settings.links_default_avatar!='')?string(settings.links_default_avatar!, static + "/source/img/avatar.svg") /> - <#list teams as item> - - - - <#if (settings.show_exchange_info!true) || (settings.links_info?? && settings.links_info != '')> -
- - <#if settings.show_exchange_info!true> - 申请友链的方法: - <#assign bloggerAvatar= (settings.links_blogger_avatar?? && settings.links_blogger_avatar!='')?string(settings.links_blogger_avatar!, user.avatar!) /> - - -
${settings.links_info!}
-
-
-
- <#if settings.link_comment_id?? && settings.link_comment_id!='' && settings.enable_comment!true> -
-

评论

- <#include "templates/main/comment.ftl"> - <@comment settings.link_comment_id, "sheet" /> -
- - \ No newline at end of file diff --git a/templates/main/article.html b/templates/main/article.html index 12a77ca..73e57c5 100644 --- a/templates/main/article.html +++ b/templates/main/article.html @@ -1,105 +1,146 @@ -<#macro article post,commentType> - <#if post.thumbnail?? && post.thumbnail!=''> -
-
- <#if categories?? && categories?size gt 0> -
- <#list categories as category> - ${category.name!} - -
- -
-

${post.title!}

- -
-
-
- - <#assign updateInterval = ((.now?long - post.updateTime?long)/86400000)?floor > - <#if updateInterval gt (settings.invalid_tips_day!'99999999')?number > -
本文最后更新于 ${post.updateTime?string('yyyy-MM-dd')},距今已有 ${updateInterval} 天,若文章内容或图片链接失效,请留言反馈。
- - <#if (metas?? && metas.tips?? && metas.tips!='')> -
${metas.tips}
- -
-
- <#if !post.thumbnail?? || post.thumbnail==''> -

${post.title!}

-
- - <#if post.categories?? && post.categories?size gt 0> -
- <#list post.categories as category> - ${category.name!}  - -
- -
-
- -
${post.formatContent!}
+
- <#include "templates/main/admire.html"> - - <#if tags?? && (tags?size gt 0)> -
-
- <#list tags as tag> - ${tag.name!}  - -
-
- - <#assign enable_copyright = (metas?? && metas.enable_copyright?? && metas.enable_copyright?trim!='')?then(metas.enable_copyright?trim, (settings.enable_copyright!true)?c)> - <#if enable_copyright == 'true' || enable_share> -
- <#if enable_copyright == 'true'> - <#include "copyright.ftl"> - - <#if enable_share> -
- - -
+
+
+
+   +
+
+

+ +
+
- <#if nextPost?? || prevPost??> -
-
- <#if prevPost??> - - - ${prevPost.title!} - - - <#if nextPost??> - - ${nextPost.title!} - - - -
+
[[${post.metadata.annotations.tips}]] +
+ +
+
+ +

+
+ +
+   +
- - <#if (!post.disallowComment!false) && settings.enable_comment!true> -
-

评论

- <#include "comment.ftl"> - <@comment post.id?c, commentType /> +
+ + +
+
+ + + + +
+
+  
- - \ No newline at end of file +
+ +
+ + + +
+
+
+
+ +
+

评论

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/main/article_list.html b/templates/main/article_list.html index 25f2147..484ca98 100644 --- a/templates/main/article_list.html +++ b/templates/main/article_list.html @@ -1,118 +1,144 @@
- [(${thumbnail})] + th:with="thumbnail = ${#strings.isEmpty(post.spec.cover) ? #strings.isEmpty(theme.config.post.default_thumbnail) ? '' : theme.config.post.default_thumbnail + '?id=' + postStat.index : post.spec.cover}, + thumbnail_mode = ${(theme.config.post.top_thumbnail_mode == 'grid' || (!post.spec.pinned && theme.config.post.thumbnail_mode == 'grid'))? 'grid' : !#strings.isEmpty(post.metadata.annotations.get('thumbnail_mode'))? post.metadata.annotations.get('thumbnail_mode') : post.spec.pinned ? theme.config.post.top_thumbnail_mode : theme.config.post.thumbnail_mode}"> + + +
+ +
+
+
+

+ 置顶 +

+
+
+
+ +
+   +
+
+
+
+ +
+
+

+ 置顶 +

+
+
+
+ +
+   +
+
+
+ +
+
+
+ + +

置顶 +

+

+
+ +
+ +
+
+
+
+

+ 置顶 +

+
+ +
+   +
+
+
+
+
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + @@ -123,7 +149,10 @@ - + + + + @@ -138,40 +167,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/main/copyright.html b/templates/main/copyright.html index f104c59..574e7ab 100644 --- a/templates/main/copyright.html +++ b/templates/main/copyright.html @@ -1,20 +1,20 @@ -
\ No newline at end of file diff --git a/templates/widget/music.html b/templates/widget/music.html index c3dac1a..a64f710 100644 --- a/templates/widget/music.html +++ b/templates/widget/music.html @@ -1,17 +1,16 @@ -<#if ((settings.music_mode!'playlist') == 'playlist' && settings.netease_playlist_id?? && settings.netease_playlist_id!='') -|| (settings.music_mode! == 'config' && settings.music_config?? && settings.music_config!='')> -
-
- 音乐 -
-
- <#if (settings.music_mode!'playlist') == 'playlist'> - - <#elseif settings.music_mode! == 'config'> - - -
-
- \ No newline at end of file +
+
+ 音乐 +
+
+ + +
+ + + +
\ No newline at end of file diff --git a/templates/widget/profile.html b/templates/widget/profile.html index 51b10ac..fdc3f62 100644 --- a/templates/widget/profile.html +++ b/templates/widget/profile.html @@ -1,101 +1,100 @@
+ th:class="'card widget profile ' + ${hide}" + th:with="stats = ${siteStatsFinder.getStats()}, contributor = ${contributorFinder.getContributor(theme.config.sidebar.metadata_name)}">
- <#if settings.profile_theme_button?? && settings.profile_theme_button!=''> - <#assign profile_theme_button=settings.profile_theme_button?split('|')> - - -
<#if settings.social_github?? && settings.social_github!=''> - - - - - <#if settings.social_qq?? && settings.social_qq!=''> - - - - - <#if settings.social_weibo?? && settings.social_weibo!=''> - - - - - <#if settings.social_twitter?? && settings.social_twitter!=''> - - - - - <#if settings.social_facebook?? && settings.social_facebook!=''> - - - - - <#if settings.social_email?? && settings.social_email!=''> - - - - - <#if settings.social_telegram?? && settings.social_telegram!=''> - - - - - <#if settings.custom_social_options?? && settings.custom_social_options!=''> - <#assign custom_social_options=settings.custom_social_options?split('\n')> - <#list custom_social_options as custom_social_option> - <#assign social_option=custom_social_option?split('|')> - <#assign social_name=(social_option[0]?? && social_option[0]?trim!='')?then(social_option[0]?trim,'')> - <#assign social_logo=(social_option[1]?? && social_option[1]?trim!='')?then(social_option[1]?trim,'')> - <#assign social_link=(social_option[2]?? && social_option[2]?trim!='')?then(social_option[2]?trim,'')> - <#if social_name!='' || social_logo!='' || social_link!=''> - - - - - - - <#if settings.social_rss!true > - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/templates/widget/recent_posts.html b/templates/widget/recent_posts.html index ed52ee7..c256f36 100644 --- a/templates/widget/recent_posts.html +++ b/templates/widget/recent_posts.html @@ -9,7 +9,7 @@
  • - +
diff --git a/templates/widget/tagcloud.html b/templates/widget/tagcloud.html index 5a50316..7894408 100644 --- a/templates/widget/tagcloud.html +++ b/templates/widget/tagcloud.html @@ -2,7 +2,10 @@
+ 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)}, + enableTagsColor = ${theme.config.sidebar.enable_tag_color}">
标签云 @@ -13,14 +16,8 @@ - + th:text="${tag.spec.displayName}" + th:with="size = ${#strings.length(tag.spec.displayName) + #strings.length(tag.spec.slug) + tag.postCount}" + th:style="'font-size: ' + ${size < 14 ? 14 : size > 32 ? 32 : size} + 'px;' + ${enableTagsColor? 'color: ' + tag.spec.color +';' : ''}">
- - - - - - -
\ No newline at end of file diff --git a/templates/widget/tags.html b/templates/widget/tags.html index c64c5d4..c4a41f0 100644 --- a/templates/widget/tags.html +++ b/templates/widget/tags.html @@ -1,7 +1,10 @@
+ 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)}, + enableTagsColor = ${theme.config.sidebar.enable_tag_color}">
标签 更多 @@ -11,7 +14,7 @@ - + th:text="${tag.spec.displayName}" + th:style="${enableTagsColor? 'color: ' + tag.spec.color +'; border-color: ' + tag.spec.color +'20;' : ''}">
\ No newline at end of file diff --git a/templates/widget/toc.html b/templates/widget/toc.html index d1f0390..1299926 100644 --- a/templates/widget/toc.html +++ b/templates/widget/toc.html @@ -6,4 +6,5 @@
+
\ No newline at end of file diff --git a/theme.yaml b/theme.yaml index 6abb6df..91e7b1b 100644 --- a/theme.yaml +++ b/theme.yaml @@ -24,21 +24,4 @@ spec: # 版本号 version: 0.0.1 # 最低支持的 Halo 版本 - require: ">=2.0.0" -# customTemplates: -# # 文章页 meta 变量 -# post: -# - enable_copyright -# - thumbnail_mode -# - tips -# - enable_katex -# - enable_share -# - enable_bullet_screen -# - index_carousel -# # 自定义页 meta 变量 -# page: -# - enable_copyright -# - tips -# - enable_katex -# - enable_share -# - enable_bullet_screen \ No newline at end of file + require: ">=2.0.0" \ No newline at end of file