├── .gitignore ├── LICENSE ├── README.md ├── _config.yml ├── gulpfile.js ├── package-lock.json ├── package.json ├── scaffolds ├── draft.md ├── page.md └── post.md ├── source ├── 404.md ├── AV │ └── index.md ├── _data │ ├── friends.json │ ├── galleries.json │ └── musics.json ├── _posts │ └── Blog-Open-Source.md ├── about │ └── index.md ├── archives │ └── index.md ├── categories │ └── index.md ├── contact │ └── index.md ├── friends │ └── index.md ├── galleries │ ├── index.md │ ├── 背景图片3 │ │ └── index.md │ └── 背景图片4 │ │ └── index.md └── tags │ └── index.md └── themes └── matery ├── .gitignore ├── LICENSE ├── _config.yml ├── languages ├── default.yml └── zh-CN.yml ├── layout ├── 404.ejs ├── _partial │ ├── back-top.ejs │ ├── bg-cover-content.ejs │ ├── bg-cover.ejs │ ├── disqus.ejs │ ├── footer.ejs │ ├── gitalk.ejs │ ├── github-link.ejs │ ├── gitment.ejs │ ├── google-analytics.ejs │ ├── head.ejs │ ├── header.ejs │ ├── index-cover.ejs │ ├── livere.ejs │ ├── mobile-nav.ejs │ ├── navigation.ejs │ ├── paging.ejs │ ├── post-cover.ejs │ ├── post-detail-toc.ejs │ ├── post-detail.ejs │ ├── post-statis.ejs │ ├── prev-next.ejs │ ├── reprint-statement.ejs │ ├── reward.ejs │ ├── search.ejs │ ├── share.ejs │ ├── social-link.ejs │ └── valine.ejs ├── _widget │ ├── category-cloud.ejs │ ├── category-radar.ejs │ ├── dream.ejs │ ├── music.ejs │ ├── my-gallery.ejs │ ├── my-projects.ejs │ ├── my-skills.ejs │ ├── post-calendar.ejs │ ├── post-charts.ejs │ ├── recommend.ejs │ ├── tag-cloud.ejs │ ├── tag-wordcloud.ejs │ └── video.ejs ├── about.ejs ├── archive.ejs ├── av.ejs ├── categories.ejs ├── category.ejs ├── contact.ejs ├── friends.ejs ├── galleries.ejs ├── gallery.ejs ├── index.ejs ├── layout.ejs ├── post.ejs ├── tag.ejs └── tags.ejs └── source ├── css ├── gallery.css ├── gitment.css ├── matery.css ├── my-gitalk.css └── my.css ├── favicon.png ├── js ├── fireworks.js ├── matery.js ├── sakura.js ├── search.js ├── wenzi.js └── xuehuapiaoluo.js ├── libs ├── animate │ └── animate.min.css ├── aos │ ├── aos.css │ └── aos.js ├── aplayer │ ├── APlayer.min.css │ └── APlayer.min.js ├── awesome │ ├── css │ │ └── font-awesome.min.css │ └── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 ├── background │ ├── canvas-nest.js │ ├── ribbon-dynamic.js │ └── ribbon.min.js ├── cryptojs │ └── crypto-js.min.js ├── dplayer │ ├── DPlayer.min.css │ └── DPlayer.min.js ├── echarts │ └── echarts.min.js ├── gitalk │ ├── gitalk.css │ └── gitalk.min.js ├── gitment │ ├── gitment-default.css │ └── gitment.js ├── jqcloud │ ├── jqcloud-1.0.4.min.js │ └── jqcloud.css ├── jquery │ └── jquery-2.2.0.min.js ├── lightGallery │ ├── css │ │ └── lightgallery.min.css │ ├── fonts │ │ ├── lg.eot │ │ ├── lg.svg │ │ ├── lg.ttf │ │ └── lg.woff │ ├── img │ │ ├── loading.gif │ │ ├── video-play.png │ │ ├── vimeo-play.png │ │ └── youtube-play.png │ └── js │ │ └── lightgallery-all.min.js ├── masonry │ └── masonry.pkgd.min.js ├── materialize │ ├── materialize.min.css │ └── materialize.min.js ├── others │ ├── busuanzi.pure.mini.js │ └── clicklove.js ├── scrollprogress │ └── scrollProgress.min.js ├── share │ ├── css │ │ └── share.min.css │ ├── fonts │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ └── js │ │ ├── jquery.share.min.js │ │ └── social-share.min.js ├── tocbot │ ├── tocbot.css │ └── tocbot.min.js └── valine │ ├── Valine.min.js │ └── av-min.js └── medias ├── avatars ├── hwsun.jpg └── ivipc.png ├── banner ├── 0.jpg ├── 1.jpg ├── 10.jpg ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── 6.jpg ├── 7.jpg ├── 8.jpg └── 9.jpg ├── comment_bg.png ├── featureimages ├── 0.jpg ├── 1.jpg ├── 10.jpg ├── 11.jpg ├── 12.jpg ├── 13.jpg ├── 14.jpg ├── 15.jpg ├── 16.jpg ├── 17.jpg ├── 18.jpg ├── 19.jpg ├── 2.jpg ├── 20.jpg ├── 21.jpg ├── 22.jpg ├── 23.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── 6.jpg ├── 7.jpg ├── 8.jpg └── 9.jpg ├── logo.png ├── music └── daoshu.mp3 └── reward ├── alipay.bmp ├── wechat.bmp └── zan.png /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Thumbs.db 3 | db.json 4 | *.log 5 | public/ 6 | .deploy*/ 7 | .vscode/ 8 | node_modules/ 9 | .idea/ 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # shw2018.github.io 2 | 3 |

Blog logo

4 | 5 |

