├── .gitignore ├── LICENSE ├── README.md ├── annotation-setting.yaml ├── build.gradle ├── gradlew ├── gradlew.bat ├── settings.gradle ├── settings.yaml ├── templates ├── archives.html ├── assets │ ├── css │ │ ├── comments.css │ │ ├── single.css │ │ └── style.css │ ├── images │ │ ├── beian.png │ │ ├── cover-author.jpg │ │ ├── loading.gif │ │ ├── logo.png │ │ ├── no-comment.png │ │ ├── random │ │ │ ├── cover-post-1.jpg │ │ │ └── cover-post-2.jpg │ │ └── upyun.png │ ├── js │ │ ├── color-thief.min.js │ │ ├── comments.js │ │ ├── jquery.min.js │ │ └── theme.js │ ├── lens │ │ ├── css │ │ │ ├── fontawesome-all.min.css │ │ │ ├── images │ │ │ │ ├── arrow-small.svg │ │ │ │ ├── arrow.svg │ │ │ │ ├── close-small-alt.svg │ │ │ │ ├── close-small.svg │ │ │ │ ├── close.svg │ │ │ │ ├── open-small.svg │ │ │ │ ├── open.svg │ │ │ │ └── spinner.svg │ │ │ ├── main.css │ │ │ └── noscript.css │ │ └── js │ │ │ ├── breakpoints.min.js │ │ │ ├── browser.min.js │ │ │ ├── jquery.min.js │ │ │ ├── lazysizes.min.js │ │ │ └── main.js │ └── static │ │ ├── fancybox │ │ ├── fancybox.css │ │ └── fancybox.umd.js │ │ ├── iconfont │ │ ├── iconfont.css │ │ ├── iconfont.js │ │ ├── iconfont.json │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ │ ├── nprogress │ │ ├── nprogress.css │ │ └── nprogress.js │ │ └── swiper │ │ ├── swiper-bundle.min.css │ │ ├── swiper-bundle.min.js │ │ └── swiper-bundle.min.js.map ├── categories.html ├── category.html ├── douban.html ├── index.html ├── links.html ├── modules │ ├── aside.html │ ├── foot.html │ ├── footer.html │ ├── head.html │ ├── header.html │ ├── inc │ │ ├── ajax │ │ │ ├── ajax-cate-tpl.html │ │ │ ├── ajax-cate.html │ │ │ ├── ajax-home.html │ │ │ ├── ajax-note-page.html │ │ │ ├── ajax-tag-tpl.html │ │ │ └── ajax-tag.html │ │ ├── aside-comments.html │ │ ├── aside-sub-page.html │ │ ├── halo-comment.html │ │ ├── home-new.html │ │ ├── home-recommend-regular.html │ │ ├── home-recommend-swiper.html │ │ ├── home-sticky.html │ │ ├── nav.html │ │ └── single-color.html │ ├── layout.html │ └── variables │ │ └── configs.html ├── moment.html ├── moments.html ├── page.html ├── page_links.html ├── photos.html ├── post.html ├── tag.html └── tags.html └── theme.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | *.local 13 | 14 | # Editor directories and files 15 | .vscode/* 16 | !.vscode/extensions.json 17 | .idea 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | 24 | .gradle 25 | build 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 困困鱼 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | iEmo Logo 3 |

4 | 5 |

iEmo是一个简约感设计Halo主题

6 |

移植于 wordpress 的 iEmo