6 | Build Status 7 | GitHub forks 8 | GitHub stars 9 |
10 | 11 | > **This is my [personal blog](https://shw2018.github.io/) repository. https://sunhwee.com** 12 | > **Now,it is open for everyone to download and modify. If it can help you to build your blog or you like the repo, could you give me a star ! Thank you!** 13 | 14 | 倒腾了一两周总算把个人博客网站完善了,目前这个版本使用应该是够了,当然还有一些优化项和功能增加后续在慢慢更新,为了回馈开源,今天准备把我自己修改完善的`blog`网站源代码开源。这不是生成后的网页文件,是您可以直接使用的源码,您只需要把博客相关信息换成您自己的就可以部署了,对于新手或者不懂编程的小伙伴来说,简直是福音,极大简化了您构建博客的工作量和复杂度,每个人都可以下载并修改成自己喜欢样式!如果你有修改想法,欢迎PR!最后,我们还是给这个开源小项目取个名字吧,不知道取啥,就叫[hexo-blog-fly](https://github.com/shw2018/hexo-blog-fly.git)吧,怎么样?<<<<<[源代码下载](https://github.com/shw2018/hexo-blog-fly)>>>>> 15 | 16 | **博客基于`Hexo`框架搭建,用到[hexo-theme-matery](https://github.com/shw2018/hexo-theme-matery)主题,并在此基础之上做了很多修改,修复了一些bug,增加了一些新的特性和功能,博客地址:[https://shw2018.github.io](https://shw2018.github.io/),博客演示:[sunhwee.com](https://sunhwee.com/)。** 17 | 18 | **简单使用方法**: 19 | 1. `star` 本项目 20 | 2. 安装[Git](https://git-scm.com/downloads), 安装[nodeJS](https://nodejs.org/en/) 21 | 3. 你可以直接`fork`一份源码到你的仓库,`clone`到本地 22 | 4. 在本地博客仓库运行`npm i`命令安装依赖包 23 | 5. 修改配置信息,改成自己的信息 24 | 6. 运行命令`hexo clean`(清除生成文件),`hexo g`(生成网页), `hexo s`(本地预览),`hexo d`(部署) 25 | 26 | ## 特性 27 | 28 | **原主题特性**: 29 | 30 | - 简单漂亮,文章内容美观易读 31 | - [Material Design](https://material.io/) 设计 32 | - 响应式设计,博客在桌面端、平板、手机等设备上均能很好的展现 33 | - 首页轮播文章及每天动态切换 `Banner` 图片 34 | - 瀑布流式的博客文章列表(文章无特色图片时会有 `24` 张漂亮的图片代替) 35 | - 时间轴式的归档页 36 | - **词云**的标签页和**雷达图**的分类页 37 | - 丰富的关于我页面(包括关于我、文章统计图、我的项目、我的技能、相册等) 38 | - 可自定义的数据的友情链接页面 39 | - 支持文章置顶和文章打赏 40 | - 支持 `MathJax` 41 | - `TOC` 目录 42 | - 可设置复制文章内容时追加版权信息 43 | - 可设置阅读文章时做密码验证 44 | - [Gitalk](https://gitalk.github.io/)、[Gitment](https://imsun.github.io/gitment/)、[Valine](https://valine.js.org/) 和 [Disqus](https://disqus.com/) 评论模块(推荐使用 `Gitalk`) 45 | - 集成了[不蒜子统计](http://busuanzi.ibruce.info/)、谷歌分析(`Google Analytics`)和文章字数统计等功能 46 | - 支持在首页的音乐播放和视频播放功能 47 | 48 | **增加的工作或特性(未打钩的是已做但还没更新到源码的)**: 49 | 50 | - [x] 修改了原主题的一些很多`bug` 2019.08.05 51 | - [x] 加入图片懒加载功能,在根目录配置文件开启和关闭 2019.08.09 52 | - [x] 增加`留言板`功能 2019.08.05 53 | - [x] 在关于板块,加入`简历`功能页 2019.08.05 54 | - [x] 增加视听[视觉听觉影音]板块 2019.08.10 55 | - [x] 支持`emoji`表情,用`markdown emoji`语法书写直接生成对应的能**跳跃**的表情。 2019.08.10 56 | - [x] 增加网站运行时间显示 2019.08.10 57 | - [x] 增加`动漫模型` 2019.08.10 58 | - [x] 整体替换Banner图片和文章特色图片 2019.08.10 59 | - [x] 增加分类`相册`功能 2019.08.29 60 | - [ ] 加入`AES`加密方法,强效加密`文章内容`和`相册集` 2019.08.30 61 | - [ ] 去掉标签页,将其合并至`分类`页中 2019.09.01 62 | - [ ] 加入实用的快捷导航栏 2019.09.01 63 | - [x] 修改了一些控件的参数 2019.09.01 64 | - [x] 修改部分样式,比如: 文章卡片,固定高度,使其不至于因为文章摘要的长短不同导致卡片大小不一使页面布局很不美观,类似的还有友链卡片,优化了页面内容布局,视觉更整齐美观 2019.09.01 65 | - [x] 解决首页文章列表卡片上方 `border-radius`圆角失效的bug 2019.09.01 66 | - [x] 添加页面樱花飘落动效 2019.09.09 67 | - [x] 添加鼠标点击烟花爆炸动效 2019.09.09 68 | - [x] 加入天气接口控件 2019.09.09 69 | - [x] 加入鼠标点击文字特效 2019.09.10 70 | - [x] 添加页面雪花飘落动效 2019.09.10 71 | - [x] 添加在线聊天插件 2019.09.12 72 | - [x] 调整线聊天插件参数,使之能够随着鼠标滑动位置自适应调整 2019.09.15 73 | - [ ] 持续更新... 74 | 75 | >**更多详情教程,强烈推荐看我写的:[Hexo+Github博客搭建完全教程](https://sunhwee.com/posts/6e8839eb.html)** 76 | 77 | >**最后,如果项目和教程对你有所帮助或者你看见了还算比较喜欢,欢迎给我`star`,谢谢您!** 78 | 79 | 有什么问题可以在文章最后评论区**留言和讨论**,当然,欢迎点击文章最后的打赏按键,请博主一杯冰阔乐,笑~ 80 |

81 | 82 | 83 |

84 | 85 | 86 | ## License 87 | 88 | [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0) 89 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # shw2018 洪卫 modify 2019.08.01 2 | # Hexo Configuration 3 | ## Docs: https://hexo.io/docs/configuration.html 4 | ## Source: https://github.com/hexojs/hexo/ 5 | 6 | # Site 7 | title: 洪卫的博客 8 | subtitle: 洪卫的博客 9 | description: 电子科技大学 | 电子与通信工程 | 计算机视觉 10 | keywords: UESTC CV DeepLearning MachineLearning 洪卫 sunhw Hongwei 计算机视觉 深度学习 11 | author: 洪卫 12 | language: zh-CN 13 | timezone: 14 | 15 | # URL 16 | ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' 17 | # url: https://shw2018.github.io/ 18 | url: https://sunhwee.com 19 | root: / 20 | permalink: :year/:month/:day/:title/ 21 | permalink_defaults: 22 | 23 | # Directory 24 | source_dir: source 25 | public_dir: public 26 | tag_dir: tags 27 | archive_dir: archives 28 | category_dir: categories 29 | code_dir: downloads/code 30 | i18n_dir: :lang 31 | skip_render: 32 | 33 | # Writing 34 | new_post_name: :title.md # File name of new posts 35 | default_layout: post 36 | titlecase: false # Transform title into titlecase 37 | external_link: true # Open external links in new tab 38 | filename_case: 0 39 | render_drafts: false 40 | post_asset_folder: true 41 | relative_link: false 42 | future: true 43 | highlight: 44 | enable: false 45 | line_number: false 46 | auto_detect: false 47 | tab_replace: 48 | 49 | prism_plugin: 50 | mode: 'preprocess' # realtime/preprocess 51 | theme: 'tomorrow' 52 | line_number: true # default false 53 | custom_css: 54 | 55 | search: 56 | path: search.xml 57 | field: post 58 | 59 | permalink_pinyin: 60 | enable: true 61 | separator: '-' # default: '-' 62 | 63 | feed: 64 | type: atom 65 | path: atom.xml 66 | limit: 20 67 | hub: 68 | content: 69 | content_limit: 140 70 | content_limit_delim: ' ' 71 | order_by: -date 72 | 73 | Plugins: 74 | - hexo-generator-baidu-sitemap 75 | - hexo-generator-sitemap 76 | 77 | baidusitemap: 78 | path: baidusitemap.xml 79 | sitemap: 80 | path: sitemap.xml 81 | 82 | # Home page setting 83 | # path: Root path for your blogs index page. (default = '') 84 | # per_page: Posts displayed per page. (0 = disable pagination) 85 | # order_by: Posts order. (Order by date descending by default) 86 | index_generator: 87 | path: '' 88 | per_page: 12 89 | order_by: -date 90 | 91 | # Category & Tag 92 | default_category: uncategorized 93 | category_map: 94 | tag_map: 95 | 96 | # Date / Time format 97 | ## Hexo uses Moment.js to parse and display date 98 | ## You can customize the date format as defined in 99 | ## http://momentjs.com/docs/#/displaying/format/ 100 | date_format: YYYY-MM-DD 101 | time_format: HH:mm:ss 102 | 103 | # Pagination 104 | ## Set per_page to 0 to disable pagination 105 | per_page: 12 106 | pagination_dir: page 107 | 108 | # Extensions 109 | ## Plugins: https://hexo.io/plugins/ 110 | ## Themes: https://hexo.io/themes/ 111 | theme: matery 112 | 113 | # Deployment 114 | ## Docs: https://hexo.io/docs/deployment.html 115 | deploy: 116 | - type: git 117 | repo: 118 | github: https://github.com/shw2018/shw2018.github.io.git 119 | # coding: https://git.coding.net/hwsun/hwsun.git 120 | # gitee: https://gitee.com/hwsun/hwsun.git 121 | branch: master 122 | - type: baidu_url_submitter 123 | 124 | # baidu submit 125 | baidu_url_submit: 126 | count: 80 # 提交最新的一个链接 127 | host: sunhwee.com # 在百度站长平台中注册的域名 128 | token: XXXXXXXXXXXXXXX # 请注意这是您的秘钥, 所以请不要把博客源代码发布在公众仓库里! 129 | path: baidu_urls.txt # 文本文档的地址, 新链接会保存在此文本文档里 130 | 131 | 132 | 133 | live2d: 134 | enable: true 135 | scriptFrom: local 136 | pluginRootPath: live2dw/ 137 | pluginJsPath: lib/ 138 | pluginModelPath: assets/ 139 | tagMode: false 140 | log: false 141 | # model: 142 | # use: live2d-widget-model-shizuku 143 | model: 144 | use: live2d-widget-model-wanko 145 | display: 146 | position: left 147 | width: 150 148 | height: 200 149 | mobile: 150 | show: false 151 | react: 152 | opacity: 0.7 153 | 154 | githubEmojis: 155 | enable: true 156 | className: github-emoji 157 | inject: true 158 | styles: 159 | # font-size: 5em 160 | # font-weight: bold 161 | customEmojis: 162 | 163 | # marked: 164 | # gfm: true 165 | # pedantic: false 166 | # breaks: true 167 | # smartLists: true 168 | # smartypants: true 169 | # modifyAnchors: '' 170 | # autolink: true 171 | # sanitizeUrl: false 172 | # headerIds: true 173 | 174 | # lazyload configuration 2019.08.14 175 | lazyload: 176 | enable: true 177 | onlypost: true 178 | loadingImg: https://cdn.jsdelivr.net/gh/shw2018/cdn@1.0/sakura/img/loader/orange.progress-bar-stripe-loader.svg # eg ./images/loading.gif -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | // shw2018 洪卫 add 2019.08.15 2 | var gulp = require("gulp"); 3 | var debug = require("gulp-debug"); 4 | var cleancss = require("gulp-clean-css"); //css压缩组件 5 | var uglify = require("gulp-uglify"); //js压缩组件 6 | var htmlmin = require("gulp-htmlmin"); //html压缩组件 7 | var htmlclean = require("gulp-htmlclean"); //html清理组件 8 | var imagemin = require("gulp-imagemin"); //图片压缩组件 9 | var changed = require("gulp-changed"); //文件更改校验组件 10 | var gulpif = require("gulp-if"); //任务 帮助调用组件 11 | var plumber = require("gulp-plumber"); //容错组件(发生错误不跳出任务,并报出错误内容) 12 | var isScriptAll = true; //是否处理所有文件,(true|处理所有文件)(false|只处理有更改的文件) 13 | var isDebug = true; //是否调试显示 编译通过的文件 14 | var gulpBabel = require("gulp-babel"); 15 | var es2015Preset = require("babel-preset-es2015"); 16 | var del = require("del"); 17 | var Hexo = require("hexo"); 18 | var hexo = new Hexo(process.cwd(), {}); // 初始化一个hexo对象 19 | 20 | // 清除public文件夹 21 | gulp.task("clean", function() { 22 | return del(["public/**/*"]); 23 | }); 24 | 25 | // 下面几个跟hexo有关的操作,主要通过hexo.call()去执行,注意return 26 | // 创建静态页面 (等同 hexo generate) 27 | gulp.task("generate", function() { 28 | return hexo.init().then(function() { 29 | return hexo 30 | .call("generate", { 31 | watch: false 32 | }) 33 | .then(function() { 34 | return hexo.exit(); 35 | }) 36 | .catch(function(err) { 37 | return hexo.exit(err); 38 | }); 39 | }); 40 | }); 41 | 42 | // 启动Hexo服务器 43 | gulp.task("server", function() { 44 | return hexo 45 | .init() 46 | .then(function() { 47 | return hexo.call("server", {}); 48 | }) 49 | .catch(function(err) { 50 | console.log(err); 51 | }); 52 | }); 53 | 54 | // 部署到服务器 55 | gulp.task("deploy", function() { 56 | return hexo.init().then(function() { 57 | return hexo 58 | .call("deploy", { 59 | watch: false 60 | }) 61 | .then(function() { 62 | return hexo.exit(); 63 | }) 64 | .catch(function(err) { 65 | return hexo.exit(err); 66 | }); 67 | }); 68 | }); 69 | 70 | // 压缩public目录下的js文件 71 | gulp.task("compressJs", function() { 72 | return gulp 73 | .src(["./public/**/*.js", "!./public/libs/**"]) //排除的js 74 | .pipe(gulpif(!isScriptAll, changed("./public"))) 75 | .pipe(gulpif(isDebug, debug({ title: "Compress JS:" }))) 76 | .pipe(plumber()) 77 | .pipe( 78 | gulpBabel({ 79 | presets: [es2015Preset] // es5检查机制 80 | }) 81 | ) 82 | .pipe(uglify()) //调用压缩组件方法uglify(),对合并的文件进行压缩 83 | .pipe(gulp.dest("./public")); //输出到目标目录 84 | }); 85 | 86 | // 压缩public目录下的css文件 87 | gulp.task("compressCss", function() { 88 | var option = { 89 | rebase: false, 90 | //advanced: true, //类型:Boolean 默认:true [是否开启高级优化(合并选择器等)] 91 | compatibility: "ie7" //保留ie7及以下兼容写法 类型:String 默认:''or'*' [启用兼容模式; 'ie7':IE7兼容模式,'ie8':IE8兼容模式,'*':IE9+兼容模式] 92 | //keepBreaks: true, //类型:Boolean 默认:false [是否保留换行] 93 | //keepSpecialComments: '*' //保留所有特殊前缀 当你用autoprefixer生成的浏览器前缀,如果不加这个参数,有可能将会删除你的部分前缀 94 | }; 95 | return gulp 96 | .src(["./public/**/*.css", "!./public/**/*.min.css"]) //排除的css 97 | .pipe(gulpif(!isScriptAll, changed("./public"))) 98 | .pipe(gulpif(isDebug, debug({ title: "Compress CSS:" }))) 99 | .pipe(plumber()) 100 | .pipe(cleancss(option)) 101 | .pipe(gulp.dest("./public")); 102 | }); 103 | 104 | // 压缩public目录下的html文件 105 | gulp.task("compressHtml", function() { 106 | var cleanOptions = { 107 | protect: /<\!--%fooTemplate\b.*?%-->/g, //忽略处理 108 | unprotect: / -------------------------------------------------------------------------------- /themes/matery/layout/_partial/back-top.ejs: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 |
7 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/bg-cover-content.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 10 | <% if (is_archive()) { %> 11 | <%= __('archives') %> 12 | <% } else if (is_category()) { %> 13 | <%= __('categories') %> 14 | <% } else if (is_tag()) { %> 15 | <%= __('tag') %> 16 | <% } else if (page.title && page.title.length > 0) { %> 17 | <%= __(page.title) %> 18 | <% } else { %> 19 | <%= config.subtitle%> 20 | <% } %> 21 |
22 | 23 |
24 | <% if (config.description && config.description.length > 0) { %> 25 | 26 | <%- '正在加载今日诗词...' %> 27 | <% } else { %> 28 | This is your root _config.yml 'description' value. 29 | <% } %> 30 |
31 | 32 | 33 |
34 |
35 |
36 | 40 | 41 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/bg-cover.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%- partial('_partial/bg-cover-content') %> 4 |
5 |
-------------------------------------------------------------------------------- /themes/matery/layout/_partial/disqus.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 6 |
7 |
8 | 9 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/footer.ejs: -------------------------------------------------------------------------------- 1 | 39 | 40 |
41 | 42 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/gitalk.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 |
7 | 8 | 9 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/github-link.ejs: -------------------------------------------------------------------------------- 1 | 45 | 46 | 48 | 55 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/gitment.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 |
7 | 8 | 9 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/google-analytics.ejs: -------------------------------------------------------------------------------- 1 | 2 | <% if (theme.googleAnalytics.enable) { %> 3 | 4 | 13 | <% } %> 14 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/head.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | var title = page.title; 5 | 6 | // tags, categories, about pages title 7 | if (title == 'tags') { 8 | title = __('tags'); 9 | } else if (title == 'categories') { 10 | title = __('categories'); 11 | } else if (title == 'about') { 12 | title = __('about'); 13 | } else if (title == 'friends') { 14 | title = __('friends'); 15 | } else if (title == 'contact') { 16 | title = __('contact'); 17 | } 18 | 19 | // archives, category, tag pages title 20 | if (is_archive()) { 21 | title = __('archives'); 22 | if (is_month()) { 23 | title += ': ' + page.year + '/' + page.month; 24 | } else if (is_year()) { 25 | title += ': ' + page.year; 26 | } 27 | } else if (is_category()) { 28 | title = __('category') + ': ' + page.category; 29 | } else if (is_tag()) { 30 | title = __('tag') + ': ' + page.tag; 31 | } 32 | 33 | // final page title. 34 | var pageTitle = title ? title + ' | ' + config.title : config.title; 35 | 36 | // keywords. 37 | var keyWords = config.keywords ? config.keywords : config.title; 38 | keyWords = title ? title + ', ' + keyWords : keyWords; 39 | 40 | // description. 41 | var description = null; 42 | if (page.hasOwnProperty('__post') && page.__post) { 43 | description = strip_html(page.content).substring(0, 120); 44 | } 45 | description = description ? description : pageTitle; 46 | 47 | let iconType = 'image/png' 48 | let faviconExt = theme.favicon.substr(theme.favicon.lastIndexOf('.') + 1, theme.favicon.length) 49 | if (faviconExt === 'png') { 50 | iconType = 'image/png' 51 | } else if (faviconExt === 'svg') { 52 | iconType = 'image/svg+xml' 53 | } else if (faviconExt === 'gif') { 54 | iconType = 'image/gif' 55 | } else if (faviconExt === 'jpeg') { 56 | iconType = 'image/jpeg' 57 | } else if (faviconExt === 'jpg') { 58 | iconType = 'image/jpeg' 59 | } else if (faviconExt === 'ico') { 60 | iconType = 'image/x-icon, image/vnd.microsoft.icon' 61 | } else { 62 | // more definitions 63 | } 64 | %> 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | <%= pageTitle %> 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 100 | 101 | 102 | 103 | 104 | 113 | 114 | <%# 加入百度自动推送JS代码,全站激活,20190813 %> 115 | <% if (theme.baidu_push) { %> 116 | 130 | <% } %> 131 | 132 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/header.ejs: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/index-cover.ejs: -------------------------------------------------------------------------------- 1 | 41 | 42 | <% 43 | // get all cover posts. 44 | var coverPosts = []; 45 | site.posts.forEach(function (post) { 46 | if (post.cover) { 47 | coverPosts.push(post); 48 | } 49 | }); 50 | var coverPostsCount = coverPosts.length; 51 | %> 52 | 53 | 136 | 137 | 177 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/livere.ejs: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 18 | 19 |
20 | 21 |
-------------------------------------------------------------------------------- /themes/matery/layout/_partial/mobile-nav.ejs: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | <% if (theme.logo !== undefined && theme.logo.length > 0) { %> 5 | 6 | <% } %> 7 |
<%- config.title %>
8 |
9 | <% if (config.description && config.description.length > 0) { %> 10 | <%= config.description %> 11 | <% } else { %> 12 | Never really desperate, only the lost of the soul. 13 | <% } %> 14 |
15 |
16 | 17 | <% 18 | var menuMap = new Map(); 19 | menuMap.set("Index", "首页"); 20 | menuMap.set("Categories", "分类"); 21 | menuMap.set("Tags", "标签"); 22 | menuMap.set("Archives", "归档"); 23 | menuMap.set("AV", "视听"); 24 | menuMap.set("List", "清单"); 25 | menuMap.set("Galleries", "相册"); 26 | menuMap.set("About", "关于我"); 27 | menuMap.set("Contact", "留言板"); 28 | menuMap.set("Friends", "友情链接"); 29 | menuMap.set("Navi","快捷导航") 30 | %> 31 | 32 | 54 | 55 | 56 | 57 | 58 | 105 | 106 |
107 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/navigation.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var menuMap = new Map(); 3 | menuMap.set("Index", "首页"); 4 | menuMap.set("Categories", "分类"); 5 | menuMap.set("Tags", "标签"); 6 | menuMap.set("Archives", "归档"); 7 | menuMap.set("AV", "视听"); 8 | menuMap.set("List", "清单"); 9 | menuMap.set("Galleries", "相册"); 10 | menuMap.set("About", "关于我"); 11 | menuMap.set("Contact", "留言板"); 12 | menuMap.set("Friends", "友情链接"); 13 | menuMap.set("Navi","快捷导航") 14 | 15 | %> 16 | 17 | 18 | 36 | 37 | 38 | 39 | 83 | 84 | <%- partial('_partial/mobile-nav') %> -------------------------------------------------------------------------------- /themes/matery/layout/_partial/paging.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | <% if (page.prev) { %> 5 | 7 | 8 | 9 | <% } else { %> 10 | 11 | 12 | 13 | <% } %> 14 |
15 |
16 |
<%- page.current %> / <%- page.total %>
17 |
18 |
19 | <% if (page.next) { %> 20 | 22 | 23 | 24 | <% } else { %> 25 | 26 | 27 | 28 | <% } %> 29 |
30 |
31 |
32 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/post-cover.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var featureimg = '/medias/bg.jpg'; 3 | if (page.img) { 4 | featureimg = page.img; 5 | } else { 6 | var hashCode = function (str) { 7 | if (!str && str.length === 0) { 8 | return 0; 9 | } 10 | 11 | var hash = 0; 12 | for (var i = 0, len = str.length; i < len; i++) { 13 | hash = ((hash << 5) - hash) + str.charCodeAt(i); 14 | hash |= 0; 15 | } 16 | return hash; 17 | }; 18 | 19 | var len = theme.featureImages.length; 20 | var num = Math.abs(hashCode(page.title) % len); 21 | featureimg = theme.featureImages[num]; 22 | } 23 | %> 24 | 25 |
26 |
27 |
28 |
29 |
30 |
31 | <%= page.title %> 32 |
33 |
34 |
35 |
36 |
37 |
-------------------------------------------------------------------------------- /themes/matery/layout/_partial/post-detail-toc.ejs: -------------------------------------------------------------------------------- 1 | 2 | 88 |
89 |
90 | <%- partial('_partial/post-detail.ejs') %> 91 |
92 |
93 |
94 |
  <%- __('toc') %>
95 |
96 |
97 |
98 |
99 | 100 | 101 | <% if (theme.toc.enable && theme.toc.showToggleBtn) { %> 102 |
103 | 104 | 105 | 106 |
107 | <% } %> 108 | 109 | 110 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/post-detail.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 | 76 |
77 |
78 |
79 | <%- page.content %> 80 |
81 |
82 | 83 | <% if (theme.reward && theme.reward.enable) { %> 84 | <%- partial('_partial/reward') %> 85 | <% } %> 86 | 87 | <%- partial('_partial/share') %> 88 | 89 | <% - partial('_partial/reprint-statement') %> 90 | 91 | <%# 老版转载声明字段 %> 92 |
93 |

94 | 95 |   <%= __('reprint') %>: 96 | 97 | <%- config.title %> 98 | 99 | <%= page.title %> 100 |

101 |
102 | 103 |
104 |
105 | 106 | <% if (theme.gitalk && theme.gitalk.enable) { %> 107 | <%- partial('_partial/gitalk') %> 108 | <% } %> 109 | 110 | <% if (theme.gitment.enable) { %> 111 | <%- partial('_partial/gitment') %> 112 | <% } %> 113 | 114 | <% if (theme.disqus.enable) { %> 115 | <%- partial('_partial/disqus') %> 116 | <% } %> 117 | 118 | <% if (theme.livere && theme.livere.enable) { %> 119 | <%- partial('_partial/livere') %> 120 | <% } %> 121 | 122 | <% if (theme.valine && theme.valine.enable) { %> 123 | <%- partial('_partial/valine') %> 124 | <% } %> 125 | 126 | <%- partial('_partial/prev-next') %> 127 |
128 | 129 | <% if (theme.copyright.enable) { %> 130 | 166 | <% } %> 167 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/post-statis.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.posts && site.posts.length > 0) { %> 2 |
3 | <%- site.posts.length %> 4 | <%- __('posts') %> 5 |
6 | <% } %> 7 | 8 | <% if (site.categories && site.categories.length > 0) { %> 9 |
10 | <%- site.categories.length %> 11 | <%- __('categories') %> 12 |
13 | <% } %> 14 | 15 | <% if (site.tags && site.tags.length > 0) { %> 16 |
17 | <%- site.tags.length %> 18 | <%- __('tags') %> 19 |
20 | <% } %> -------------------------------------------------------------------------------- /themes/matery/layout/_partial/reward.ejs: -------------------------------------------------------------------------------- 1 | 92 | 93 |
94 | 95 | 96 | 97 | 117 |
118 | 119 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/search.ejs: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/share.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | <% if (config.language && config.language.indexOf('zh') >= 0) { %> 5 |
6 | <% } else { %> 7 |
8 | <% } %> 9 |
10 | 11 | -------------------------------------------------------------------------------- /themes/matery/layout/_partial/social-link.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.socialLink.github) { %> 2 | 3 | 4 | 5 | <% } %> 6 | 7 | <% if (theme.socialLink.email) { %> 8 | 9 | 10 | 11 | 12 | <% } %> 13 | 14 | <% if (theme.socialLink.zhihu) { %> 15 | 16 | 17 | 18 | <% } %> 19 | 20 | <% if (theme.socialLink.qq) { %> 21 | 22 | 23 | 24 | <% } %> 25 | 26 | <% if (theme.socialLink.weibo) { %> 27 | 28 | 29 | 30 | <% } %> 31 | 32 | <% if (config.feed && config.feed.path == 'atom.xml') { %> 33 | 34 | 35 | 36 | <% } %> -------------------------------------------------------------------------------- /themes/matery/layout/_widget/category-cloud.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var colorArr = ['#F9EBEA', '#F5EEF8', '#D5F5E3', '#E8F8F5', '#FEF9E7', 3 | '#F8F9F9', '#82E0AA', '#D7BDE2', '#A3E4D7', '#85C1E9', '#F8C471', '#F9E79F', '#FFF']; 4 | var colorCount = colorArr.length; 5 | var hashCode = function (str) { 6 | if (!str && str.length === 0) { 7 | return 0; 8 | } 9 | 10 | var hash = 0; 11 | for (var i = 0, len = str.length; i < len; i++) { 12 | hash = ((hash << 5) - hash) + str.charCodeAt(i); 13 | hash |= 0; 14 | } 15 | return hash; 16 | }; 17 | var i = 0; 18 | var isCategory = is_category(); 19 | %> 20 | 21 |
22 |
23 |
24 |
25 |   <%= __('postCategoryTitle') %> 26 |
27 |
28 | <% if (site.categories && site.categories.length > 0) { %> 29 | <% site.categories.map(function(category) { %> 30 | <% 31 | i++; 32 | var color = i >= colorCount ? colorArr[Math.abs(hashCode(category.name) % colorCount)] 33 | : colorArr[i - 1]; 34 | %> 35 | 36 | <%- category.name %> 39 | <%- category.length %> 40 | 41 | 42 | <% }); %> 43 | <% } else { %> 44 | <%= __('categoryEmptyTip') %> 45 | <% } %> 46 |
47 |
48 |
49 |
-------------------------------------------------------------------------------- /themes/matery/layout/_widget/category-radar.ejs: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |
10 |
11 |
12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /themes/matery/layout/_widget/dream.ejs: -------------------------------------------------------------------------------- 1 |
2 | <% if (theme.dream.showTitle) { %> 3 |
4 |   <%- theme.dream.title %> 5 |
6 | <% } %> 7 |
8 |
9 | <%- theme.dream.text %> 10 |
11 |
12 |
-------------------------------------------------------------------------------- /themes/matery/layout/_widget/music.ejs: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | var audiosJson = JSON.stringify(site.data.musics); 4 | %> 5 | 6 | 7 |
8 | <% if (theme.music.showTitle) { %> 9 |
10 |   <%- theme.music.title %> 11 |
12 | <% } %> 13 |
14 | <%# 注释语法 原主题控件样式 %> 15 | <%#
%> 16 |
17 |
18 |
19 |
20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /themes/matery/layout/_widget/my-gallery.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | // the gallery photos of theme _config.yml. 3 | var gallery = theme.myGallery.data; 4 | %> 5 | 21 | 22 | -------------------------------------------------------------------------------- /themes/matery/layout/_widget/my-projects.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | // the projects information of theme _config.yml. 3 | var myprojects = theme.myProjects.data; 4 | %> 5 |
6 |
7 |   <%- __('myProjects') %> 8 |
9 |
10 | <% if (myprojects) { %> 11 | <% Object.keys(myprojects).forEach(function(project) { %> 12 |
13 |
14 | 16 | 17 | 18 |
19 | <%- project %> 20 |
21 |
<%- myprojects[project].desc %>
22 |
23 |
24 | <% }); %> 25 | <% } %> 26 |
27 |
-------------------------------------------------------------------------------- /themes/matery/layout/_widget/my-skills.ejs: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | // the skills information of theme _config.yml. 4 | var mySkills = theme.mySkills.data; 5 | var topSkillArr = []; 6 | %> 7 |
8 |
9 |   <%- __('mySkills') %> 10 |
11 |
12 | <% if (mySkills) { %> 13 | <% Object.keys(mySkills).forEach(function(skill) { %> 14 | <% topSkillArr.push(skill); %> 15 |
16 |
17 |
19 | <%- skill %> 20 |
21 |
<%- mySkills[skill].percent %>
22 |
23 |
24 | <% }); %> 25 | <% } %> 26 |
27 | 28 | <% 29 | /** 30 | * Determine if an element is included in the array. 31 | * 32 | * @param arr array 33 | * @param value value 34 | */ 35 | var isInArray = function (arr, value) { 36 | for (var i = 0; i < arr.length; i++) { 37 | if (value == arr[i]) { 38 | return true; 39 | } 40 | } 41 | return false; 42 | } 43 | %> 44 | 45 | <% if (site.tags) { %> 46 |
47 |
  <%- __('otherSkills') %>
48 |
49 | <% site.tags.map(function(tag) { %> 50 | <% if (!isInArray(topSkillArr, tag.name)) { %> 51 | 52 | <%- tag.name %> 53 | 54 | <% } %> 55 | <% }); %> 56 |
57 |
58 | <% } %> 59 | 60 |
-------------------------------------------------------------------------------- /themes/matery/layout/_widget/post-calendar.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 | 7 | 8 | -------------------------------------------------------------------------------- /themes/matery/layout/_widget/recommend.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | // get all top posts. 3 | var topPosts = []; 4 | site.posts.forEach(function (post) { 5 | if (post.top) { 6 | topPosts.push(post); 7 | } 8 | }); 9 | var topPostsCount = topPosts.length; 10 | %> 11 | 12 | <% if (topPostsCount > 0) { %> 13 | <% 14 | var hashCode = function (str) { 15 | if (!str && str.length === 0) { 16 | return 0; 17 | } 18 | 19 | var hash = 0; 20 | for (var i = 0, len = str.length; i < len; i++) { 21 | hash = ((hash << 5) - hash) + str.charCodeAt(i); 22 | hash |= 0; 23 | } 24 | return hash; 25 | }; 26 | 27 | var featureImages = theme.featureImages; 28 | var imgCount = featureImages.length; 29 | var bgColorArr = [ 30 | 'linear-gradient(to right, #FF5E3A 0%, #FF2A68 100%)', 31 | 'linear-gradient(to right, #EF4DB6 0%, #C643FC 100%)', 32 | 'linear-gradient(to right, #1AD6FD 0%, #1D62F0 100%)', 33 | 'linear-gradient(to right, #FFCC00 0%, #FF9500 100%)', 34 | 'linear-gradient(to right, #4cbf30 0%, #0f9d58 100%)', 35 | 'linear-gradient(to right, #C644FC 0%, #5856D6 100%)', 36 | 'linear-gradient(to right, #55EFCB 0%, #5BCAFF 100%)']; 37 | var colorCount = bgColorArr.length; 38 | %> 39 | 40 | <% if (theme.recommend.showTitle) { %> 41 |
  <%- __('recommendedPosts') %>
42 | <% } %> 43 |
44 | <% if (topPostsCount % 2 === 0) { %> 45 | <% for (var i = 0; i < topPostsCount; i++) { %> 46 | <% 47 | var post = topPosts[i]; 48 | var featureImg = post.img ? post.img : featureImages[Math.abs(hashCode(post.title) % imgCount)]; 49 | var bgColor = bgColorArr[i % colorCount]; 50 | %> 51 |
1) { %>data-aos="zoom-in-up"<% } %>> 52 |
53 |
54 |
55 | <% post.categories.forEach(category => { %> 56 | <%- category.name %> 57 | <% }); %> 58 |
59 | 60 |

<%- post.title %>

61 |
62 |

63 | <% if (post.summary && post.summary.length > 0) { %> 64 | <%- post.summary %> 65 | <% } else { %> 66 | <%- strip_html(post.content).substring(0, 70) %> 67 | <% } %> 68 |

69 | 71 | <%- __('readMore') %> 72 | 73 |
74 |
75 |
76 | <% } %> 77 | <% } else { %> 78 | <% for (var i = 0; i < topPostsCount; i++) { %> 79 | <% 80 | var post = topPosts[i]; 81 | var grid = (i % 3 === 0) ? 's12' : 's12 m6'; 82 | var description = (i % 3 === 0) ? strip_html(post.content).substring(0, 85) 83 | : strip_html(post.content).substring(0, 70); 84 | if (post.summary && post.summary.length > 0) { 85 | description = post.summary; 86 | } 87 | var featureImg = post.img ? post.img : featureImages[Math.abs(hashCode(post.title) % imgCount)]; 88 | var bgColor = bgColorArr[i % colorCount]; 89 | %> 90 |
0) { %>data-aos="zoom-in-up"<% } %>> 91 |
92 |
93 |
94 | <% post.categories.forEach(category => { %> 95 | <%- category.name %> 96 | <% }); %> 97 |
98 | 99 |

<%- post.title %>

100 |
101 |

<%- description %>

102 | 104 | <%- __('readMore') %> 105 | 106 |
107 |
108 |
109 | <% } %> 110 | <% } %> 111 |
112 | <% } %> 113 | -------------------------------------------------------------------------------- /themes/matery/layout/_widget/tag-cloud.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var colorArr = ['#F9EBEA', '#F5EEF8', '#D5F5E3', '#E8F8F5', '#FEF9E7', 3 | '#F8F9F9', '#82E0AA', '#D7BDE2', '#A3E4D7', '#85C1E9', '#F8C471', '#F9E79F', '#FFF']; 4 | var colorCount = colorArr.length; 5 | var hashCode = function (str) { 6 | if (!str && str.length === 0) { 7 | return 0; 8 | } 9 | 10 | var hash = 0; 11 | for (var i = 0, len = str.length; i < len; i++) { 12 | hash = ((hash << 5) - hash) + str.charCodeAt(i); 13 | hash |= 0; 14 | } 15 | return hash; 16 | }; 17 | var i = 0; 18 | var isTag = is_tag(); 19 | %> 20 | 21 |
22 |
23 |
24 |
25 |   <%= __('postTagTitle') %> 26 |
27 |
28 | <% site.tags.map(function(tag) { %> 29 | <% 30 | i++; 31 | var color = i >= colorCount ? colorArr[Math.abs(hashCode(tag.name) % colorCount)] 32 | : colorArr[i - 1]; 33 | %> 34 | 35 | <%- tag.name %> 38 | <%- tag.length %> 39 | 40 | 41 | <% }); %> 42 |
43 |
44 |
45 |
-------------------------------------------------------------------------------- /themes/matery/layout/_widget/tag-wordcloud.ejs: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |
10 |
11 |
12 |
13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /themes/matery/layout/_widget/video.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | <% if (theme.video.showTitle) { %> 5 |
6 |   <%- theme.video.title %> 7 |
8 | <% } %> 9 |
10 | <%# 注释语法 原主题控件样式 %> 11 |
12 |
style="height: <%- theme.video.height %>px;"<% } %>>
14 |
15 | 16 |
17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /themes/matery/layout/about.ejs: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | <%- partial('_partial/bg-cover') %> 10 | 11 |
12 | 13 |
14 |
15 |
16 |
17 |
18 | <%- partial('_partial/post-statis') %> 19 |
20 |
21 |
22 |
23 | <%- config.author %> 25 |
26 |
27 |
28 | <%- partial('_partial/post-statis') %> 29 |
30 |
<%- config.author %>
31 |
<%- theme.profile.career %>
32 | 35 |
36 |
37 |
38 |
39 | 42 |
43 |
44 | 45 |
46 | <%= theme.profile.introduction %> 47 |
48 | 49 | <%- partial('_widget/post-charts') %> 50 | 51 | <% if (theme.myProjects && theme.myProjects.enable) { %> 52 | <%- partial('_widget/my-projects') %> 53 | <% } %> 54 | 55 | <% if (theme.mySkills && theme.mySkills.enable) { %> 56 | <%- partial('_widget/my-skills') %> 57 | <% } %> 58 | 59 |
60 |
61 | 62 |
63 |
64 |
65 |
66 |   <%- __('myCV') %> 67 |
68 |
69 | <%- page.content %> 70 |
71 |
72 |
73 |
74 | 75 |
76 |
-------------------------------------------------------------------------------- /themes/matery/layout/archive.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/bg-cover') %> 2 | 3 |
4 | 5 | <% if (theme.postCalendar) { %> 6 | <%- partial('_widget/post-calendar') %> 7 | <% } %> 8 | 9 | <% 10 | /** 11 | * hashCode function. 12 | * 13 | * @param str str 14 | * @returns {number} 15 | */ 16 | var hashCode = function (str) { 17 | if (!str && str.length === 0) { 18 | return 0; 19 | } 20 | 21 | var hash = 0; 22 | for (var i = 0, len = str.length; i < len; i++) { 23 | hash = ((hash << 5) - hash) + str.charCodeAt(i); 24 | hash |= 0; 25 | } 26 | return hash; 27 | }; 28 | 29 | // init year and month variable. 30 | var year = '1970'; 31 | var month = '1970-01'; 32 | 33 | // post feature image. 34 | var featureimg = '/medias/featureimages/0.jpg'; 35 | var featureImages = theme.featureImages; 36 | %> 37 | 38 |
39 | <% page.posts.each(function(post) { %> 40 |
41 | 42 | <%# year. %> 43 | <% if (date(post.date, 'YYYY') != year) { %> 44 | <% year = date(post.date, 'YYYY'); %> 45 |
46 | <%- year %> 47 |
48 | <% } %> 49 | 50 | <%# month. %> 51 | <% if (date(post.date, 'YYYY-MM') != month) { %> 52 | <% 53 | month = date(post.date, 'YYYY-MM'); 54 | var m = date(post.date, 'MM') 55 | %> 56 |
57 | <%- m %> 58 |
59 | <% } %> 60 | 61 | <%# every day posts. %> 62 |
63 | <%- date(post.date, 'YYYY-MM-DD').substring(8, 10) %> 64 |
65 |
66 |
67 |
68 | 69 |
70 | <% if (post.img) { %> 71 | <%- post.title %> 72 | <% } else { %> 73 | <% 74 | var len = featureImages.length; 75 | var num = Math.abs(hashCode(post.title) % len); 76 | featureimg = featureImages[num]; 77 | %> 78 | <%- post.title %> 79 | <% } %> 80 | <%- post.title %> 81 |
82 |
83 |
84 |
85 | <% if (post.summary && post.summary.length > 0) { %> 86 | <%- post.summary %> 87 | <% } else { %> 88 | <%- strip_html(post.content).substring(0, 120) %> 89 | <% } %> 90 |
91 |
92 | 93 | <%= date(post.date, config.date_format) %> 95 | 96 | 97 | <% if (post.categories && post.categories.length > 0) { %> 98 | 99 | <% post.categories.forEach(category => { %> 100 | 103 | <% }); %> 104 | <% } %> 105 | 106 |
107 |
108 | 109 | <% if (post.tags && post.tags.length) { %> 110 | 115 | <% } %> 116 |
117 |
118 |
119 |
120 | <% }); %> 121 |
122 | 123 |
124 | 125 | <% if (page.total > 1) { %> 126 | <%- partial('_partial/paging') %> 127 | <% } %> -------------------------------------------------------------------------------- /themes/matery/layout/av.ejs: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | <%- partial('_partial/bg-cover') %> 10 | 11 |
12 |
13 |
14 |
15 | 16 |
17 |
18 |   <%- theme.music.title %> 19 |
20 | <% if (theme.music && theme.music.enable) { %> 21 | <%- partial('_widget/music') %> 22 | <% } %> 23 | 24 |
25 | 26 | <% if (theme.video && theme.video.enable) { %> 27 | <%- partial('_widget/video') %> 28 | <% } %> 29 | 30 | <% if (theme.myGallery && theme.myGallery.enable) { %> 31 | <%- partial('_widget/my-gallery') %> 32 | <% } %> 33 |
34 |
35 | 36 |
37 |
38 |
39 |
40 |   <%- __('资源共享') %> 41 |
42 |
43 | <%- page.content %> 44 |
45 |
46 |
47 |
48 | 49 | 50 |
51 |
-------------------------------------------------------------------------------- /themes/matery/layout/categories.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/bg-cover') %> 2 | 3 |
4 | 5 | <%- partial('_widget/category-cloud') %> 6 | 7 | <% if (site.categories && site.categories.length > 0) { %> 8 | <%- partial('_widget/category-radar') %> 9 | <% } %> 10 | 11 |
12 | -------------------------------------------------------------------------------- /themes/matery/layout/category.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/bg-cover') %> 2 | 3 |
4 | 5 | <%- partial('_widget/category-cloud') %> 6 | 7 | <% 8 | var hashCode = function (str) { 9 | if (!str && str.length === 0) { 10 | return 0; 11 | } 12 | 13 | var hash = 0; 14 | for (var i = 0, len = str.length; i < len; i++) { 15 | hash = ((hash << 5) - hash) + str.charCodeAt(i); 16 | hash |= 0; 17 | } 18 | return hash; 19 | }; 20 | %> 21 | 22 |
23 |
24 | <% page.posts.sort('date').reverse().forEach(post => { %> 25 |
26 |
27 | 28 |
29 | <% if (post.img) { %> 30 | <%- post.title %> 31 | <% } else { %> 32 | <% 33 | var len = theme.featureImages.length; 34 | var num = Math.abs(hashCode(post.title) % len); 35 | var featureimg = theme.featureImages[num]; 36 | %> 37 | <%- post.title %> 38 | <% } %> 39 | <%- post.title %> 40 |
41 |
42 |
43 |
44 | <% if (post.summary && post.summary.length > 0) { %> 45 | <%- post.summary %> 46 | <% } else { %> 47 | <%- strip_html(post.content).substring(0, 120) %> 48 | <% } %> 49 |
50 |
51 | 52 | <%= date(post.date, config.date_format) %> 53 | 54 | 55 | <% if (post.categories && post.categories.length > 0) { %> 56 | 57 | <% post.categories.forEach(category => { %> 58 | 61 | <% }); %> 62 | <% } %> 63 | 64 |
65 |
66 | 67 | <% if (post.tags && post.tags.length) { %> 68 | 75 | <% } %> 76 |
77 |
78 | <% }); %> 79 |
80 |
81 |
82 | 83 | <% if (page.total > 1) { %> 84 | <%- partial('_partial/paging') %> 85 | <% } %> -------------------------------------------------------------------------------- /themes/matery/layout/contact.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%- partial('_partial/bg-cover') %> 3 | 4 |
5 |
6 |
7 |
8 |
9 | <%- page.content %> 10 |
11 |
12 |
13 | 14 | <% if (theme.gitalk && theme.gitalk.enable) { %> 15 | <%- partial('_partial/gitalk') %> 16 | <% } %> 17 | 18 | <% if (theme.gitment.enable) { %> 19 | <%- partial('_partial/gitment') %> 20 | <% } %> 21 | 22 | <% if (theme.disqus.enable) { %> 23 | <%- partial('_partial/disqus') %> 24 | <% } %> 25 | 26 | <% if (theme.livere && theme.livere.enable) { %> 27 | <%- partial('_partial/livere') %> 28 | <% } %> 29 | 30 | <% if (theme.valine && theme.valine.enable) { %> 31 | <%- partial('_partial/valine') %> 32 | <% } %> 33 | 34 |
35 |
-------------------------------------------------------------------------------- /themes/matery/layout/friends.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/bg-cover') %> 2 | 191 | 192 |
193 |
194 | 225 |
226 |
227 | 228 | -------------------------------------------------------------------------------- /themes/matery/layout/galleries.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- partial('_partial/bg-cover') %> 4 | 5 |
6 |
7 | <% if (site.data && site.data.galleries) { %> 8 | <% var galleries = site.data.galleries; %> 9 | 24 | <% } %> 25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /themes/matery/layout/gallery.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <%- partial('_partial/post-cover') %> 7 | 8 | <% 9 | let galleries = []; 10 | if (site.data && site.data.galleries) { 11 | galleries = site.data.galleries; 12 | } 13 | var pageTitle = page.title; 14 | function getCurrentGallery(galleries, pageTitle) { 15 | for (let i = 0; i < galleries.length; i++) { 16 | if (galleries[i]['name'] == pageTitle) { 17 | return galleries[i]; 18 | } 19 | } 20 | } 21 | var currentGallery = getCurrentGallery(galleries, pageTitle) 22 | 23 | var photos = currentGallery.photos; 24 | 25 | let imageStr = '' 26 | 27 | for (var i = 0, len = photos.length; i < len; i++) { 28 | var photo = photos[i]; 29 | 30 | 31 | 32 | imageStr += "\n" + 35 | "  + photo + \n" + 37 | " " 38 | } 39 | %> 40 | 41 | 43 | 44 | 45 | 52 | 53 | 54 | 55 |
56 |
57 | <% if (page.password ) { %> 58 | 59 | 60 | 61 | 62 |
63 |
64 | 65 | 解密 66 |
67 |
68 |
69 | 72 |
73 | 74 | <% } else { %> 75 |
76 | <%- imageStr %> 77 |
78 | <% } %> 79 |
80 |
81 | 82 | 83 | 84 | 85 | 86 | 95 | -------------------------------------------------------------------------------- /themes/matery/layout/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <% if (is_home() && page.current === 1) { %> 3 | <%- partial('_partial/index-cover') %> 4 | <% } else { %> 5 | <%- partial('_partial/bg-cover') %> 6 | <% } %> 7 | 8 |
9 | 10 | <% if (page.current === 1) { %> 11 |
12 |
13 |
14 |
15 | <% if (theme.dream.enable) { %> 16 | <%- partial('_widget/dream') %> 17 | <% } %> 18 | <% if (theme.music.enable && site.data && site.data.musics) { %> 19 | <%- partial('_widget/music') %> 20 | <% } %> 21 | <%# 注释语法 %> 22 | <%# if (theme.video.enable) { %> 23 | <%# - partial('_widget/video') %> 24 | <%# } %> 25 |
26 | <%- partial('_widget/recommend') %> 27 |
28 |
29 |
30 |
31 |
32 | <% } %> 33 | 34 | <% 35 | var hashCode = function (str) { 36 | if (!str && str.length === 0) { 37 | return 0; 38 | } 39 | 40 | var hash = 0; 41 | for (var i = 0, len = str.length; i < len; i++) { 42 | hash = ((hash << 5) - hash) + str.charCodeAt(i); 43 | hash |= 0; 44 | } 45 | return hash; 46 | }; 47 | %> 48 | 49 | 50 |
51 |
52 | <% page.posts.forEach(post => { %> 53 |
54 |
55 | 56 |
57 | <% if (post.img) { %> 58 | <%- post.title %> 59 | <% } else { %> 60 | <% 61 | var featureimg = '/medias/featureimages/0.jpg'; 62 | var featureImages = theme.featureImages; 63 | if (!featureImages || featureImages.length == 0) { 64 | return featureimg; 65 | } 66 | 67 | var len = featureImages.length; 68 | var num = Math.abs(hashCode(post.title) % len); 69 | featureimg = featureImages[num]; 70 | %> 71 | <%- post.title %> 72 | <% } %> 73 | <%- post.title %> 74 |
75 |
76 | 77 |
78 |
79 | <% if (post.summary && post.summary.length > 0) { %> 80 | <%- post.summary %> 81 | <% } else { %> 82 | <%- strip_html(post.content).substring(0, 120) %> 83 | <% } %> 84 |
85 |
86 | 87 | <%= date(post.date, config.date_format) %> 88 | 89 | 90 | <% if (post.categories && post.categories.length > 0) { %> 91 | 92 | <% post.categories.forEach(category => { %> 93 | 96 | <% }); %> 97 | <% } %> 98 | 99 |
100 |
101 | 102 | <% if(post.tags && post.tags.length > 0) { %> 103 | 110 | <% } %> 111 |
112 |
113 | <% }); %> 114 |
115 |
116 | 117 |
118 | 119 | <% if (page.total > 1) { %> 120 | <%- partial('_partial/paging') %> 121 | <% } %> -------------------------------------------------------------------------------- /themes/matery/layout/post.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.verifyPassword.enable) { %> 2 | 3 | 14 | <% } %> 15 | 16 | <%- partial('_partial/post-cover') %> 17 | 18 | <% 19 | var isTocEnable = theme.toc.enable && String(page.toc) !== 'false'; 20 | var containerClass = isTocEnable ? 'post-container' : 'container'; 21 | %> 22 | 23 |
24 | 25 | <% if (isTocEnable) { %> 26 | <%- partial('_partial/post-detail-toc.ejs') %> 27 | <% } else { %> 28 | <%- partial('_partial/post-detail.ejs') %> 29 | <% } %> 30 | 31 |
32 | 33 | <% if (theme.mathjax.enable && page.mathjax) { %> 34 | 35 | 40 | <% } %> -------------------------------------------------------------------------------- /themes/matery/layout/tag.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/bg-cover') %> 2 | 3 |
4 | 5 | <%- partial('_widget/tag-cloud') %> 6 | 7 | <% 8 | var hashCode = function (str) { 9 | if (!str && str.length === 0) { 10 | return 0; 11 | } 12 | 13 | var hash = 0; 14 | for (var i = 0, len = str.length; i < len; i++) { 15 | hash = ((hash << 5) - hash) + str.charCodeAt(i); 16 | hash |= 0; 17 | } 18 | return hash; 19 | }; 20 | %> 21 | 22 |
23 |
24 | <% page.posts.sort('date').reverse().forEach(post => { %> 25 | <% 26 | var tagArr = []; 27 | if (post.tags && post.tags.length > 0) { 28 | post.tags.forEach(tag => { 29 | tagArr.push(tag.name); 30 | }); 31 | } 32 | var tags = tagArr.join(', '); 33 | %> 34 |
35 |
36 | 37 |
38 | <% if (post.img) { %> 39 | <%- post.title %> 40 | <% } else { %> 41 | <% 42 | var len = theme.featureImages.length; 43 | var num = Math.abs(hashCode(post.title) % len); 44 | var featureimg = theme.featureImages[num]; 45 | %> 46 | <%- post.title %> 47 | <% } %> 48 | <%- post.title %> 49 |
50 |
51 |
52 |
53 | 54 | <%= date(post.date, config.date_format) %> 55 | 56 | 57 | <% if (post.categories && post.categories.length > 0) { %> 58 | 59 | <% post.categories.forEach(category => { %> 60 | 63 | <% }); %> 64 | <% } %> 65 | 66 |
67 |
68 |
69 |
70 | <% }); %> 71 |
72 |
73 |
74 | 75 | <% if (page.total > 1) { %> 76 | <%- partial('_partial/paging') %> 77 | <% } %> -------------------------------------------------------------------------------- /themes/matery/layout/tags.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/bg-cover') %> 2 | 3 |
4 | 5 | <%- partial('_widget/tag-cloud') %> 6 | 7 | <% if (site.tags && site.tags.length > 0) { %> 8 | <%- partial('_widget/tag-wordcloud') %> 9 | <% } %> 10 | 11 |
12 | -------------------------------------------------------------------------------- /themes/matery/source/css/gallery.css: -------------------------------------------------------------------------------- 1 | .gallery-wrapper{ 2 | padding-top: 30px; 3 | } 4 | .gallery-wrapper .gallery-box{ 5 | padding: 5px !important; 6 | } 7 | 8 | .gallery-wrapper .gallery-item { 9 | display: block; 10 | overflow: hidden; 11 | background-color: #fff; 12 | padding: 5px; 13 | padding-bottom: 0; 14 | position: relative; 15 | -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.22); 16 | -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.22); 17 | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.22); 18 | } 19 | 20 | .gallery-cover-box{ 21 | width: 100%; 22 | padding-top: 60%; 23 | text-align: center; 24 | overflow: hidden; 25 | position: relative; 26 | background: center center no-repeat; 27 | -webkit-background-size: cover; 28 | background-size: cover; 29 | } 30 | 31 | .gallery-cover-box .gallery-cover-img { 32 | display: inline-block; 33 | width: 100%; 34 | position: absolute; 35 | left: 50%; 36 | top: 50%; 37 | transform: translate(-50%,-50%); 38 | } 39 | .gallery-item .gallery-name{ 40 | font-size: 14px; 41 | line-height: 24px; 42 | text-align: center; 43 | color: #666; 44 | margin: 0; 45 | } 46 | 47 | .waterfall { 48 | column-count: 3; 49 | column-gap: 1em; 50 | } 51 | .photo-wrapper{ 52 | padding-top: 20px; 53 | } 54 | .photo-item { 55 | display: block; 56 | padding: 10px; 57 | padding-bottom: 0; 58 | margin-bottom: 14px; 59 | font-size: 0; 60 | -moz-page-break-inside: avoid; 61 | -webkit-column-break-inside: avoid; 62 | break-inside: avoid; 63 | background: white; 64 | -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.22); 65 | -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.22); 66 | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.22); 67 | } 68 | .photo-item img { 69 | width: 100%; 70 | } 71 | .photo-item .photo-name{ 72 | font-size: 14px; 73 | line-height: 30px; 74 | text-align: center; 75 | margin-top: 10px; 76 | margin-bottom: 10px; 77 | border-top: 1px solid #dddddd; 78 | } 79 | 80 | /*适配移动端布局*/ 81 | @media only screen and (max-width: 601px) { 82 | .waterfall { 83 | column-count: 2; 84 | column-gap: 1em; 85 | } 86 | } 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /themes/matery/source/css/my-gitalk.css: -------------------------------------------------------------------------------- 1 | .gitalk-card { 2 | margin: 1.25rem auto; 3 | } 4 | 5 | .gitalk-card .card-content { 6 | padding: 1px 20px 20px 20px; 7 | } 8 | 9 | #gitalk-container .gt-no-init a { 10 | color: #42b983; 11 | text-decoration: underline; 12 | } 13 | 14 | #gitalk-container .gt-container .gt-btn, 15 | #gitalk-container .gt-btn-login, 16 | #gitalk-container .gt-container .gt-header-controls .gt-btn { 17 | border: 1px solid #4caf50; 18 | background-color: #4caf50; 19 | box-shadow: 0 2px 2px 0 rgba(76, 175, 80, 0.14), 0 3px 1px -2px rgba(76, 175, 80, 0.2), 0 1px 5px 0 rgba(76, 175, 80, 0.12); 20 | } 21 | 22 | #gitalk-container .gt-container .gt-link { 23 | color: #42b983; 24 | text-decoration: underline; 25 | } 26 | 27 | #gitalk-container .gt-container .gt-btn-preview { 28 | color: #4caf50; 29 | background-color: #fff !important; 30 | box-shadow: 0 2px 2px 0 rgba(76, 175, 80, 0.14), 0 3px 1px -2px rgba(76, 175, 80, 0.2), 0 1px 5px 0 rgba(76, 175, 80, 0.12); 31 | } 32 | 33 | #gitalk-container .gt-container .gt-header-textarea { 34 | background-color: #f6f9fc; 35 | border: 1px solid rgba(0, 0, 0, 0.05); 36 | } 37 | 38 | #gitalk-container .gt-container .gt-svg svg { 39 | fill: #42b983; 40 | } 41 | 42 | #gitalk-container .gt-container .gt-header-controls-tip, 43 | #gitalk-container .gt-container a, 44 | #gitalk-container .gt-container .gt-comment-username { 45 | color: #42b983; 46 | } 47 | 48 | #gitalk-container .gt-container .gt-ico-text { 49 | margin-left: 0.08rem; 50 | } 51 | 52 | #gitalk-container .gt-container .gt-comment-body { 53 | color: #34495e !important; 54 | } 55 | 56 | #gitalk-container .gt-container .gt-header-preview { 57 | border: 1px solid rgba(0, 0, 0, 0.02); 58 | background-color: #f9f9f9; 59 | } 60 | 61 | .markdown-body p { 62 | margin: 2px 2px 10px; 63 | font-size: 1.05rem; 64 | line-height: 1.78rem; 65 | } 66 | 67 | .markdown-body blockquote p { 68 | text-indent: 0.2rem; 69 | } 70 | 71 | .markdown-body a { 72 | padding: 0 2px; 73 | color: #42b983; 74 | font-weight: 500; 75 | text-decoration: underline; 76 | } 77 | 78 | .markdown-body img { 79 | max-width: 100%; 80 | height: auto; 81 | cursor: pointer; 82 | } 83 | 84 | .markdown-body ol li { 85 | list-style-type: decimal; 86 | } 87 | 88 | .markdown-body ol, 89 | ul { 90 | display: block; 91 | padding-left: 2em; 92 | word-spacing: 0.05rem; 93 | } 94 | 95 | .markdown-body ul li, 96 | ol li { 97 | display: list-item; 98 | line-height: 1.8rem; 99 | font-size: 1rem; 100 | } 101 | 102 | .markdown-body ul li { 103 | list-style-type: disc; 104 | } 105 | 106 | .markdown-body ul ul li { 107 | list-style-type: circle; 108 | } 109 | 110 | .markdown-body table, th, td { 111 | padding: 12px 13px; 112 | border: 1px solid #dfe2e5; 113 | } 114 | 115 | .markdown-body table, th, td { 116 | border: 0; 117 | } 118 | 119 | table tr:nth-child(2n), thead { 120 | background-color: #fafafa; 121 | } 122 | 123 | .markdown-body table th { 124 | background-color: #f2f2f2; 125 | min-width: 80px; 126 | } 127 | 128 | .markdown-body table td { 129 | min-width: 80px; 130 | } 131 | 132 | .markdown-body h1 { 133 | font-size: 1.85rem; 134 | font-weight: bold; 135 | line-height: 2.2rem; 136 | } 137 | 138 | .markdown-body h2 { 139 | font-size: 1.65rem; 140 | font-weight: bold; 141 | line-height: 1.9rem; 142 | } 143 | 144 | .markdown-body h3 { 145 | font-size: 1.45rem; 146 | font-weight: bold; 147 | line-height: 1.7rem; 148 | } 149 | 150 | .markdown-body h4 { 151 | font-size: 1.25rem; 152 | font-weight: bold; 153 | line-height: 1.5rem; 154 | } 155 | 156 | .markdown-body h5 { 157 | font-size: 1.1rem; 158 | font-weight: bold; 159 | line-height: 1.4rem; 160 | } 161 | 162 | .markdown-body h6 { 163 | font-size: 1rem; 164 | line-height: 1.3rem; 165 | } 166 | 167 | .markdown-body p { 168 | font-size: 1rem; 169 | line-height: 1.5rem; 170 | } 171 | 172 | .markdown-body hr { 173 | margin: 12px 0; 174 | border: 0; 175 | border-top: 1px solid #ccc; 176 | } 177 | 178 | .markdown-body blockquote { 179 | margin: 15px 0; 180 | border-left: 5px solid #42b983; 181 | padding: 1rem 0.8rem 1rem 0.8rem; 182 | color: #666; 183 | background-color: rgba(66, 185, 131, .1); 184 | } 185 | 186 | .markdown-body pre { 187 | padding: 1.2em; 188 | margin: .5em 0; 189 | background: #272822; 190 | overflow: auto; 191 | border-radius: 0.3em; 192 | tab-size: 4; 193 | } 194 | 195 | .markdown-body code { 196 | padding: 1px 1px; 197 | font-size: 0.92rem; 198 | color: #e96900; 199 | background-color: #f8f8f8; 200 | border-radius: 2px; 201 | } 202 | 203 | .markdown-body pre code { 204 | padding: 0; 205 | color: #e8eaf6; 206 | background-color: #272822; 207 | } 208 | 209 | .markdown-body pre[class*="language-"] { 210 | padding: 1.2em; 211 | margin: .5em 0; 212 | } 213 | 214 | .markdown-body code[class*="language-"], 215 | pre[class*="language-"] { 216 | color: #e8eaf6; 217 | } 218 | 219 | .markdown-body [type="checkbox"]:not(:checked), [type="checkbox"]:checked { 220 | position: inherit; 221 | margin-left: -1.3rem; 222 | margin-right: 0.4rem; 223 | margin-top: -1px; 224 | vertical-align: middle; 225 | left: unset; 226 | visibility: visible; 227 | } 228 | 229 | .markdown-body b, 230 | strong { 231 | font-weight: bold; 232 | } 233 | 234 | .markdown-body dfn { 235 | font-style: italic; 236 | } 237 | 238 | .markdown-body small { 239 | font-size: 85%; 240 | } 241 | 242 | .markdown-body cite { 243 | font-style: normal; 244 | } 245 | 246 | .markdown-body mark { 247 | background-color: #fcf8e3; 248 | padding: .2em; 249 | } -------------------------------------------------------------------------------- /themes/matery/source/css/my.css: -------------------------------------------------------------------------------- 1 | /* shw2018 洪卫 add 2019.08.10*/ 2 | /* Here is your custom css styles. */ 3 | 4 | /* hexo-filter-github-emojis */ 5 | .github-emoji{ 6 | height: 2em; 7 | width: 2em; 8 | display: inline-block !important; 9 | position: relative; 10 | margin: 0 3px !important; 11 | padding: 0; 12 | } 13 | .github-emoji:hover{ 14 | animation: emoji-face 5s infinite ease-in-out; 15 | } 16 | @keyframes emoji-face { 17 | 2% { 18 | transform: translate(0, 1.5px) rotate(1.5deg); 19 | } 20 | 4% { 21 | transform: translate(0, -1.5px) rotate(-0.5deg); 22 | } 23 | 6% { 24 | transform: translate(0, 1.5px) rotate(-1.5deg); 25 | } 26 | 8% { 27 | transform: translate(0, -1.5px) rotate(-1.5deg); 28 | } 29 | 10% { 30 | transform: translate(0, 2.5px) rotate(1.5deg); 31 | } 32 | 12% { 33 | transform: translate(0, -0.5px) rotate(1.5deg); 34 | } 35 | 14% { 36 | transform: translate(0, -1.5px) rotate(1.5deg); 37 | } 38 | 16% { 39 | transform: translate(0, -0.5px) rotate(-1.5deg); 40 | } 41 | 18% { 42 | transform: translate(0, 0.5px) rotate(-1.5deg); 43 | } 44 | 20% { 45 | transform: translate(0, -1.5px) rotate(2.5deg); 46 | } 47 | 22% { 48 | transform: translate(0, 0.5px) rotate(-1.5deg); 49 | } 50 | 24% { 51 | transform: translate(0, 1.5px) rotate(1.5deg); 52 | } 53 | 26% { 54 | transform: translate(0, 0.5px) rotate(0.5deg); 55 | } 56 | 28% { 57 | transform: translate(0, 0.5px) rotate(1.5deg); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /themes/matery/source/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/favicon.png -------------------------------------------------------------------------------- /themes/matery/source/js/fireworks.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function updateCoords(e){ 3 | pointerX=(e.clientX||e.touches[0].clientX) 4 | -canvasEl.getBoundingClientRect().left, 5 | pointerY=e.clientY||e.touches[0].clientY-canvasEl.getBoundingClientRect().top 6 | }function setParticuleDirection(e){ 7 | var t=anime.random(0,360)*Math.PI/180, 8 | a=anime.random(50,180), 9 | n=[-1,1][anime.random(0,1)]*a; 10 | return{x:e.x+n*Math.cos(t),y:e.y+n*Math.sin(t)} 11 | }function createParticule(e,t){ 12 | var a={};return a.x=e, 13 | a.y=t, 14 | a.color=colors[anime.random(0,colors.length-1)], 15 | a.radius=anime.random(16,32), 16 | a.endPos=setParticuleDirection(a), 17 | a.draw=function(){ 18 | ctx.beginPath(), 19 | ctx.arc(a.x,a.y,a.radius,0,2*Math.PI,!0), 20 | ctx.fillStyle=a.color,ctx.fill()},a 21 | }function createCircle(e,t){ 22 | var a={}; 23 | return a.x=e, 24 | a.y=t, 25 | a.color="#F00",a.radius=0.1, 26 | a.alpha=0.5, 27 | a.lineWidth=6, 28 | a.draw=function(){ 29 | ctx.globalAlpha=a.alpha, 30 | ctx.beginPath(), 31 | ctx.arc(a.x,a.y,a.radius,0,2*Math.PI,!0), 32 | ctx.lineWidth=a.lineWidth, 33 | ctx.strokeStyle=a.color,ctx.stroke(), 34 | ctx.globalAlpha=1},a 35 | }function renderParticule(e){ 36 | for(var t=0;t= 450) { 27 | w = w + 21; 28 | } else if (w >= 350 && w < 450) { 29 | w = w + 18; 30 | } else if (w >= 300 && w < 350) { 31 | w = w + 16; 32 | } else { 33 | w = w + 14; 34 | } 35 | $('#' + targetId).width(w); 36 | }; 37 | 38 | /** 39 | * 修复footer部分的位置,使得在内容比较少时,footer也会在底部. 40 | */ 41 | let fixFooterPosition = function () { 42 | $('.content').css('min-height', window.innerHeight - 165); 43 | // $('.hbe-input-container').css('min-height', window.innerHeight - 165); 44 | 45 | }; 46 | 47 | /** 48 | * 修复样式. 49 | */ 50 | let fixStyles = function () { 51 | fixPostCardWidth('navContainer', 'articles'); 52 | fixPostCardWidth('artDetail', 'prenext-posts'); 53 | fixFooterPosition(); 54 | }; 55 | fixStyles(); 56 | 57 | /*调整屏幕宽度时重新设置文章列的宽度,修复小间距问题*/ 58 | $(window).resize(function () { 59 | fixStyles(); 60 | }); 61 | 62 | /*初始化瀑布流布局*/ 63 | $('#articles').masonry({ 64 | itemSelector: '.article' 65 | }); 66 | 67 | AOS.init({ 68 | easing: 'ease-in-out-sine', 69 | duration: 700, 70 | delay: 100 71 | }); 72 | 73 | /*文章内容详情的一些初始化特性*/ 74 | let articleInit = function () { 75 | $('#articleContent a').attr('target', '_blank'); 76 | 77 | $('#articleContent img').not('img.emoji').each(function () { 78 | let imgPath = $(this).attr('src'); 79 | $(this).wrap('
'); 80 | // 图片添加阴影 81 | $(this).addClass("img-shadow img-margin"); 82 | // 图片添加字幕 83 | let alt = $(this).attr('alt'); 84 | let title = $(this).attr('title'); 85 | let captionText = ""; 86 | // 如果alt为空,title来替 87 | if (alt === undefined || alt === "") { 88 | if (title !== undefined && title !== "") { 89 | captionText = title; 90 | } 91 | } else { 92 | captionText = alt; 93 | } 94 | // 字幕不空,添加之 95 | if (captionText !== "") { 96 | let captionDiv = document.createElement('div'); 97 | captionDiv.className = 'caption'; 98 | let captionEle = document.createElement('b'); 99 | captionEle.className = 'center-caption'; 100 | captionEle.innerText = captionText; 101 | captionDiv.appendChild(captionEle); 102 | this.insertAdjacentElement('afterend', captionDiv) 103 | } 104 | }); 105 | 106 | $('#articleContent, #myGallery').lightGallery({ 107 | selector: '.img-item', 108 | // 启用字幕 109 | subHtmlSelectorRelative: true, 110 | showThumbByDefault: false //2018.08.14 111 | }); 112 | 113 | /*网站加载逻辑问题 网站加载逻辑问题:图片最后加载 洪卫 shw2018 modify 修改时间:2019.08.14*/ 114 | // $(document).find('img[data-original]').each(function () { 115 | // $(this).parent().attr("href", $(this).attr("data-original")); 116 | // }); 117 | 118 | // progress bar init 119 | const progressElement = window.document.querySelector('.progress-bar'); 120 | if (progressElement) { 121 | new ScrollProgress((x, y) => { 122 | progressElement.style.width = y * 100 + '%'; 123 | }); 124 | } 125 | }; 126 | articleInit(); 127 | 128 | $('.modal').modal(); 129 | 130 | /*回到顶部*/ 131 | $('#backTop').click(function () { 132 | $('body,html').animate({ 133 | scrollTop: 0 134 | }, 400); 135 | return false; 136 | }); 137 | 138 | /*监听滚动条位置*/ 139 | let $nav = $('#headNav'); 140 | let $backTop = $('.top-scroll'); 141 | $(window).scroll(function () { 142 | /* 回到顶部按钮根据滚动条的位置的显示和隐藏.*/ 143 | let scroll = $(window).scrollTop(); 144 | if (scroll < 100) { 145 | $nav.addClass('nav-transparent'); 146 | $backTop.slideUp(300); 147 | } else { 148 | $nav.removeClass('nav-transparent'); 149 | $backTop.slideDown(300); 150 | } 151 | }); 152 | 153 | // 增加二级菜单功能 洪卫 shw2018 add 2019.09.17 154 | $(".nav-menu>li").hover(function(){ 155 | $(this).children('ul').stop(true,true).show(); 156 | $(this).addClass('nav-show').siblings('li').removeClass('nav-show'); 157 | 158 | },function(){ 159 | $(this).children('ul').stop(true,true).hide(); 160 | $('.nav-item.nav-show').removeClass('nav-show'); 161 | }) 162 | 163 | $('.m-nav-item>a').on('click',function(){ 164 | if ($(this).next('ul').css('display') == "none") { 165 | $('.m-nav-item').children('ul').slideUp(300); 166 | $(this).next('ul').slideDown(300); 167 | $(this).parent('li').addClass('m-nav-show').siblings('li').removeClass('m-nav-show'); 168 | }else{ 169 | $(this).next('ul').slideUp(300); 170 | $('.m-nav-item.m-nav-show').removeClass('m-nav-show'); 171 | } 172 | }); 173 | 174 | }); -------------------------------------------------------------------------------- /themes/matery/source/js/search.js: -------------------------------------------------------------------------------- 1 | var searchFunc = function (path, search_id, content_id) { 2 | 'use strict'; 3 | $.ajax({ 4 | url: path, 5 | dataType: "xml", 6 | success: function (xmlResponse) { 7 | // get the contents from search data 8 | var datas = $("entry", xmlResponse).map(function () { 9 | return { 10 | title: $("title", this).text(), 11 | content: $("content", this).text(), 12 | url: $("url", this).text() 13 | }; 14 | }).get(); 15 | var $input = document.getElementById(search_id); 16 | var $resultContent = document.getElementById(content_id); 17 | $input.addEventListener('input', function () { 18 | var str = '"; 81 | $resultContent.innerHTML = str; 82 | }); 83 | } 84 | }); 85 | } -------------------------------------------------------------------------------- /themes/matery/source/js/wenzi.js: -------------------------------------------------------------------------------- 1 | /* 鼠标点击文字特效 */ 2 | var a_idx = 0; 3 | jQuery(document).ready(function($) { 4 | $("body").click(function(e) { 5 | // var a = new Array("❤富强❤","❤民主❤","❤文明❤","❤和谐❤","❤自由❤","❤平等❤","❤公正❤","❤法治❤","❤爱国❤","❤敬业❤","❤诚信❤","❤友善❤"); 6 | var a = new Array("富强","民主","文明","和谐","自由","平等","公正","法治","爱国","敬业","诚信","友善"); 7 | var $i = $("").text(a[a_idx]); 8 | a_idx = (a_idx + 1) % a.length; 9 | var x = e.pageX, 10 | y = e.pageY; 11 | $i.css({ 12 | "z-index": 999999999999999999999999999999999999999999999999999999999999999999999, 13 | "top": y - 20, 14 | "left": x, 15 | "position": "absolute", 16 | "font-weight": "bold", 17 | "color": "rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")" 18 | }); 19 | $("body").append($i); 20 | $i.animate({ 21 | "top": y - 180, 22 | "opacity": 0 23 | }, 24 | 1500, 25 | function() { 26 | $i.remove(); 27 | }); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /themes/matery/source/js/xuehuapiaoluo.js: -------------------------------------------------------------------------------- 1 | /*样式一*/ 2 | //背景雪花飘落特效 3 | (function($){ 4 | $.fn.snow = function(options){ 5 | var $flake = $('
').css({'position': 'absolute','z-index':'9999', 'top': '-50px'}).html('❄'), 6 | documentHeight = $(document).height(), 7 | documentWidth = $(document).width(), 8 | defaults = { 9 | minSize : 10, 10 | maxSize : 20, 11 | newOn : 1000, 12 | flakeColor : "#AFDAEF" /* 此处可以定义雪花颜色,若要白色可以改为#FFFFFF */ 13 | }, 14 | options = $.extend({}, defaults, options); 15 | var interval= setInterval( function(){ 16 | var startPositionLeft = Math.random() * documentWidth - 100, 17 | startOpacity = 0.5 + Math.random(), 18 | sizeFlake = options.minSize + Math.random() * options.maxSize, 19 | endPositionTop = documentHeight - 200, 20 | endPositionLeft = startPositionLeft - 500 + Math.random() * 500, 21 | durationFall = documentHeight * 10 + Math.random() * 5000; 22 | $flake.clone().appendTo('body').css({ 23 | left: startPositionLeft, 24 | opacity: startOpacity, 25 | 'font-size': sizeFlake, 26 | color: options.flakeColor 27 | }).animate({ 28 | top: endPositionTop, 29 | left: endPositionLeft, 30 | opacity: 0.2 31 | },durationFall,'linear',function(){ 32 | $(this).remove() 33 | }); 34 | }, options.newOn); 35 | }; 36 | })(jQuery); 37 | $(function(){ 38 | $.fn.snow({ 39 | minSize: 5, /* 定义雪花最小尺寸 */ 40 | maxSize: 50,/* 定义雪花最大尺寸 */ 41 | newOn: 500 /* 定义密集程度,数字越小越密集 */ 42 | }); 43 | }); -------------------------------------------------------------------------------- /themes/matery/source/libs/awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/libs/awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /themes/matery/source/libs/awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/libs/awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /themes/matery/source/libs/awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/libs/awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /themes/matery/source/libs/awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/libs/awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /themes/matery/source/libs/awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/libs/awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /themes/matery/source/libs/background/canvas-nest.js: -------------------------------------------------------------------------------- 1 | ! function () { 2 | var userAgentInfo = navigator.userAgent; 3 | var Agents = ["iPad", "iPhone", "Android", 4 | "SymbianOS", "Windows Phone", 5 | "iPod", "webOS", "BlackBerry", "IEMobile" 6 | ]; 7 | for (var v = 0; v < Agents.length; v++) { 8 | if (userAgentInfo.indexOf(Agents[v]) > 0) { 9 | return; 10 | } 11 | } 12 | 13 | function o(w, v, i) { 14 | return w.getAttribute(v) || i 15 | } 16 | 17 | function j(i) { 18 | return document.getElementsByTagName(i) 19 | } 20 | 21 | function l() { 22 | var i = j("script"), 23 | w = i.length, 24 | v = i[w - 1]; 25 | return { 26 | l: w, 27 | z: o(v, "zIndex", -1), 28 | o: o(v, "opacity", 0.5), 29 | c: o(v, "color", "0,0,0"), 30 | n: o(v, "count", 99) 31 | } 32 | } 33 | 34 | function k() { 35 | r = u.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, n = u.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight 36 | } 37 | 38 | function b() { 39 | e.clearRect(0, 0, r, n); 40 | var w = [f].concat(t); 41 | var x, v, A, B, z, y; 42 | t.forEach(function (i) { 43 | i.x += i.xa, i.y += i.ya, i.xa *= i.x > r || i.x < 0 ? -1 : 1, i.ya *= i.y > n || i.y < 0 ? -1 : 1, e.fillRect(i.x - 0.5, i.y - 0.5, 1, 1); 44 | for (v = 0; v < w.length; v++) { 45 | x = w[v]; 46 | if (i !== x && null !== x.x && null !== x.y) { 47 | B = i.x - x.x, z = i.y - x.y, y = B * B + z * z; 48 | y < x.max && (x === f && y >= x.max / 2 && (i.x -= 0.03 * B, i.y -= 0.03 * z), A = (x.max - y) / x.max, e.beginPath(), e.lineWidth = A / 2, e.strokeStyle = "rgba(" + s.c + "," + (A + 0.2) + ")", e.moveTo(i.x, i.y), e.lineTo(x.x, x.y), e.stroke()) 49 | } 50 | } 51 | w.splice(w.indexOf(i), 1) 52 | }), m(b) 53 | } 54 | var u = document.createElement("canvas"), 55 | s = l(), 56 | c = "c_n" + s.l, 57 | e = u.getContext("2d"), 58 | r, n, m = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (i) { 59 | window.setTimeout(i, 1000 / 45) 60 | }, 61 | a = Math.random, 62 | f = { 63 | x: null, 64 | y: null, 65 | max: 20000 66 | }; 67 | u.id = c; 68 | u.style.cssText = "position:fixed;top:0;left:0;pointer-events: none;z-index:" + s.z + ";opacity:" + s.o; 69 | j("body")[0].appendChild(u); 70 | k(), window.onresize = k; 71 | window.onmousemove = function (i) { 72 | i = i || window.event, f.x = i.clientX, f.y = i.clientY 73 | }, window.onmouseout = function () { 74 | f.x = null, f.y = null 75 | }; 76 | for (var t = [], p = 0; s.n > p; p++) { 77 | var h = a() * r, 78 | g = a() * n, 79 | q = 2 * a() - 1, 80 | d = 2 * a() - 1; 81 | t.push({ 82 | x: h, 83 | y: g, 84 | xa: q, 85 | ya: d, 86 | max: 6000 87 | }) 88 | } 89 | setTimeout(function () { 90 | b() 91 | }, 100) 92 | }(); 93 | -------------------------------------------------------------------------------- /themes/matery/source/libs/background/ribbon.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016 hustcc 3 | * License: MIT 4 | * Version: v1.0.1 5 | * GitHub: https://github.com/hustcc/ribbon.js 6 | **/ 7 | ! function () { 8 | function e(e, t, n) { 9 | return Number(e.getAttribute(t)) || n 10 | } 11 | 12 | function t() { 13 | for (r.clearRect(0, 0, h, s), a = [{ 14 | x: 0, 15 | y: .7 * s + f 16 | }, { 17 | x: 0, 18 | y: .7 * s - f 19 | }]; a[1].x < h + f;) n(a[0], a[1]) 20 | } 21 | 22 | function n(e, t) { 23 | r.beginPath(), r.moveTo(e.x, e.y), r.lineTo(t.x, t.y); 24 | var n = t.x + (2 * p() - .25) * f, 25 | o = i(t.y); 26 | r.lineTo(n, o), r.closePath(), m -= x / -50, r.fillStyle = "#" + (127 * y(m) + 128 << 16 | 127 * y(m + x / 3) + 128 << 8 | 127 * y(m + x / 3 * 2) + 128).toString(16), r.fill(), a[0] = a[1], a[1] = { 27 | x: n, 28 | y: o 29 | } 30 | } 31 | 32 | function i(e) { 33 | return l = e + (2 * p() - 1.1) * f, l > s || l < 0 ? i(e) : l 34 | } 35 | var o = document.getElementsByTagName("script"), 36 | c = o[o.length - 1]; 37 | config = { 38 | z: e(c, "zIndex", -1), 39 | a: e(c, "alpha", .6), 40 | s: e(c, "size", 90) 41 | }; 42 | var a, l, d = document.createElement("canvas"), 43 | r = d.getContext("2d"), 44 | g = window.devicePixelRatio || 1, 45 | h = window.innerWidth, 46 | s = window.innerHeight, 47 | f = config.s, 48 | u = Math, 49 | m = 0, 50 | x = 2 * u.PI, 51 | y = u.cos, 52 | p = u.random; 53 | d.width = h * g, d.height = s * g, r.scale(g, g), r.globalAlpha = config.a, d.style.cssText = "opacity: " + config.a + ";position:fixed;top:0;left:0;z-index: " + config.z + ";width:100%;height:100%;pointer-events:none;", document.getElementsByTagName("body")[0].appendChild(d), document.onclick = t, document.ontouchstart = t, t() 54 | }(); -------------------------------------------------------------------------------- /themes/matery/source/libs/jqcloud/jqcloud-1.0.4.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQCloud Plugin for jQuery 3 | * 4 | * Version 1.0.4 5 | * 6 | * Copyright 2011, Luca Ongaro 7 | * Licensed under the MIT license. 8 | * 9 | * Date: 2013-05-09 18:54:22 +0200 10 | */ 11 | (function(e){"use strict";e.fn.jQCloud=function(t,n){var r=this,i=r.attr("id")||Math.floor(Math.random()*1e6).toString(36),s={width:r.width(),height:r.height(),center:{x:(n&&n.width?n.width:r.width())/2,y:(n&&n.height?n.height:r.height())/2},delayedMode:t.length>50,shape:!1,encodeURI:!0,removeOverflowing:!0};n=e.extend(s,n||{}),r.addClass("jqcloud").width(n.width).height(n.height),r.css("position")==="static"&&r.css("position","relative");var o=function(){var s=function(e,t){var n=function(e,t){return Math.abs(2*e.offsetLeft+e.offsetWidth-2*t.offsetLeft-t.offsetWidth)t.weight?-1:0});var u=n.shape==="rectangular"?18:2,a=[],f=n.width/n.height,l=function(o,l){var c=i+"_word_"+o,h="#"+c,p=6.28*Math.random(),d=0,v=0,m=0,g=5,y="",b="",w;l.html=e.extend(l.html,{id:c}),l.html&&l.html["class"]&&(y=l.html["class"],delete l.html["class"]),t[0].weight>t[t.length-1].weight&&(g=Math.round((l.weight-t[t.length-1].weight)/(t[0].weight-t[t.length-1].weight)*9)+1),w=e("").attr(l.html).addClass("w"+g+" "+y),l.link?(typeof l.link=="string"&&(l.link={href:l.link}),n.encodeURI&&(l.link=e.extend(l.link,{href:encodeURI(l.link.href).replace(/'/g,"%27")})),b=e("").attr(l.link).text(l.text)):b=l.text,w.append(b);if(!!l.handlers)for(var E in l.handlers)l.handlers.hasOwnProperty(E)&&typeof l.handlers[E]=="function"&&e(w).bind(E,l.handlers[E]);r.append(w);var S=w.width(),x=w.height(),T=n.center.x-S/2,N=n.center.y-x/2,C=w[0].style;C.position="absolute",C.left=T+"px",C.top=N+"px";while(s(w[0],a)){if(n.shape==="rectangular"){v++,v*u>(1+Math.floor(m/2))*u*(m%4%2===0?1:f)&&(v=0,m++);switch(m%4){case 1:T+=u*f+Math.random()*2;break;case 2:N-=u+Math.random()*2;break;case 3:T-=u*f+Math.random()*2;break;case 0:N+=u+Math.random()*2}}else d+=u,p+=(o%2===0?1:-1)*u,T=n.center.x-S/2+d*Math.cos(p)*f,N=n.center.y+d*Math.sin(p)-x/2;C.left=T+"px",C.top=N+"px"}if(n.removeOverflowing&&(T<0||N<0||T+S>n.width||N+x>n.height)){w.remove();return}a.push(w[0]),e.isFunction(l.afterWordRender)&&l.afterWordRender.call(w)},c=function(i){i=i||0;if(!r.is(":visible")){setTimeout(function(){c(i)},10);return}ia;a++)b[a].apply(document);b=[]},e=function(){a||(a=!0,d.call(window),document.removeEventListener?document.removeEventListener("DOMContentLoaded",e,!1):document.attachEvent&&(document.detachEvent("onreadystatechange",e),window==window.top&&(clearInterval(c),c=null)))},document.addEventListener?document.addEventListener("DOMContentLoaded",e,!1):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){/loaded|complete/.test(document.readyState)&&e()}),window==window.top&&(c=setInterval(function(){try{a||document.documentElement.doScroll("left")}catch(b){return}e()},5)))}(),bszCaller={fetch:function(a,b){var c="BusuanziCallback_"+Math.floor(1099511627776*Math.random());window[c]=this.evalCall(b),a=a.replace("=BusuanziCallback","="+c),scriptTag=document.createElement("SCRIPT"),scriptTag.type="text/javascript",scriptTag.defer=!0,scriptTag.src=a,document.getElementsByTagName("HEAD")[0].appendChild(scriptTag)},evalCall:function(a){return function(b){ready(function(){try{a(b),scriptTag.parentElement.removeChild(scriptTag)}catch(c){bszTag.hides()}})}}},bszCaller.fetch("//busuanzi.ibruce.info/busuanzi?jsonpCallback=BusuanziCallback",function(a){bszTag.texts(a),bszTag.shows()}),bszTag={bszs:["site_pv","page_pv","site_uv"],texts:function(a){this.bszs.map(function(b){var c=document.getElementById("busuanzi_value_"+b);c&&(c.innerHTML=a[b])})},hides:function(){this.bszs.map(function(a){var b=document.getElementById("busuanzi_container_"+a);b&&(b.style.display="none")})},shows:function(){this.bszs.map(function(a){var b=document.getElementById("busuanzi_container_"+a);b&&(b.style.display="inline")})}}; -------------------------------------------------------------------------------- /themes/matery/source/libs/others/clicklove.js: -------------------------------------------------------------------------------- 1 | !function(e,t,a){function r(){for(var e=0;e.toc-list{overflow:hidden;position:relative}.toc>.toc-list li{list-style:none}.toc-list{margin:0;padding-left:10px}a.toc-link{color:currentColor;height:100%}.is-collapsible{max-height:1000px;overflow:hidden;transition:all 300ms ease-in-out}.is-collapsed{max-height:0}.is-position-fixed{position:fixed !important;top:0}.is-active-link{font-weight:700}.toc-link::before{background-color:#EEE;content:' ';display:inline-block;height:inherit;left:0;margin-top:-1px;position:absolute;width:2px}.is-active-link::before{background-color:#54BC4B} 2 | -------------------------------------------------------------------------------- /themes/matery/source/medias/avatars/hwsun.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/avatars/hwsun.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/avatars/ivipc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/avatars/ivipc.png -------------------------------------------------------------------------------- /themes/matery/source/medias/banner/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/banner/0.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/banner/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/banner/1.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/banner/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/banner/10.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/banner/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/banner/2.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/banner/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/banner/3.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/banner/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/banner/4.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/banner/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/banner/5.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/banner/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/banner/6.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/banner/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/banner/7.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/banner/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/banner/8.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/banner/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/banner/9.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/comment_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/comment_bg.png -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/0.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/1.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/10.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/11.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/12.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/13.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/14.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/15.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/16.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/17.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/18.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/19.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/2.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/20.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/21.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/22.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/23.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/3.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/4.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/5.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/6.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/7.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/8.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/featureimages/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/featureimages/9.jpg -------------------------------------------------------------------------------- /themes/matery/source/medias/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/logo.png -------------------------------------------------------------------------------- /themes/matery/source/medias/music/daoshu.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/music/daoshu.mp3 -------------------------------------------------------------------------------- /themes/matery/source/medias/reward/alipay.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/reward/alipay.bmp -------------------------------------------------------------------------------- /themes/matery/source/medias/reward/wechat.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/reward/wechat.bmp -------------------------------------------------------------------------------- /themes/matery/source/medias/reward/zan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shw2018/hexo-blog-fly/2b794ab11889991c7f668b0dde71f1cd6e0accbd/themes/matery/source/medias/reward/zan.png --------------------------------------------------------------------------------