7 | 8 | ![ScreenShot](https://api.minio.yyds.pink/moony/files/2024/05/iemo-1.png) 9 | ![ScreenShot](https://api.minio.yyds.pink/halo-docs/2024/05/iemo.png) 10 | 11 | 12 | ### 预览:[困困鱼](https://demo.kunkunyu.com?preview-theme=theme-iemo) 13 | 14 | ### 文档:[iEmo 使用文档](https://docs.kunkunyu.com/docs/iemo) 15 | 16 | 17 | ### 插件支持 18 | iEmo 主题支持以下 Halo 插件: 19 | 20 | - [X] 友情链接(/links):https://halo.run/store/apps/app-hfbQg 21 | - [X] 豆瓣(/douban):https://www.halo.run/store/apps/app-srBOL 22 | - [X] 瞬间(/moments):https://halo.run/store/apps/app-SnwWD 23 | 24 | 为了获得更好的体验,你还可以安装以下插件(如果需要): 25 | - highlight.js 代码高亮:https://halo.run/store/apps/app-sqpgf 26 | 27 | ### 使用说明 28 | > 1、部分功能是使用插件进行支持 29 | - [X] 文章目录 30 | - [X] [代码高亮/语言/复制](https://github.com/halo-sigs/plugin-highlightjs)(插件) 31 | - [x] [文章搜索](https://github.com/halo-sigs/plugin-search-widget)(插件) 32 | - [X] [评论系统](https://github.com/halo-sigs/plugin-comment-widget)(插件) 33 | - [x] [友情链接](https://github.com/halo-sigs/plugin-links)(插件) 34 | - [x] [豆瓣](https://github.com/chengzhongxue/plugin-douban)(插件) 35 | - [x] [瞬间](https://github.com/halo-sigs/plugin-moments)(插件) 36 | - [x] 其他功能 37 | 38 | ### TODO 39 | - [ ] 细节优化 40 | - [ ] 图库(/photos):https://halo.run/store/apps/app-BmQJW 41 | 42 | ### 🏭 贡献 43 | 44 | > 如果你想帮助完善 `iEmo` 主题,请: 45 | 46 | - 点 `star` 47 | - 提 `issue` 48 | - 修 `bugs` 49 | - 推 `pr` 50 | 51 |
52 | 53 | ### 💬 讨论 54 | 55 | 如果你对主题有什么建议或者意见,欢迎提 PR & issue。 56 | 57 | * 添加企业微信 (备注进群) 58 | 59 | 60 | * QQ群 61 | 62 | 63 | ### 赞助 64 | 如果 iEmo 对你有帮助,欢迎[赞助我](https://afdian.net/a/moony_la),感谢以下赞助者对 iEmo 项目的支持: 65 | -------------------------------------------------------------------------------- /annotation-setting.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1alpha1 2 | kind: AnnotationSetting 3 | metadata: 4 | generateName: annotation-setting- 5 | spec: 6 | targetRef: 7 | group: "" 8 | kind: MenuItem 9 | formSchema: 10 | - $formkit: "text" 11 | name: "icon" 12 | label: "图标" 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java' 3 | } 4 | 5 | group 'run.halo' 6 | version '1.0' 7 | 8 | repositories { 9 | mavenCentral() 10 | } 11 | 12 | dependencies { 13 | implementation('org.thymeleaf:thymeleaf:3.0.12.RELEASE') 14 | } -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 | 85 | APP_NAME="Gradle" 86 | APP_BASE_NAME=${0##*/} 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | MAX_FD=$( ulimit -H -n ) || 147 | warn "Could not query maximum file descriptor limit" 148 | esac 149 | case $MAX_FD in #( 150 | '' | soft) :;; #( 151 | *) 152 | ulimit -n "$MAX_FD" || 153 | warn "Could not set maximum file descriptor limit to $MAX_FD" 154 | esac 155 | fi 156 | 157 | # Collect all arguments for the java command, stacking in reverse order: 158 | # * args from the command line 159 | # * the main class name 160 | # * -classpath 161 | # * -D...appname settings 162 | # * --module-path (only if needed) 163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 164 | 165 | # For Cygwin or MSYS, switch paths to Windows format before running java 166 | if "$cygwin" || "$msys" ; then 167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 169 | 170 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 171 | 172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 173 | for arg do 174 | if 175 | case $arg in #( 176 | -*) false ;; # don't mess with options #( 177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 178 | [ -e "$t" ] ;; #( 179 | *) false ;; 180 | esac 181 | then 182 | arg=$( cygpath --path --ignore --mixed "$arg" ) 183 | fi 184 | # Roll the args list around exactly as many times as the number of 185 | # args, so each arg winds up back in the position where it started, but 186 | # possibly modified. 187 | # 188 | # NB: a `for` loop captures its iteration list before it begins, so 189 | # changing the positional parameters here affects neither the number of 190 | # iterations, nor the values presented in `arg`. 191 | shift # remove old arg 192 | set -- "$@" "$arg" # push replacement arg 193 | done 194 | fi 195 | 196 | # Collect all arguments for the java command; 197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 | # shell script including quotes and variable substitutions, so put them in 199 | # double quotes to make sure that they get re-expanded; and 200 | # * put everything else in single quotes, so that it's not re-expanded. 201 | 202 | set -- \ 203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 | -classpath "$CLASSPATH" \ 205 | org.gradle.wrapper.GradleWrapperMain \ 206 | "$@" 207 | 208 | # Use "xargs" to parse quoted args. 209 | # 210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 211 | # 212 | # In Bash we could simply go: 213 | # 214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 215 | # set -- "${ARGS[@]}" "$@" 216 | # 217 | # but POSIX shell has neither arrays nor command substitution, so instead we 218 | # post-process each arg (as a line of input to sed) to backslash-escape any 219 | # character that might be a shell metacharacter, then use eval to reverse 220 | # that process (while maintaining the separation between arguments), and wrap 221 | # the whole thing up as a single "set" statement. 222 | # 223 | # This will of course break if any of these variables contains a newline or 224 | # an unmatched quote. 225 | # 226 | 227 | eval "set -- $( 228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 229 | xargs -n1 | 230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 231 | tr '\n' ' ' 232 | )" '"$@"' 233 | 234 | exec "$JAVACMD" "$@" 235 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'theme-iemo' 2 | -------------------------------------------------------------------------------- /settings.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1alpha1 2 | kind: Setting 3 | metadata: 4 | name: theme-iemo-setting 5 | spec: 6 | forms: 7 | - group: basic 8 | label: 基础设置 9 | formSchema: 10 | - $formkit: checkbox 11 | name: iemo_auto_load 12 | label: 自动加载内容 13 | value: false 14 | help: 当页面内容满时滚动到底部自动加载内容 15 | - $formkit: select 16 | name: iemo_page_animation 17 | label: 页面动画 18 | value: "" 19 | options: 20 | - value: "" 21 | label: 关闭 22 | - value: "Left" 23 | label: 从左往右 24 | - value: "Right" 25 | label: 从右往左 26 | - value: "Top" 27 | label: 从上往下 28 | - value: "Enlarge" 29 | label: 放大效果 30 | - $formkit: group 31 | name: recommend_post 32 | label: 推荐文章 33 | value: 34 | post_show: [] 35 | iemo_recommend_show: "" 36 | iemo_swiper_shownum: "more" 37 | children: 38 | - $formkit: radio 39 | name: iemo_recommend_show 40 | id: iemo_recommend_show 41 | label: 显示方式(显示在首页顶部) 42 | options: 43 | - label: 不显示 44 | value: "" 45 | - label: 轮播图(最多支持10篇) 46 | value: swiper 47 | - label: 固定卡片(最多支持3篇,移动端仅显示第一篇) 48 | value: regular 49 | - $formkit: repeater 50 | name: post_show 51 | if: $get(iemo_recommend_show).value != "" 52 | label: 选择文章 53 | children: 54 | - $formkit: postSelect 55 | name: post 56 | label: 文章 57 | value: "" 58 | validation: required 59 | - $formkit: radio 60 | name: iemo_swiper_shownum 61 | label: 轮播图显示数量 62 | help: 轮播图一页显示的数量,多篇为3个,单篇为1个 63 | options: 64 | - label: 多篇 65 | value: "more" 66 | - label: 单篇 67 | value: single 68 | - $formkit: number 69 | name: iemo_copyright 70 | label: 版权号 71 | value: 2024 72 | help: 填写年份(数字)即可 73 | - $formkit: text 74 | name: iemo_icp 75 | label: ICP备案 76 | help: 填写ICP备案号,没有请留空 77 | - $formkit: text 78 | name: iemo_icp_gov 79 | label: 公网安备号 80 | help: 填写公网安备号,没有请留空 81 | - $formkit: checkbox 82 | name: iemo_upyun 83 | label: 又拍云联盟 84 | value: false 85 | 86 | - group: sidebar 87 | label: 侧栏 88 | formSchema: 89 | - $formkit: attachment 90 | name: iemo_avatar_author 91 | label: 个人头像 92 | help: 个人资料的头像 93 | value: https://cravatar.cn 94 | accepts: 95 | - "image/*" 96 | - $formkit: attachment 97 | name: iemo_cover_author 98 | label: 个人背景 99 | help: 显示在侧边栏 100 | value: /themes/theme-iemo/assets/images/cover-author.jpg 101 | accepts: 102 | - "image/*" 103 | - $formkit: text 104 | name: iemo_name_author 105 | label: 个人名称 106 | help: 个人资料的名称 107 | value: 困困鱼 108 | - $formkit: textarea 109 | name: iemo_des_author 110 | label: 个人描述 111 | help: 个人资料的描述 112 | value: 这家伙很懒,什么都没写 113 | - $formkit: checkbox 114 | name: iemo_aside_subpage 115 | id: iemo_aside_subpage 116 | label: 侧边栏附页 117 | value: false 118 | help: 可添加内容:菜单、评论、关于 119 | - $formkit: checkbox 120 | if: $get(iemo_aside_subpage).value 121 | name: iemo_aside_comments 122 | id: iemo_aside_comments 123 | label: 侧边栏附页-评论 124 | value: false 125 | help: 开启附页最新评论 126 | - $formkit: number 127 | if: $get(iemo_aside_comments).value 128 | name: iemo_aside_comments_num 129 | label: 最大展示条数 130 | value: 6 131 | help: 显示最新评论数量(1~100),默认6条 132 | - $formkit: code 133 | name: iemo_about 134 | label: 侧边栏附页-关于 135 | height: 200px 136 | language: html 137 | help: 位于侧边栏附页,填写文本,可用于对博客或自己的介绍等 138 | - $formkit: repeater 139 | name: socialMedia 140 | label: 社交媒体 141 | value: [ ] 142 | children: 143 | - $formkit: text 144 | name: icon 145 | label: 图标 146 | - $formkit: text 147 | name: name 148 | label: 名称 149 | - $formkit: url 150 | name: url 151 | label: 链接 152 | 153 | - group: post 154 | label: 文章 155 | formSchema: 156 | - $formkit: attachment 157 | name: iemo_cover_post 158 | label: 文章默认封面 159 | value: /themes/theme-iemo/assets/images/random/cover-post-1.jpg 160 | accepts: 161 | - "image/*" 162 | - $formkit: checkbox 163 | name: iemo_toc 164 | label: 文章目录Toc 165 | value: true 166 | - group: moment 167 | label: 瞬间 168 | formSchema: 169 | - $formkit: attachment 170 | name: iemo_cover_moment 171 | label: 封面 172 | value: /themes/theme-iemo/assets/images/random/cover-post-1.jpg 173 | accepts: 174 | - "image/*" 175 | - 176 | - group: plugin 177 | label: 插件适配 178 | formSchema: 179 | - $formkit: group 180 | name: links 181 | label: 链接插件 182 | value: 183 | enable_comment: false 184 | children: 185 | - $formkit: checkbox 186 | name: enable_comment 187 | label: 启用评论 188 | help: "启用链接插件原生适配的评论组件,需要链接插件 >= 1.4.0 版本" 189 | - $formkit: code 190 | label: 页面内容 191 | language: html 192 | height: 400px 193 | name: content 194 | help: 页面底部内容,可以用于填写申请信息,支持 HTML 195 | 196 | 197 | -------------------------------------------------------------------------------- /templates/archives.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 |
6 | 7 |
8 | 9 |
10 |
11 |

归档 Archives.

12 |
13 |
    14 | 15 | 16 |

    [[${archive.year}]]年[[${month.month}]]月

    17 |
  • 18 | 〔[[${#dates.format(post.spec.publishTime,'dd')}]]日〕 19 | 20 |
  • 21 |
  • 22 |
    23 |
    24 |
25 |
26 |
27 | 28 |
29 |
30 |
31 |
32 | 33 | -------------------------------------------------------------------------------- /templates/assets/css/comments.css: -------------------------------------------------------------------------------- 1 | .comments { 2 | padding: 0 25px; 3 | margin-bottom: 25px; 4 | } 5 | .comments .take-part-in-comment { 6 | text-align: center; 7 | font-size: 14px; 8 | font-style: italic; 9 | color: #999; 10 | margin-top: 70px; 11 | margin-bottom: 30px; 12 | } 13 | .comments .response { 14 | margin-bottom: 50px; 15 | } 16 | .comments .response h3 { 17 | color: #333; 18 | margin-bottom: 25px; 19 | } -------------------------------------------------------------------------------- /templates/assets/css/single.css: -------------------------------------------------------------------------------- 1 | .single .post-content { 2 | font-size: 16px; 3 | color: #333; 4 | } 5 | 6 | .single .post-content > * { 7 | margin-bottom: 20px; 8 | color: #333; 9 | width: 100%; 10 | position: relative; 11 | } 12 | .single .post-content > *:last-child { 13 | margin-bottom: 0; 14 | } 15 | 16 | .single .post-content .has-text-align-center, 17 | .single .post-content .aligncenter, 18 | .single .post-content .aligncenter .wp-element-caption { 19 | text-align: center; 20 | } 21 | .single .post-content .has-text-align-right, 22 | .single .post-content .alignright, 23 | .single .post-content .alignright .wp-element-caption { 24 | text-align: right; 25 | } 26 | 27 | /* p标签 */ 28 | .single .post-content p { 29 | line-height: 1.8; 30 | /* text-align: justify; */ 31 | white-space: normal; 32 | word-break: break-all; 33 | word-wrap: break-word; 34 | } 35 | 36 | .single .post-content img:hover { 37 | box-shadow: 0 0 10px rgba(0 0 0 / .05); 38 | } 39 | 40 | .single .post-content p img { 41 | margin-top: 20px; 42 | } 43 | 44 | 45 | /* a标签 */ 46 | .single .post-content a { 47 | color: var(--theme-bak); 48 | text-decoration: underline; 49 | display: inline-block; 50 | outline: 0; 51 | } 52 | 53 | .single .wp-block-image a { 54 | display: inline-block; 55 | outline: 0; 56 | } 57 | 58 | 59 | /* h标签 */ 60 | .single .post-content h6 { 61 | font-size: 14px; 62 | color: #333; 63 | font-weight: 700; 64 | position: relative; 65 | } 66 | .single .post-content h5 { 67 | font-size: 15px; 68 | color: #333; 69 | position: relative; 70 | } 71 | .single .post-content h4 { 72 | font-size: 16px; 73 | color: #333; 74 | position: relative; 75 | } 76 | .single .post-content h3 { 77 | font-size: 18px; 78 | color: #333; 79 | position: relative; 80 | } 81 | .single .post-content h2 { 82 | font-size: 22px; 83 | color: #333; 84 | position: relative; 85 | } 86 | .single .post-content h1 { 87 | font-size: 24px; 88 | color: #333; 89 | position: relative; 90 | } 91 | 92 | .single .post-content h1 span, 93 | .single .post-content h2 span, 94 | .single .post-content h3 span { 95 | box-shadow: inset 0 -0.55em var(--title-color); 96 | } 97 | 98 | /* 引用 */ 99 | .single .post-content blockquote { 100 | background-color: #f5f5f5; 101 | border-left: 4px solid var(--theme-bak); 102 | padding: 10px; 103 | color: var(--theme-bak); 104 | } 105 | .single .post-content blockquote cite { 106 | display: inline-block; 107 | font-size: 14px; 108 | color: #999; 109 | margin-top: 10px; 110 | } 111 | 112 | /* 列表标签 */ 113 | .single .post-content ul, 114 | .single .post-content ol { 115 | margin-left: 1em; 116 | } 117 | 118 | .single .post-content ul li, 119 | .single .post-content ol li { 120 | line-height: 1.8; 121 | margin-left: 20px; 122 | width: calc(100% - 40px); 123 | word-break: break-all; 124 | word-wrap: break-word; 125 | } 126 | .single .post-content ul li { 127 | list-style: disc; 128 | } 129 | .single .post-content ol li { 130 | list-style: decimal; 131 | } 132 | 133 | code { 134 | border-radius: 4px; 135 | background-color: var(--code-bgc); 136 | color: var(--theme-bak); 137 | font-size: 14px; 138 | padding: 2px 4px; 139 | font-family: 'PingFang SC','Consolas','Courier New','monospace'; 140 | } 141 | .single .post-content pre { 142 | font-family: 'PingFang SC','Consolas','Courier New','monospace'; 143 | border-radius: 8px; 144 | } 145 | .single .post-content pre * { 146 | font-family: 'PingFang SC','Consolas','Courier New','monospace'; 147 | } 148 | 149 | 150 | /* 表格 */ 151 | .single .post-content .wp-block-table { 152 | overflow: auto; 153 | } 154 | .single .post-content .wp-block-table::-webkit-scrollbar { 155 | width: 6px; 156 | height: 6px; 157 | } 158 | .single .post-content .wp-block-table:hover::-webkit-scrollbar-thumb { 159 | border-radius: 6px; 160 | background-color: var(--scroll); 161 | } 162 | 163 | .single .post-content .wp-block-table table { 164 | width: 100%; 165 | border-collapse: collapse; 166 | } 167 | .single .post-content .wp-block-table table.has-fixed-layout { 168 | table-layout: fixed; 169 | } 170 | .single .post-content .wp-block-table tr:hover { 171 | background-color: var(--menu-hover); 172 | } 173 | .single .post-content .wp-block-table table, 174 | .single .post-content .wp-block-table th, 175 | .single .post-content .wp-block-table td { 176 | font-size: 15px; 177 | border: 1px solid #e2e2e2; 178 | } 179 | .single .post-content .wp-block-table th, 180 | .single .post-content .wp-block-table td { 181 | padding: 10px; 182 | } 183 | 184 | .single .post-content .wp-block-table th { 185 | background-color: var(--theme); 186 | color: #fff; 187 | text-shadow: 0 0 5px rgba(0 0 0 / .2); 188 | } 189 | 190 | /* 媒体 */ 191 | .single .post-content .wp-block-image { 192 | display: block; 193 | max-width: 100%; 194 | } 195 | .single .post-content img { 196 | border-radius: 8px; 197 | max-width: 100%; 198 | height: auto; 199 | vertical-align: middle; 200 | } 201 | 202 | .single .post-content .wp-block-gallery { 203 | display: grid; 204 | grid-template-columns: 1fr 1fr 1fr; 205 | gap: 10px; 206 | } 207 | .single .post-content .wp-block-gallery .wp-block-image { 208 | width: 100%; 209 | height: 0; 210 | padding-bottom: 100%; 211 | position: relative; 212 | } 213 | .single .post-content .wp-block-gallery .wp-block-image img { 214 | width: 100%; 215 | height: 100%; 216 | object-fit: cover; 217 | position: absolute; 218 | top: 0; 219 | vertical-align: middle; 220 | } 221 | .fancybox__container { 222 | --fancybox-accent-color: var(--theme); 223 | } 224 | 225 | .single .post-content figcaption { 226 | font-size: 14px; 227 | font-style: italic; 228 | color: #999; 229 | margin-top: 5px; 230 | } 231 | 232 | .single .post-content .wp-block-video video { 233 | max-width: 100%; 234 | border-radius: 8px; 235 | vertical-align: middle; 236 | } 237 | 238 | .single .post-content .wp-block-audio { 239 | max-width: 100%; 240 | vertical-align: middle; 241 | } 242 | .single .post-content .wp-block-audio audio { 243 | width: 100%; 244 | } 245 | 246 | /* 高亮颜色 */ 247 | .single .post-content .has-black-color { 248 | color: #000; 249 | } 250 | .single .post-content .has-cyan-bluish-gray-color { 251 | color: #abb8c3; 252 | } 253 | .single .post-content .has-white-color { 254 | color: #ffffff; 255 | } 256 | .single .post-content .has-pale-pink-color { 257 | color: #f78da7; 258 | } 259 | .single .post-content .has-vivid-red-color { 260 | color: #cf2e2e; 261 | } 262 | .single .post-content .has-luminous-vivid-orange-color { 263 | color: #ff6900; 264 | } 265 | .single .post-content .has-luminous-vivid-amber-color { 266 | color: #fcb900; 267 | } 268 | .single .post-content .has-light-green-cyan-color { 269 | color: #7bdcb5; 270 | } 271 | .single .post-content .has-vivid-green-cyan-color { 272 | color: #00d084; 273 | } 274 | .single .post-content .has-pale-cyan-blue-color { 275 | color: #8ed1fc; 276 | } 277 | .single .post-content .has-vivid-cyan-blue-color { 278 | color: #0693e3; 279 | } 280 | .single .post-content .has-vivid-purple-color { 281 | color: #9b51e0; 282 | } 283 | 284 | /* note */ 285 | .single .post-content .wp-video { 286 | max-width: 100% !important; 287 | } 288 | .single .post-content .wp-video video { 289 | width: 100%; 290 | height: auto; 291 | border-radius: 8px; 292 | margin-bottom: 0; 293 | vertical-align: middle; 294 | } 295 | 296 | @media screen and (max-width: 700px) { 297 | /* h标签 */ 298 | .single .post-content h6 { 299 | font-size: 14px; 300 | } 301 | .single .post-content h5 { 302 | font-size: 15px; 303 | } 304 | .single .post-content h4 { 305 | font-size: 16px; 306 | } 307 | .single .post-content h3 { 308 | font-size: 18px; 309 | } 310 | .single .post-content h2 { 311 | font-size: 20px; 312 | } 313 | .single .post-content h1 { 314 | font-size: 22px; 315 | } 316 | } 317 | 318 | 319 | @media screen and (max-width: 500px) { 320 | .single .post-content pre { 321 | padding: 10px; 322 | } 323 | } 324 | 325 | .moment-media { 326 | display: table; 327 | width: 50%; 328 | } 329 | 330 | .moment-media>div { 331 | overflow: hidden; 332 | float: left 333 | } 334 | 335 | .moment-media img,.moment-media video { 336 | aspect-ratio: 1/1; 337 | -o-object-fit: cover; 338 | object-fit: cover 339 | } 340 | 341 | .moment-media.medium-1 .moment-media-item { 342 | width: 100% 343 | } 344 | 345 | .moment-media.medium-2 .moment-media-item,.moment-media.medium-4 .moment-media-item { 346 | width: 48%; 347 | margin: 1% 348 | } 349 | 350 | .moment-media.medium-3 .moment-media-item { 351 | width: 31.33%; 352 | margin: 1% 353 | } 354 | 355 | .moment-media.medium-3 .moment-media-item:nth-child(1) { 356 | width: 64.67% 357 | } 358 | 359 | .moment-media.medium-5 .moment-media-item,.moment-media.medium-8 .moment-media-item { 360 | width: 31.33%; 361 | margin: 1% 362 | } 363 | 364 | .moment-media.medium-5 .moment-media-item:nth-child(n+1):nth-child(-n+2),.moment-media.medium-8 .moment-media-item:nth-child(n+1):nth-child(-n+2) { 365 | width: 48%; 366 | margin: 1% 367 | } 368 | 369 | .moment-media.medium-6 .moment-media-item { 370 | width: 31.33%; 371 | margin: 1.1% 1% 372 | } 373 | 374 | .moment-media.medium-6 .moment-media-item:nth-child(1) { 375 | width: 64.67% 376 | } 377 | 378 | .moment-media.medium-7 .moment-media-item { 379 | width: 31.33%; 380 | margin: 1% 381 | } 382 | 383 | .moment-media.medium-7 .moment-media-item:nth-child(n+4):nth-child(-n+7) { 384 | width: 23% 385 | } 386 | 387 | .moment-media.medium-9 .moment-media-item { 388 | width: 31.33%; 389 | margin: 1% 390 | } 391 | 392 | .rounded-lg { 393 | border-radius: .5rem; 394 | } 395 | 396 | .notes-content { 397 | margin-bottom: 15px; 398 | } -------------------------------------------------------------------------------- /templates/assets/images/beian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chengzhongxue/halo-theme-iemo/39b8d2d98f0f3914983c0a301eb82f061d9bd92b/templates/assets/images/beian.png -------------------------------------------------------------------------------- /templates/assets/images/cover-author.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chengzhongxue/halo-theme-iemo/39b8d2d98f0f3914983c0a301eb82f061d9bd92b/templates/assets/images/cover-author.jpg -------------------------------------------------------------------------------- /templates/assets/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chengzhongxue/halo-theme-iemo/39b8d2d98f0f3914983c0a301eb82f061d9bd92b/templates/assets/images/loading.gif -------------------------------------------------------------------------------- /templates/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chengzhongxue/halo-theme-iemo/39b8d2d98f0f3914983c0a301eb82f061d9bd92b/templates/assets/images/logo.png -------------------------------------------------------------------------------- /templates/assets/images/no-comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chengzhongxue/halo-theme-iemo/39b8d2d98f0f3914983c0a301eb82f061d9bd92b/templates/assets/images/no-comment.png -------------------------------------------------------------------------------- /templates/assets/images/random/cover-post-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chengzhongxue/halo-theme-iemo/39b8d2d98f0f3914983c0a301eb82f061d9bd92b/templates/assets/images/random/cover-post-1.jpg -------------------------------------------------------------------------------- /templates/assets/images/random/cover-post-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chengzhongxue/halo-theme-iemo/39b8d2d98f0f3914983c0a301eb82f061d9bd92b/templates/assets/images/random/cover-post-2.jpg -------------------------------------------------------------------------------- /templates/assets/images/upyun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chengzhongxue/halo-theme-iemo/39b8d2d98f0f3914983c0a301eb82f061d9bd92b/templates/assets/images/upyun.png -------------------------------------------------------------------------------- /templates/assets/js/color-thief.min.js: -------------------------------------------------------------------------------- 1 | !function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):t.ColorThief=r()}(this,function(){if(!t)var t={map:function(t,r){var n={};return r?t.map(function(t,o){return n.index=o,r.call(n,t)}):t.slice()},naturalOrder:function(t,r){return tr?1:0},sum:function(t,r){var n={};return t.reduce(r?function(t,o,e){return n.index=e,t+r.call(n,o)}:function(t,r){return t+r},0)},max:function(r,n){return Math.max.apply(null,n?t.map(r,n):r)}};var r=function(){var r=5,n=8-r,o=1e3;function e(t,n,o){return(t<<2*r)+(n<f/2){for(e=n.copy(),i=n.copy(),u=(r=a-n[s])<=(o=n[h]-a)?Math.min(n[h]-1,~~(a+o/2)):Math.max(n[s],~~(a-1-r/2));!v[u];)u++;for(c=l[u];!c&&v[u-1];)c=l[--u];return e[h]=u,i[s]=e[h]+1,[e,i]}}(u==o?"r":u==i?"g":"b")}}return u.prototype={volume:function(t){return this._volume&&!t||(this._volume=(this.r2-this.r1+1)*(this.g2-this.g1+1)*(this.b2-this.b1+1)),this._volume},count:function(t){var r=this.histo;if(!this._count_set||t){var n,o,i,u=0;for(n=this.r1;n<=this.r2;n++)for(o=this.g1;o<=this.g2;o++)for(i=this.b1;i<=this.b2;i++)u+=r[e(n,o,i)]||0;this._count=u,this._count_set=!0}return this._count},copy:function(){return new u(this.r1,this.r2,this.g1,this.g2,this.b1,this.b2,this.histo)},avg:function(t){var n=this.histo;if(!this._avg||t){var o,i,u,a,s=0,h=1<<8-r,c=0,f=0,v=0;for(i=this.r1;i<=this.r2;i++)for(u=this.g1;u<=this.g2;u++)for(a=this.b1;a<=this.b2;a++)s+=o=n[e(i,u,a)]||0,c+=o*(i+.5)*h,f+=o*(u+.5)*h,v+=o*(a+.5)*h;this._avg=s?[~~(c/s),~~(f/s),~~(v/s)]:[~~(h*(this.r1+this.r2+1)/2),~~(h*(this.g1+this.g2+1)/2),~~(h*(this.b1+this.b2+1)/2)]}return this._avg},contains:function(t){var r=t[0]>>n;return gval=t[1]>>n,bval=t[2]>>n,r>=this.r1&&r<=this.r2&&gval>=this.g1&&gval<=this.g2&&bval>=this.b1&&bval<=this.b2}},a.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map(function(t){return t.color})},size:function(){return this.vboxes.size()},map:function(t){for(var r=this.vboxes,n=0;n251&&e[1]>251&&e[2]>251&&(r[o].color=[255,255,255])}},{quantize:function(h,c){if(!h.length||c<2||c>256)return!1;var f=function(t){var o,i=new Array(1<<3*r);return t.forEach(function(t){o=e(t[0]>>n,t[1]>>n,t[2]>>n),i[o]=(i[o]||0)+1}),i}(h);f.forEach(function(){});var v=function(t,r){var o,e,i,a=1e6,s=0,h=1e6,c=0,f=1e6,v=0;return t.forEach(function(t){(o=t[0]>>n)s&&(s=o),(e=t[1]>>n)c&&(c=e),(i=t[2]>>n)v&&(v=i)}),new u(a,s,h,c,f,v,r)}(h,f),l=new i(function(r,n){return t.naturalOrder(r.count(),n.count())});function g(t,r){for(var n,e=t.size(),i=0;i=r)return;if(i++>o)return;if((n=t.pop()).count()){var u=s(f,n),a=u[0],h=u[1];if(!a)return;t.push(a),h&&(t.push(h),e++)}else t.push(n),i++}}l.push(v),g(l,.75*c);for(var p=new i(function(r,n){return t.naturalOrder(r.count()*r.volume(),n.count()*n.volume())});l.size();)p.push(l.pop());g(p,c);for(var d=new a;p.size();)d.push(p.pop());return d}}}().quantize,n=function(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.width=this.canvas.width=t.naturalWidth,this.height=this.canvas.height=t.naturalHeight,this.context.drawImage(t,0,0,this.width,this.height)};n.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)};var o=function(){};return o.prototype.getColor=function(t,r){return void 0===r&&(r=10),this.getPalette(t,5,r)[0]},o.prototype.getPalette=function(t,o,e){var i=function(t){var r=t.colorCount,n=t.quality;if(void 0!==r&&Number.isInteger(r)){if(1===r)throw new Error("colorCount should be between 2 and 20. To get one color, call getColor() instead of getPalette()");r=Math.max(r,2),r=Math.min(r,20)}else r=10;return(void 0===n||!Number.isInteger(n)||n<1)&&(n=10),{colorCount:r,quality:n}}({colorCount:o,quality:e}),u=new n(t),a=function(t,r,n){for(var o=t,e=[],i=0,u=void 0,a=void 0,s=void 0,h=void 0,c=void 0;i=125)&&(a>250&&s>250&&h>250||e.push([a,s,h]));return e}(u.getImageData().data,u.width*u.height,i.quality),s=r(a,i.colorCount);return s?s.palette():null},o.prototype.getColorFromUrl=function(t,r,n){var o=this,e=document.createElement("img");e.addEventListener("load",function(){var i=o.getPalette(e,5,n);r(i[0],t)}),e.src=t},o.prototype.getImageData=function(t,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){if(200==this.status){var t=new Uint8Array(this.response);i=t.length;for(var n=new Array(i),o=0;o{ 7 | new_ip.push((Number(ip_arr[i]) - 99) / 1412073); 8 | }) 9 | return new_ip.reverse().join('.'); 10 | } else { 11 | return 'null'; 12 | } 13 | 14 | } 15 | 16 | $('.comments .user-ip').each(function(){ 17 | const that = $(this); 18 | const url = 'https://api.vore.top/api/IPdata?ip=' + getIp(that.attr('ip')); 19 | // that.attr('ip',''); 20 | $.get(url, function(res){ 21 | if(res.code == 200 && res.adcode.p) 22 | that.html('' + $.trim(res.adcode.p)); 23 | else 24 | that.html('未知'); 25 | },'json').fail(function(){ 26 | that.html('未知'); 27 | }); 28 | }); 29 | 30 | 31 | // 文本框聚焦 32 | $('.text textarea').on('focus', ()=>{ 33 | $('.text').addClass('focus'); 34 | }) 35 | $('.text textarea').on('blur', ()=>{ 36 | $('.text').removeClass('focus'); 37 | }) 38 | 39 | 40 | // 发言 41 | $('.write').click(function(e){ 42 | e.preventDefault; 43 | 44 | $(this).parent().hide(); 45 | $('.submit-comment-btn').addClass('active'); 46 | 47 | $('.text').addClass('active'); 48 | $('.text textarea').focus(); 49 | 50 | $('#comment_post_ID').attr('value', $('.comments').attr('id')) 51 | $('#comment_parent').attr('value', '0') 52 | 53 | $('.response form > .emoji-btn').addClass('active'); 54 | }) 55 | 56 | 57 | // 取消 58 | function cancal_comment(){ 59 | $('.text').removeClass('active'); 60 | $('.text textarea').removeClass('active').blur(); 61 | $('.text .pholder').text('').hide(); 62 | 63 | $('#comment_post_ID').attr('value', ''); 64 | $('#comment_parent').attr('value', ''); 65 | 66 | } 67 | 68 | $('.cancal1').click(function(e){ 69 | e.preventDefault; 70 | $('.submit-comment-btn').removeClass('active'); 71 | $('.write-comment-btn').show(); 72 | cancal_comment(); 73 | 74 | $('.response form > .emoji-btn').removeClass('active'); 75 | }) 76 | 77 | 78 | // 取消回复 79 | $('.cancal2').click(function(e){ 80 | e.preventDefault; 81 | $('.text .pholder').text('').hide(); 82 | $('.text textarea').removeClass('active'); 83 | $('.cancal1').show(); 84 | $(this).hide(); 85 | $('#comment_post_ID').attr('value', $('.comments').attr('id')) 86 | $('#comment_parent').attr('value', '0') 87 | }) 88 | 89 | 90 | // 回复 91 | const comment_li = $('.comments .comments-body ul li .comment-card'); 92 | comment_li.each(function(){ 93 | const that = $(this); 94 | $(this.querySelector('.reply-btn a')).click(function(e){ 95 | 96 | e.preventDefault(); 97 | cancal_comment(); 98 | 99 | let reply_username = $(that[0].querySelector('.user-name h4')).text(); 100 | 101 | $('.submit-comment-btn').addClass('active'); 102 | $('.write-comment-btn').hide(); 103 | $('.cancal1').hide(); 104 | $('.cancal2').show(); 105 | 106 | $('.text').addClass('active'); 107 | $('.text textarea').addClass('active').focus(); 108 | $('.text .pholder').text('@' + reply_username).show(); 109 | 110 | $('#comment_post_ID').attr('value', $('.comments').attr('id')) 111 | $('#comment_parent').attr('value', $(this).attr('id')) 112 | 113 | $('.response form > .emoji-btn').addClass('active'); 114 | }) 115 | }) 116 | 117 | 118 | // 判断text 119 | let text = $('.comments .response textarea').val(); 120 | if($.trim(text)){ 121 | $('.submit').show(); 122 | } else { 123 | $('.submit').hide(); 124 | } 125 | $('.comments .response textarea').on('input', function(){ 126 | text = $(this).val(); 127 | if($.trim(text)) { 128 | $('.submit').show(); 129 | } else { 130 | $('.submit').hide(); 131 | } 132 | }) 133 | 134 | 135 | // visitor 136 | const visitor_btn = $('.comments .response .user-info a'); 137 | const visitor_write = $('.comments .response .visitor'); 138 | const visitor_name = $('.comments .response .visitor #author') 139 | const visitor_email = $('.comments .response .visitor #email'); 140 | const visitor_name_tip = $('.comments .response .user-info p').text(); 141 | 142 | // 点击弹出信息框 143 | if(visitor_btn.length && visitor_write.length){ 144 | function remove_visitor_write() { 145 | visitor_write.removeClass('active'); 146 | $(document).off('click',remove_visitor_write); 147 | }; 148 | visitor_btn.on('click',(e)=>{ 149 | e.stopPropagation(); 150 | if(visitor_write.toggleClass('active')) { 151 | $(document).on('click',remove_visitor_write); 152 | } 153 | }); 154 | visitor_write.on('click',(e)=>e.stopPropagation()); 155 | }; 156 | 157 | // 实时同步昵称 158 | if(visitor_name == ''){ 159 | $('.comments .response .user-info p').text(visitor_name_tip); 160 | } 161 | visitor_name.on('input', function(){ 162 | $('.comments .response .user-info p').text($(this).val()); 163 | if($(this).val() == ''){ 164 | $('.comments .response .user-info p').text(visitor_name_tip); 165 | } 166 | }) 167 | 168 | // 判断是否填写信息 169 | if(visitor_name.length && visitor_email.length){ 170 | $('.submit').click(()=>{ 171 | if($(visitor_name).val() == '' || $(visitor_email).val() == ''){ 172 | $(visitor_write).addClass('active'); 173 | } 174 | }) 175 | $(document).click((e)=>{ 176 | if(!$(e.target).is('.submit') && $(visitor_write).attr('class').indexOf('active') > -1){ 177 | $(visitor_write).removeClass('active'); 178 | } 179 | }) 180 | } 181 | 182 | 183 | // 顶部参与讨论按钮 184 | if($('.single .shortcuts .to-comment').length){ 185 | $('.single .shortcuts .to-comment').on('click', function(){ 186 | $('article').animate({scrollTop:$('#response').offset().top - 115}, 300); 187 | }) 188 | } 189 | 190 | 191 | // 表情 192 | const emoji = [ 193 | '😀','😁','😂','🤣','😃','😄', 194 | '😅','😆','😉','😊','😋','😎', 195 | '😍','😘','🥰','😗','😙','🥲', 196 | '😚','☺️','🙂','🤗','🤩','🤔', 197 | '🫡','🤨','😐','😑','😶','🫥', 198 | '😶‍🌫️','🙄','😏','😣','😥','😮', 199 | '🤐','😯','😪','😫','🥱','😴', 200 | '😌','😛','😜','😝','🤤','😒', 201 | '😓','😔','😕','🫤','🙃','🫠', 202 | '🤑','😲','☹️','🙁','😖','😞', 203 | '😟','😤','😢','😭','😦','😧', 204 | '😨','😩','🤯','😬','😮‍💨','😰', 205 | '😱','🥵','🥶','😳','🤪','😵', 206 | '😵‍💫','🥴','😠','😡','🤬','😷', 207 | '🤒','🤕','🤢','🤮','🤧','😇', 208 | '🥳','🥸','🥺','🥹','🤠','🤡', 209 | '🤥','🤫','🤭','🫢','🫣','🧐', 210 | '🤓','💀','💩','👻']; 211 | 212 | emoji.forEach(function(e){ 213 | $('.emoji-box').append('' + e + ''); 214 | }) 215 | 216 | $('.emoji-btn').on('click', function(){ 217 | $('.comments .response .emoji').toggleClass('active'); 218 | }) 219 | 220 | $(document).click((e)=>{ 221 | if(!$(e.target).is('.emoji-btn, .emoji, .emoji-box, .emoji span') && $('.comments .response .emoji').attr('class').indexOf('active') > -1) { 222 | $('.comments .response .emoji').removeClass('active') 223 | } 224 | }) 225 | 226 | $('.comments .response .emoji span').on('click', function(){ 227 | $('.text textarea').insertAtCaret($(this).text()); 228 | 229 | if($.trim($('.text textarea').val())){ 230 | $('.submit').show(); 231 | } else { 232 | $('.submit').hide(); 233 | } 234 | }) 235 | 236 | $.fn.extend({ 237 | insertAtCaret: function(myValue){ 238 | var $t=$(this)[0]; 239 | if (document.selection) { 240 | this.focus(); 241 | sel = document.selection.createRange(); 242 | sel.text = myValue; 243 | this.focus(); 244 | } 245 | else 246 | if ($t.selectionStart || $t.selectionStart == '0'){ 247 | var startPos = $t.selectionStart; 248 | var endPos = $t.selectionEnd; 249 | var scrollTop = $t.scrollTop; 250 | $t.value = $t.value.substring(0, startPos) + myValue + $t.value.substring(endPos, $t.value.length); 251 | this.focus(); 252 | $t.selectionStart = startPos + myValue.length; 253 | $t.selectionEnd = startPos + myValue.length; 254 | $t.scrollTop = scrollTop; 255 | } 256 | else { 257 | this.value += myValue; 258 | this.focus(); 259 | } 260 | } 261 | }) -------------------------------------------------------------------------------- /templates/assets/js/theme.js: -------------------------------------------------------------------------------- 1 | // Remove tag A wuth mousedown 2 | $('body').on('mousedown', 'a', function(e) { 3 | e.preventDefault(); 4 | }); 5 | 6 | 7 | // Search btn - Mobile 8 | $('#search-btn').click(function() { 9 | $('.search-m').toggleClass('active'); 10 | if($('.search-m').attr('class') == 'search-m active') { 11 | $('.nav').css('border-bottom','1px solid #fff'); 12 | } else { 13 | $('#search-m').blur(); 14 | $('.nav').css('border-bottom','1px solid #e2e2e2'); 15 | } 16 | }) 17 | function close_search_m() { 18 | $('#search-m').blur(); 19 | $('.search-m').removeClass('active'); 20 | if($('.search-m').attr('class') != 'search-m active') { 21 | $('.nav').css('border-bottom','1px solid #e2e2e2'); 22 | } 23 | } 24 | 25 | 26 | // Menu btn 27 | $('#menu-btn').click(function() { 28 | if($('header').attr('class') == $('aside').attr('class')) { 29 | $('header').toggleClass('active'); 30 | $('aside').toggleClass('active'); 31 | } else if($('header').attr('class') == 'active' && $('aside').attr('class') != 'active') { 32 | $('header').removeClass('active'); 33 | } else if($('header').attr('class') != 'active' && $('aside').attr('class') == 'active') { 34 | $('header').addClass('active'); 35 | } 36 | close_search_m(); 37 | }) 38 | 39 | $('#aside-btn').click(function() { 40 | $('aside').toggleClass('active'); 41 | close_search_m(); 42 | }) 43 | 44 | 45 | // Nav user menu 46 | const user_set_btn = document.querySelector('main .nav .user-menu #user-menu-btn'); 47 | const user_set_menu = document.querySelector('main .nav .user-menu .user-menu-box'); 48 | function remove_set_menu(e) { 49 | user_set_menu.classList.remove('active'); 50 | document.removeEventListener("click",remove_set_menu); 51 | } 52 | 53 | if(user_set_btn) { 54 | user_set_btn.addEventListener("click",(e)=>{ 55 | e.stopPropagation(); 56 | close_search_m(); 57 | if(user_set_menu.classList.toggle('active')) { 58 | document.addEventListener("click",remove_set_menu); 59 | } 60 | }) 61 | user_set_menu.addEventListener("click",(e)=>e.stopPropagation()); 62 | } 63 | 64 | 65 | // Click with hide menu and search 66 | $('article, aside .aside-content').on('click', function() { 67 | $(user_set_menu).removeClass('active'); 68 | close_search_m(); 69 | }) 70 | 71 | $('article').on('click', function() { 72 | $('header').removeClass('active'); 73 | $('aside').removeClass('active'); 74 | close_search_m(); 75 | }) 76 | 77 | $('header').on('click', function() { 78 | close_search_m(); 79 | }) 80 | 81 | 82 | // Horizontal scrolling 83 | const cateTagContainer = document.querySelectorAll(` 84 | .category main .content article .categories ul, 85 | .tag main .content article .tag-bar ul, 86 | .note main .content article .note-bar ul, 87 | .single main .content article .post-cover .post-info .more, 88 | .home main .content article .bottom .recommend-bar 89 | `); 90 | 91 | if(cateTagContainer) { 92 | $(cateTagContainer).each(function(i) { 93 | cateTagContainer[i].addEventListener("wheel", (event) => { 94 | event.preventDefault(); 95 | cateTagContainer[i].scrollLeft += event.deltaY; 96 | }); 97 | }) 98 | } 99 | 100 | 101 | // Menu tooltip 102 | const menuItemA = document.querySelectorAll('header .menu > li > a'); 103 | 104 | if(menuItemA) { 105 | let menuItemTitle = []; 106 | $(menuItemA).each(function(i) { 107 | menuItemTitle[i] = $(menuItemA[i]).attr('title'); 108 | if(menuItemTitle[i]) { 109 | $(menuItemA[i]).attr('title',''); 110 | $('').text(menuItemTitle[i]).appendTo(menuItemA[i]); 111 | } else { 112 | // console.log(false); 113 | } 114 | }) 115 | } 116 | 117 | 118 | // Home new or sticky 119 | $('.home .recommend-bar ul .slider').width($('.home .recommend-bar ul li a.active').outerWidth()); 120 | $('.home .recommend-bar ul li a').each(function(i) { 121 | $(this).attr('index',i); 122 | $(this).click(function() { 123 | $('.home .recommend-bar ul li a').removeClass('active'); 124 | $(this).addClass('active'); 125 | let width = $(this).outerWidth(); 126 | let position = $(this).position(); 127 | let scrollLeft = $('.home .recommend-bar ul').scrollLeft(); 128 | $(".home .recommend-bar ul .slider").css({ 129 | width: width, 130 | left: position.left + scrollLeft, 131 | }); 132 | // console.log(position.left); 133 | $('.home .post-part').removeClass('active'); 134 | $($('.home .post-part')[$(this).attr('index')]).addClass('active'); 135 | }) 136 | }) 137 | 138 | // aside sub page 139 | const aside_btn_open = $('aside .aside-content .aside-btn-open'); 140 | const aside_btn_close = $('aside .aside-content .aside-btn-close'); 141 | 142 | aside_btn_open.on('click', function() { 143 | $('aside .aside-content').addClass('active'); 144 | $('aside .aside-content .main-page').removeClass('active'); 145 | $('aside .aside-content .sub-page').addClass('active'); 146 | }) 147 | aside_btn_close.on('click', function() { 148 | $('aside .aside-content').removeClass('active'); 149 | $('aside .aside-content .sub-page').removeClass('active'); 150 | $('aside .aside-content .main-page').addClass('active'); 151 | }) 152 | 153 | 154 | // aside sub page menu 155 | const menu_parent = $('.sub-page .menu_sidebar > ul > li.menu-item-has-children'); 156 | let menu_parent_hight = []; 157 | let menu_parent_a_hight = []; 158 | $(document).ready(function() { 159 | $(menu_parent).each(function(i) { 160 | menu_parent_hight[i] = $(this).outerHeight(); 161 | menu_parent_a_hight[i] = $(this).children('a').outerHeight(); 162 | $(this).height(menu_parent_a_hight[i]); 163 | $(this).children('a').on('click', function(e) { 164 | e.preventDefault(); 165 | if(!$(this).hasClass('active')) { 166 | $(this).parent().height(menu_parent_hight[i]); 167 | $(this).children('.arrow').addClass('active'); 168 | $(this).addClass('active'); 169 | } else { 170 | $(this).parent().height(menu_parent_a_hight[i]); 171 | $(this).children('.arrow').removeClass('active'); 172 | $(this).removeClass('active'); 173 | } 174 | }) 175 | 176 | $(document).click((e)=>{ 177 | if($(this).children('a').hasClass('active')) { 178 | if(!$(e.target).is($(this).children('a, ul')) && !$(e.target).is(this.querySelectorAll('ul li ul li a, a *'))) { 179 | $(this).height(menu_parent_a_hight[i]); 180 | $(this).children('a').removeClass('active'); 181 | $(this.querySelector('.arrow')).removeClass('active'); 182 | } 183 | } 184 | }) 185 | }) 186 | }) 187 | 188 | 189 | // toc 190 | const post_title = $(` 191 | .post-content h1, 192 | .post-content h2, 193 | .post-content h3, 194 | .post-content h4, 195 | .post-content h5, 196 | .post-content h6 197 | `); 198 | 199 | function add_toc() { 200 | let title_i = 1; 201 | post_title.each(function() { 202 | $(this).attr('id', 'title-' + title_i); 203 | $('aside .toc ul').append('
  • ' + $(this).text() + '
  • '); 204 | title_i ++; 205 | }) 206 | } 207 | 208 | if($('.toc').length > 0 && post_title.length >= 2) { 209 | $('aside .toc').show(); 210 | add_toc(); 211 | } else { 212 | $('aside .toc').hide(); 213 | } 214 | 215 | // 顶部参与讨论按钮 216 | if($('.single .shortcuts .to-comment').length){ 217 | $('.single .shortcuts .to-comment').on('click', function(){ 218 | $('article').animate({scrollTop:$('#response').offset().top - 115}, 300); 219 | }) 220 | } 221 | 222 | $('.menu ul li a').each((i, e) => { 223 | // 获取当前页面的路径(不包括查询参数和哈希) 224 | var route = location.href.split(/[?#]/)[0]; 225 | 226 | let href = e.href.split(/[?#]/)[0]; 227 | // 获取当前菜单项的路径(不包括查询参数和哈希) 228 | if(e.href.indexOf('?preview-theme') != -1) { 229 | href =e.href; 230 | } 231 | 232 | // 比较当前页面的路径和菜单项的路径 233 | if (route === href) { 234 | e.parentElement.classList.add('current-menu-item'); 235 | } 236 | }); 237 | 238 | //处理瞬间权限 239 | async function role() { 240 | const response = await fetch(`/apis/api.console.halo.run/v1alpha1/users/-`); 241 | const data = await response.json(); 242 | var roles = data.roles; 243 | 244 | if(roles.length>0) { 245 | var name = roles[0].metadata.name 246 | if(name != 'super-role') { 247 | let dependencies = roles[0].metadata.annotations["rbac.authorization.halo.run/dependencies"] 248 | const disallowAccessConsole = roles[0].metadata.annotations["rbac.authorization.halo.run/disallow-access-console"] 249 | if(dependencies != undefined) { 250 | const momentsRole = ["role-template-moments-manage"] 251 | const momentsResult = momentsRole.some(r => dependencies.includes(r)); 252 | const momentsRoleUc = ["role-template-moments-manage","role-template-uc-moments-publish"] 253 | const momentsResultUc = momentsRoleUc.some(r => dependencies.includes(r)); 254 | const postRolesUc = ["role-template-post-author","role-template-post-publisher","role-template-post-contributor"] 255 | const postResultUc = postRolesUc.some(r => dependencies.includes(r)); 256 | const postRoles = ["role-template-manage-posts"] 257 | const postResult = postRoles.some(r => dependencies.includes(r)); 258 | if (momentsResult == false || disallowAccessConsole == true) { 259 | if (!momentsResultUc) { 260 | $('#momentsEdit').remove(); 261 | }else { 262 | $('#momentsEdit')[0].href = '/uc/moments' 263 | } 264 | } 265 | if (postResult == false || disallowAccessConsole == true) { 266 | if (!postResultUc) { 267 | $('#postsEdit').remove(); 268 | }else { 269 | $('#postsEdit')[0].href = '/uc/posts' 270 | } 271 | } 272 | }else { 273 | $('#postsEdit').remove(); 274 | $('#momentsEdit').remove(); 275 | } 276 | } 277 | } 278 | } 279 | 280 | 281 | role(); -------------------------------------------------------------------------------- /templates/assets/lens/css/images/arrow-small.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /templates/assets/lens/css/images/arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /templates/assets/lens/css/images/close-small-alt.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /templates/assets/lens/css/images/close-small.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /templates/assets/lens/css/images/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /templates/assets/lens/css/images/open-small.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /templates/assets/lens/css/images/open.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /templates/assets/lens/css/images/spinner.svg: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /templates/assets/lens/css/noscript.css: -------------------------------------------------------------------------------- 1 | /* 2 | Lens by HTML5 UP 3 | html5up.net | @ajlkn 4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | */ 6 | 7 | /* Main */ 8 | 9 | #main { 10 | opacity: 1 !important; 11 | right: 0 !important; 12 | } 13 | 14 | body:before { 15 | content: 'Javascript is disabled :('; 16 | display: block; 17 | position: absolute; 18 | top: 50%; 19 | width: calc(100% - 22.5em * 0.333333333); 20 | height: 4em; 21 | margin-top: -2em; 22 | color: #282828; 23 | cursor: default; 24 | font-size: 3em; 25 | line-height: 4em; 26 | text-align: center; 27 | white-space: nowrap; 28 | left: 0; 29 | } -------------------------------------------------------------------------------- /templates/assets/lens/js/breakpoints.min.js: -------------------------------------------------------------------------------- 1 | /* breakpoints.js v1.0 | @ajlkn | MIT licensed */ 2 | var breakpoints=function(){"use strict";function e(e){t.init(e)}var t={list:null,media:{},events:[],init:function(e){t.list=e,window.addEventListener("resize",t.poll),window.addEventListener("orientationchange",t.poll),window.addEventListener("load",t.poll),window.addEventListener("fullscreenchange",t.poll)},active:function(e){var n,a,s,i,r,d,c;if(!(e in t.media)){if(">="==e.substr(0,2)?(a="gte",n=e.substr(2)):"<="==e.substr(0,2)?(a="lte",n=e.substr(2)):">"==e.substr(0,1)?(a="gt",n=e.substr(1)):"<"==e.substr(0,1)?(a="lt",n=e.substr(1)):"!"==e.substr(0,1)?(a="not",n=e.substr(1)):(a="eq",n=e),n&&n in t.list)if(i=t.list[n],Array.isArray(i)){if(r=parseInt(i[0]),d=parseInt(i[1]),isNaN(r)){if(isNaN(d))return;c=i[1].substr(String(d).length)}else c=i[0].substr(String(r).length);if(isNaN(r))switch(a){case"gte":s="screen";break;case"lte":s="screen and (max-width: "+d+c+")";break;case"gt":s="screen and (min-width: "+(d+1)+c+")";break;case"lt":s="screen and (max-width: -1px)";break;case"not":s="screen and (min-width: "+(d+1)+c+")";break;default:s="screen and (max-width: "+d+c+")"}else if(isNaN(d))switch(a){case"gte":s="screen and (min-width: "+r+c+")";break;case"lte":s="screen";break;case"gt":s="screen and (max-width: -1px)";break;case"lt":s="screen and (max-width: "+(r-1)+c+")";break;case"not":s="screen and (max-width: "+(r-1)+c+")";break;default:s="screen and (min-width: "+r+c+")"}else switch(a){case"gte":s="screen and (min-width: "+r+c+")";break;case"lte":s="screen and (max-width: "+d+c+")";break;case"gt":s="screen and (min-width: "+(d+1)+c+")";break;case"lt":s="screen and (max-width: "+(r-1)+c+")";break;case"not":s="screen and (max-width: "+(r-1)+c+"), screen and (min-width: "+(d+1)+c+")";break;default:s="screen and (min-width: "+r+c+") and (max-width: "+d+c+")"}}else s="("==i.charAt(0)?"screen and "+i:i;t.media[e]=!!s&&s}return t.media[e]!==!1&&window.matchMedia(t.media[e]).matches},on:function(e,n){t.events.push({query:e,handler:n,state:!1}),t.active(e)&&n()},poll:function(){var e,n;for(e=0;e49?function(){o(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(a){return}a=true;t=r-(f.now()-i);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ie=function(e){var t,a;var i=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-a;if(e0;if(r&&Z(i,"overflow")!="visible"){a=i.getBoundingClientRect();r=C>a.left&&pa.top-1&&g500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w2&&h>2&&!D.hidden){w=f;N=0}else if(h>1&&N>1&&M<6){w=u}else{w=_}}if(l!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;l=n}a=d[t].getBoundingClientRect();if((b=a.bottom)>=s&&(g=a.top)<=z&&(C=a.right)>=s*c&&(p=a.left)<=y&&(b||C||p||g)&&(H.loadHidden||x(d[t]))&&(m&&M<3&&!o&&(h<3||N<4)||W(d[t],n))){R(d[t]);r=true;if(M>9){break}}else if(!r&&m&&!i&&M<4&&N<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!o&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){i=v[0]||d[t]}}if(i&&!r){R(i)}}};var a=ae(t);var S=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}L(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,B);X(t,"lazyloaded")};var i=te(S);var B=function(e){i({target:e.target})};var T=function(e,t){var a=e.getAttribute("data-load-mode")||H.iframeLoadMode;if(a==0){e.contentWindow.location.replace(t)}else if(a==1){e.src=t}};var F=function(e){var t;var a=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(a){e.setAttribute("srcset",a)}};var s=te(function(t,e,a,i,r){var n,s,o,l,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(i){if(a){K(t,H.autosizesClass)}else{t.setAttribute("sizes",i)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){o=t.parentNode;l=o&&j.test(o.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||l);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(L,2500);V(t,B,true)}if(l){G.call(o.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!l){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||l)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,H.fastLoadedClass)}S(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){M--}},true)});var R=function(e){if(e._lazyRace){return}var t;var a=n.test(e.nodeName);var i=a&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=i=="auto";if((r||!m)&&a&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;M++;s(e,t,r,i,a)};var r=ie(function(){H.loadMode=3;a()});var o=function(){if(H.loadMode==3){H.loadMode=2}r()};var l=function(){if(m){return}if(f.now()-e<999){I(l,999);return}m=true;H.loadMode=3;a();q("scroll",o,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",a,true);q("resize",a,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(a).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",a,true);O[P]("DOMAttrModified",a,true);setInterval(a,999)}q("hashchange",a,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,a,true)});if(/d$|^c/.test(D.readyState)){l()}else{q("load",l);D[P]("DOMContentLoaded",a);I(l,2e4)}if(k.elements.length){t();ee._lsFlush()}else{a()}},checkElems:a,unveil:R,_aLSL:o}}(),re=function(){var a;var n=te(function(e,t,a,i){var r,n,s;e._lazysizesWidth=i;i+="px";e.setAttribute("sizes",i);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n 2 | 4 | 5 |
    6 | 7 |
    8 | 9 |
    10 |
    11 |
  • 12 |

    分类 Categories.

    13 |
      14 |
    • 15 | 16 |
    • 17 |
    18 |
  • 19 |
    20 |
    21 | 22 |
    23 |
    24 |
    25 |
    26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /templates/category.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 |
    6 | 7 |
    8 | 9 |
    10 |
    11 |
  • 12 |

    分类 Categories.

    13 |
      14 |
    • 15 | 16 |
    • 17 |
    18 |
  • 19 |
    20 |
      21 |
    • 22 |
      23 | 24 | 27 | 28 |
      29 |
      30 |

      31 | [[${' 32 | '+#dates.format(post.spec.publishTime,'yyyy年MM月dd日')}]] 33 |
      34 |
    • 35 |
    36 | 39 | 41 |
    42 |
    43 | 44 |
    45 |
    46 |
    47 |
    48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /templates/douban.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 |
    10 | 11 |
    12 | 13 |
    14 |
    15 |

    豆瓣 Douban.

    16 |
    17 |
    18 | 23 |
    24 |
    25 |
    想看
    26 |
    在看
    27 |
    看过
    28 |
    29 |
    30 | 31 |
    32 |
    33 |
    34 |
    35 |
    36 |
    37 |
    38 |
    39 | 40 |
    41 |
    42 |
    43 | 44 |
    45 | 46 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 |
    6 | 7 |
    8 | 9 |
    10 |
    11 |

    首页 Home.

    12 | 13 | 14 | 15 | 16 |
    17 |
    18 | 23 |
    24 | 25 | 26 |
    27 |
    28 | 29 |
    30 |
    31 |
    32 | 33 |
    34 | 35 | -------------------------------------------------------------------------------- /templates/links.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /templates/modules/aside.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/modules/foot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /templates/modules/footer.html: -------------------------------------------------------------------------------- 1 |
    2 | 16 |
    -------------------------------------------------------------------------------- /templates/modules/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /templates/modules/header.html: -------------------------------------------------------------------------------- 1 |
    2 | 5 | 23 |
    -------------------------------------------------------------------------------- /templates/modules/inc/ajax/ajax-cate-tpl.html: -------------------------------------------------------------------------------- 1 | 175 | 176 | 258 | 259 | -------------------------------------------------------------------------------- /templates/modules/inc/ajax/ajax-cate.html: -------------------------------------------------------------------------------- 1 | 200 | 201 | 271 | 272 | -------------------------------------------------------------------------------- /templates/modules/inc/ajax/ajax-home.html: -------------------------------------------------------------------------------- 1 | 4 |
    好像就这么多 5 |
    6 | 7 | 42 | 43 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /templates/modules/inc/ajax/ajax-note-page.html: -------------------------------------------------------------------------------- 1 | 4 | 6 | 7 | 42 | 43 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /templates/modules/inc/ajax/ajax-tag-tpl.html: -------------------------------------------------------------------------------- 1 | 175 | 176 | 254 | 255 | -------------------------------------------------------------------------------- /templates/modules/inc/ajax/ajax-tag.html: -------------------------------------------------------------------------------- 1 | 201 | 202 | 268 | 269 | -------------------------------------------------------------------------------- /templates/modules/inc/aside-comments.html: -------------------------------------------------------------------------------- 1 | 3 |
      4 | 5 |
    • 8 |
      9 |
      10 | 13 |
      14 |
      15 |
      16 | [[${comment.owner.displayName}]] 17 |
      18 |
      [[${#dates.format(comment.metadata.creationTimestamp, 20 | 'yyyy年MM月dd日')}]]
      21 |
      22 |
      23 |
      24 | 25 |
      26 |
    • 27 |
      28 |
    29 | 30 |

    暂无评论

    31 |
    32 |
    -------------------------------------------------------------------------------- /templates/modules/inc/aside-sub-page.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | 5 |
    6 |
    7 |
    8 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |
    15 |
    返回
    16 |
    17 | 18 | 55 | 58 | 59 | 60 |
    61 |

    评论 Comments.

    62 | 63 |
    64 |
    65 | 66 |
    67 |

    关于 About.

    68 |

    69 |
    70 |
    71 | 72 |
    -------------------------------------------------------------------------------- /templates/modules/inc/halo-comment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 |
    5 |

    参与讨论

    6 |

    (Participate in the discussion)

    7 |
    8 |
    9 |

    参与讨论

    10 | 11 |
    12 |
    13 |
    -------------------------------------------------------------------------------- /templates/modules/inc/home-new.html: -------------------------------------------------------------------------------- 1 |
    2 | 38 | 39 |
    -------------------------------------------------------------------------------- /templates/modules/inc/home-recommend-regular.html: -------------------------------------------------------------------------------- 1 | 4 | 59 | 106 |
    107 |
    108 | 109 |
    110 | 111 | 113 | 116 | 117 |

    118 | 119 |

    120 |

    121 |
    122 |
    123 |
    124 |
    125 |
    126 | 127 |
    -------------------------------------------------------------------------------- /templates/modules/inc/home-recommend-swiper.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 57 | 67 | 68 | 69 | 70 | 71 | 118 | 124 | 125 | 126 | 147 | 162 | 163 | 164 | 183 | 184 | 185 | 186 | 187 | 188 |
    189 |
    190 |
    191 | 192 | 201 | 202 |
    203 |
    204 |
    205 |
    206 |
    207 | 208 | 231 |
    232 | 233 | 234 |
    -------------------------------------------------------------------------------- /templates/modules/inc/home-sticky.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chengzhongxue/halo-theme-iemo/39b8d2d98f0f3914983c0a301eb82f061d9bd92b/templates/modules/inc/home-sticky.html -------------------------------------------------------------------------------- /templates/modules/inc/nav.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/modules/inc/single-color.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /templates/modules/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /templates/modules/variables/configs.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/moment.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 |
    10 | 11 |
    12 | 13 |
    14 |
    15 |
    16 |
    17 | 20 | 22 |
    23 |
    24 | 参与讨论 26 |
    27 | 38 |
    39 |
    40 | 41 |
    42 | 43 |
    44 | 45 |
    46 | 48 | 51 |
    52 |
    53 |
    54 |
    55 |
    56 |
    57 | 59 | 60 |
    61 | 62 |
    63 |
    64 |
    65 |
    66 | 67 | 68 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /templates/moments.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 |
    10 | 11 | 14 |
    15 | 16 |
    17 |
    18 |

    说说 Moments.

    19 |
    20 |
      21 |
    • 22 | 全部 23 |
    • 24 |
    • 25 | 28 |
    • 29 |
    30 |
    31 |
    32 |
      33 |
    • 34 |
      35 |
      36 | 37 |
      38 |
      39 |
      40 |
      42 |
      43 |
      44 |
      45 |
      46 |
      47 | 48 | 49 |
      50 | 51 |
      52 | 54 | 57 |
      58 |
      59 |
      60 |
      61 |
      62 |
      63 | 查看原文 65 |
      66 |
    • 67 |
    68 |
    69 | 70 |
    71 | 72 |
    73 |
    74 |
    75 | 76 |
    77 | 78 | 79 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /templates/page.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 |
    10 | 11 |
    12 | 13 |
    14 |
    15 |
    16 |
    17 | 18 | 19 | 20 | 21 | 39 | 40 | 41 | 42 | 43 | 44 |
    45 |
    46 | 参与讨论 47 |
    48 | 59 |
    60 |
    61 | 62 | 67 |
    68 | 69 |
    70 | 71 |
    72 |
    73 |
    74 |
    75 | 76 | 77 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /templates/page_links.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 13 | 50 | 51 | 52 | 53 | 54 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /templates/photos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 |
    17 | 18 | 21 |
    22 | 28 |
    29 | 30 |
    31 | 35 |
    36 |
    37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /templates/post.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 |
    10 | 11 |
    12 | 13 |
    14 |
    15 |
    16 |
    18 | 19 | 20 | 21 | 22 | 40 | 41 | 42 | 43 | 44 | 45 |
    46 |
    47 | 48 | 49 | 50 | 51 | 参与讨论 52 |
    53 | 72 |
    73 |
    74 | 75 | 80 |
    81 | 83 | 84 |
    85 | 86 |
    87 |
    88 |
    89 |
    90 | 91 | 92 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /templates/tag.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 |
    6 | 7 |
    8 | 9 |
    10 |
    11 |

    标签 Tags.

    12 |
    13 |
      14 |
    • 15 | 16 |
    • 17 |
    18 |
    19 |
    20 |
      21 |
    • 22 |
      23 | 24 | 26 | 27 |
      28 |
      29 |

      30 | [[${' '+#dates.format(post.spec.publishTime,'yyyy年MM月dd日')}]] 31 |
      32 |
    • 33 |
    34 | 37 | 38 |
    39 |
    40 | 41 |
    42 |
    43 |
    44 |
    45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /templates/tags.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 |
    6 | 7 |
    8 | 9 |
    10 |
    11 |

    标签 Tags.

    12 |
    13 |
      14 |
    • 15 | 16 |
    • 17 |
    18 |
    19 |
    20 |
    21 | 22 |
    23 |
    24 |
    25 |
    26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /theme.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: theme.halo.run/v1alpha1 2 | kind: Theme 3 | metadata: 4 | name: theme-iemo 5 | annotations: 6 | "store.halo.run/app-id": "app-ufBcY" 7 | spec: 8 | displayName: iEmo 9 | author: 10 | name: 困困鱼 11 | website: "https://github.com/chengzhongxue" 12 | customTemplates: 13 | page: 14 | - name: 友情链接页面模版 15 | description: 支持可预设文本的友链 16 | screenshot: 17 | file: page_links.html 18 | description: 简约感设计Halo主题 19 | logo: "/themes/theme-iemo/assets/images/logo.png" 20 | homepage: "https://www.halo.run/store/apps/app-ufBcY" 21 | repo: "https://github.com/chengzhongxue/halo-theme-iemo" 22 | issues: "https://github.com/chengzhongxue/halo-theme-iemo/issues" 23 | settingName: "theme-iemo-setting" 24 | configMapName: "theme-iemo-configMap" 25 | version: "1.0.5" 26 | requires: ">=2.20.0" 27 | license: 28 | - name: "MIT License" 29 | url: "https://github.com/chengzhongxue/halo-theme-iemo/blob/main/LICENSE" 30 | --------------------------------------------------------------------------------