重新发布 1.1.2
This commit is contained in:
parent
513fd47bbb
commit
3eb3d0350d
|
@ -37,7 +37,7 @@
|
|||
|
||||
  移植自 [Hexo](https://hexo.io/zh-cn/index.html) 社区中 [张洪 Heo](https://blog.zhheo.com/)
|
||||
对 [Hexo-Theme-Butterfly](https://github.com/liuzhihang/halo-theme-hao)
|
||||
主题的魔改版本。同步参考 [Hexo-Theme-Acrylic-Next](https://github.com/hexo-theme-Acrylic/Hexo-Theme-Acrylic-Next)
|
||||
主题的魔改版本。
|
||||
|
||||
## 安装
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
apiVersion: v1alpha1
|
||||
kind: AnnotationSetting
|
||||
metadata:
|
||||
generateName: annotation-setting-
|
||||
spec:
|
||||
targetRef:
|
||||
group: ""
|
||||
kind: MenuItem
|
||||
formSchema:
|
||||
- $formkit: "text"
|
||||
name: "icon"
|
||||
label: "图标"
|
691
settings.yaml
691
settings.yaml
|
@ -37,6 +37,29 @@ spec:
|
|||
label: 标题
|
||||
placeholder: 请输入标题
|
||||
help: '支持 HTML 语法,比如 <i class="iconfont icon-logo-hao-pro" style="font-size: 1rem"></i>,留空为站点名称'
|
||||
- $formkit: radio
|
||||
name: article
|
||||
label: 导航栏右侧(随机文章按钮开关)
|
||||
value: true
|
||||
options:
|
||||
- label: 打开
|
||||
value: true
|
||||
- label: 关闭
|
||||
value: false
|
||||
- $formkit: radio
|
||||
name: travelling
|
||||
label: 导航栏右侧(开往按钮开关)
|
||||
value: true
|
||||
options:
|
||||
- label: 打开
|
||||
value: true
|
||||
- label: 关闭
|
||||
value: false
|
||||
- $formkit: url
|
||||
name: travellingUrl
|
||||
label: 开往Url
|
||||
placeholder: "请输入开往地址"
|
||||
value: "https://travellings.link"
|
||||
|
||||
- group: top
|
||||
label: 顶部
|
||||
|
@ -93,7 +116,6 @@ spec:
|
|||
name: bikan
|
||||
label: 必看精选
|
||||
placeholder: 请输入地址
|
||||
validation: "url"
|
||||
value: "/"
|
||||
- $formkit: url
|
||||
if: "$get(recentTop).value"
|
||||
|
@ -101,14 +123,12 @@ spec:
|
|||
label: 热门文章
|
||||
placeholder: 请输入地址
|
||||
value: "/"
|
||||
validation: "url"
|
||||
- $formkit: url
|
||||
if: "$get(recentTop).value"
|
||||
name: shiyong
|
||||
label: 实用教程
|
||||
placeholder: 请输入地址
|
||||
value: "/"
|
||||
validation: "url"
|
||||
- $formkit: radio
|
||||
if: "$get(recentTop).value"
|
||||
name: todayRecommend
|
||||
|
@ -134,17 +154,15 @@ spec:
|
|||
name: todayRecommendUrl
|
||||
label: 今日推荐跳转地址
|
||||
placeholder: 请输入地址
|
||||
validation: "url"
|
||||
- $formkit: text
|
||||
name: todayRecommendTitle
|
||||
label: 今日推荐标题
|
||||
placeholder: 请输入标题
|
||||
value: "今日推荐"
|
||||
- $formkit: url
|
||||
- $formkit: attachment
|
||||
name: todayRecommendCover
|
||||
label: 今日推荐背景图
|
||||
placeholder: 请输入地址
|
||||
validation: "url"
|
||||
- $formkit: select
|
||||
if: "$get(recentTop).value"
|
||||
name: recommendPost
|
||||
|
@ -345,61 +363,61 @@ spec:
|
|||
label: 图标
|
||||
options:
|
||||
- label: 电子邮箱
|
||||
value: fa-solid fa-envelope
|
||||
value: icon-mail-line
|
||||
- label: 微信
|
||||
value: fa-brands fa-weixin
|
||||
# - label: 公众号
|
||||
# value:
|
||||
value: icon-wechat2
|
||||
- label: 公众号
|
||||
value: icon-weixingongzhonghao
|
||||
- label: 腾讯 QQ
|
||||
value: fa-brands fa-qq
|
||||
value: icon-qq-line
|
||||
- label: 新浪微博
|
||||
value: fa-brands fa-weibo
|
||||
value: icon-weibo-line
|
||||
- label: 知乎
|
||||
value: fa-brands fa-zhihu
|
||||
# - label: 豆瓣
|
||||
# value:
|
||||
value: icon-zhihu-line
|
||||
- label: 豆瓣
|
||||
value: icon-douban-line
|
||||
- label: 哔哩哔哩
|
||||
value: fa-brands fa-bilibili
|
||||
value: icon-bilibili-line
|
||||
- label: GitHub
|
||||
value: fa-brands fa-github
|
||||
value: icon-github-line
|
||||
- label: GitLab
|
||||
value: fa-brands fa-gitlab
|
||||
# - label: 百度
|
||||
# value: icon-baidu-line
|
||||
# - label: 掘金
|
||||
# value: icon-juejin
|
||||
# - label: 语雀
|
||||
# value: icon-yuque
|
||||
# - label: 博客园
|
||||
# value: icon-CN_cnblogs
|
||||
# - label: CSDN
|
||||
# value: icon-csdn1
|
||||
# - label: LeetCode
|
||||
# value: icon-leetcode
|
||||
# - label: 头条
|
||||
# value: icon-jinritoutiao
|
||||
value: icon-gitlab-line
|
||||
- label: 百度
|
||||
value: icon-baidu-line
|
||||
- label: 掘金
|
||||
value: icon-juejin
|
||||
- label: 语雀
|
||||
value: icon-yuque
|
||||
- label: 博客园
|
||||
value: icon-CN_cnblogs
|
||||
- label: CSDN
|
||||
value: icon-csdn1
|
||||
- label: LeetCode
|
||||
value: icon-leetcode
|
||||
- label: 头条
|
||||
value: icon-jinritoutiao
|
||||
- label: 抖音 / TikTok
|
||||
value: fa-brands fa-tiktok
|
||||
value: icon-douyin
|
||||
- label: Telegram
|
||||
value: fa-brands fa-telegram
|
||||
value: icon-telegram-line
|
||||
- label: Facebook
|
||||
value: fa-brands fa-facebook
|
||||
value: icon-facebook-box-line
|
||||
- label: Instagram
|
||||
value: fa-brands fa-instagram
|
||||
value: icon-instagram-line
|
||||
- label: LinkedIn
|
||||
value: fa-brands fa-linkedin
|
||||
value: icon-linkedin-box-line
|
||||
- label: Twitter
|
||||
value: fa-brands fa-twitter
|
||||
value: icon-twitter-line
|
||||
- label: Slack
|
||||
value: fa-brands fa-slack
|
||||
value: icon-slack-line
|
||||
- label: Discord
|
||||
value: fa-brands fa-discord
|
||||
value: icon-discord-line
|
||||
- label: YouTube
|
||||
value: fa-brands fa-youtube
|
||||
value: icon-youtube-line
|
||||
- label: Steam
|
||||
value: fa-brands fa-steam
|
||||
value: icon-steam-fill
|
||||
- label: Dribbble
|
||||
value: fa-brands fa-dribbble
|
||||
value: icon-dribbble-line
|
||||
- $formkit: text
|
||||
name: name
|
||||
label: 名称
|
||||
|
@ -423,14 +441,12 @@ spec:
|
|||
wechatImgFace:
|
||||
wechatImgBack:
|
||||
children:
|
||||
- $formkit: url
|
||||
- $formkit: attachment
|
||||
name: wechatImgFace
|
||||
placeholder: 公众号正面图
|
||||
validation: "url"
|
||||
- $formkit: url
|
||||
- $formkit: attachment
|
||||
name: wechatImgBack
|
||||
placeholder: 公众号背面图
|
||||
validation: "url"
|
||||
help: 图片可以从公众号后台下载物料或者自制
|
||||
- $formkit: number
|
||||
name: tagQuantity
|
||||
|
@ -446,9 +462,95 @@ spec:
|
|||
- group: footer
|
||||
label: 页脚
|
||||
formSchema:
|
||||
- $formkit: attachment
|
||||
name: centerImg
|
||||
label: 社交媒体中间logo
|
||||
help: logo图片链接
|
||||
placeholder: 请填写logo图片链接
|
||||
- $formkit: repeater
|
||||
name: socialMedia
|
||||
label: 社交媒体
|
||||
name: socialMediaLeft
|
||||
label: 社交媒体(左)
|
||||
value: [ ]
|
||||
children:
|
||||
- $formkit: select
|
||||
name: icon
|
||||
label: 图标
|
||||
options:
|
||||
- label: 电子邮箱
|
||||
value: icon-mail-line
|
||||
- label: 微信
|
||||
value: icon-wechat2
|
||||
- label: 公众号
|
||||
value: icon-weixingongzhonghao
|
||||
- label: 腾讯 QQ
|
||||
value: icon-qq-line
|
||||
- label: 新浪微博
|
||||
value: icon-weibo-line
|
||||
- label: 知乎
|
||||
value: icon-zhihu-line
|
||||
- label: 豆瓣
|
||||
value: icon-douban-line
|
||||
- label: 哔哩哔哩
|
||||
value: icon-bilibili-line
|
||||
- label: GitHub
|
||||
value: icon-github-line
|
||||
- label: GitLab
|
||||
value: icon-gitlab-line
|
||||
- label: 百度
|
||||
value: icon-baidu-line
|
||||
- label: 掘金
|
||||
value: icon-juejin
|
||||
- label: 语雀
|
||||
value: icon-yuque
|
||||
- label: 博客园
|
||||
value: icon-CN_cnblogs
|
||||
- label: CSDN
|
||||
value: icon-csdn1
|
||||
- label: LeetCode
|
||||
value: icon-leetcode
|
||||
- label: 头条
|
||||
value: icon-jinritoutiao
|
||||
- label: 抖音 / TikTok
|
||||
value: icon-douyin
|
||||
- label: Telegram
|
||||
value: icon-telegram-line
|
||||
- label: Facebook
|
||||
value: icon-facebook-box-line
|
||||
- label: Instagram
|
||||
value: icon-instagram-line
|
||||
- label: LinkedIn
|
||||
value: icon-linkedin-box-line
|
||||
- label: Twitter
|
||||
value: icon-twitter-line
|
||||
- label: Slack
|
||||
value: icon-slack-line
|
||||
- label: Discord
|
||||
value: icon-discord-line
|
||||
- label: YouTube
|
||||
value: icon-youtube-line
|
||||
- label: Steam
|
||||
value: icon-steam-fill
|
||||
- label: Dribbble
|
||||
value: icon-dribbble-line
|
||||
- $formkit: text
|
||||
name: name
|
||||
label: 名称
|
||||
- $formkit: text
|
||||
name: url
|
||||
label: 链接
|
||||
- $formkit: radio
|
||||
name: urlType
|
||||
label: 链接类型
|
||||
value: normal
|
||||
help: "如果选择了图片类型,那么在访客点击之后会使用弹框的形式加载"
|
||||
options:
|
||||
- label: 跳转链接
|
||||
value: normal
|
||||
- label: 图片
|
||||
value: image
|
||||
- $formkit: repeater
|
||||
name: socialMediaRight
|
||||
label: 社交媒体(右)
|
||||
value: [ ]
|
||||
children:
|
||||
- $formkit: select
|
||||
|
@ -554,6 +656,60 @@ spec:
|
|||
label: 最近发布文章
|
||||
value: 4
|
||||
help: "最近发布的文章数量"
|
||||
- $formkit: group
|
||||
name: reward
|
||||
label: 打赏
|
||||
value:
|
||||
enable_reward:
|
||||
wxPay:
|
||||
alipay:
|
||||
reward_md_url:
|
||||
children:
|
||||
- $formkit: radio
|
||||
name: enable_reward
|
||||
help: 启用文章打赏,请正确填写名称和二维码图片链接
|
||||
value: true
|
||||
options:
|
||||
- label: 启用
|
||||
value: true
|
||||
- label: 禁用
|
||||
value: false
|
||||
- $formkit: attachment
|
||||
name: wxPay
|
||||
label: 微信
|
||||
help: 微信二维码图片链接
|
||||
placeholder: 请填写微信二维码图片链接
|
||||
- $formkit: attachment
|
||||
name: alipay
|
||||
label: 支付宝
|
||||
help: 支付宝二维码图片链接
|
||||
placeholder: 请填写支付宝二维码图片链接
|
||||
- $formkit: url
|
||||
name: reward_md_url
|
||||
label: 赞赏者名单地址
|
||||
placeholder: "请输入赞赏者名单地址"
|
||||
value: "/about"
|
||||
- $formkit: group
|
||||
name: post_edit
|
||||
label: 运营模式与责任
|
||||
value:
|
||||
enable_post_edit:
|
||||
post_edit_url:
|
||||
children:
|
||||
- $formkit: radio
|
||||
name: enable_post_edit
|
||||
help: 启用文章运营模式与责任,请正确填写链接
|
||||
value: true
|
||||
options:
|
||||
- label: 启用
|
||||
value: true
|
||||
- label: 禁用
|
||||
value: false
|
||||
- $formkit: url
|
||||
name: post_edit_url
|
||||
label: 运营模式与责任地址
|
||||
placeholder: "请输入运营模式与责任地址"
|
||||
value: "/rss"
|
||||
- $formkit: radio
|
||||
name: copyright
|
||||
label: 版权声明
|
||||
|
@ -615,13 +771,20 @@ spec:
|
|||
name: content
|
||||
label: 我的介绍
|
||||
value: <div class="title1">你好,很高兴认识你👋</div> <div class="title2">我叫 <span class="inline-word">程序员小航</span></div> <div class="title1">是一名 前端开发工程师、后端开发工程师、全干工程师</div>
|
||||
|
||||
help: 支持 HTML 语法
|
||||
- $formkit: textarea
|
||||
name: idea
|
||||
label: 我的想法
|
||||
value: <div class="author-content-item-tips">一定</div> <h2>记得<br> 修改这块<span class="inline-word">代码</span> <div class="mask"> <span class="first-tips" data-show="">优秀的产品</span> <span>出色的设计</span> <span>高效的编程</span> <span data-up="">人性化的用户体验</span> </div> </h2>
|
||||
help: 支持 HTML 语法
|
||||
- $formkit: group
|
||||
name: authorCareers
|
||||
label: 职业生涯
|
||||
value:
|
||||
authorCareersTitle:
|
||||
authorCareersTags:
|
||||
authorCareersBackground:
|
||||
children:
|
||||
- $formkit: text
|
||||
name: authorCareersTitle
|
||||
label: 职业生涯标题
|
||||
|
@ -637,62 +800,10 @@ spec:
|
|||
- $formkit: text
|
||||
name: desc
|
||||
label: 描述
|
||||
- $formkit: url
|
||||
- $formkit: attachment
|
||||
name: authorCareersBackground
|
||||
label: 职业生涯背景图
|
||||
placeholder: 建议找个透明图
|
||||
validation: "url"
|
||||
- $formkit: url
|
||||
name: authorCareersPhoto
|
||||
label: 图片
|
||||
validation: "url"
|
||||
value: https://p.zhheo.com/2023788ba3b8739936f844e64f483faacaf1085602.png!cover
|
||||
- $formkit: text
|
||||
name: authorInfoAddress
|
||||
label: 居住地
|
||||
placeholder: 请输入内容
|
||||
- $formkit: text
|
||||
name: authorInfoAddressBackground
|
||||
label: 居住地背景图
|
||||
placeholder: 请输入内容
|
||||
- $formkit: repeater
|
||||
name: authorInfo
|
||||
label: 个人信息
|
||||
value: [ ]
|
||||
children:
|
||||
- $formkit: text
|
||||
name: authorInfoTitle
|
||||
label: 标题
|
||||
placeholder: 请输入内容
|
||||
- $formkit: text
|
||||
name: authorInfoContent
|
||||
label: 内容
|
||||
placeholder: 请输入内容
|
||||
- $formkit: color
|
||||
name: authorInfoColor
|
||||
label: 内容颜色
|
||||
placeholder: 请输入内容
|
||||
|
||||
- $formkit: repeater
|
||||
name: textarea
|
||||
label: 文本块
|
||||
min: 2
|
||||
max: 2
|
||||
help: 左边的一行10字 右面一行19字
|
||||
children:
|
||||
- $formkit: text
|
||||
name: tittle
|
||||
label: 文本块标题
|
||||
value: 座右铭
|
||||
- $formkit: text
|
||||
name: textarea_up
|
||||
label: 文本块(上)
|
||||
value: 生活原本沉闷,
|
||||
- $formkit: text
|
||||
name: textarea_down
|
||||
label: 文本块(下)
|
||||
value: 但跑起来就有风。
|
||||
|
||||
- $formkit: select
|
||||
name: personalities
|
||||
label: 人格
|
||||
|
@ -731,10 +842,272 @@ spec:
|
|||
value: istj
|
||||
- label: ESTJ
|
||||
value: estj
|
||||
- $formkit: attachment
|
||||
name: authorCareersPhoto
|
||||
label: 图片
|
||||
value: https://p.zhheo.com/2023788ba3b8739936f844e64f483faacaf1085602.png!cover
|
||||
- $formkit: repeater
|
||||
name: textarea
|
||||
label: 文本块
|
||||
min: 2
|
||||
max: 2
|
||||
help: 左边的一行10字 右面一行19字
|
||||
children:
|
||||
- $formkit: text
|
||||
name: tittle
|
||||
label: 文本块标题
|
||||
value: 座右铭
|
||||
- $formkit: text
|
||||
name: textarea_up
|
||||
label: 文本块(上)
|
||||
value: 生活原本沉闷,
|
||||
- $formkit: text
|
||||
name: textarea_down
|
||||
label: 文本块(下)
|
||||
value: 但跑起来就有风。
|
||||
- $formkit: group
|
||||
name: game
|
||||
label: 爱好游戏相关配置
|
||||
value:
|
||||
game_tips:
|
||||
game_title:
|
||||
game_uid:
|
||||
game_bg:
|
||||
children:
|
||||
- $formkit: text
|
||||
name: game_tips
|
||||
label: 爱好游戏提示文字
|
||||
placeholder: 请输入内容
|
||||
value: 爱好游戏
|
||||
- $formkit: text
|
||||
name: game_title
|
||||
label: 爱好游戏标题
|
||||
placeholder: 请输入内容
|
||||
value: 英雄联盟
|
||||
- $formkit: text
|
||||
name: game_uid
|
||||
label: 爱好游戏 uid
|
||||
placeholder: 请输入内容
|
||||
value: 比尔吉沃特
|
||||
- $formkit: attachment
|
||||
name: game_bg
|
||||
label: 爱好游戏背景
|
||||
placeholder: 请输入内容
|
||||
value: https://img.zhheo.com/i/2022/08/31/630efa7ae39fe.webp
|
||||
|
||||
|
||||
|
||||
|
||||
- $formkit: group
|
||||
name: game2
|
||||
label: 爱好游戏2相关配置
|
||||
value:
|
||||
game2_tips:
|
||||
game2_title:
|
||||
game2_uid:
|
||||
game2_bg:
|
||||
children:
|
||||
- $formkit: text
|
||||
name: game2_tips
|
||||
label: 爱好游戏2提示文字
|
||||
placeholder: 请输入内容
|
||||
value: 爱好游戏
|
||||
- $formkit: text
|
||||
name: game2_title
|
||||
label: 爱好游戏2标题
|
||||
placeholder: 请输入内容
|
||||
value: 狼人杀
|
||||
- $formkit: text
|
||||
name: game2_uid
|
||||
label: 爱好游戏2 id
|
||||
placeholder: 请输入内容
|
||||
value: ID 1333E3FF
|
||||
- $formkit: attachment
|
||||
name: game2_bg
|
||||
label: 爱好游戏2背景
|
||||
placeholder: 请输入内容
|
||||
value: https://img.zhheo.com/i/2022/08/31/630efa916a851.webp
|
||||
- $formkit: group
|
||||
name: like
|
||||
label: 关注偏好相关配置
|
||||
value:
|
||||
like_tips:
|
||||
like_title:
|
||||
like_bottom:
|
||||
like_bg:
|
||||
children:
|
||||
- $formkit: text
|
||||
name: like_tips
|
||||
label: 关注偏好配置提示文字
|
||||
placeholder: 请输入内容
|
||||
value: 关注偏好
|
||||
- $formkit: text
|
||||
name: like_title
|
||||
label: 关注偏好配置标题
|
||||
placeholder: 请输入内容
|
||||
value: 数码科技
|
||||
- $formkit: text
|
||||
name: like_bottom
|
||||
label: 关注偏好配置底部文字
|
||||
placeholder: 请输入内容
|
||||
value: 手机、电脑软硬件
|
||||
- $formkit: attachment
|
||||
name: like_bg
|
||||
label: 关注偏好配置背景
|
||||
placeholder: 请输入内容
|
||||
value: https://img.zhheo.com/i/2022/08/31/630efac3ecef3.webp
|
||||
- $formkit: group
|
||||
name: music
|
||||
label: 音乐偏好相关配置
|
||||
value:
|
||||
music_tips:
|
||||
music_title:
|
||||
music_link:
|
||||
music_bg:
|
||||
children:
|
||||
- $formkit: text
|
||||
name: music_tips
|
||||
label: 音乐偏好提示性文字
|
||||
placeholder: 请输入内容
|
||||
value: 音乐偏好
|
||||
- $formkit: text
|
||||
name: music_title
|
||||
label: 音乐偏好标题
|
||||
placeholder: 请输入内容
|
||||
value: Hiphop、民谣、华语流行
|
||||
- $formkit: text
|
||||
name: music_link
|
||||
label: 音乐偏好按钮链接
|
||||
placeholder: 请输入内容
|
||||
value:
|
||||
- $formkit: attachment
|
||||
name: music_bg
|
||||
label: 音乐偏好背景
|
||||
placeholder: 请输入内容
|
||||
value: https://img.zhheo.com/i/2022/08/31/630efae141e9a.webp
|
||||
- $formkit: text
|
||||
name: LingQueMonitorID
|
||||
label: 51la网站统计配置
|
||||
placeholder: 请输入内容
|
||||
value: https://v6-widget.51.la/v6/K48u6B53QKqNs741/quote.js
|
||||
- $formkit: group
|
||||
name: map
|
||||
label: 地图相关配置
|
||||
value:
|
||||
StrengthenTitle:
|
||||
background:
|
||||
backgroundDark:
|
||||
authorInfo:
|
||||
children:
|
||||
- $formkit: text
|
||||
name: StrengthenTitle
|
||||
label: 居住地
|
||||
placeholder: 请输入内容
|
||||
- $formkit: attachment
|
||||
name: background
|
||||
label: 地图亮色模式背景
|
||||
placeholder: 请输入内容
|
||||
- $formkit: attachment
|
||||
name: backgroundDark
|
||||
label: 地图暗色模式背景
|
||||
placeholder: 请输入内容
|
||||
- $formkit: repeater
|
||||
name: authorInfo
|
||||
label: 个人信息
|
||||
value: [ ]
|
||||
children:
|
||||
- $formkit: text
|
||||
name: authorInfoTitle
|
||||
label: 标题
|
||||
placeholder: 请输入内容
|
||||
- $formkit: text
|
||||
name: authorInfoContent
|
||||
label: 内容
|
||||
placeholder: 请输入内容
|
||||
- $formkit: color
|
||||
name: authorInfoColor
|
||||
label: 内容颜色
|
||||
placeholder: 请输入内容
|
||||
- $formkit: textarea
|
||||
name: xjlc
|
||||
label: 心路历程
|
||||
value: <div class="author-content-item-tips">心路历程</div> <span class="author-content-item-title">为什么建站?</span> <br>创建这个站的时候,想要就是能够有一个自己能够<b>积累知识、积累兴趣</b>的地方。和他人分享,会让这些成为积累和沉淀。如果能够帮助到更多的人,帮助更多人解决问题,那一定是非常棒的事情。<br> 分享这件事我从很早就开始了,起初做的微信公众号,现在做的网站。因为我比较喜欢研究数码和软件,想要探究在互联网上的事物是如何被创造和发展。网络给我带来了非常多的知识和眼界,我也想力所能及的分享一些我生活的琐碎知识。<br>与大多数垂直类的技术博客不同,这里的种类会非常的繁杂,有<b>技能的教程干货</b>、有<b>生活上的吐槽和妙招</b>、有<b>话题上的思考和想法</b>。一般我研究什么、发现了什么都会分享在这里。<br> 这些就是创造这个小站的本意,<b>也是我分享生活的方式</b>。有幸能和你相遇在这里,相信我们能共同留下一段美好记忆。</p>
|
||||
help: 支持 HTML 语法
|
||||
- group: aboutReward
|
||||
label: 个人(打赏名单)
|
||||
formSchema:
|
||||
- $formkit: text
|
||||
name: title
|
||||
label: 标题
|
||||
placeholder: 请输入内容
|
||||
value: 赞赏名单
|
||||
- $formkit: text
|
||||
name: content
|
||||
label: 内容
|
||||
placeholder: 请输入内容
|
||||
value: 感谢赞赏的人,因为你们,让我感受到写博客这件事情能够给你们创造了价值。这会让我在这条路上走得更远。
|
||||
- $formkit: group
|
||||
name: reward
|
||||
label: 打赏按钮
|
||||
value:
|
||||
enable_reward:
|
||||
name:
|
||||
content:
|
||||
wxPay:
|
||||
alipay:
|
||||
children:
|
||||
- $formkit: radio
|
||||
name: enable_reward
|
||||
help: 启用文章打赏,请正确填写名称和二维码图片链接
|
||||
value: true
|
||||
options:
|
||||
- label: 启用
|
||||
value: true
|
||||
- label: 禁用
|
||||
value: false
|
||||
- $formkit: text
|
||||
name: name
|
||||
label: 按钮名称
|
||||
placeholder: 请输入内容
|
||||
value: 赞赏作者
|
||||
- $formkit: text
|
||||
name: content
|
||||
label: 内容
|
||||
placeholder: 请输入内容
|
||||
value: 感谢你赐予我前进的力量
|
||||
- $formkit: attachment
|
||||
name: wxPay
|
||||
label: 微信
|
||||
help: 微信二维码图片链接
|
||||
placeholder: 请填写微信二维码图片链接
|
||||
- $formkit: attachment
|
||||
name: alipay
|
||||
label: 支付宝
|
||||
help: 支付宝二维码图片链接
|
||||
placeholder: 请填写支付宝二维码图片链接
|
||||
- $formkit: repeater
|
||||
name: reward_list
|
||||
label: 打赏名单
|
||||
value: [ ]
|
||||
children:
|
||||
- $formkit: text
|
||||
name: name
|
||||
label: 名称
|
||||
placeholder: 请输入内容
|
||||
- $formkit: text
|
||||
name: amount
|
||||
label: 金额
|
||||
placeholder: 请输入内容
|
||||
- $formkit: date
|
||||
name: datatime
|
||||
label: 时间
|
||||
placeholder: 请输入内容
|
||||
- $formkit: radio
|
||||
name: sign
|
||||
label: 标记
|
||||
value: "N"
|
||||
options:
|
||||
- label: 是
|
||||
value: "Y"
|
||||
- label: 否
|
||||
value: "N"
|
||||
|
||||
- group: style
|
||||
label: 样式(WIP)
|
||||
|
@ -776,29 +1149,24 @@ spec:
|
|||
value: true
|
||||
- label: 关闭
|
||||
value: false
|
||||
- $formkit: radio
|
||||
name: introduction
|
||||
label: 介绍框(WIP)
|
||||
value: true
|
||||
options:
|
||||
- label: 打开
|
||||
value: true
|
||||
- label: 关闭
|
||||
value: false
|
||||
- $formkit: text
|
||||
name: introductionTitle
|
||||
label: 介绍框标题
|
||||
value: '欢迎使用主题 Hao'
|
||||
value: '协议提醒助手'
|
||||
- $formkit: text
|
||||
name: introductionTip
|
||||
label: 介绍框内容
|
||||
value: '⭐️ Star halo-theme-hao,提交主题建议或意见。'
|
||||
value: '查看本站为你的个人隐私做出的努力'
|
||||
- $formkit: url
|
||||
name: introductionUrl
|
||||
validation: "url"
|
||||
value: "https://github.com/liuzhihang/halo-theme-hao"
|
||||
value: "/privacy"
|
||||
label: 介绍框点击跳转地址
|
||||
placeholder: 请输入跳转 url
|
||||
- $formkit: text
|
||||
name: introductionName
|
||||
value: "本站如何保护你的隐私"
|
||||
label: 按钮标题
|
||||
placeholder: 请输入按钮标题
|
||||
|
||||
- group: rightMenu
|
||||
label: 右键菜单
|
||||
|
@ -857,7 +1225,89 @@ spec:
|
|||
label: 按钮跳转连链接
|
||||
placeholder: 请输入跳转 url
|
||||
|
||||
|
||||
- group: fcircle
|
||||
label: 友链鱼塘
|
||||
formSchema:
|
||||
- $formkit: url
|
||||
name: backgroundImg
|
||||
validation: "url"
|
||||
label: 图片
|
||||
value: https://img.cdn.yzczi.com/img/64624940e3623.jpeg
|
||||
placeholder: 请输入图片地址
|
||||
- $formkit: text
|
||||
name: smallTitle
|
||||
label: 小标题
|
||||
value: 友链
|
||||
- $formkit: text
|
||||
name: bigTitle
|
||||
label: 大标题
|
||||
value: 最新文章订阅
|
||||
- $formkit: text
|
||||
name: detail
|
||||
label: 描述
|
||||
value: 使用 友链朋友圈 订阅友链最新文章
|
||||
- $formkit: text
|
||||
name: buttonTitle
|
||||
label: 按钮标题
|
||||
value: 部署项目
|
||||
- $formkit: url
|
||||
name: buttonUrl
|
||||
validation: "url"
|
||||
value: "https://github.com/Rock-Candy-Tea/hexo-circle-of-friends"
|
||||
label: 按钮跳转连链接
|
||||
placeholder: 请输入跳转 url
|
||||
- $formkit: url
|
||||
name: apiurl
|
||||
value: "`https://moments.0206.ink/`"
|
||||
label: token地址
|
||||
placeholder: 请输入token地址
|
||||
help: 注意格式 (`token地址`)
|
||||
- $formkit: url
|
||||
name: fetchUrl
|
||||
value: "`https://moments.0206.ink/randomfriend?num=3`"
|
||||
label: 页脚友链地址
|
||||
placeholder: 请输入页脚友链地址
|
||||
help: 注意格式 (`友链地址`)
|
||||
- group: comments
|
||||
label: 评论
|
||||
formSchema:
|
||||
- $formkit: select
|
||||
name: use
|
||||
label: 评论选择
|
||||
value: commentWidget
|
||||
help: Twikoo评论需要(打开,envId填写,accessToken填写)
|
||||
options:
|
||||
- label: 默认
|
||||
value: commentWidget
|
||||
- label: Twikoo评论
|
||||
value: Twikoo
|
||||
- $formkit: radio
|
||||
name: twikoo
|
||||
label: Twikoo评论
|
||||
value: false
|
||||
options:
|
||||
- label: 打开
|
||||
value: true
|
||||
- label: 关闭
|
||||
value: false
|
||||
- $formkit: url
|
||||
name: envId
|
||||
value: "`xxxxxxx`"
|
||||
label: Twikoo评论-环境id
|
||||
placeholder: 请输入环境id
|
||||
help: 注意格式 (`地址`)
|
||||
- $formkit: text
|
||||
name: accessToken
|
||||
value: "`xxxxxxx`"
|
||||
label: Twikoo评论-token
|
||||
placeholder: 请输入token
|
||||
help: 注意格式 (`token`)
|
||||
- $formkit: text
|
||||
name: mailMd5
|
||||
value: "`xxxxxxx`"
|
||||
label: Twikoo评论-mailMd5
|
||||
placeholder: 请输入mailMd5
|
||||
help: 注意格式 (`mailMd5`)
|
||||
- group: other
|
||||
label: 其他设置
|
||||
formSchema:
|
||||
|
@ -874,6 +1324,7 @@ spec:
|
|||
name: loadingBoxImg
|
||||
validation: "url"
|
||||
label: 加载页图片 URL
|
||||
value: "https://bu.dusays.com/2023/03/03/6401a7960c0fb.webp"
|
||||
placeholder: 请输入图片 url
|
||||
- $formkit: radio
|
||||
name: loadProgressBar
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = '404')}"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<th:block th:fragment="content">
|
||||
|
||||
<div class="page" id="body-wrap">
|
||||
<div class="errors">
|
||||
|
||||
<!-- 头部导航栏 -->
|
||||
<div>
|
||||
<header class="not-top-img" id="page-header">
|
||||
<nav th:replace="~{modules/nav :: nav(title = null)}"></nav>
|
||||
</header>
|
||||
</div>
|
||||
<div id="error-wrap">
|
||||
<div class="error-content">
|
||||
<div class="error-img" style="background-image: url('/themes/theme-hao/assets/images/404s.gif')">
|
||||
</div>
|
||||
<div class="error-info">
|
||||
<h1 class="error_title">404</h1>
|
||||
<div class="error_subtitle">请尝试站内搜索寻找文章</div>
|
||||
<a class="button--animated" href="/"
|
||||
data-pjax-state=""><i class="fas fa-rocket"></i>回到主页</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="aside-list">
|
||||
<div class="aside-list-group"
|
||||
th:with='topGroupPosts = ${postFinder.list(1,6)},
|
||||
postRandomImg=${#strings.contains(theme.config.layout.postRandomImg,"?") ? theme.config.layout.postRandomImg : theme.config.layout.postRandomImg+"?"}'>
|
||||
<div th:each="post : ${topGroupPosts}" class="aside-list-item"><a class="thumbnail"
|
||||
th:href="@{${post.status.permalink}}"
|
||||
th:title="${post.spec.title}"><img
|
||||
loading="lazy"
|
||||
th:src='${#strings.isEmpty(post.spec.cover) ? postRandomImg+","+post.spec.title : post.spec.cover}'
|
||||
th:alt="${post.spec.title}"></a>
|
||||
<div class="content"><a class="title" th:href="@{${post.status.permalink}}"
|
||||
th:title="${post.spec.title}"
|
||||
data-pjax-state="">[[${post.spec.title}]]</a>
|
||||
<!-- <time datetime="2023-06-08T04:08:22.000Z" title="创建 2023-06-08 12:08:22">2023-06-08</time> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- 底部 -->
|
||||
<footer th:replace="~{modules/footer :: footer}"></footer>
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
</html>
|
|
@ -24,7 +24,8 @@
|
|||
th:text="${authorTag.tag}"></span>
|
||||
</div>
|
||||
<div class="author-img">
|
||||
<img th:src="@{${#strings.isEmpty(site.favicon) ? '/assets/images/hao-logo.jpg' : site.favicon}}">
|
||||
<img
|
||||
th:src="@{${#strings.isEmpty(site.favicon) ? '/assets/images/hao-logo.jpg' : site.favicon}}">
|
||||
</div>
|
||||
<div class="author-tag-right"
|
||||
th:if="${not #lists.isEmpty(theme.config.about.authorInfoRightTags)}"
|
||||
|
@ -37,8 +38,8 @@
|
|||
|
||||
|
||||
<div class="author-content">
|
||||
<div class="author-content-item myInfoAndSayHello"
|
||||
th:utext="${theme.config.about.content}"></div>
|
||||
<div class="author-content-item myInfoAndSayHello" th:utext="${theme.config.about.content}">
|
||||
</div>
|
||||
<div class="aboutsiteTips author-content-item" th:utext="${theme.config.about.idea}"></div>
|
||||
</div>
|
||||
<script>
|
||||
|
@ -361,17 +362,17 @@
|
|||
<div class="card-content">
|
||||
<div class="author-content-item-tips">生涯</div>
|
||||
<span class="author-content-item-title"
|
||||
th:text="${theme.config.about.authorCareersTitle}">无限进步</span>
|
||||
th:text="${theme.config.about.authorCareers.authorCareersTitle}">无限进步</span>
|
||||
<div class="careers-group"
|
||||
th:if="${not #lists.isEmpty(theme.config.about.authorCareersTags)}"
|
||||
th:with="careersTags = ${theme.config.about.authorCareersTags}">
|
||||
th:if="${not #lists.isEmpty(theme.config.about.authorCareers.authorCareersTags)}"
|
||||
th:with="careersTags = ${theme.config.about.authorCareers.authorCareersTags}">
|
||||
<div class="careers-item" th:each="tag : ${careersTags}">
|
||||
<div class="circle" th:style="'background:' + ${tag.background}"></div>
|
||||
<div class="name" th:text="${tag.desc}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<img alt="生涯" class="author-content-img"
|
||||
th:src="${#strings.isEmpty(theme.config.about.authorCareersBackground) ? '/assets/images/hao-logo.jpg' : theme.config.about.authorCareersBackground}">
|
||||
th:src="@{${#strings.isEmpty(theme.config.about.authorCareers.authorCareersBackground) ? '/assets/images/hao-logo.jpg' : theme.config.about.authorCareers.authorCareersBackground}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -389,9 +390,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/INFP-%E4%BA%BA%E6%A0%BC'}">调停者</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -403,9 +402,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/INTJ-%E4%BA%BA%E6%A0%BC'}">建筑师</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -417,9 +414,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/INTP-%E4%BA%BA%E6%A0%BC'}">逻辑学家</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -431,9 +426,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/ENTJ-%E4%BA%BA%E6%A0%BC'}">指挥官</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -445,9 +438,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/ENTP-%E4%BA%BA%E6%A0%BC'}">辩论家</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -459,9 +450,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/ENFJ-%E4%BA%BA%E6%A0%BC'}">主人公</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -473,9 +462,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/ENFP-%E4%BA%BA%E6%A0%BC'}">竞选者</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -487,9 +474,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/ESTJ-%E4%BA%BA%E6%A0%BC'}">总经理</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -501,9 +486,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/ESTP-%E4%BA%BA%E6%A0%BC'}">企业家</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -515,9 +498,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/ESFJ-%E4%BA%BA%E6%A0%BC'}">执政官</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -529,9 +510,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/ESFP-%E4%BA%BA%E6%A0%BC'}">表演者</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -543,9 +522,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/INFJ-%E4%BA%BA%E6%A0%BC'}">提倡者</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -557,9 +534,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/ISTJ-%E4%BA%BA%E6%A0%BC'}">物流师</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -571,9 +546,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/ISTP-%E4%BA%BA%E6%A0%BC'}">鉴赏家</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -585,9 +558,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/ISFJ-%E4%BA%BA%E6%A0%BC'}">守卫者</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -599,9 +570,7 @@
|
|||
style="transform: rotateY(180deg);"></div>
|
||||
<div class="post-tips">在 <a href="https://www.16personalities.com/"
|
||||
rel="noopener nofollow" target="_blank">16personalities</a>
|
||||
了解更多关于 <a
|
||||
rel="noopener external nofollow"
|
||||
target="_blank"
|
||||
了解更多关于 <a rel="noopener external nofollow" target="_blank"
|
||||
th:href="@{'https://www.16personalities.com/ch/ISFP-%E4%BA%BA%E6%A0%BC'}">探险家</a>
|
||||
</div>
|
||||
</th:block>
|
||||
|
@ -617,7 +586,8 @@
|
|||
<div class="author-content-item maxim">
|
||||
<div class="author-content-item-tips" th:text="${texts[0].tittle}">座右铭</div>
|
||||
<span class="maxim-title">
|
||||
<span style="opacity: 0.6;margin-bottom:8px;" th:text="${texts[0].textarea_up}">生活原本沉闷,</span>
|
||||
<span style="opacity: 0.6;margin-bottom:8px;"
|
||||
th:text="${texts[0].textarea_up}">生活原本沉闷,</span>
|
||||
<span th:text="${texts[0].textarea_down}">但跑起来就有风。</span>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -626,7 +596,8 @@
|
|||
<div class="card-content">
|
||||
<div class="author-content-item-tips" th:text="${texts[1].tittle}">特长</div>
|
||||
<span class="buff-title">
|
||||
<span style="opacity: 0.6;margin-bottom:8px;" th:text="${texts[1].textarea_up}">玄学流电脑疑难问题解决
|
||||
<span style="opacity: 0.6;margin-bottom:8px;"
|
||||
th:text="${texts[1].textarea_up}">玄学流电脑疑难问题解决
|
||||
<span class="inline-word">专家</span>
|
||||
</span>
|
||||
<span th:text="${texts[1].textarea_down}">软件学习能力</span>
|
||||
|
@ -634,60 +605,75 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="author-content">
|
||||
<div class="author-content-item game-lol"
|
||||
th:style="'background: url('+ @{${theme.config.about.game.game_bg}} +') top / cover no-repeat'">
|
||||
<div class="card-content">
|
||||
<div class="author-content-item-tips" th:text="${theme.config.about.game.game_tips}">
|
||||
|
||||
<!-- hobbies -->
|
||||
<!-- <div class="author-content">-->
|
||||
<!-- <div class="author-content-item left-side">-->
|
||||
<!-- <img alt="" src="https://p.zhheo.com/2023788ba3b8739936f844e64f483faacaf1085602.png!cover">-->
|
||||
<!-- <div class="card-content">-->
|
||||
<!-- <div class="author-content-item-tips">英雄联盟</div>-->
|
||||
<!-- <span class="author-content-item-title"></span>-->
|
||||
<!-- <div class="content-bottom">-->
|
||||
<!-- <div class="tips"></div>-->
|
||||
<!-- <div class="tips"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="author-content-item right-side">-->
|
||||
<!-- <img alt="" src="https://p.zhheo.com/2023ff56a55649cf81989b9e1f4efc836907085102.png!cover">-->
|
||||
<!-- <div class="card-content">-->
|
||||
<!-- <div class="author-content-item-tips">狼人杀</div>-->
|
||||
<!-- <span class="author-content-item-title"></span>-->
|
||||
<!-- <div class="content-bottom">-->
|
||||
<!-- <div class="tips"></div>-->
|
||||
<!-- <div class="tips"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<span class="author-content-item-title"
|
||||
th:text="${theme.config.about.game.game_title}"></span>
|
||||
<div class="content-bottom">
|
||||
<div class="icon-group">
|
||||
<div class="loading-bar" role="presentation" aria-hidden="true"></div>
|
||||
</div>
|
||||
<div class="tips" th:text="${theme.config.about.game.game_uid}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="author-content-item game-wolf"
|
||||
th:style="'background: url('+ @{${theme.config.about.game2.game2_bg}} +') top / cover no-repeat'">
|
||||
<div class="card-content">
|
||||
<div class="author-content-item-tips" th:text="${theme.config.about.game2.game2_tips}">
|
||||
|
||||
<!-- <div class="author-content">-->
|
||||
</div>
|
||||
<span class="author-content-item-title"
|
||||
th:text="${theme.config.about.game2.game2_title}"></span>
|
||||
<div class="content-bottom">
|
||||
<div class="tips" th:text="${theme.config.about.game2.game2_uid}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div-->
|
||||
<!-- class="author-content-item like-technology"-->
|
||||
<!-- style="background: url(https://p.zhheo.com/2023e6940f5f56f0004af2705c3586d1fdf5190802.png!cover)">-->
|
||||
<!-- <div class="card-content">-->
|
||||
<!-- <div class="author-content-item-tips">关注偏好</div>-->
|
||||
<!-- <span class="author-content-item-title">数码科技</span>-->
|
||||
<!-- <div class="content-bottom">-->
|
||||
<!-- <div class="tips">手机、电脑软硬件</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="author-content">
|
||||
|
||||
<!-- <div-->
|
||||
<!-- class="author-content-item like-music"-->
|
||||
<!-- style="background: url(https://bu.dusays.com/2023/03/12/640dc6bed6d2d.jpg)">-->
|
||||
<!-- <div class="card-content">-->
|
||||
<!-- <div class="author-content-item-tips">音乐偏好</div>-->
|
||||
<!-- <span class="author-content-item-title">Hiphop、民谣、华语流行</span>-->
|
||||
<!-- <div class="content-bottom">-->
|
||||
<!-- <div class="tips"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="author-content-item like-technology"
|
||||
th:style="'background: url('+ @{${theme.config.about.like.like_bg}} +') top / cover no-repeat;'">
|
||||
<div class="card-content">
|
||||
<div class="author-content-item-tips" th:text="${theme.config.about.like.like_tips}">
|
||||
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<span class="author-content-item-title"
|
||||
th:text="${theme.config.about.like.like_title}"></span>
|
||||
<div class="content-bottom">
|
||||
<div class="tips" th:text="${theme.config.about.like.like_bottom}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="author-content-item like-music"
|
||||
th:style="'background: url('+ @{${theme.config.about.music.music_bg}} +') top / cover no-repeat'">
|
||||
<div class="card-content">
|
||||
<div class="author-content-item-tips" th:text="${theme.config.about.music.music_tips}">
|
||||
|
||||
</div>
|
||||
<span class="author-content-item-title"
|
||||
th:text="${theme.config.about.music.music_title}"></span>
|
||||
<div class="content-bottom">
|
||||
<div class="tips">跟 [[${site.title}]] 一起欣赏更多音乐</div>
|
||||
</div>
|
||||
<!-- <div class="banner-button-group"><a class="banner-button"
|
||||
target="_blank"
|
||||
rel="noopener nofollow">
|
||||
<i class="heofont icon-arrow-right-circle-fill"></i>
|
||||
<span class="banner-button-text">更多推荐</span></a>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="author-content">
|
||||
<div class="about-statistic author-content-item"
|
||||
|
@ -699,20 +685,31 @@
|
|||
<div class="post-tips">统计信息来自 <a href="https://invite.51.la/1NzKqTeb?target=V6"
|
||||
rel="noopener nofollow"
|
||||
target="_blank">51la网站统计</a></div>
|
||||
<div class="banner-button-group"><a class="banner-button"
|
||||
onclick="pjax.loadUrl('/archives')"
|
||||
data-pjax-state=""><i
|
||||
class="anzhiyufont anzhiyu-icon-arrow-circle-right"></i><span
|
||||
class="banner-button-text">文章隧道</span></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
fetch("https://v6-widget.51.la/v6/K0yfsHaZHpjPWap0/quote.js")
|
||||
// 链接替换即可,不需要后面的参数
|
||||
fetch("[[${theme.config.about.LingQueMonitorID}]]")
|
||||
.then(res => res.text())
|
||||
.then(data => {
|
||||
let title = ["最近活跃", "今日人数", "今日访问", "昨日人数", "昨日访问", "本月访问", "总访问量"];
|
||||
// let num = data.match(/(?<=<\/span><span>).*?(?=<\/span><\/p>)/g)
|
||||
let num = data.match(/(<\/span><span>).*?(\/span><\/p>)/g);
|
||||
|
||||
num = num.map(el => {
|
||||
let val = el.replace(/(<\/span><span>)/g, "");
|
||||
let str = val.replace(/(<\/span><\/p>)/g, "");
|
||||
return str;
|
||||
});
|
||||
|
||||
let s = document.getElementById("statistic");
|
||||
|
||||
// 自定义不显示哪个或者显示哪个,如下为不显示 最近活跃访客 和 总访问量
|
||||
let statistic = [];
|
||||
for (let i = 0; i < num.length; i++) {
|
||||
if (i == 0 || i == num.length - 1) continue;
|
||||
|
@ -720,158 +717,126 @@
|
|||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div class="author-content-item-group column mapAndInfo">
|
||||
<div class="author-content-item map single"
|
||||
th:style="'background:' + ${theme.config.about.authorInfoAddressBackground} ">
|
||||
<div class="author-content-item map single">
|
||||
<span class="map-title">我现在住在
|
||||
<b th:text="${theme.config.about.authorInfoAddress}"></b>
|
||||
</span>
|
||||
<b>[[${theme.config.about.map.StrengthenTitle}]]</b></span>
|
||||
</div>
|
||||
<div class="author-content-item selfInfo single"
|
||||
th:if="${not #lists.isEmpty(theme.config.about.authorInfo)}"
|
||||
th:with="authorInfo = ${theme.config.about.authorInfo}">
|
||||
<div th:each="info : ${authorInfo}">
|
||||
<span class="selfInfo-title" th:text="${info.authorInfoTitle}"></span>
|
||||
<span class="selfInfo-content" th:style="'color:' + ${info.authorInfoColor} "
|
||||
th:text="${info.authorInfoContent}"></span>
|
||||
th:if="${not #lists.isEmpty(theme.config.about.map.authorInfo)}"
|
||||
th:with="texts = ${theme.config.about.map.authorInfo}">
|
||||
<div><span class="selfInfo-title" th:text="${texts[0].authorInfoTitle}">生于</span><span
|
||||
class="selfInfo-content" th:style="'color:' + ${texts[0].authorInfoColor}"
|
||||
th:text="${texts[0].authorInfoContent}">2000</span>
|
||||
</div>
|
||||
<div><span class="selfInfo-title"
|
||||
th:text="${texts[1].authorInfoTitle}">太原理工大学</span><span
|
||||
class="selfInfo-content" th:style="'color:' + ${texts[1].authorInfoColor}"
|
||||
th:text="${texts[1].authorInfoContent}">计算机科学</span>
|
||||
</div>
|
||||
<div><span class="selfInfo-title"
|
||||
th:text="${texts[2].authorInfoTitle}">现在职业</span><span
|
||||
class="selfInfo-content" th:style="'color:' + ${texts[2].authorInfoColor}"
|
||||
th:text="${texts[2].authorInfoContent}">BI工程师</span>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.author-content-item.map {
|
||||
background: url([[${theme.config.about.map.background}]]) no-repeat center;
|
||||
min-height: 160px;
|
||||
max-height: 400px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin-bottom: 0.5rem;
|
||||
height: 60%;
|
||||
background-size: 100%;
|
||||
transition: 1s ease-in-out;
|
||||
}
|
||||
|
||||
[data-theme=dark] .author-content-item.map {
|
||||
background: url([[${theme.config.about.map.backgroundDark}]]) no-repeat center;
|
||||
background-size: 100%;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="author-content">
|
||||
<div class="create-site-post author-content-item single" th:utext="${theme.config.about.xjlc}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="author-content">
|
||||
<div class="create-site-post author-content-item single">
|
||||
<div class="author-content-item-tips">心路历程</div>
|
||||
<div class="author-content-item single reward">
|
||||
<div class="author-content-item-tips">致谢</div>
|
||||
<span class="author-content-item-title"
|
||||
th:text="${singlePage.spec.title}">为什么建站?</span>
|
||||
<p th:utext="${singlePage.content.content}"></p>
|
||||
th:text="${theme.config.aboutReward.title}">赞赏名单</span>
|
||||
<div class="author-content-item-description" th:text="${theme.config.aboutReward.content}">
|
||||
感谢赞赏的人,因为你们,让我感受到写博客这件事情能够给你们创造了价值。这会让我在这条路上走得更远。
|
||||
</div>
|
||||
<div class="post-reward" th:if="${theme.config.aboutReward.reward.enable_reward}">
|
||||
<div class="post-reward" onclick="AddRewardMask()"></div>
|
||||
<div class="reward-button" title="赞赏作者"><i class="heofont icon-hand-heart-fill"></i>
|
||||
[[${theme.config.aboutReward.reward.name}]]
|
||||
</div>
|
||||
<div class="reward-main">
|
||||
<ul class="reward-all">
|
||||
<span class="reward-title">
|
||||
[[${theme.config.aboutReward.reward.content}]]</span>
|
||||
<ul class="reward-group">
|
||||
|
||||
|
||||
<li class="reward-item">
|
||||
<a href="" target="_blank"
|
||||
th:href="@{${theme.config.aboutReward.reward.wxPay}}">
|
||||
<img alt="微信" class="post-qr-code-img"
|
||||
th:src="${theme.config.aboutReward.reward.wxPay}">
|
||||
</a>
|
||||
<div class="post-qr-code-desc">
|
||||
微信
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="reward-item">
|
||||
<a href="" target="_blank"
|
||||
th:href="@{${theme.config.aboutReward.reward.alipay}}">
|
||||
<img alt="支付宝" class="post-qr-code-img"
|
||||
th:src="${theme.config.aboutReward.reward.alipay}">
|
||||
</a>
|
||||
<div class="post-qr-code-desc">
|
||||
支付宝
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="author-content">-->
|
||||
<!-- <div class="author-content-item single reward">-->
|
||||
<!-- <div class="author-content-item-tips">致谢</div>-->
|
||||
<!-- <span class="author-content-item-title">赞赏名单</span>-->
|
||||
<!-- <div class="author-content-item-description">-->
|
||||
<!-- 感谢赞赏的人,因为你们,让我感受到写博客这件事情能够给你们创造了价值。这会让我在这条路上走得更远。-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="reward-list-all">-->
|
||||
<div class="reward-list-all" th:if="${not #lists.isEmpty(theme.config.aboutReward.reward_list)}"
|
||||
th:with="authorRewardList = ${theme.config.aboutReward.reward_list}">
|
||||
|
||||
<!-- <div class="reward-list-item">-->
|
||||
<!-- <div class="reward-list-item-name">思宁</div>-->
|
||||
<!-- <div class="reward-list-bottom-group">-->
|
||||
<!-- <div class="reward-list-item-money">¥ 1</div>-->
|
||||
<!-- <time class="datatime reward-list-item-time"-->
|
||||
<!-- datetime="2021-05-06T08:00:00+08:00"></time>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="reward-list-item" th:each="authorReward : ${authorRewardList}">
|
||||
<div class="reward-list-item-name">[[${authorReward.name}]]</div>
|
||||
<div class="reward-list-bottom-group">
|
||||
<div th:if="${authorReward.sign == 'N'}" class="reward-list-item-money">¥
|
||||
[[${authorReward.amount}]]
|
||||
</div>
|
||||
<div th:if="${authorReward.sign == 'Y'}" class="reward-list-item-money"
|
||||
style="background: var(--heo-vip);">¥ [[${authorReward.amount}]]
|
||||
</div>
|
||||
<time class="datatime reward-list-item-time">[[${authorReward.datatime}]]</time>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="reward-list-item">-->
|
||||
<!-- <div class="reward-list-item-name">小屁卡</div>-->
|
||||
<!-- <div class="reward-list-bottom-group">-->
|
||||
<!-- <div class="reward-list-item-money">¥ 3</div>-->
|
||||
<!-- <time class="datatime reward-list-item-time"-->
|
||||
<!-- datetime="2021-04-20T08:00:00+08:00"></time>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="reward-list-item">-->
|
||||
<!-- <div class="reward-list-item-name">Adil</div>-->
|
||||
<!-- <div class="reward-list-bottom-group">-->
|
||||
<!-- <div class="reward-list-item-money" style="background: var(--heo-vip);">¥ 50-->
|
||||
<!-- </div>-->
|
||||
<!-- <time class="datatime reward-list-item-time"-->
|
||||
<!-- datetime="2021-03-25T08:00:00+08:00"></time>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="reward-list-item">-->
|
||||
<!-- <div class="reward-list-item-name">ғᴏᴜʀʏ</div>-->
|
||||
<!-- <div class="reward-list-bottom-group">-->
|
||||
<!-- <div class="reward-list-item-money">¥ 1</div>-->
|
||||
<!-- <time class="datatime reward-list-item-time"-->
|
||||
<!-- datetime="2021-03-13T08:00:00+08:00"></time>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="reward-list-item">-->
|
||||
<!-- <div class="reward-list-item-name">**才</div>-->
|
||||
<!-- <div class="reward-list-bottom-group">-->
|
||||
<!-- <div class="reward-list-item-money">¥ 2</div>-->
|
||||
<!-- <time class="datatime reward-list-item-time"-->
|
||||
<!-- datetime="2021-02-17T08:00:00+08:00"></time>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="reward-list-item">-->
|
||||
<!-- <div class="reward-list-item-name">ZEvan</div>-->
|
||||
<!-- <div class="reward-list-bottom-group">-->
|
||||
<!-- <div class="reward-list-item-money">¥ 1</div>-->
|
||||
<!-- <time class="datatime reward-list-item-time"-->
|
||||
<!-- datetime="2021-01-11T08:00:00+08:00"></time>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="post-reward">-->
|
||||
<!-- <div class="post-reward" onclick="AddRewardMask()"></div>-->
|
||||
<!-- <div class="reward-button" title="赞赏作者"><i-->
|
||||
<!-- class="heofont icon-hand-heart-fill"></i>-->
|
||||
<!-- 打赏作者-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="reward-main">-->
|
||||
<!-- <ul class="reward-all">-->
|
||||
<!-- <span class="reward-title">感谢你赐予我前进的力量</span>-->
|
||||
<!-- <ul class="reward-group">-->
|
||||
|
||||
|
||||
<!-- <li class="reward-item">-->
|
||||
<!-- <a href="" target="_blank">-->
|
||||
<!-- <img alt="微信" class="post-qr-code-img" src="">-->
|
||||
<!-- </a>-->
|
||||
<!-- <div class="post-qr-code-desc">-->
|
||||
<!-- 微信-->
|
||||
<!-- </div>-->
|
||||
<!-- </li>-->
|
||||
|
||||
<!-- <li class="reward-item">-->
|
||||
<!-- <a href="" target="_blank">-->
|
||||
<!-- <img alt="支付宝" class="post-qr-code-img" src="">-->
|
||||
<!-- </a>-->
|
||||
<!-- <div class="post-qr-code-desc">-->
|
||||
<!-- 支付宝-->
|
||||
<!-- </div>-->
|
||||
<!-- </li>-->
|
||||
|
||||
<!-- </ul>-->
|
||||
<!-- </ul>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 评论模块 -->
|
||||
<div id="post-comment"
|
||||
th:if="${pluginFinder.available('PluginCommentWidget') and singlePage.spec.allowComment}">
|
||||
<div class="comment-head">
|
||||
<div class="comment-headline"><i class="iconfont icon-comment-alt"></i> <span>评论</span></div>
|
||||
<div class="comment-privacy"><a href="#">隐私政策</a></div>
|
||||
<div class="comment-tips" id="comment-tips">
|
||||
<span>你无需删除空行,直接评论以获取最佳展示效果</span>
|
||||
</div>
|
||||
</div>
|
||||
<halo:comment colorScheme="document.documentElement.getAttribute('data-theme')"
|
||||
group="content.halo.run"
|
||||
kind="SinglePage"
|
||||
th:attr="name=${singlePage.metadata.name}"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 侧栏 -->
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.pageWidgets})}"></div>
|
||||
|
||||
</main>
|
||||
<!-- 底部 -->
|
||||
|
@ -881,4 +846,3 @@
|
|||
</th:block>
|
||||
|
||||
</html>
|
||||
|
||||
|
|
|
@ -1,559 +0,0 @@
|
|||
@media screen and (min-width: 900px) {
|
||||
#page-header #nav a:hover .heoicon {
|
||||
transition: .3s;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#sidebar-menus .menus_item .not-child {
|
||||
padding: 4px 8px !important;
|
||||
width: 100%;
|
||||
background: var(--heo-card-bg);
|
||||
border-radius: 8px;
|
||||
border: var(--style-border-always);
|
||||
align-items: center;
|
||||
font-size: 14px !important;
|
||||
margin: 10px 0;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#sidebar-menus .menus_item .not-child span {
|
||||
color: var(--heo-fontcolor) !important;
|
||||
}
|
||||
|
||||
.meta-secondline > span {
|
||||
opacity: .6;
|
||||
transition: .3s;
|
||||
margin-right: 1.1rem;
|
||||
}
|
||||
|
||||
#category #category-bar {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* 侧公众号卡片 */
|
||||
#flip-wrapper .left {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
line-height: 1.3;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#flip-wrapper .left .title {
|
||||
font-size: 1.35rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
#flip-wrapper .left .desc {
|
||||
font-size: small;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#article-container .highlight-tools {
|
||||
position: relative;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
min-height: 1.2rem;
|
||||
height: 2.15em;
|
||||
background: var(--heo-secondbg);
|
||||
border-bottom: var(--style-border-always);
|
||||
color: var(--heo-fontcolor);
|
||||
font-size: var(--global-font-size);
|
||||
}
|
||||
|
||||
#article-container .highlight-tools .copy-button {
|
||||
position: absolute;
|
||||
right: 0.7rem;
|
||||
cursor: pointer;
|
||||
transition: color .2s;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#article-container .highlight-tools .code-lang {
|
||||
position: absolute;
|
||||
font-weight: 700;
|
||||
font-size: 1.15em;
|
||||
user-select: none;
|
||||
left: 0.6rem;
|
||||
}
|
||||
|
||||
#article-container .code-expand-btn.expand-done {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
#article-container .bilibili_box {
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
background: var(--heo-card-bg);
|
||||
border: var(--style-border-always);
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
color: var(--heo-fontcolor) !important;
|
||||
text-decoration: none !important;
|
||||
-webkit-transition: .3s;
|
||||
-moz-transition: .3s;
|
||||
-o-transition: .3s;
|
||||
-ms-transition: .3s;
|
||||
transition: .3s
|
||||
}
|
||||
|
||||
#article-container .bilibili_box:hover {
|
||||
border-color: var(--heo-theme)
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
#article-container .bilibili_box {
|
||||
-webkit-box-orient: vertical;
|
||||
-moz-box-orient: vertical;
|
||||
-o-box-orient: vertical;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column
|
||||
}
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_cover {
|
||||
width: 200px;
|
||||
position: relative
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
#article-container .bilibili_box .bilibili_cover {
|
||||
width: 100%
|
||||
}
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_cover img {
|
||||
width: 100%;
|
||||
filter: none;
|
||||
margin: 0 !important;
|
||||
border-radius: 0 !important
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_cover .play_icon {
|
||||
position: absolute;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
opacity: .8;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
-moz-transform: translate(-50%, -50%);
|
||||
-o-transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%)
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_cover span {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_info {
|
||||
padding: 10px 10px 10px 18px;
|
||||
width: calc(100% - 200px);
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-moz-box-orient: vertical;
|
||||
-o-box-orient: vertical;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-pack: distribute;
|
||||
-moz-box-pack: distribute;
|
||||
-o-box-pack: distribute;
|
||||
-ms-flex-pack: distribute;
|
||||
-webkit-justify-content: space-around;
|
||||
justify-content: space-around
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
#article-container .bilibili_box .bilibili_info {
|
||||
width: 100%;
|
||||
padding-bottom: 25px
|
||||
}
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_info .title {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 1.7
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_info .stat {
|
||||
font-size: 15px
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_info .stat svg {
|
||||
margin-right: 3px;
|
||||
font-size: 18px;
|
||||
vertical-align: -0.15em;
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_info .stat svg path {
|
||||
fill: #99a9bf
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_info .stat span {
|
||||
margin-right: 10px
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_info .owner {
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-moz-box-align: center;
|
||||
-o-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
line-height: 1;
|
||||
font-size: 15px;
|
||||
margin-top: 3px
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_info .owner .tip {
|
||||
color: #f69;
|
||||
border: 1px solid;
|
||||
padding: 4px 7px;
|
||||
font-size: 13px;
|
||||
border-radius: 5px;
|
||||
margin-right: 10px
|
||||
}
|
||||
|
||||
#article-container .bilibili_box .bilibili_info .owner img {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50% !important;
|
||||
object-fit: cover;
|
||||
margin: 0 5px 0 0 !important
|
||||
}
|
||||
|
||||
[data-theme=dark] #article-container .bilibili_box .bilibili_cover, [data-theme=light] #article-container .bilibili_box .bilibili_info .stat svg {
|
||||
opacity: .8
|
||||
}
|
||||
|
||||
/* 配置相册界面album的CSS */
|
||||
/* 相册顶部那一坨 */
|
||||
.author-content.author-content-item.album {
|
||||
height: 19rem;
|
||||
color: var(--heo-white);
|
||||
overflow: hidden;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* 移动端那一坨 */
|
||||
@media screen and (max-width: 768px) {
|
||||
.author-content.author-content-item.album {
|
||||
height: 9rem;
|
||||
}
|
||||
}
|
||||
|
||||
#album .card-album {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
margin: var(--album-spacing-xxl) 0 0;
|
||||
}
|
||||
|
||||
#album .card-album .album-content-nocover {
|
||||
width: calc(100% / 4 - 40px);
|
||||
}
|
||||
|
||||
#album .card-album .card {
|
||||
list-style: none;
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: calc(100% / 4 - 10px);
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#album .card-album .card:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#album .card_cover {
|
||||
border-radius: var(--album-spacing-l);
|
||||
filter: brightness(0.75) saturate(1.2) contrast(0.85);
|
||||
transform-origin: center;
|
||||
transform: scale(1) translateZ(0);
|
||||
transition: filter 200ms linear, transform 200ms linear;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
height: 550px;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: var(--album-spacing-l);
|
||||
}
|
||||
|
||||
#album .card:hover .card_cover {
|
||||
transform: scale(1.05) translateZ(0);
|
||||
filter: brightness(0.9) saturate(1.2) contrast(1);
|
||||
}
|
||||
|
||||
#album .card-album:hover > .card:not(:hover) .card_cover {
|
||||
filter: brightness(0.5) saturate(0.9) contrast(1.2) blur(20px);
|
||||
}
|
||||
|
||||
#album .card__content {
|
||||
left: 0;
|
||||
padding: var(--album-spacing-l);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
#album .card__category {
|
||||
color: var(--album-text-light);
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: var(--album-spacing-s);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#album .card__heading {
|
||||
color: var(--album-text-lighter);
|
||||
font-size: 1.9rem;
|
||||
text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.2);
|
||||
line-height: 1.4;
|
||||
word-spacing: 100vw;
|
||||
}
|
||||
|
||||
@media (min-width: 1300px) {
|
||||
#album img.card_cover {
|
||||
height: 600px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
#album .card-album .card {
|
||||
width: calc(100% / 2 - 40px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 540px) {
|
||||
#album .card-album .card {
|
||||
width: calc(100%);
|
||||
}
|
||||
}
|
||||
|
||||
/* 配置相册界面album_detail的CSS */
|
||||
/* 处理页面样式 */
|
||||
#album_detail .album-container-img {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
|
||||
#album_detail .album-container-img .album-content-noimg {
|
||||
width: calc(100% / 2 - 5px);
|
||||
}
|
||||
|
||||
#album_detail .album-content-img img {
|
||||
object-fit: cover;
|
||||
max-width: 100%;
|
||||
border-radius: 12px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
#album_detail .album-content-img {
|
||||
height: 100%;
|
||||
max-height: 300px;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#album_detail .album-content .datacont {
|
||||
order: 0;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 700;
|
||||
color: var(--heo-fontcolor);
|
||||
width: 100%;
|
||||
line-height: 1.38;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 0.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
#album_detail p {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#album_detail div.album-content {
|
||||
display: flex;
|
||||
flex-flow: wrap;
|
||||
border-radius: 12px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#album_detail .timeline ul li.album-item {
|
||||
position: relative;
|
||||
width: 32%;
|
||||
border: var(--style-border-always);
|
||||
border-radius: 12px;
|
||||
padding: 1rem 1rem 0.5rem;
|
||||
transition: all 0.3s ease 0s;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
background: var(--heo-card-bg);
|
||||
box-shadow: var(--heo-shadow-border);
|
||||
margin-right: 2%;
|
||||
}
|
||||
|
||||
#album_detail .timeline #waterfall.show {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#album_detail .timeline #waterfall {
|
||||
opacity: 0;
|
||||
transition: all 0.3s ease 0s;
|
||||
}
|
||||
|
||||
#album_detail ul.list {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#album_detail {
|
||||
margin-top: 1rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#album_detail > section > ul > li.album-item {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#album-tips {
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
#album_detail .timeline ul li.album-item hr {
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin: 8px 0px;
|
||||
border: 1px dashed var(--heo-theme-op);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#album_detail .album-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#album_detail > section > ul > li > div .album-info-time,
|
||||
#album_detail > section > ul > li > div .album-info-address,
|
||||
#album_detail > section > ul > li > div .album-info-from {
|
||||
color: var(--heo-fontcolor);
|
||||
font-size: 0.7rem;
|
||||
background-color: var(--heo-gray-op);
|
||||
padding: 0px 8px;
|
||||
border-radius: 20px;
|
||||
cursor: default;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#album_detail > section > ul > li > div .album-info-address,
|
||||
#album_detail > section > ul > li > div .album-info-from {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
#album_detail > section > ul > li > div .album-info-address span,
|
||||
#album_detail > section > ul > li > div .album-info-from span {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
#album_detail .album-info .fa-brands.fa-instagram {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
#album_detail .album-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#album_detail .album-bottom .album-reply {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#album_detail .timeline ul li.album-item:hover {
|
||||
border: var(--style-border-hover);
|
||||
}
|
||||
|
||||
#album_detail .album-content-link {
|
||||
display: flex;
|
||||
margin-left: 0.5rem;
|
||||
font-size: 0.7rem;
|
||||
align-items: center;
|
||||
background-color: rgba(245, 108, 108, 0.13);
|
||||
color: rgb(245, 108, 108);
|
||||
padding: 0px 8px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#album_detail .album-content-link i {
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
#album_detail .album-content-link:hover {
|
||||
background-color: var(--heo-main);
|
||||
color: var(--heo-white);
|
||||
}
|
||||
|
||||
body[data-type="album_detail"] #page .author-content-item .card-content .banner-button-group .banner-button:hover {
|
||||
color: var(--heo-white);
|
||||
border-radius: 20px !important;
|
||||
}
|
||||
|
||||
/* 响应式 */
|
||||
@media screen and (max-width: 1300px) {
|
||||
#album_detail .timeline ul li.album-item {
|
||||
width: 49%;
|
||||
margin-right: 1%;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
#album_detail .timeline ul li.album-item {
|
||||
width: 100%;
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 593 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 512 B |
Binary file not shown.
After Width: | Height: | Size: 80 KiB |
|
@ -1,146 +0,0 @@
|
|||
function coverColor() {
|
||||
var path = document.getElementById("post-cover")?.src;
|
||||
if (path !== undefined) {
|
||||
var img = new Image();
|
||||
img.crossOrigin = "Anonymous";
|
||||
img.src = path;
|
||||
img.onload = function () {
|
||||
var canvas = document.createElement("canvas");
|
||||
canvas.width = this.width;
|
||||
canvas.height = this.height;
|
||||
var ctx = canvas.getContext("2d");
|
||||
ctx.drawImage(this, 0, 0);
|
||||
var data = ctx.getImageData(0, 0, this.width, this.height).data;
|
||||
var r = 0, g = 0, b = 0;
|
||||
var step = 5;
|
||||
for (var i = 0; i < data.length; i += 4 * step) {
|
||||
r += data[i];
|
||||
g += data[i + 1];
|
||||
b += data[i + 2];
|
||||
}
|
||||
r = Math.floor(r / (data.length / 4 / step));
|
||||
g = Math.floor(g / (data.length / 4 / step));
|
||||
b = Math.floor(b / (data.length / 4 / step));
|
||||
var value = "#" + r.toString(16) + g.toString(16) + b.toString(16);
|
||||
if (getContrastYIQ(value) == "light") {
|
||||
value = LightenDarkenColor(colorHex(value), -50)
|
||||
}
|
||||
|
||||
document.documentElement.style.setProperty('--heo-main', value);
|
||||
document.documentElement.style.setProperty('--heo-main-op', value + '23');
|
||||
document.documentElement.style.setProperty('--heo-main-op-deep', value + 'dd');
|
||||
document.documentElement.style.setProperty('--heo-main-none', value + '00');
|
||||
initThemeColor()
|
||||
document.getElementById("coverdiv").classList.add("loaded");
|
||||
}
|
||||
} else {
|
||||
document.documentElement.style.setProperty('--heo-main', 'var(--heo-theme)');
|
||||
document.documentElement.style.setProperty('--heo-main-op', 'var(--heo-theme-op)');
|
||||
document.documentElement.style.setProperty('--heo-main-op-deep', 'var(--heo-theme-op-deep)');
|
||||
document.documentElement.style.setProperty('--heo-main-none', 'var(--heo-theme-none)');
|
||||
initThemeColor()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function colorHex(colorString) {
|
||||
const hexRegex = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
||||
let color = colorString;
|
||||
|
||||
if (/^(rgb|RGB)/.test(color)) {
|
||||
const colorArr = color.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
|
||||
const hexArr = colorArr.map(c => {
|
||||
const hex = Number(c).toString(16);
|
||||
return hex.length === 1 ? "0" + hex : hex;
|
||||
});
|
||||
return "#" + hexArr.join("");
|
||||
} else if (hexRegex.test(color)) {
|
||||
const hexDigits = color.replace(/#/, "").split("");
|
||||
if (hexDigits.length === 6) {
|
||||
return color;
|
||||
} else if (hexDigits.length === 3) {
|
||||
const hexArr = hexDigits.map(c => c + c);
|
||||
return "#" + hexArr.join("");
|
||||
}
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
function colorRgb(str) {
|
||||
const HEX_SHORT_REGEX = /^#([0-9a-fA-f]{3})$/;
|
||||
const HEX_LONG_REGEX = /^#([0-9a-fA-f]{6})$/;
|
||||
const HEX_SHORT_LENGTH = 4;
|
||||
|
||||
const sColor = str.toLowerCase();
|
||||
let hexValue = "";
|
||||
|
||||
if (sColor && (HEX_SHORT_REGEX.test(sColor) || HEX_LONG_REGEX.test(sColor))) {
|
||||
hexValue = sColor.length === HEX_SHORT_LENGTH ?
|
||||
sColor.replace(/^#(.)/g, "#$1$1") :
|
||||
sColor;
|
||||
|
||||
const rgbValue = hexValue.slice(1)
|
||||
.match(/.{2}/g)
|
||||
.map(val => parseInt(val, 16))
|
||||
.join(",");
|
||||
|
||||
return `rgb(${rgbValue})`;
|
||||
} else {
|
||||
return sColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function LightenDarkenColor(col, amt) {
|
||||
let usePound = false;
|
||||
|
||||
if (col[0] === "#") {
|
||||
col = col.slice(1);
|
||||
usePound = true;
|
||||
}
|
||||
|
||||
const num = parseInt(col, 16);
|
||||
const r = Math.min(255, Math.max(0, (num >> 16) + amt));
|
||||
const b = Math.min(255, Math.max(0, ((num >> 8) & 0xff) + amt));
|
||||
const g = Math.min(255, Math.max(0, (num & 0xff) + amt));
|
||||
|
||||
return `${usePound ? "#" : ""}${(g | (b << 8) | (r << 16)).toString(16).padStart(6, "0")}`;
|
||||
}
|
||||
|
||||
|
||||
function getContrastYIQ(hexcolor) {
|
||||
var colorrgb = colorRgb(hexcolor);
|
||||
var colors = colorrgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
||||
var red = colors[1];
|
||||
var green = colors[2];
|
||||
var blue = colors[3];
|
||||
var brightness;
|
||||
brightness = (red * 299) + (green * 587) + (blue * 114);
|
||||
brightness = brightness / 255000;
|
||||
if (brightness >= 0.5) {
|
||||
return "light";
|
||||
} else {
|
||||
return "dark";
|
||||
}
|
||||
}
|
||||
|
||||
function initThemeColor() {
|
||||
const currentTop = window.scrollY || document.documentElement.scrollTop;
|
||||
let themeColor;
|
||||
if (currentTop > 0) {
|
||||
themeColor = getComputedStyle(document.documentElement).getPropertyValue('--heo-card-bg');
|
||||
} else if (PAGECONFIG.is_post) {
|
||||
themeColor = getComputedStyle(document.documentElement).getPropertyValue('--heo-main');
|
||||
} else {
|
||||
themeColor = getComputedStyle(document.documentElement).getPropertyValue('--heo-background');
|
||||
}
|
||||
changeThemeColor(themeColor);
|
||||
}
|
||||
|
||||
function changeThemeColor(color) {
|
||||
const meta = document.querySelector('meta[name="theme-color"]');
|
||||
if (meta) {
|
||||
meta.setAttribute('content', color);
|
||||
}
|
||||
}
|
|
@ -1,135 +0,0 @@
|
|||
function coverColor() {
|
||||
var path = document.getElementById("post-cover")?.src;
|
||||
if (path !== undefined) {
|
||||
var httpRequest = new XMLHttpRequest();
|
||||
httpRequest.open('GET', path + '?imageAve', true);
|
||||
httpRequest.send();
|
||||
httpRequest.onreadystatechange = function () {
|
||||
if (httpRequest.readyState == 4 && httpRequest.status == 200) {
|
||||
var json = httpRequest.responseText;
|
||||
var obj = eval('(' + json + ')');
|
||||
var value = obj.RGB;
|
||||
value = "#" + value.slice(2)
|
||||
if (getContrastYIQ(value) == "light") {
|
||||
value = LightenDarkenColor(colorHex(value), -50)
|
||||
}
|
||||
|
||||
document.documentElement.style.setProperty('--heo-main', value);
|
||||
document.documentElement.style.setProperty('--heo-main-op', value + '23');
|
||||
document.documentElement.style.setProperty('--heo-main-op-deep', value + 'dd');
|
||||
document.documentElement.style.setProperty('--heo-main-none', value + '00');
|
||||
initThemeColor()
|
||||
document.getElementById("coverdiv").classList.add("loaded");
|
||||
}
|
||||
};
|
||||
} else {
|
||||
document.documentElement.style.setProperty('--heo-main', 'var(--heo-theme)');
|
||||
document.documentElement.style.setProperty('--heo-main-op', 'var(--heo-theme-op)');
|
||||
document.documentElement.style.setProperty('--heo-main-op-deep', 'var(--heo-theme-op-deep)');
|
||||
document.documentElement.style.setProperty('--heo-main-none', 'var(--heo-theme-none)');
|
||||
initThemeColor()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function colorHex(colorString) {
|
||||
const hexRegex = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
||||
let color = colorString;
|
||||
|
||||
if (/^(rgb|RGB)/.test(color)) {
|
||||
const colorArr = color.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
|
||||
const hexArr = colorArr.map(c => {
|
||||
const hex = Number(c).toString(16);
|
||||
return hex.length === 1 ? "0" + hex : hex;
|
||||
});
|
||||
return "#" + hexArr.join("");
|
||||
} else if (hexRegex.test(color)) {
|
||||
const hexDigits = color.replace(/#/, "").split("");
|
||||
if (hexDigits.length === 6) {
|
||||
return color;
|
||||
} else if (hexDigits.length === 3) {
|
||||
const hexArr = hexDigits.map(c => c + c);
|
||||
return "#" + hexArr.join("");
|
||||
}
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
function colorRgb(str) {
|
||||
const HEX_SHORT_REGEX = /^#([0-9a-fA-f]{3})$/;
|
||||
const HEX_LONG_REGEX = /^#([0-9a-fA-f]{6})$/;
|
||||
const HEX_SHORT_LENGTH = 4;
|
||||
|
||||
const sColor = str.toLowerCase();
|
||||
let hexValue = "";
|
||||
|
||||
if (sColor && (HEX_SHORT_REGEX.test(sColor) || HEX_LONG_REGEX.test(sColor))) {
|
||||
hexValue = sColor.length === HEX_SHORT_LENGTH ?
|
||||
sColor.replace(/^#(.)/g, "#$1$1") :
|
||||
sColor;
|
||||
|
||||
const rgbValue = hexValue.slice(1)
|
||||
.match(/.{2}/g)
|
||||
.map(val => parseInt(val, 16))
|
||||
.join(",");
|
||||
|
||||
return `rgb(${rgbValue})`;
|
||||
} else {
|
||||
return sColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function LightenDarkenColor(col, amt) {
|
||||
let usePound = false;
|
||||
|
||||
if (col[0] === "#") {
|
||||
col = col.slice(1);
|
||||
usePound = true;
|
||||
}
|
||||
|
||||
const num = parseInt(col, 16);
|
||||
const r = Math.min(255, Math.max(0, (num >> 16) + amt));
|
||||
const b = Math.min(255, Math.max(0, ((num >> 8) & 0xff) + amt));
|
||||
const g = Math.min(255, Math.max(0, (num & 0xff) + amt));
|
||||
|
||||
return `${usePound ? "#" : ""}${(g | (b << 8) | (r << 16)).toString(16).padStart(6, "0")}`;
|
||||
}
|
||||
|
||||
|
||||
function getContrastYIQ(hexcolor) {
|
||||
var colorrgb = colorRgb(hexcolor);
|
||||
var colors = colorrgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
||||
var red = colors[1];
|
||||
var green = colors[2];
|
||||
var blue = colors[3];
|
||||
var brightness;
|
||||
brightness = (red * 299) + (green * 587) + (blue * 114);
|
||||
brightness = brightness / 255000;
|
||||
if (brightness >= 0.5) {
|
||||
return "light";
|
||||
} else {
|
||||
return "dark";
|
||||
}
|
||||
}
|
||||
|
||||
function initThemeColor() {
|
||||
const currentTop = window.scrollY || document.documentElement.scrollTop;
|
||||
let themeColor;
|
||||
if (currentTop > 0) {
|
||||
themeColor = getComputedStyle(document.documentElement).getPropertyValue('--heo-card-bg');
|
||||
} else if (PAGECONFIG.is_post) {
|
||||
themeColor = getComputedStyle(document.documentElement).getPropertyValue('--heo-main');
|
||||
} else {
|
||||
themeColor = getComputedStyle(document.documentElement).getPropertyValue('--heo-background');
|
||||
}
|
||||
changeThemeColor(themeColor);
|
||||
}
|
||||
|
||||
function changeThemeColor(color) {
|
||||
const meta = document.querySelector('meta[name="theme-color"]');
|
||||
if (meta) {
|
||||
meta.setAttribute('content', color);
|
||||
}
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
const $searchMask = document.getElementById('search-mask'),
|
||||
$searchDialog = document.querySelector('#algolia-search .search-dialog')
|
||||
|
||||
class search {
|
||||
static openSearch() {
|
||||
utils.fadeIn($searchMask, '0.5')
|
||||
utils.fadeIn($searchDialog, '0.5')
|
||||
document.addEventListener('keydown', function f(event) {
|
||||
if (event.code === 'Escape') {
|
||||
closeSearch()
|
||||
document.removeEventListener('keydown', f)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
static closeSearch() {
|
||||
utils.fadeOut($searchDialog, '0.5')
|
||||
utils.fadeOut($searchMask, '0.5')
|
||||
}
|
||||
|
||||
static cutContent(content) {
|
||||
if (content === '') return ''
|
||||
|
||||
const firstOccur = content.indexOf('<mark>')
|
||||
|
||||
let start = firstOccur - 30
|
||||
let end = firstOccur + 120
|
||||
let pre = ''
|
||||
let post = ''
|
||||
|
||||
if (start <= 0) {
|
||||
start = 0
|
||||
end = 140
|
||||
} else {
|
||||
pre = '...'
|
||||
}
|
||||
|
||||
if (end > content.length) {
|
||||
end = content.length
|
||||
} else {
|
||||
post = '...'
|
||||
}
|
||||
|
||||
const matchContent = pre + content.substring(start, end) + post
|
||||
return matchContent
|
||||
}
|
||||
|
||||
static search() {
|
||||
const algolia = GLOBALCONFIG.algolia, that = this
|
||||
const isAlgoliaValid = algolia.appId && algolia.apiKey && algolia.indexName
|
||||
if (!isAlgoliaValid) {
|
||||
return console.error('Algolia setting is invalid!')
|
||||
}
|
||||
|
||||
const init = instantsearch({
|
||||
indexName: algolia.indexName,
|
||||
searchClient: algoliasearch(algolia.appId, algolia.apiKey),
|
||||
searchFunction(helper) {
|
||||
helper.state.query && helper.search()
|
||||
}
|
||||
})
|
||||
|
||||
const searchBox = instantsearch.widgets.searchBox({
|
||||
container: '#search-input',
|
||||
showReset: false,
|
||||
showSubmit: false,
|
||||
autofocus: true,
|
||||
placeholder: GLOBALCONFIG.lang.search.placeholder,
|
||||
showLoadingIndicator: false
|
||||
})
|
||||
|
||||
const hits = instantsearch.widgets.hits({
|
||||
container: '#algolia-hits',
|
||||
templates: {
|
||||
item(data) {
|
||||
const link = '/' + data.path
|
||||
const result = data._highlightResult
|
||||
const content = result.contentStripTruncate
|
||||
? that.cutContent(result.contentStripTruncate.value)
|
||||
: result.contentStrip
|
||||
? that.cutContent(result.contentStrip.value)
|
||||
: result.content
|
||||
? that.cutContent(result.content.value)
|
||||
: ''
|
||||
return `
|
||||
<a href="${link}" class="algolia-hit-item-link">
|
||||
${result.title.value}
|
||||
</a>
|
||||
<p class="algolia-hit-item-content">${content}</p>`
|
||||
},
|
||||
empty: function (data) {
|
||||
return (
|
||||
`<div id="algolia-hits-empty">${GLOBALCONFIG.lang.search.empty}</div>`
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const stats = instantsearch.widgets.stats({
|
||||
container: '.algolia-stats',
|
||||
templates: {
|
||||
text: function (data) {
|
||||
const stats = GLOBALCONFIG.lang.search.hit.replace('${query}', `<mark>${data.nbHits}</mark>`)
|
||||
return (
|
||||
stats
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const powerBy = instantsearch.widgets.poweredBy({
|
||||
container: '.algolia-poweredBy'
|
||||
})
|
||||
|
||||
init.addWidgets([searchBox, hits, stats, powerBy]) // add the widgets to the instantsearch instance
|
||||
init.start()
|
||||
init.on('render', () => {
|
||||
pjax.refresh(document.getElementById('algolia-hits'))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const searchClickFn = () => {
|
||||
document.querySelector('#search-button > .search').addEventListener('click', search.openSearch)
|
||||
}
|
||||
|
||||
const searchClickFnOnce = () => {
|
||||
document.querySelector('#algolia-search .search-close-button').addEventListener('click', search.closeSearch)
|
||||
$searchMask.addEventListener('click', search.closeSearch)
|
||||
}
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
searchClickFn()
|
||||
searchClickFnOnce()
|
||||
search.search()
|
||||
})
|
||||
|
||||
window.addEventListener('pjax:complete', () => {
|
||||
searchClickFn()
|
||||
})
|
|
@ -1,162 +0,0 @@
|
|||
const $searchMask = document.getElementById('search-mask'),
|
||||
$searchDialog = document.querySelector('#local-search .search-dialog'),
|
||||
$input = document.querySelector('#search-input'),
|
||||
$resultContent = document.getElementById('search-results'),
|
||||
$loadingStatus = document.getElementById('loading-status')
|
||||
let dataObj = null
|
||||
|
||||
class search {
|
||||
static openSearch() {
|
||||
utils.fadeIn($searchMask, '0.5')
|
||||
utils.fadeIn($searchDialog, '0.5')
|
||||
setTimeout(() => {
|
||||
document.querySelector('#search-input').focus()
|
||||
}, 100)
|
||||
search.search()
|
||||
document.addEventListener('keydown', function f(event) {
|
||||
if (event.code === 'Escape') {
|
||||
closeSearch()
|
||||
document.removeEventListener('keydown', f)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
static closeSearch() {
|
||||
utils.fadeOut($searchDialog, '0.5')
|
||||
utils.fadeOut($searchMask, '0.5')
|
||||
}
|
||||
|
||||
static async fetchData(path) {
|
||||
let data = []
|
||||
const response = await fetch(path)
|
||||
const res = await new window.DOMParser().parseFromString(await response.text(), 'text/xml')
|
||||
data = [...res.querySelectorAll('entry')].map(item => {
|
||||
return {
|
||||
title: item.querySelector('title').textContent,
|
||||
content: item.querySelector('content') && item.querySelector('content').textContent,
|
||||
url: item.querySelector('url').textContent
|
||||
}
|
||||
})
|
||||
if (response.ok) {
|
||||
const $loadDataItem = document.getElementById('loading-database')
|
||||
$loadDataItem.nextElementSibling.style.display = 'block'
|
||||
$loadDataItem.remove()
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
static search() {
|
||||
if (!GLOBALCONFIG.localsearch.preload && dataObj === null) dataObj = this.fetchData(GLOBALCONFIG.localsearch.path)
|
||||
$input.addEventListener('input', function type() {
|
||||
const keywords = this.value.trim().toLowerCase().split(/[\s]+/)
|
||||
if (keywords[0] !== '') $loadingStatus.innerHTML = '<i class="fas fa-spinner fa-pulse"></i><span>加载中</span>'
|
||||
else {
|
||||
$resultContent.innerHTML = ''
|
||||
return
|
||||
}
|
||||
|
||||
if (keywords.length <= 0) return
|
||||
let count = 0, str = '<div class="search-result-list">'
|
||||
// perform local searching
|
||||
dataObj.then(data => {
|
||||
data.forEach(data => {
|
||||
let isMatch = true
|
||||
let dataTitle = data.title ? data.title.trim().toLowerCase() : ''
|
||||
const dataContent = data.content ? data.content.trim().replace(/<[^>]+>/g, '').toLowerCase() : ''
|
||||
const dataUrl = data.url.startsWith('/') ? data.url : GLOBALCONFIG.root + data.url
|
||||
let indexTitle = -1
|
||||
let indexContent = -1
|
||||
let firstOccur = -1
|
||||
// only match articles with not empty titles and contents
|
||||
if (dataTitle !== '' || dataContent !== '') {
|
||||
keywords.forEach((keyword, i) => {
|
||||
indexTitle = dataTitle.indexOf(keyword)
|
||||
indexContent = dataContent.indexOf(keyword)
|
||||
if (indexTitle < 0 && indexContent < 0) {
|
||||
isMatch = false
|
||||
} else {
|
||||
if (indexContent < 0) {
|
||||
indexContent = 0
|
||||
}
|
||||
if (i === 0) {
|
||||
firstOccur = indexContent
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
isMatch = false
|
||||
}
|
||||
|
||||
// show search results
|
||||
if (isMatch) {
|
||||
if (firstOccur >= 0) {
|
||||
// cut out 130 characters
|
||||
let start = firstOccur - 30
|
||||
let end = firstOccur + 100
|
||||
let pre = ''
|
||||
let post = ''
|
||||
|
||||
if (start < 0) {
|
||||
start = 0
|
||||
}
|
||||
|
||||
if (start === 0) {
|
||||
end = 100
|
||||
} else {
|
||||
pre = '...'
|
||||
}
|
||||
|
||||
if (end > dataContent.length) {
|
||||
end = dataContent.length
|
||||
} else {
|
||||
post = '...'
|
||||
}
|
||||
|
||||
let matchContent = dataContent.substring(start, end)
|
||||
// highlight all keywords
|
||||
keywords.forEach(keyword => {
|
||||
const regex = new RegExp(`(?!<[^>]*?)(${keyword})(?![^<]*?>)`, 'gi')
|
||||
matchContent = matchContent.replaceAll(regex, '<span class="search-keyword">$1</span>')
|
||||
dataTitle = dataTitle.replaceAll(regex, '<span class="search-keyword">$1</span>')
|
||||
})
|
||||
|
||||
str += '<div class="search__hit-item"><a href="' + dataUrl + '"><span class="search-result-title">' + dataTitle + '</span>'
|
||||
count += 1
|
||||
if (dataContent !== '') {
|
||||
str += '<div class="search-result">' + pre + matchContent + post + '</div>'
|
||||
}
|
||||
}
|
||||
str += '</a></div>'
|
||||
}
|
||||
})
|
||||
if (count === 0) {
|
||||
str += `<div id="search__hits-empty">${GLOBALCONFIG.lang.search.empty}</div>`
|
||||
} else {
|
||||
str += `<div class="search__hits-count">${GLOBALCONFIG.lang.search.hit.replace('${query}', '<span class="search-keyword">' + count + '</span>')}</div>`
|
||||
}
|
||||
str += '</div>'
|
||||
$resultContent.innerHTML = str
|
||||
if (keywords[0] !== '') $loadingStatus.innerHTML = ''
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const searchClickFn = () => {
|
||||
document.querySelector('#search-button > .search').addEventListener('click', search.openSearch)
|
||||
}
|
||||
|
||||
const searchClickFnOnce = () => {
|
||||
document.querySelector('#local-search .search-close-button').addEventListener('click', search.closeSearch)
|
||||
$searchMask.addEventListener('click', search.closeSearch)
|
||||
if (GLOBALCONFIG.localsearch.preload) dataObj = search.fetchData(GLOBALCONFIG.localsearch.path)
|
||||
}
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
searchClickFn()
|
||||
searchClickFnOnce()
|
||||
})
|
||||
|
||||
window.addEventListener('pjax:complete', () => {
|
||||
searchClickFn()
|
||||
})
|
|
@ -0,0 +1,12 @@
|
|||
let halo = {
|
||||
darkComment: () => {
|
||||
if (document.querySelector('#comment div').shadowRoot.querySelector('.halo-comment-widget').classList != null) {
|
||||
let commentDOMclass = document.querySelector('#comment div').shadowRoot.querySelector('.halo-comment-widget').classList
|
||||
if (commentDOMclass.contains('light'))
|
||||
commentDOMclass.replace('light', 'dark')
|
||||
else
|
||||
commentDOMclass.replace('dark', 'light')
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,451 @@
|
|||
let heo_cookiesTime = null;
|
||||
let heo_musicPlaying = false;
|
||||
let heo_keyboard = false;
|
||||
let heo_intype = false;
|
||||
// 私有函数
|
||||
var heo = {
|
||||
// 检测显示模式
|
||||
darkModeStatus: function () {
|
||||
let theme = document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light'
|
||||
if (theme == 'light') {
|
||||
$(".menu-darkmode-text").text("深色模式");
|
||||
} else {
|
||||
$(".menu-darkmode-text").text("浅色模式");
|
||||
}
|
||||
},
|
||||
|
||||
// //bb添加时间
|
||||
// changeTimeInEssay: function () {
|
||||
// const relativeDate = function (selector) {
|
||||
// selector.forEach(item => {
|
||||
// const $this = item
|
||||
// const timeVal = $this.getAttribute('datetime')
|
||||
// $this.innerText = btf.diffDate(timeVal, true)
|
||||
// $this.style.display = 'inline'
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// if (document.querySelector('#comment')) {
|
||||
// relativeDate(document.querySelectorAll('#comment time'))
|
||||
// }
|
||||
// },
|
||||
|
||||
// 首页bb
|
||||
initIndexEssay: function () {
|
||||
if (document.querySelector("#bber-talk"))
|
||||
new Swiper(".swiper-container", {
|
||||
direction: "vertical",
|
||||
loop: !0,
|
||||
autoplay: {
|
||||
delay: 3e3,
|
||||
pauseOnMouseEnter: !0
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 只在首页显示
|
||||
onlyHome: function () {
|
||||
var urlinfo = window.location.pathname;
|
||||
urlinfo = decodeURIComponent(urlinfo);
|
||||
if (urlinfo == '/') {
|
||||
$('.only-home').attr('style', 'display: flex');
|
||||
} else {
|
||||
$('.only-home').attr('style', 'display: none');
|
||||
}
|
||||
},
|
||||
|
||||
//是否在首页
|
||||
is_Post: function () {
|
||||
var url = window.location.href; //获取url
|
||||
if (url.indexOf("/p/") >= 0) { //判断url地址中是否包含code字符串
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//监测是否在页面开头
|
||||
addNavBackgroundInit: function () {
|
||||
var e = 0
|
||||
, t = 0;
|
||||
document.body && (e = document.body.scrollTop),
|
||||
document.documentElement && (t = document.documentElement.scrollTop),
|
||||
0 != (e - t > 0 ? e : t) && (document.getElementById("page-header").classList.add("nav-fixed"),
|
||||
document.getElementById("page-header").classList.add("nav-visible"),
|
||||
$("#cookies-window").hide())
|
||||
},
|
||||
|
||||
// 标签页面
|
||||
//分类条
|
||||
// tagPageActive: function () {
|
||||
// var urlinfo = window.location.pathname;
|
||||
// urlinfo = decodeURIComponent(urlinfo)
|
||||
// // console.log(urlinfo);
|
||||
// // 验证是否是分类链接
|
||||
// var pattern = /\/tags\/.*?\//;
|
||||
// var patbool = pattern.test(urlinfo);
|
||||
// // console.log(patbool);
|
||||
// // 获取当前的分类
|
||||
// if (patbool) {
|
||||
// var valuegroup = urlinfo.split("/");
|
||||
// // console.log(valuegroup[2]);
|
||||
// // 获取当前分类
|
||||
// var nowCategorie = valuegroup[2];
|
||||
// if (document.querySelector('#tag-page-tags')) {
|
||||
// $('a').removeClass('select')
|
||||
// document.getElementById(nowCategorie).classList.add("select");
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
|
||||
//分类条
|
||||
// categoriesBarActive: function () {
|
||||
// if (document.querySelector('#category-bar')) {
|
||||
// $(".category-bar-item").removeClass("select")
|
||||
// }
|
||||
// var urlinfo = window.location.pathname;
|
||||
// urlinfo = decodeURIComponent(urlinfo);
|
||||
// // console.log(urlinfo);
|
||||
// //判断是否是首页
|
||||
// if (urlinfo == '/') {
|
||||
// if (document.querySelector('#category-bar')) {
|
||||
// document.getElementById('category-bar-home').classList.add("select");
|
||||
// }
|
||||
// } else {
|
||||
// // 验证是否是分类链接
|
||||
// var pattern = /\/categories\/.*?\//;
|
||||
// var patbool = pattern.test(urlinfo);
|
||||
// // console.log(patbool);
|
||||
// // 获取当前的分类
|
||||
// if (patbool) {
|
||||
// var valuegroup = urlinfo.split("/");
|
||||
// // console.log(valuegroup[2]);
|
||||
// // 获取当前分类
|
||||
// var nowCategorie = valuegroup[2];
|
||||
// if (document.querySelector('#category-bar')) {
|
||||
// document.getElementById(nowCategorie).classList.add("select");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
|
||||
// 页脚友链
|
||||
addFriendLinksInFooter: function () {
|
||||
var fetchUrl = "https://moments.0206.ink/randomfriend?num=3"
|
||||
fetch(fetchUrl)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
var randomFriendLinks = getArrayItems(json, 3);
|
||||
|
||||
var htmlText = '';
|
||||
for (let i = 0; i < randomFriendLinks.length; ++i) {
|
||||
var item = randomFriendLinks[i]
|
||||
htmlText += `<a class='footer-item' href='${item.link}' target="_blank" rel="noopener nofollow">${item.name}</a>`;
|
||||
}
|
||||
htmlText += `<a class='footer-item' href='/links'>更多</a>`
|
||||
document.getElementById("friend-links-in-footer").innerHTML = htmlText;
|
||||
})
|
||||
},
|
||||
|
||||
//禁止图片右键单击
|
||||
stopImgRightDrag: function () {
|
||||
var img = $("img");
|
||||
img.on("dragstart", function () {
|
||||
return false;
|
||||
});
|
||||
},
|
||||
|
||||
//置顶文章横向滚动
|
||||
topPostScroll: function () {
|
||||
if (document.getElementById("recent-post-top")) {
|
||||
let xscroll = document.getElementById("recent-post-top");
|
||||
xscroll.addEventListener("mousewheel", function (e) {
|
||||
//计算鼠标滚轮滚动的距离
|
||||
let v = -e.wheelDelta / 2;
|
||||
xscroll.scrollLeft += v;
|
||||
//阻止浏览器默认方法
|
||||
if (document.body.clientWidth < 1300) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
},
|
||||
|
||||
topCategoriesBarScroll: function () {
|
||||
if (document.getElementById("category-bar-items")) {
|
||||
let xscroll = document.getElementById("category-bar-items");
|
||||
xscroll.addEventListener("mousewheel", function (e) {
|
||||
//计算鼠标滚轮滚动的距离
|
||||
let v = -e.wheelDelta / 2;
|
||||
xscroll.scrollLeft += v;
|
||||
//阻止浏览器默认方法
|
||||
e.preventDefault();
|
||||
}, false);
|
||||
}
|
||||
},
|
||||
|
||||
//作者卡片问好
|
||||
sayhi: function () {
|
||||
if (document.querySelector('#author-info__sayhi')) {
|
||||
document.getElementById("author-info__sayhi").innerHTML = getTimeState() + "!我是";
|
||||
}
|
||||
},
|
||||
|
||||
// 添加标签
|
||||
addTag: function () {
|
||||
//添加new标签
|
||||
if (document.querySelector('.heo-tag-new')) {
|
||||
$(".heo-tag-new").append(`<sup class="heo-tag heo-tag-new-view">N</sup>`)
|
||||
}
|
||||
//添加hot标签
|
||||
if (document.querySelector('.heo-tag-hot')) {
|
||||
$(".heo-tag-hot").append(`<sup class="heo-tag heo-tag-hot-view">H</sup>`)
|
||||
}
|
||||
},
|
||||
|
||||
// 二维码
|
||||
qrcodeCreate: function () {
|
||||
if (document.getElementById('qrcode')) {
|
||||
document.getElementById("qrcode").innerHTML = "";
|
||||
var qrcode = new QRCode(document.getElementById("qrcode"), {
|
||||
text: window.location.href,
|
||||
width: 250,
|
||||
height: 250,
|
||||
colorDark: "#000",
|
||||
colorLight: "#ffffff",
|
||||
correctLevel: QRCode.CorrectLevel.H
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 刷新即刻短文瀑布流
|
||||
reflashEssayWaterFall: function () {
|
||||
document.querySelector("#waterfall") && setTimeout((function () {
|
||||
waterfall("#waterfall"),
|
||||
document.getElementById("waterfall").classList.add("show")
|
||||
}
|
||||
), 500)
|
||||
},
|
||||
|
||||
// 即刻短文添加灯箱
|
||||
addMediumInEssay: function () {
|
||||
if (document.querySelector('#waterfall')) {
|
||||
mediumZoom(document.querySelectorAll('[data-zoomable]'))
|
||||
}
|
||||
},
|
||||
|
||||
// 下载图片
|
||||
downloadImage: function (imgsrc, name) { //下载图片地址和图片名
|
||||
rm.hideRightMenu();
|
||||
if (rm.downloadimging == false) {
|
||||
rm.downloadimging = true;
|
||||
btf.snackbarShow('正在下载中,请稍后', false, 10000)
|
||||
setTimeout(function () {
|
||||
let image = new Image();
|
||||
// 解决跨域 Canvas 污染问题
|
||||
image.setAttribute("crossOrigin", "anonymous");
|
||||
image.onload = function () {
|
||||
let canvas = document.createElement("canvas");
|
||||
canvas.width = image.width;
|
||||
canvas.height = image.height;
|
||||
let context = canvas.getContext("2d");
|
||||
context.drawImage(image, 0, 0, image.width, image.height);
|
||||
let url = canvas.toDataURL("image/png"); //得到图片的base64编码数据
|
||||
let a = document.createElement("a"); // 生成一个a元素
|
||||
let event = new MouseEvent("click"); // 创建一个单击事件
|
||||
a.download = name || "photo"; // 设置图片名称
|
||||
a.href = url; // 将生成的URL设置为a.href属性
|
||||
a.dispatchEvent(event); // 触发a的单击事件
|
||||
};
|
||||
image.src = imgsrc;
|
||||
btf.snackbarShow('图片已添加盲水印,请遵守版权协议');
|
||||
rm.downloadimging = false;
|
||||
}, "10000");
|
||||
} else {
|
||||
btf.snackbarShow('有正在进行中的下载,请稍后再试');
|
||||
}
|
||||
},
|
||||
|
||||
//控制评论弹幕
|
||||
switchCommentBarrage: function () {
|
||||
let commentBarrage = document.querySelector('.comment-barrage');
|
||||
if (commentBarrage) {
|
||||
if ($(".comment-barrage").is(":visible")) {
|
||||
$(".comment-barrage").hide();
|
||||
$(".menu-commentBarrage-text").text("显示热评");
|
||||
document.querySelector("#consoleCommentBarrage").classList.remove("on");
|
||||
localStorage.setItem('commentBarrageSwitch', 'false');
|
||||
btf.snackbarShow("✨ 已关闭评论弹幕", false, 2000)
|
||||
} else if ($(".comment-barrage").is(":hidden")) {
|
||||
$(".comment-barrage").show();
|
||||
$(".menu-commentBarrage-text").text("关闭热评");
|
||||
document.querySelector("#consoleCommentBarrage").classList.add("on");
|
||||
localStorage.removeItem('commentBarrageSwitch');
|
||||
btf.snackbarShow("✨ 已开启评论弹幕", false, 2000)
|
||||
}
|
||||
}
|
||||
rm.hideRightMenu();
|
||||
},
|
||||
|
||||
//隐藏cookie窗口
|
||||
hidecookie: function () {
|
||||
heo_cookiesTime = setTimeout((() => {
|
||||
document.getElementById("cookies-window").classList.add("cw-hide"),
|
||||
setTimeout((() => {
|
||||
$("#cookies-window").hide()
|
||||
}
|
||||
), 1e3)
|
||||
}
|
||||
), 3e3)
|
||||
},
|
||||
|
||||
//隐藏今日推荐
|
||||
hideTodayCard: function () {
|
||||
if (document.getElementById("todayCard")) {
|
||||
document.getElementById("todayCard").classList.add('hide');
|
||||
}
|
||||
},
|
||||
|
||||
//更改主题色
|
||||
changeThemeColor: function (color) {
|
||||
if (document.querySelector('meta[name="theme-color"]') !== null) {
|
||||
document.querySelector('meta[name="theme-color"]').setAttribute('content', color)
|
||||
}
|
||||
},
|
||||
|
||||
//自适应主题色
|
||||
initThemeColor: function () {
|
||||
if (heo.is_Post()) {
|
||||
const currentTop = window.scrollY || document.documentElement.scrollTop
|
||||
if (currentTop === 0) {
|
||||
let themeColor = getComputedStyle(document.documentElement).getPropertyValue('--heo-main');
|
||||
heo.changeThemeColor(themeColor);
|
||||
} else {
|
||||
let themeColor = getComputedStyle(document.documentElement).getPropertyValue('--heo-background');
|
||||
heo.changeThemeColor(themeColor);
|
||||
}
|
||||
} else {
|
||||
let themeColor = getComputedStyle(document.documentElement).getPropertyValue('--heo-background');
|
||||
heo.changeThemeColor(themeColor);
|
||||
}
|
||||
},
|
||||
|
||||
//跳转到指定位置
|
||||
jumpTo: function (dom) {
|
||||
$(document).ready(function () {
|
||||
$("html,body").animate({
|
||||
scrollTop: $(dom).eq(i).offset().top
|
||||
}, 500 /*scroll实现定位滚动*/); /*让整个页面可以滚动*/
|
||||
});
|
||||
},
|
||||
|
||||
//显示加载动画
|
||||
showLoading: function () {
|
||||
document.querySelector("#loading-box").classList.remove("loaded");
|
||||
let cardColor = getComputedStyle(document.documentElement).getPropertyValue('--heo-card-bg');
|
||||
heo.changeThemeColor(cardColor);
|
||||
},
|
||||
|
||||
//隐藏加载动画
|
||||
hideLoading: function () {
|
||||
document.querySelector("#loading-box").classList.add("loaded");
|
||||
},
|
||||
|
||||
//切换音乐播放状态
|
||||
musicToggle: function () {
|
||||
let msgPlay = '<i class="fa-solid fa-play"></i><span>播放音乐</span>' // 此處可以更改為你想要顯示的文字
|
||||
let msgPause = '<i class="fa-solid fa-pause"></i><span>暂停音乐</span>' // 同上,但兩處均不建議更改
|
||||
if (heo_musicPlaying) {
|
||||
document.querySelector("#nav-music").classList.remove("playing");
|
||||
document.getElementById("menu-music-toggle").innerHTML = msgPlay;
|
||||
document.getElementById("nav-music-hoverTips").innerHTML = "音乐已暂停";
|
||||
document.querySelector("#consoleMusic").classList.remove("on");
|
||||
heo_musicPlaying = false;
|
||||
} else {
|
||||
document.querySelector("#nav-music").classList.add("playing");
|
||||
document.getElementById("menu-music-toggle").innerHTML = msgPause;
|
||||
document.querySelector("#consoleMusic").classList.add("on");
|
||||
heo_musicPlaying = true;
|
||||
}
|
||||
document.querySelector('meting-js').aplayer.toggle();
|
||||
rm.hideRightMenu();
|
||||
},
|
||||
|
||||
//音乐上一曲
|
||||
musicSkipBack: function () {
|
||||
document.querySelector('meting-js').aplayer.skipBack();
|
||||
rm.hideRightMenu();
|
||||
},
|
||||
|
||||
//音乐下一曲
|
||||
musicSkipForward: function () {
|
||||
document.querySelector('meting-js').aplayer.skipForward();
|
||||
rm.hideRightMenu();
|
||||
},
|
||||
|
||||
//获取音乐中的名称
|
||||
musicGetName: function () {
|
||||
var x = $('.aplayer-title')
|
||||
// var x = document.getElementsByClassName('txt');
|
||||
// for (var i = x.length - 1; i >= 0; i--) {
|
||||
// console.log(x[i].innerText)
|
||||
// }
|
||||
var arr = []
|
||||
for (var i = x.length - 1; i >= 0; i--) {
|
||||
arr[i] = x[i].innerText
|
||||
// console.log(x[i].innerText)
|
||||
}
|
||||
return arr[0]
|
||||
},
|
||||
|
||||
//显示中控台
|
||||
showConsole: function () {
|
||||
document.querySelector("#console").classList.add("show");
|
||||
|
||||
},
|
||||
|
||||
//隐藏中控台
|
||||
hideConsole: function () {
|
||||
document.querySelector("#console").classList.remove("show");
|
||||
},
|
||||
|
||||
//快捷键功能开关
|
||||
keyboardToggle: function () {
|
||||
if (heo_keyboard) {
|
||||
heo_keyboard = false;
|
||||
document.querySelector("#consoleKeyboard").classList.remove("on");
|
||||
localStorage.setItem('keyboardToggle', 'false');
|
||||
} else {
|
||||
heo_keyboard = true;
|
||||
document.querySelector("#consoleKeyboard").classList.add("on");
|
||||
localStorage.setItem('keyboardToggle', 'true');
|
||||
}
|
||||
},
|
||||
|
||||
//滚动到指定id
|
||||
scrollTo: function (id) {
|
||||
var domTop = document.querySelector(id).offsetTop;
|
||||
window.scrollTo(0, domTop - 80);
|
||||
},
|
||||
|
||||
//隐藏侧边栏
|
||||
hideAsideBtn: () => { // Hide aside
|
||||
const $htmlDom = document.documentElement.classList
|
||||
$htmlDom.contains('hide-aside')
|
||||
? saveToLocal.set('aside-status', 'show', 2)
|
||||
: saveToLocal.set('aside-status', 'hide', 2)
|
||||
$htmlDom.toggle('hide-aside')
|
||||
},
|
||||
|
||||
|
||||
//初始化console图标
|
||||
initConsoleState: function () {
|
||||
//初始化隐藏边栏
|
||||
const $htmlDom = document.documentElement.classList
|
||||
$htmlDom.contains('hide-aside')
|
||||
? document.querySelector("#consoleHideAside").classList.add("on")
|
||||
: document.querySelector("#consoleHideAside").classList.remove("on")
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,78 @@
|
|||
const utils = {
|
||||
var btf = {
|
||||
|
||||
|
||||
// 修改时间显示"最近"
|
||||
diffDate: function (d, more = false) {
|
||||
const dateNow = new Date();
|
||||
const datePost = new Date(d);
|
||||
const dateDiff = dateNow.getTime() - datePost.getTime();
|
||||
const minute = 1000 * 60;
|
||||
const hour = minute * 60;
|
||||
const day = hour * 24;
|
||||
const month = day * 30;
|
||||
|
||||
let result;
|
||||
if (more) {
|
||||
const monthCount = dateDiff / month;
|
||||
const dayCount = dateDiff / day;
|
||||
const hourCount = dateDiff / hour;
|
||||
const minuteCount = dateDiff / minute;
|
||||
|
||||
if (monthCount >= 1) {
|
||||
result = datePost.toLocaleDateString().replace(/\//g, "-");
|
||||
} else if (dayCount >= 1) {
|
||||
result = parseInt(dayCount) + " " + GLOBAL_CONFIG.date_suffix.day;
|
||||
} else if (hourCount >= 1) {
|
||||
result = parseInt(hourCount) + " " + GLOBAL_CONFIG.date_suffix.hour;
|
||||
} else if (minuteCount >= 1) {
|
||||
result = parseInt(minuteCount) + " " + GLOBAL_CONFIG.date_suffix.min;
|
||||
} else {
|
||||
result = GLOBAL_CONFIG.date_suffix.just;
|
||||
}
|
||||
} else {
|
||||
result = parseInt(dateDiff / day);
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
loadLightbox: ele => {
|
||||
const service = GLOBAL_CONFIG.lightbox;
|
||||
|
||||
if (service === "mediumZoom") {
|
||||
const zoom = mediumZoom(ele);
|
||||
zoom.on("open", e => {
|
||||
const photoBg = document.documentElement.getAttribute("data-theme") === "dark" ? "#121212" : "#fff";
|
||||
zoom.update({
|
||||
background: photoBg,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (service === "fancybox") {
|
||||
ele.forEach(i => {
|
||||
if (i.parentNode.tagName !== "A") {
|
||||
const dataSrc = i.dataset.lazySrc || i.src;
|
||||
const dataCaption = i.title || i.alt || "";
|
||||
anzhiyu.wrap(i, "a", {
|
||||
href: dataSrc,
|
||||
"data-fancybox": "gallery",
|
||||
"data-caption": dataCaption,
|
||||
"data-thumb": dataSrc,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (!window.fancyboxRun) {
|
||||
Fancybox.bind("[data-fancybox]", {
|
||||
Hash: false,
|
||||
Thumbs: {
|
||||
autoStart: false,
|
||||
},
|
||||
});
|
||||
window.fancyboxRun = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
debounce: function (func, wait, immediate) {
|
||||
let timeout
|
||||
return function () {
|
||||
|
@ -49,18 +123,6 @@ const utils = {
|
|||
return throttled
|
||||
},
|
||||
|
||||
fadeIn: (ele, time) => {
|
||||
ele.style.cssText = `display:block;animation: to_show ${time}s`
|
||||
},
|
||||
|
||||
fadeOut: (ele, time) => {
|
||||
ele.addEventListener('animationend', function f() {
|
||||
ele.style.cssText = "display: none; animation: '' "
|
||||
ele.removeEventListener('animationend', f)
|
||||
})
|
||||
ele.style.animation = `to_hide ${time}s`
|
||||
},
|
||||
|
||||
sidebarPaddingR: () => {
|
||||
const innerWidth = window.innerWidth
|
||||
const clientWidth = document.body.clientWidth
|
||||
|
@ -73,72 +135,132 @@ const utils = {
|
|||
snackbarShow: (text, showAction, duration) => {
|
||||
const sa = (typeof showAction !== 'undefined') ? showAction : false
|
||||
const dur = (typeof duration !== 'undefined') ? duration : 5000
|
||||
const position = GLOBAL_CONFIG.Snackbar.position
|
||||
const bg = document.documentElement.getAttribute('data-theme') === 'light' ? GLOBAL_CONFIG.Snackbar.bgLight : GLOBAL_CONFIG.Snackbar.bgDark
|
||||
document.styleSheets[0].addRule(':root', '--heo-snackbar-time:' + dur + 'ms!important')
|
||||
Snackbar.show({
|
||||
text: text,
|
||||
backgroundColor: bg,
|
||||
showAction: sa,
|
||||
duration: dur,
|
||||
pos: 'top-center'
|
||||
pos: position
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
initJustifiedGallery: function (selector) {
|
||||
if (!(selector instanceof jQuery)) {
|
||||
selector = $(selector)
|
||||
}
|
||||
selector.each(function (i, o) {
|
||||
if ($(this).is(':visible')) {
|
||||
$(this).justifiedGallery({
|
||||
rowHeight: 220,
|
||||
margins: 4
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
copy: async (text) => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(text)
|
||||
utils.snackbarShow(GLOBALCONFIG.lang.copy.success, false, 2000)
|
||||
} catch (err) {
|
||||
utils.snackbarShow(GLOBALCONFIG.lang.copy.error, false, 2000)
|
||||
}
|
||||
},
|
||||
diffDate: (d, more = false) => {
|
||||
const dateNow = new Date()
|
||||
const datePost = new Date(d)
|
||||
const dateDiff = dateNow.getTime() - datePost.getTime()
|
||||
const minute = 1000 * 60
|
||||
const hour = minute * 60
|
||||
const day = hour * 24
|
||||
const month = day * 30
|
||||
|
||||
getEleTop: ele => {
|
||||
let actualTop = ele.offsetTop
|
||||
let current = ele.offsetParent
|
||||
let result
|
||||
if (more) {
|
||||
const monthCount = dateDiff / month
|
||||
const dayCount = dateDiff / day
|
||||
const hourCount = dateDiff / hour
|
||||
const minuteCount = dateDiff / minute
|
||||
|
||||
while (current !== null) {
|
||||
actualTop += current.offsetTop
|
||||
current = current.offsetParent
|
||||
}
|
||||
|
||||
return actualTop
|
||||
},
|
||||
|
||||
randomNum: (length) => {
|
||||
return Math.floor(Math.random() * length)
|
||||
},
|
||||
|
||||
timeDiff: (timeObj, today) => {
|
||||
var timeDiff = today.getTime() - timeObj.getTime();
|
||||
return Math.floor(timeDiff / (1000 * 3600 * 24));
|
||||
},
|
||||
|
||||
scrollToDest: (pos, time = 500) => {
|
||||
const currentPos = window.pageYOffset
|
||||
const isNavFixed = document.getElementById('page-header').classList.contains('nav-fixed')
|
||||
if (currentPos > pos || isNavFixed) pos = pos - 70
|
||||
if ('scrollBehavior' in document.documentElement.style) {
|
||||
window.scrollTo({
|
||||
top: pos,
|
||||
behavior: 'smooth'
|
||||
})
|
||||
return
|
||||
}
|
||||
let start = null
|
||||
pos = +pos
|
||||
window.requestAnimationFrame(function step(currentTime) {
|
||||
start = !start ? currentTime : start
|
||||
const progress = currentTime - start
|
||||
if (currentPos < pos) {
|
||||
window.scrollTo(0, ((pos - currentPos) * progress / time) + currentPos)
|
||||
if (monthCount > 12) {
|
||||
// result = datePost.toLocaleDateString().replace(/\//g, '-')
|
||||
result = datePost.toLocaleDateString()
|
||||
} else if (dayCount >= 7) {
|
||||
// } else if (monthCount >= 1) {
|
||||
result = datePost.toLocaleDateString().substr(5)
|
||||
// result = parseInt(monthCount) + ' ' + GLOBAL_CONFIG.date_suffix.month
|
||||
} else if (dayCount >= 1) {
|
||||
result = parseInt(dayCount) + '' + GLOBAL_CONFIG.date_suffix.day
|
||||
} else if (hourCount >= 1) {
|
||||
result = '最近'
|
||||
// result = parseInt(hourCount) + ' ' + GLOBAL_CONFIG.date_suffix.hour
|
||||
} else if (minuteCount >= 1) {
|
||||
result = '最近'
|
||||
// result = parseInt(minuteCount) + ' ' + GLOBAL_CONFIG.date_suffix.min
|
||||
} else {
|
||||
window.scrollTo(0, currentPos - ((currentPos - pos) * progress / time))
|
||||
result = GLOBAL_CONFIG.date_suffix.just
|
||||
}
|
||||
if (progress < time) {
|
||||
window.requestAnimationFrame(step)
|
||||
} else {
|
||||
window.scrollTo(0, pos)
|
||||
result = parseInt(dateDiff / day)
|
||||
}
|
||||
return result
|
||||
},
|
||||
|
||||
loadComment: (dom, callback) => {
|
||||
if ('IntersectionObserver' in window) {
|
||||
const observerItem = new IntersectionObserver((entries) => {
|
||||
if (entries[0].isIntersecting) {
|
||||
callback()
|
||||
observerItem.disconnect()
|
||||
}
|
||||
}, {threshold: [0]})
|
||||
observerItem.observe(dom)
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
scrollToDest: (e, t) => {
|
||||
if (e < 0 || t < 0)
|
||||
return;
|
||||
const n = window.scrollY || window.screenTop;
|
||||
if (e -= 70,
|
||||
"CSS" in window && CSS.supports("scroll-behavior", "smooth"))
|
||||
return void window.scrollTo({
|
||||
top: e,
|
||||
behavior: "smooth"
|
||||
});
|
||||
let o = null;
|
||||
t = t || 500,
|
||||
window.requestAnimationFrame((function i(s) {
|
||||
if (o = o || s,
|
||||
n < e) {
|
||||
const r = s - o;
|
||||
window.scrollTo(0, (e - n) * r / t + n),
|
||||
r < t ? window.requestAnimationFrame(i) : window.scrollTo(0, e)
|
||||
} else {
|
||||
const r = s - o;
|
||||
window.scrollTo(0, n - (n - e) * r / t),
|
||||
r < t ? window.requestAnimationFrame(i) : window.scrollTo(0, e)
|
||||
}
|
||||
}
|
||||
))
|
||||
},
|
||||
|
||||
fadeIn: (ele, time) => {
|
||||
ele.style.cssText = `display:block;animation: to_show ${time}s`
|
||||
},
|
||||
|
||||
fadeOut: (ele, time) => {
|
||||
ele.addEventListener('animationend', function f() {
|
||||
ele.style.cssText = "display: none; animation: '' "
|
||||
ele.removeEventListener('animationend', f)
|
||||
})
|
||||
ele.style.animation = `to_hide ${time}s`
|
||||
},
|
||||
|
||||
getParents: (elem, selector) => {
|
||||
for (; elem && elem !== document; elem = elem.parentNode) {
|
||||
if (elem.matches(selector)) return elem
|
||||
}
|
||||
return null
|
||||
},
|
||||
|
||||
siblings: (ele, selector) => {
|
||||
|
@ -149,5 +271,50 @@ const utils = {
|
|||
return child !== ele
|
||||
})
|
||||
},
|
||||
isMobile: () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} selector
|
||||
* @param {*} eleType the type of create element
|
||||
* @param {*} id id
|
||||
* @param {*} cn class name
|
||||
*/
|
||||
wrap: function (selector, eleType, id = '', cn = '') {
|
||||
const creatEle = document.createElement(eleType)
|
||||
if (id) creatEle.id = id
|
||||
if (cn) creatEle.className = cn
|
||||
selector.parentNode.insertBefore(creatEle, selector)
|
||||
creatEle.appendChild(selector)
|
||||
},
|
||||
|
||||
unwrap: function (el) {
|
||||
const elParentNode = el.parentNode
|
||||
if (elParentNode !== document.body) {
|
||||
elParentNode.parentNode.insertBefore(el, elParentNode)
|
||||
elParentNode.parentNode.removeChild(elParentNode)
|
||||
}
|
||||
},
|
||||
|
||||
isJqueryLoad: (fn) => {
|
||||
if (typeof jQuery === 'undefined') {
|
||||
getScript(GLOBAL_CONFIG.source.jQuery).then(fn)
|
||||
} else {
|
||||
fn()
|
||||
}
|
||||
},
|
||||
|
||||
isHidden: (ele) => ele.offsetHeight === 0 && ele.offsetWidth === 0,
|
||||
|
||||
getEleTop: (ele) => {
|
||||
let actualTop = ele.offsetTop
|
||||
let current = ele.offsetParent
|
||||
|
||||
while (current !== null) {
|
||||
actualTop += current.offsetTop
|
||||
current = current.offsetParent
|
||||
}
|
||||
|
||||
return actualTop
|
||||
}
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
!function(n){"use strict";var t=function(){return document.createElement("canvas").getContext("2d")},e=function(n,e){var a=new Image,o=n.src||n;"data:"!==o.substring(0,5)&&(a.crossOrigin="Anonymous"),a.onload=function(){var n=t("2d");n.drawImage(a,0,0);var o=n.getImageData(0,0,a.width,a.height);e&&e(o.data)},a.src=o},a=function(n){return["rgb(",n,")"].join("")},o=function(n){return n.map(function(n){return a(n.name)})},r=5,i=10,c={};c.colors=function(n,t){t=t||{};var c=t.exclude||[],u=t.paletteSize||i;e(n,function(e){for(var i=n.width*n.height||e.length,m={},s="",d=[],f={dominant:{name:"",count:0},palette:Array.apply(null,new Array(u)).map(Boolean).map(function(){return{name:"0,0,0",count:0}})},l=0;i>l;){if(d[0]=e[l],d[1]=e[l+1],d[2]=e[l+2],s=d.join(","),m[s]=s in m?m[s]+1:1,-1===c.indexOf(a(s))){var g=m[s];g>f.dominant.count?(f.dominant.name=s,f.dominant.count=g):f.palette.some(function(n){return g>n.count?(n.name=s,n.count=g,!0):void 0})}l+=4*r}if(t.success){var p=o(f.palette);t.success({dominant:a(f.dominant.name),secondary:p[0],palette:p})}})},n.RGBaster=n.RGBaster||c}(window);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
function waterfall(a){function b(a,b){var c=window.getComputedStyle(b);return parseFloat(c["margin"+a])||0}function c(a){return a+"px"}function d(a){return parseFloat(a.style.top)}function e(a){return parseFloat(a.style.left)}function f(a){return a.clientWidth}function g(a){return a.clientHeight}function h(a){return d(a)+g(a)+b("Bottom",a)}function i(a){return e(a)+f(a)+b("Right",a)}function j(a){a=a.sort(function(a,b){return h(a)===h(b)?e(b)-e(a):h(b)-h(a)})}function k(b){f(a)!=t&&(b.target.removeEventListener(b.type,arguments.callee),waterfall(a))}"string"==typeof a&&(a=document.querySelector(a));var l=[].map.call(a.children,function(a){return a.style.position="absolute",a});a.style.position="relative";var m=[];l.length&&(l[0].style.top="0px",l[0].style.left=c(b("Left",l[0])),m.push(l[0]));for(var n=1;n<l.length;n++){var o=l[n-1],p=l[n],q=i(o)+f(p)<=f(a);if(!q)break;p.style.top=o.style.top,p.style.left=c(i(o)+b("Left",p)),m.push(p)}for(;n<l.length;n++){j(m);var p=l[n],r=m.pop();p.style.top=c(h(r)+b("Top",p)),p.style.left=c(e(r)),m.push(p)}j(m);var s=m[0];a.style.height=c(h(s)+b("Bottom",s));var t=f(a);window.addEventListener?window.addEventListener("resize",k):document.body.onresize=k}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,479 @@
|
|||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 3736806 */
|
||||
src: url('iconfont.woff2?t=1675495619599') format('woff2'),
|
||||
url('iconfont.woff?t=1675495619599') format('woff'),
|
||||
url('iconfont.ttf?t=1675495619599') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-arrows-alt-h:before {
|
||||
content: "\ef28";
|
||||
}
|
||||
|
||||
.icon-plus-circle:before {
|
||||
content: "\f082";
|
||||
}
|
||||
|
||||
.icon-csdn1:before {
|
||||
content: "\e608";
|
||||
}
|
||||
|
||||
.icon-CN_cnblogs:before {
|
||||
content: "\e64d";
|
||||
}
|
||||
|
||||
.icon-leetcode:before {
|
||||
content: "\ebf2";
|
||||
}
|
||||
|
||||
.icon-juejin:before {
|
||||
content: "\e606";
|
||||
}
|
||||
|
||||
.icon-weibiaoti-1:before {
|
||||
content: "\e607";
|
||||
}
|
||||
|
||||
.icon-csdn:before {
|
||||
content: "\e60a";
|
||||
}
|
||||
|
||||
.icon-bokeyuan:before {
|
||||
content: "\e623";
|
||||
}
|
||||
|
||||
.icon-yuque:before {
|
||||
content: "\e880";
|
||||
}
|
||||
|
||||
.icon-jinritoutiao:before {
|
||||
content: "\e68d";
|
||||
}
|
||||
|
||||
.icon-weixingongzhonghao:before {
|
||||
content: "\e605";
|
||||
}
|
||||
|
||||
.icon-steam-line:before {
|
||||
content: "\e75f";
|
||||
}
|
||||
|
||||
.icon-steam-fill:before {
|
||||
content: "\e763";
|
||||
}
|
||||
|
||||
.icon-slack-line:before {
|
||||
content: "\e75c";
|
||||
}
|
||||
|
||||
.icon-linkedin-box-line:before {
|
||||
content: "\e750";
|
||||
}
|
||||
|
||||
.icon-telegram-line:before {
|
||||
content: "\e761";
|
||||
}
|
||||
|
||||
.icon-douyin:before {
|
||||
content: "\e673";
|
||||
}
|
||||
|
||||
.icon-wechat2:before {
|
||||
content: "\e632";
|
||||
}
|
||||
|
||||
.icon-phone-line:before {
|
||||
content: "\e6ac";
|
||||
}
|
||||
|
||||
.icon-alipay-line:before {
|
||||
content: "\e73c";
|
||||
}
|
||||
|
||||
.icon-app-store-line:before {
|
||||
content: "\e73e";
|
||||
}
|
||||
|
||||
.icon-baidu-line:before {
|
||||
content: "\e73f";
|
||||
}
|
||||
|
||||
.icon-bilibili-line:before {
|
||||
content: "\e740";
|
||||
}
|
||||
|
||||
.icon-dingding-line:before {
|
||||
content: "\e743";
|
||||
}
|
||||
|
||||
.icon-douban-line:before {
|
||||
content: "\e744";
|
||||
}
|
||||
|
||||
.icon-disqus-line:before {
|
||||
content: "\e745";
|
||||
}
|
||||
|
||||
.icon-discord-line:before {
|
||||
content: "\e746";
|
||||
}
|
||||
|
||||
.icon-dribbble-line:before {
|
||||
content: "\e747";
|
||||
}
|
||||
|
||||
.icon-drive-line:before {
|
||||
content: "\e748";
|
||||
}
|
||||
|
||||
.icon-facebook-box-line:before {
|
||||
content: "\e749";
|
||||
}
|
||||
|
||||
.icon-dropbox-line:before {
|
||||
content: "\e74a";
|
||||
}
|
||||
|
||||
.icon-evernote-line:before {
|
||||
content: "\e74b";
|
||||
}
|
||||
|
||||
.icon-gitlab-line:before {
|
||||
content: "\e74d";
|
||||
}
|
||||
|
||||
.icon-google-line:before {
|
||||
content: "\e74e";
|
||||
}
|
||||
|
||||
.icon-google-play-line:before {
|
||||
content: "\e74f";
|
||||
}
|
||||
|
||||
.icon-instagram-line:before {
|
||||
content: "\e751";
|
||||
}
|
||||
|
||||
.icon-line-fill:before {
|
||||
content: "\e752";
|
||||
}
|
||||
|
||||
.icon-paypal-line:before {
|
||||
content: "\e757";
|
||||
}
|
||||
|
||||
.icon-qq-line:before {
|
||||
content: "\e759";
|
||||
}
|
||||
|
||||
.icon-reddit-line:before {
|
||||
content: "\e75a";
|
||||
}
|
||||
|
||||
.icon-spotify-line:before {
|
||||
content: "\e75d";
|
||||
}
|
||||
|
||||
.icon-stack-overflow-line:before {
|
||||
content: "\e75e";
|
||||
}
|
||||
|
||||
.icon-snapchat-line:before {
|
||||
content: "\e75b";
|
||||
}
|
||||
|
||||
.icon-taobao-line:before {
|
||||
content: "\e760";
|
||||
}
|
||||
|
||||
.icon-twitter-line:before {
|
||||
content: "\e762";
|
||||
}
|
||||
|
||||
.icon-wechat-2-line:before {
|
||||
content: "\e766";
|
||||
}
|
||||
|
||||
.icon-wechat-fill:before {
|
||||
content: "\e768";
|
||||
}
|
||||
|
||||
.icon-wechat-line:before {
|
||||
content: "\e769";
|
||||
}
|
||||
|
||||
.icon-weibo-line:before {
|
||||
content: "\e76a";
|
||||
}
|
||||
|
||||
.icon-whatsapp-line:before {
|
||||
content: "\e76b";
|
||||
}
|
||||
|
||||
.icon-youtube-line:before {
|
||||
content: "\e76c";
|
||||
}
|
||||
|
||||
.icon-zhihu-line:before {
|
||||
content: "\e76d";
|
||||
}
|
||||
|
||||
.icon-wechat-2-fill:before {
|
||||
content: "\e76e";
|
||||
}
|
||||
|
||||
.icon-by:before {
|
||||
content: "\e601";
|
||||
}
|
||||
|
||||
.icon-cc:before {
|
||||
content: "\e602";
|
||||
}
|
||||
|
||||
.icon-nc:before {
|
||||
content: "\e603";
|
||||
}
|
||||
|
||||
.icon-nd:before {
|
||||
content: "\e604";
|
||||
}
|
||||
|
||||
.icon-HAO:before {
|
||||
content: "\e60e";
|
||||
}
|
||||
|
||||
.icon-logo-hao-pro:before {
|
||||
content: "\f290";
|
||||
}
|
||||
|
||||
.icon-logo-hao:before {
|
||||
content: "\e609";
|
||||
}
|
||||
|
||||
.icon-logo-moment:before {
|
||||
content: "\e6af";
|
||||
}
|
||||
|
||||
.icon-indent:before {
|
||||
content: "\f027";
|
||||
}
|
||||
|
||||
.icon-bars:before {
|
||||
content: "\ef34";
|
||||
}
|
||||
|
||||
.icon-mail-line:before {
|
||||
content: "\e668";
|
||||
}
|
||||
|
||||
.icon-github-line:before {
|
||||
content: "\e74c";
|
||||
}
|
||||
|
||||
.icon-moon:before {
|
||||
content: "\f057";
|
||||
}
|
||||
|
||||
.icon-closed-captioning:before {
|
||||
content: "\ef76";
|
||||
}
|
||||
|
||||
.icon-hand-holding:before {
|
||||
content: "\f000";
|
||||
}
|
||||
|
||||
.icon-dice:before {
|
||||
content: "\ef94";
|
||||
}
|
||||
|
||||
.icon-list-ul:before {
|
||||
content: "\f039";
|
||||
}
|
||||
|
||||
.icon-baidu:before {
|
||||
content: "\e6b6";
|
||||
}
|
||||
|
||||
.icon-search:before {
|
||||
content: "\f0a8";
|
||||
}
|
||||
|
||||
.icon-download:before {
|
||||
content: "\efa5";
|
||||
}
|
||||
|
||||
.icon-image:before {
|
||||
content: "\f024";
|
||||
}
|
||||
|
||||
.icon-window-restore:before {
|
||||
content: "\f159";
|
||||
}
|
||||
|
||||
.icon-comment-dots1:before {
|
||||
content: "\f288";
|
||||
}
|
||||
|
||||
.icon-copy:before {
|
||||
content: "\ef86";
|
||||
}
|
||||
|
||||
.icon-bus:before {
|
||||
content: "\ef58";
|
||||
}
|
||||
|
||||
.icon-hotjar:before {
|
||||
content: "\f1cf";
|
||||
}
|
||||
|
||||
.icon-weibo:before {
|
||||
content: "\f261";
|
||||
}
|
||||
|
||||
.icon-robot:before {
|
||||
content: "\f09a";
|
||||
}
|
||||
|
||||
.icon-paste:before {
|
||||
content: "\f068";
|
||||
}
|
||||
|
||||
.icon-link:before {
|
||||
content: "\f037";
|
||||
}
|
||||
|
||||
.icon-qrcode:before {
|
||||
content: "\f08d";
|
||||
}
|
||||
|
||||
.icon-calendar-alt:before {
|
||||
content: "\ef5a";
|
||||
}
|
||||
|
||||
.icon-clock:before {
|
||||
content: "\ef75";
|
||||
}
|
||||
|
||||
.icon-file-word:before {
|
||||
content: "\efd1";
|
||||
}
|
||||
|
||||
.icon-chevron-down:before {
|
||||
content: "\ef6d";
|
||||
}
|
||||
|
||||
.icon-times-circle:before {
|
||||
content: "\f10a";
|
||||
}
|
||||
|
||||
.icon-grip-vertical:before {
|
||||
content: "\efff";
|
||||
}
|
||||
|
||||
.icon-book:before {
|
||||
content: "\ef46";
|
||||
}
|
||||
|
||||
.icon-burn:before {
|
||||
content: "\ef57";
|
||||
}
|
||||
|
||||
.icon-dove:before {
|
||||
content: "\efa4";
|
||||
}
|
||||
|
||||
.icon-arrow-circle-right:before {
|
||||
content: "\ef23";
|
||||
}
|
||||
|
||||
.icon-comment-dots:before {
|
||||
content: "\ef7e";
|
||||
}
|
||||
|
||||
.icon-folder-open:before {
|
||||
content: "\efdc";
|
||||
}
|
||||
|
||||
.icon-file-alt:before {
|
||||
content: "\efc1";
|
||||
}
|
||||
|
||||
.icon-bullseye:before {
|
||||
content: "\ef56";
|
||||
}
|
||||
|
||||
.icon-sliders:before {
|
||||
content: "\f0bf";
|
||||
}
|
||||
|
||||
.icon-tags:before {
|
||||
content: "\f0f3";
|
||||
}
|
||||
|
||||
.icon-comment-alt:before {
|
||||
content: "\f287";
|
||||
}
|
||||
|
||||
.icon-eye:before {
|
||||
content: "\f28f";
|
||||
}
|
||||
|
||||
.icon-arrow-left:before {
|
||||
content: "\ef26";
|
||||
}
|
||||
|
||||
.icon-arrow-right:before {
|
||||
content: "\ef27";
|
||||
}
|
||||
|
||||
.icon-arrow-up:before {
|
||||
content: "\ef2a";
|
||||
}
|
||||
|
||||
.icon-chevron-left:before {
|
||||
content: "\ef6e";
|
||||
}
|
||||
|
||||
.icon-chevron-right:before {
|
||||
content: "\ef6f";
|
||||
}
|
||||
|
||||
.icon-redo-alt:before {
|
||||
content: "\f094";
|
||||
}
|
||||
|
||||
.icon-listol:before {
|
||||
content: "\e767";
|
||||
}
|
||||
|
||||
.icon-arrowup:before {
|
||||
content: "\e64c";
|
||||
}
|
||||
|
||||
.icon-icon-sidebar-scxmtj:before {
|
||||
content: "\e643";
|
||||
}
|
||||
|
||||
.icon-train-public-transport:before {
|
||||
content: "\e600";
|
||||
}
|
||||
|
||||
.icon-a-theconsole-fill:before {
|
||||
content: "\ea32";
|
||||
}
|
||||
|
||||
.icon-shuffle:before {
|
||||
content: "\e67e";
|
||||
}
|
||||
|
||||
.icon-md-train:before {
|
||||
content: "\e77d";
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,821 @@
|
|||
{
|
||||
"id": "3736806",
|
||||
"name": "hao",
|
||||
"font_family": "iconfont",
|
||||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "5633818",
|
||||
"name": "arrows-alt-h",
|
||||
"font_class": "arrows-alt-h",
|
||||
"unicode": "ef28",
|
||||
"unicode_decimal": 61224
|
||||
},
|
||||
{
|
||||
"icon_id": "5634298",
|
||||
"name": "plus-circle",
|
||||
"font_class": "plus-circle",
|
||||
"unicode": "f082",
|
||||
"unicode_decimal": 61570
|
||||
},
|
||||
{
|
||||
"icon_id": "3506983",
|
||||
"name": "csdn",
|
||||
"font_class": "csdn1",
|
||||
"unicode": "e608",
|
||||
"unicode_decimal": 58888
|
||||
},
|
||||
{
|
||||
"icon_id": "2041684",
|
||||
"name": "CN_cnblogs",
|
||||
"font_class": "CN_cnblogs",
|
||||
"unicode": "e64d",
|
||||
"unicode_decimal": 58957
|
||||
},
|
||||
{
|
||||
"icon_id": "15378535",
|
||||
"name": "leetcode",
|
||||
"font_class": "leetcode",
|
||||
"unicode": "ebf2",
|
||||
"unicode_decimal": 60402
|
||||
},
|
||||
{
|
||||
"icon_id": "18422914",
|
||||
"name": "juejin",
|
||||
"font_class": "juejin",
|
||||
"unicode": "e606",
|
||||
"unicode_decimal": 58886
|
||||
},
|
||||
{
|
||||
"icon_id": "18458782",
|
||||
"name": "infoQ",
|
||||
"font_class": "weibiaoti-1",
|
||||
"unicode": "e607",
|
||||
"unicode_decimal": 58887
|
||||
},
|
||||
{
|
||||
"icon_id": "829865",
|
||||
"name": "csdn",
|
||||
"font_class": "csdn",
|
||||
"unicode": "e60a",
|
||||
"unicode_decimal": 58890
|
||||
},
|
||||
{
|
||||
"icon_id": "833511",
|
||||
"name": "博客园",
|
||||
"font_class": "bokeyuan",
|
||||
"unicode": "e623",
|
||||
"unicode_decimal": 58915
|
||||
},
|
||||
{
|
||||
"icon_id": "4936975",
|
||||
"name": "yuque",
|
||||
"font_class": "yuque",
|
||||
"unicode": "e880",
|
||||
"unicode_decimal": 59520
|
||||
},
|
||||
{
|
||||
"icon_id": "13743995",
|
||||
"name": "jinritoutiao",
|
||||
"font_class": "jinritoutiao",
|
||||
"unicode": "e68d",
|
||||
"unicode_decimal": 59021
|
||||
},
|
||||
{
|
||||
"icon_id": "28650243",
|
||||
"name": "微信公众号",
|
||||
"font_class": "weixingongzhonghao",
|
||||
"unicode": "e605",
|
||||
"unicode_decimal": 58885
|
||||
},
|
||||
{
|
||||
"icon_id": "20818171",
|
||||
"name": "steam-line",
|
||||
"font_class": "steam-line",
|
||||
"unicode": "e75f",
|
||||
"unicode_decimal": 59231
|
||||
},
|
||||
{
|
||||
"icon_id": "20818172",
|
||||
"name": "steam-fill",
|
||||
"font_class": "steam-fill",
|
||||
"unicode": "e763",
|
||||
"unicode_decimal": 59235
|
||||
},
|
||||
{
|
||||
"icon_id": "20818156",
|
||||
"name": "slack-line",
|
||||
"font_class": "slack-line",
|
||||
"unicode": "e75c",
|
||||
"unicode_decimal": 59228
|
||||
},
|
||||
{
|
||||
"icon_id": "20818112",
|
||||
"name": "linkedin-box-line",
|
||||
"font_class": "linkedin-box-line",
|
||||
"unicode": "e750",
|
||||
"unicode_decimal": 59216
|
||||
},
|
||||
{
|
||||
"icon_id": "20818178",
|
||||
"name": "telegram-line",
|
||||
"font_class": "telegram-line",
|
||||
"unicode": "e761",
|
||||
"unicode_decimal": 59233
|
||||
},
|
||||
{
|
||||
"icon_id": "22273028",
|
||||
"name": "douyin",
|
||||
"font_class": "douyin",
|
||||
"unicode": "e673",
|
||||
"unicode_decimal": 58995
|
||||
},
|
||||
{
|
||||
"icon_id": "14629289",
|
||||
"name": "wechat2",
|
||||
"font_class": "wechat2",
|
||||
"unicode": "e632",
|
||||
"unicode_decimal": 58930
|
||||
},
|
||||
{
|
||||
"icon_id": "20817466",
|
||||
"name": "phone-line",
|
||||
"font_class": "phone-line",
|
||||
"unicode": "e6ac",
|
||||
"unicode_decimal": 59052
|
||||
},
|
||||
{
|
||||
"icon_id": "20818029",
|
||||
"name": "alipay-line",
|
||||
"font_class": "alipay-line",
|
||||
"unicode": "e73c",
|
||||
"unicode_decimal": 59196
|
||||
},
|
||||
{
|
||||
"icon_id": "20818039",
|
||||
"name": "app-store-line",
|
||||
"font_class": "app-store-line",
|
||||
"unicode": "e73e",
|
||||
"unicode_decimal": 59198
|
||||
},
|
||||
{
|
||||
"icon_id": "20818044",
|
||||
"name": "baidu-line",
|
||||
"font_class": "baidu-line",
|
||||
"unicode": "e73f",
|
||||
"unicode_decimal": 59199
|
||||
},
|
||||
{
|
||||
"icon_id": "20818045",
|
||||
"name": "bilibili-line",
|
||||
"font_class": "bilibili-line",
|
||||
"unicode": "e740",
|
||||
"unicode_decimal": 59200
|
||||
},
|
||||
{
|
||||
"icon_id": "20818057",
|
||||
"name": "dingding-line",
|
||||
"font_class": "dingding-line",
|
||||
"unicode": "e743",
|
||||
"unicode_decimal": 59203
|
||||
},
|
||||
{
|
||||
"icon_id": "20818060",
|
||||
"name": "douban-line",
|
||||
"font_class": "douban-line",
|
||||
"unicode": "e744",
|
||||
"unicode_decimal": 59204
|
||||
},
|
||||
{
|
||||
"icon_id": "20818061",
|
||||
"name": "disqus-line",
|
||||
"font_class": "disqus-line",
|
||||
"unicode": "e745",
|
||||
"unicode_decimal": 59205
|
||||
},
|
||||
{
|
||||
"icon_id": "20818062",
|
||||
"name": "discord-line",
|
||||
"font_class": "discord-line",
|
||||
"unicode": "e746",
|
||||
"unicode_decimal": 59206
|
||||
},
|
||||
{
|
||||
"icon_id": "20818064",
|
||||
"name": "dribbble-line",
|
||||
"font_class": "dribbble-line",
|
||||
"unicode": "e747",
|
||||
"unicode_decimal": 59207
|
||||
},
|
||||
{
|
||||
"icon_id": "20818065",
|
||||
"name": "drive-line",
|
||||
"font_class": "drive-line",
|
||||
"unicode": "e748",
|
||||
"unicode_decimal": 59208
|
||||
},
|
||||
{
|
||||
"icon_id": "20818068",
|
||||
"name": "facebook-box-line",
|
||||
"font_class": "facebook-box-line",
|
||||
"unicode": "e749",
|
||||
"unicode_decimal": 59209
|
||||
},
|
||||
{
|
||||
"icon_id": "20818074",
|
||||
"name": "dropbox-line",
|
||||
"font_class": "dropbox-line",
|
||||
"unicode": "e74a",
|
||||
"unicode_decimal": 59210
|
||||
},
|
||||
{
|
||||
"icon_id": "20818085",
|
||||
"name": "evernote-line",
|
||||
"font_class": "evernote-line",
|
||||
"unicode": "e74b",
|
||||
"unicode_decimal": 59211
|
||||
},
|
||||
{
|
||||
"icon_id": "20818088",
|
||||
"name": "gitlab-line",
|
||||
"font_class": "gitlab-line",
|
||||
"unicode": "e74d",
|
||||
"unicode_decimal": 59213
|
||||
},
|
||||
{
|
||||
"icon_id": "20818092",
|
||||
"name": "google-line",
|
||||
"font_class": "google-line",
|
||||
"unicode": "e74e",
|
||||
"unicode_decimal": 59214
|
||||
},
|
||||
{
|
||||
"icon_id": "20818094",
|
||||
"name": "google-play-line",
|
||||
"font_class": "google-play-line",
|
||||
"unicode": "e74f",
|
||||
"unicode_decimal": 59215
|
||||
},
|
||||
{
|
||||
"icon_id": "20818106",
|
||||
"name": "instagram-line",
|
||||
"font_class": "instagram-line",
|
||||
"unicode": "e751",
|
||||
"unicode_decimal": 59217
|
||||
},
|
||||
{
|
||||
"icon_id": "20818121",
|
||||
"name": "line-fill",
|
||||
"font_class": "line-fill",
|
||||
"unicode": "e752",
|
||||
"unicode_decimal": 59218
|
||||
},
|
||||
{
|
||||
"icon_id": "20818138",
|
||||
"name": "paypal-line",
|
||||
"font_class": "paypal-line",
|
||||
"unicode": "e757",
|
||||
"unicode_decimal": 59223
|
||||
},
|
||||
{
|
||||
"icon_id": "20818146",
|
||||
"name": "qq-line",
|
||||
"font_class": "qq-line",
|
||||
"unicode": "e759",
|
||||
"unicode_decimal": 59225
|
||||
},
|
||||
{
|
||||
"icon_id": "20818153",
|
||||
"name": "reddit-line",
|
||||
"font_class": "reddit-line",
|
||||
"unicode": "e75a",
|
||||
"unicode_decimal": 59226
|
||||
},
|
||||
{
|
||||
"icon_id": "20818162",
|
||||
"name": "spotify-line",
|
||||
"font_class": "spotify-line",
|
||||
"unicode": "e75d",
|
||||
"unicode_decimal": 59229
|
||||
},
|
||||
{
|
||||
"icon_id": "20818166",
|
||||
"name": "stack-overflow-line",
|
||||
"font_class": "stack-overflow-line",
|
||||
"unicode": "e75e",
|
||||
"unicode_decimal": 59230
|
||||
},
|
||||
{
|
||||
"icon_id": "20818168",
|
||||
"name": "snapchat-line",
|
||||
"font_class": "snapchat-line",
|
||||
"unicode": "e75b",
|
||||
"unicode_decimal": 59227
|
||||
},
|
||||
{
|
||||
"icon_id": "20818175",
|
||||
"name": "taobao-line",
|
||||
"font_class": "taobao-line",
|
||||
"unicode": "e760",
|
||||
"unicode_decimal": 59232
|
||||
},
|
||||
{
|
||||
"icon_id": "20818181",
|
||||
"name": "twitter-line",
|
||||
"font_class": "twitter-line",
|
||||
"unicode": "e762",
|
||||
"unicode_decimal": 59234
|
||||
},
|
||||
{
|
||||
"icon_id": "20818193",
|
||||
"name": "wechat-2-line",
|
||||
"font_class": "wechat-2-line",
|
||||
"unicode": "e766",
|
||||
"unicode_decimal": 59238
|
||||
},
|
||||
{
|
||||
"icon_id": "20818195",
|
||||
"name": "wechat-fill",
|
||||
"font_class": "wechat-fill",
|
||||
"unicode": "e768",
|
||||
"unicode_decimal": 59240
|
||||
},
|
||||
{
|
||||
"icon_id": "20818198",
|
||||
"name": "wechat-line",
|
||||
"font_class": "wechat-line",
|
||||
"unicode": "e769",
|
||||
"unicode_decimal": 59241
|
||||
},
|
||||
{
|
||||
"icon_id": "20818200",
|
||||
"name": "weibo-line",
|
||||
"font_class": "weibo-line",
|
||||
"unicode": "e76a",
|
||||
"unicode_decimal": 59242
|
||||
},
|
||||
{
|
||||
"icon_id": "20818206",
|
||||
"name": "whatsapp-line",
|
||||
"font_class": "whatsapp-line",
|
||||
"unicode": "e76b",
|
||||
"unicode_decimal": 59243
|
||||
},
|
||||
{
|
||||
"icon_id": "20818213",
|
||||
"name": "youtube-line",
|
||||
"font_class": "youtube-line",
|
||||
"unicode": "e76c",
|
||||
"unicode_decimal": 59244
|
||||
},
|
||||
{
|
||||
"icon_id": "20818220",
|
||||
"name": "zhihu-line",
|
||||
"font_class": "zhihu-line",
|
||||
"unicode": "e76d",
|
||||
"unicode_decimal": 59245
|
||||
},
|
||||
{
|
||||
"icon_id": "20818226",
|
||||
"name": "wechat-2-fill",
|
||||
"font_class": "wechat-2-fill",
|
||||
"unicode": "e76e",
|
||||
"unicode_decimal": 59246
|
||||
},
|
||||
{
|
||||
"icon_id": "12095053",
|
||||
"name": "by",
|
||||
"font_class": "by",
|
||||
"unicode": "e601",
|
||||
"unicode_decimal": 58881
|
||||
},
|
||||
{
|
||||
"icon_id": "12095056",
|
||||
"name": "cc",
|
||||
"font_class": "cc",
|
||||
"unicode": "e602",
|
||||
"unicode_decimal": 58882
|
||||
},
|
||||
{
|
||||
"icon_id": "12095063",
|
||||
"name": "nc",
|
||||
"font_class": "nc",
|
||||
"unicode": "e603",
|
||||
"unicode_decimal": 58883
|
||||
},
|
||||
{
|
||||
"icon_id": "12095066",
|
||||
"name": "nd",
|
||||
"font_class": "nd",
|
||||
"unicode": "e604",
|
||||
"unicode_decimal": 58884
|
||||
},
|
||||
{
|
||||
"icon_id": "32816778",
|
||||
"name": "HAO",
|
||||
"font_class": "HAO",
|
||||
"unicode": "e60e",
|
||||
"unicode_decimal": 58894
|
||||
},
|
||||
{
|
||||
"icon_id": "32796142",
|
||||
"name": "logo-hao-copy",
|
||||
"font_class": "logo-hao-pro",
|
||||
"unicode": "f290",
|
||||
"unicode_decimal": 62096
|
||||
},
|
||||
{
|
||||
"icon_id": "32787589",
|
||||
"name": "logo-hao",
|
||||
"font_class": "logo-hao",
|
||||
"unicode": "e609",
|
||||
"unicode_decimal": 58889
|
||||
},
|
||||
{
|
||||
"icon_id": "16440935",
|
||||
"name": "logo-moment",
|
||||
"font_class": "logo-moment",
|
||||
"unicode": "e6af",
|
||||
"unicode_decimal": 59055
|
||||
},
|
||||
{
|
||||
"icon_id": "5634161",
|
||||
"name": "indent",
|
||||
"font_class": "indent",
|
||||
"unicode": "f027",
|
||||
"unicode_decimal": 61479
|
||||
},
|
||||
{
|
||||
"icon_id": "5633834",
|
||||
"name": "bars",
|
||||
"font_class": "bars",
|
||||
"unicode": "ef34",
|
||||
"unicode_decimal": 61236
|
||||
},
|
||||
{
|
||||
"icon_id": "20817029",
|
||||
"name": "mail-line",
|
||||
"font_class": "mail-line",
|
||||
"unicode": "e668",
|
||||
"unicode_decimal": 58984
|
||||
},
|
||||
{
|
||||
"icon_id": "20818096",
|
||||
"name": "github-line",
|
||||
"font_class": "github-line",
|
||||
"unicode": "e74c",
|
||||
"unicode_decimal": 59212
|
||||
},
|
||||
{
|
||||
"icon_id": "5634247",
|
||||
"name": "moon",
|
||||
"font_class": "moon",
|
||||
"unicode": "f057",
|
||||
"unicode_decimal": 61527
|
||||
},
|
||||
{
|
||||
"icon_id": "5633944",
|
||||
"name": "closed-captioning",
|
||||
"font_class": "closed-captioning",
|
||||
"unicode": "ef76",
|
||||
"unicode_decimal": 61302
|
||||
},
|
||||
{
|
||||
"icon_id": "5634114",
|
||||
"name": "hand-holding",
|
||||
"font_class": "hand-holding",
|
||||
"unicode": "f000",
|
||||
"unicode_decimal": 61440
|
||||
},
|
||||
{
|
||||
"icon_id": "5633983",
|
||||
"name": "dice",
|
||||
"font_class": "dice",
|
||||
"unicode": "ef94",
|
||||
"unicode_decimal": 61332
|
||||
},
|
||||
{
|
||||
"icon_id": "5634194",
|
||||
"name": "list-ul",
|
||||
"font_class": "list-ul",
|
||||
"unicode": "f039",
|
||||
"unicode_decimal": 61497
|
||||
},
|
||||
{
|
||||
"icon_id": "386278",
|
||||
"name": "baidu",
|
||||
"font_class": "baidu",
|
||||
"unicode": "e6b6",
|
||||
"unicode_decimal": 59062
|
||||
},
|
||||
{
|
||||
"icon_id": "5634346",
|
||||
"name": "search",
|
||||
"font_class": "search",
|
||||
"unicode": "f0a8",
|
||||
"unicode_decimal": 61608
|
||||
},
|
||||
{
|
||||
"icon_id": "5634003",
|
||||
"name": "download",
|
||||
"font_class": "download",
|
||||
"unicode": "efa5",
|
||||
"unicode_decimal": 61349
|
||||
},
|
||||
{
|
||||
"icon_id": "5634158",
|
||||
"name": "image",
|
||||
"font_class": "image",
|
||||
"unicode": "f024",
|
||||
"unicode_decimal": 61476
|
||||
},
|
||||
{
|
||||
"icon_id": "5634542",
|
||||
"name": "window-restore",
|
||||
"font_class": "window-restore",
|
||||
"unicode": "f159",
|
||||
"unicode_decimal": 61785
|
||||
},
|
||||
{
|
||||
"icon_id": "5634960",
|
||||
"name": "comment-dots",
|
||||
"font_class": "comment-dots1",
|
||||
"unicode": "f288",
|
||||
"unicode_decimal": 62088
|
||||
},
|
||||
{
|
||||
"icon_id": "5633967",
|
||||
"name": "copy",
|
||||
"font_class": "copy",
|
||||
"unicode": "ef86",
|
||||
"unicode_decimal": 61318
|
||||
},
|
||||
{
|
||||
"icon_id": "5633878",
|
||||
"name": "bus",
|
||||
"font_class": "bus",
|
||||
"unicode": "ef58",
|
||||
"unicode_decimal": 61272
|
||||
},
|
||||
{
|
||||
"icon_id": "5634718",
|
||||
"name": "hotjar",
|
||||
"font_class": "hotjar",
|
||||
"unicode": "f1cf",
|
||||
"unicode_decimal": 61903
|
||||
},
|
||||
{
|
||||
"icon_id": "5634903",
|
||||
"name": "weibo",
|
||||
"font_class": "weibo",
|
||||
"unicode": "f261",
|
||||
"unicode_decimal": 62049
|
||||
},
|
||||
{
|
||||
"icon_id": "5634330",
|
||||
"name": "robot",
|
||||
"font_class": "robot",
|
||||
"unicode": "f09a",
|
||||
"unicode_decimal": 61594
|
||||
},
|
||||
{
|
||||
"icon_id": "5634271",
|
||||
"name": "paste",
|
||||
"font_class": "paste",
|
||||
"unicode": "f068",
|
||||
"unicode_decimal": 61544
|
||||
},
|
||||
{
|
||||
"icon_id": "5634192",
|
||||
"name": "link",
|
||||
"font_class": "link",
|
||||
"unicode": "f037",
|
||||
"unicode_decimal": 61495
|
||||
},
|
||||
{
|
||||
"icon_id": "5634313",
|
||||
"name": "qrcode",
|
||||
"font_class": "qrcode",
|
||||
"unicode": "f08d",
|
||||
"unicode_decimal": 61581
|
||||
},
|
||||
{
|
||||
"icon_id": "5633882",
|
||||
"name": "calendar-alt",
|
||||
"font_class": "calendar-alt",
|
||||
"unicode": "ef5a",
|
||||
"unicode_decimal": 61274
|
||||
},
|
||||
{
|
||||
"icon_id": "5633943",
|
||||
"name": "clock",
|
||||
"font_class": "clock",
|
||||
"unicode": "ef75",
|
||||
"unicode_decimal": 61301
|
||||
},
|
||||
{
|
||||
"icon_id": "5634058",
|
||||
"name": "file-word",
|
||||
"font_class": "file-word",
|
||||
"unicode": "efd1",
|
||||
"unicode_decimal": 61393
|
||||
},
|
||||
{
|
||||
"icon_id": "5633931",
|
||||
"name": "chevron-down",
|
||||
"font_class": "chevron-down",
|
||||
"unicode": "ef6d",
|
||||
"unicode_decimal": 61293
|
||||
},
|
||||
{
|
||||
"icon_id": "5634458",
|
||||
"name": "times-circle",
|
||||
"font_class": "times-circle",
|
||||
"unicode": "f10a",
|
||||
"unicode_decimal": 61706
|
||||
},
|
||||
{
|
||||
"icon_id": "5634113",
|
||||
"name": "grip-vertical",
|
||||
"font_class": "grip-vertical",
|
||||
"unicode": "efff",
|
||||
"unicode_decimal": 61439
|
||||
},
|
||||
{
|
||||
"icon_id": "5633858",
|
||||
"name": "book",
|
||||
"font_class": "book",
|
||||
"unicode": "ef46",
|
||||
"unicode_decimal": 61254
|
||||
},
|
||||
{
|
||||
"icon_id": "5633877",
|
||||
"name": "burn",
|
||||
"font_class": "burn",
|
||||
"unicode": "ef57",
|
||||
"unicode_decimal": 61271
|
||||
},
|
||||
{
|
||||
"icon_id": "5634002",
|
||||
"name": "dove",
|
||||
"font_class": "dove",
|
||||
"unicode": "efa4",
|
||||
"unicode_decimal": 61348
|
||||
},
|
||||
{
|
||||
"icon_id": "5633812",
|
||||
"name": "arrow-circle-right",
|
||||
"font_class": "arrow-circle-right",
|
||||
"unicode": "ef23",
|
||||
"unicode_decimal": 61219
|
||||
},
|
||||
{
|
||||
"icon_id": "5633958",
|
||||
"name": "comment-dots",
|
||||
"font_class": "comment-dots",
|
||||
"unicode": "ef7e",
|
||||
"unicode_decimal": 61310
|
||||
},
|
||||
{
|
||||
"icon_id": "5634073",
|
||||
"name": "folder-open",
|
||||
"font_class": "folder-open",
|
||||
"unicode": "efdc",
|
||||
"unicode_decimal": 61404
|
||||
},
|
||||
{
|
||||
"icon_id": "5634038",
|
||||
"name": "file-alt",
|
||||
"font_class": "file-alt",
|
||||
"unicode": "efc1",
|
||||
"unicode_decimal": 61377
|
||||
},
|
||||
{
|
||||
"icon_id": "5633876",
|
||||
"name": "bullseye",
|
||||
"font_class": "bullseye",
|
||||
"unicode": "ef56",
|
||||
"unicode_decimal": 61270
|
||||
},
|
||||
{
|
||||
"icon_id": "5634373",
|
||||
"name": "sliders-h",
|
||||
"font_class": "sliders",
|
||||
"unicode": "f0bf",
|
||||
"unicode_decimal": 61631
|
||||
},
|
||||
{
|
||||
"icon_id": "5634433",
|
||||
"name": "tags",
|
||||
"font_class": "tags",
|
||||
"unicode": "f0f3",
|
||||
"unicode_decimal": 61683
|
||||
},
|
||||
{
|
||||
"icon_id": "5634959",
|
||||
"name": "comment-alt",
|
||||
"font_class": "comment-alt",
|
||||
"unicode": "f287",
|
||||
"unicode_decimal": 62087
|
||||
},
|
||||
{
|
||||
"icon_id": "5634971",
|
||||
"name": "eye",
|
||||
"font_class": "eye",
|
||||
"unicode": "f28f",
|
||||
"unicode_decimal": 62095
|
||||
},
|
||||
{
|
||||
"icon_id": "5633815",
|
||||
"name": "arrow-left",
|
||||
"font_class": "arrow-left",
|
||||
"unicode": "ef26",
|
||||
"unicode_decimal": 61222
|
||||
},
|
||||
{
|
||||
"icon_id": "5633816",
|
||||
"name": "arrow-right",
|
||||
"font_class": "arrow-right",
|
||||
"unicode": "ef27",
|
||||
"unicode_decimal": 61223
|
||||
},
|
||||
{
|
||||
"icon_id": "5633820",
|
||||
"name": "arrow-up",
|
||||
"font_class": "arrow-up",
|
||||
"unicode": "ef2a",
|
||||
"unicode_decimal": 61226
|
||||
},
|
||||
{
|
||||
"icon_id": "5633932",
|
||||
"name": "chevron-left",
|
||||
"font_class": "chevron-left",
|
||||
"unicode": "ef6e",
|
||||
"unicode_decimal": 61294
|
||||
},
|
||||
{
|
||||
"icon_id": "5633933",
|
||||
"name": "chevron-right",
|
||||
"font_class": "chevron-right",
|
||||
"unicode": "ef6f",
|
||||
"unicode_decimal": 61295
|
||||
},
|
||||
{
|
||||
"icon_id": "5634323",
|
||||
"name": "redo-alt",
|
||||
"font_class": "redo-alt",
|
||||
"unicode": "f094",
|
||||
"unicode_decimal": 61588
|
||||
},
|
||||
{
|
||||
"icon_id": "836718",
|
||||
"name": "list-ol",
|
||||
"font_class": "listol",
|
||||
"unicode": "e767",
|
||||
"unicode_decimal": 59239
|
||||
},
|
||||
{
|
||||
"icon_id": "433860",
|
||||
"name": "arrow-up",
|
||||
"font_class": "arrowup",
|
||||
"unicode": "e64c",
|
||||
"unicode_decimal": 58956
|
||||
},
|
||||
{
|
||||
"icon_id": "5652805",
|
||||
"name": "icon-side bar-scxmtj",
|
||||
"font_class": "icon-sidebar-scxmtj",
|
||||
"unicode": "e643",
|
||||
"unicode_decimal": 58947
|
||||
},
|
||||
{
|
||||
"icon_id": "21169476",
|
||||
"name": "train-public-transport",
|
||||
"font_class": "train-public-transport",
|
||||
"unicode": "e600",
|
||||
"unicode_decimal": 58880
|
||||
},
|
||||
{
|
||||
"icon_id": "24342573",
|
||||
"name": "the console-fill",
|
||||
"font_class": "a-theconsole-fill",
|
||||
"unicode": "ea32",
|
||||
"unicode_decimal": 59954
|
||||
},
|
||||
{
|
||||
"icon_id": "1251292",
|
||||
"name": "shuffle",
|
||||
"font_class": "shuffle",
|
||||
"unicode": "e67e",
|
||||
"unicode_decimal": 59006
|
||||
},
|
||||
{
|
||||
"icon_id": "11102802",
|
||||
"name": "md-train",
|
||||
"font_class": "md-train",
|
||||
"unicode": "e77d",
|
||||
"unicode_decimal": 59261
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,2 @@
|
|||
/*! instant.page v5.1.1 - (C) 2019-2020 Alexandre Dieulot - https://instant.page/license */
|
||||
let t,e;const n=new Set,o=document.createElement("link"),i=o.relList&&o.relList.supports&&o.relList.supports("prefetch")&&window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype,s="instantAllowQueryString"in document.body.dataset,a="instantAllowExternalLinks"in document.body.dataset,r="instantWhitelist"in document.body.dataset,c="instantMousedownShortcut"in document.body.dataset,d=1111;let l=65,u=!1,f=!1,m=!1;if("instantIntensity"in document.body.dataset){const t=document.body.dataset.instantIntensity;if("mousedown"==t.substr(0,"mousedown".length))u=!0,"mousedown-only"==t&&(f=!0);else if("viewport"==t.substr(0,"viewport".length))navigator.connection&&(navigator.connection.saveData||navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g"))||("viewport"==t?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(m=!0):"viewport-all"==t&&(m=!0));else{const e=parseInt(t);isNaN(e)||(l=e)}}if(i){const n={capture:!0,passive:!0};if(f||document.addEventListener("touchstart",function(t){e=performance.now();const n=t.target.closest("a");if(!h(n))return;v(n.href)},n),u?c||document.addEventListener("mousedown",function(t){const e=t.target.closest("a");if(!h(e))return;v(e.href)},n):document.addEventListener("mouseover",function(n){if(performance.now()-e<d)return;if(!("closest"in n.target))return;const o=n.target.closest("a");if(!h(o))return;o.addEventListener("mouseout",p,{passive:!0}),t=setTimeout(()=>{v(o.href),t=void 0},l)},n),c&&document.addEventListener("mousedown",function(t){if(performance.now()-e<d)return;const n=t.target.closest("a");if(t.which>1||t.metaKey||t.ctrlKey)return;if(!n)return;n.addEventListener("click",function(t){1337!=t.detail&&t.preventDefault()},{capture:!0,passive:!1,once:!0});const o=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1,detail:1337});n.dispatchEvent(o)},n),m){let t;(t=window.requestIdleCallback?t=>{requestIdleCallback(t,{timeout:1500})}:t=>{t()})(()=>{const t=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const n=e.target;t.unobserve(n),v(n.href)}})});document.querySelectorAll("a").forEach(e=>{h(e)&&t.observe(e)})})}}function p(e){e.relatedTarget&&e.target.closest("a")==e.relatedTarget.closest("a")||t&&(clearTimeout(t),t=void 0)}function h(t){if(t&&t.href&&(!r||"instant"in t.dataset)&&(a||t.origin==location.origin||"instant"in t.dataset)&&["http:","https:"].includes(t.protocol)&&("http:"!=t.protocol||"https:"!=location.protocol)&&(s||!t.search||"instant"in t.dataset)&&!(t.hash&&t.pathname+t.search==location.pathname+location.search||"noInstant"in t.dataset))return!0}function v(t){if(n.has(t))return;const e=document.createElement("link");e.rel="prefetch",e.href=t,document.head.appendChild(e),n.add(t)}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -24,39 +24,62 @@
|
|||
--heo-shadow-green: 0 8px 12px -3px #87ee7936;
|
||||
--heo-logo-color: linear-gradient(215deg, #4584ff 0%, #cf0db9 100%);
|
||||
--heo-snackbar-time: 5s;
|
||||
--hl-color: #eff;
|
||||
--hl-bg: #212121;
|
||||
--hltools-bg: #1c1c1c;
|
||||
--hltools-color: rgba(238, 255, 255, 0.8);
|
||||
--hlnumber-bg: #212121;
|
||||
--hlnumber-color: rgba(238, 255, 255, 0.5);
|
||||
--hlscrollbar-bg: #121212;
|
||||
--hlexpand-bg: linear-gradient(180deg, rgba(33, 33, 33, 0.6), rgba(33, 33, 33, 0.9));
|
||||
/* 相册变量定义 */
|
||||
--album-background-dark: #2d3548;
|
||||
--album-text-light: rgba(255, 255, 255, 0.6);
|
||||
--album-text-lighter: rgba(255, 255, 255, 0.9);
|
||||
--album-spacing-s: 8px;
|
||||
--album-spacing-m: 16px;
|
||||
--album-spacing-l: 24px;
|
||||
--album-spacing-xl: 32px;
|
||||
--album-spacing-xxl: 64px;
|
||||
}
|
||||
--style-border: 1px solid var(--heo-card-border);
|
||||
--style-border-always: 1px solid var(--heo-card-border);
|
||||
--style-border-hover: 1px solid var(--heo-main);
|
||||
--style-border-hover-always: 1px solid var(--heo-main);
|
||||
--style-border-dashed: 1px dashed var(--heo-theme-op);
|
||||
|
||||
::selection {
|
||||
background: var(--heo-fontcolor);
|
||||
color: var(--heo-background);
|
||||
}
|
||||
|
||||
[data-theme=light] {
|
||||
--heo-theme: #425AEF;
|
||||
--heo-theme-op: #4259ef23;
|
||||
--heo-theme-op-deep: #4259efdd;
|
||||
--heo-theme-none: #4259ef01;
|
||||
--heo-blue: #425AEF;
|
||||
--heo-red: #f04a63;
|
||||
--heo-red: #D8213C;
|
||||
--heo-pink: #FF7C7C;
|
||||
--heo-green: #57bd6a;
|
||||
--heo-green: #28a63f;
|
||||
--heo-yellow: #c28b00;
|
||||
--heo-yellow-op: #d99c001a;
|
||||
--heo-orange: #e38100;
|
||||
--heo-fontcolor: #363636;
|
||||
--heo-background: #f7f9fe;
|
||||
--heo-reverse: #000;
|
||||
--heo-maskbg: rgba(255, 255, 255, 0.6);
|
||||
--heo-maskbgdeep: rgba(255, 255, 255, 0.85);
|
||||
--heo-hovertext: var(--heo-main);
|
||||
--heo-ahoverbg: #F7F7FA;
|
||||
--heo-lighttext: var(--heo-main);
|
||||
--heo-secondtext: rgba(60, 60, 67, 0.6);
|
||||
--heo-scrollbar: rgba(60, 60, 67, 0.4);
|
||||
--heo-card-btn-bg: #edf0f7;
|
||||
--heo-post-blockquote-bg: #fafcff;
|
||||
--heo-post-tabs-bg: #f2f5f8;
|
||||
--heo-secondbg: #f1f3f8;
|
||||
--heo-shadow-nav: 0 5px 12px -5px rgba(102, 68, 68, 0.05);
|
||||
--heo-card-bg: #fff;
|
||||
--heo-card-bg-op: var(--heo-black-op);
|
||||
--heo-card-bg-none: rgba(255, 255, 255, 0);
|
||||
--heo-shadow-lightblack: 0 5px 12px -5px rgba(102, 68, 68, 0.00);
|
||||
--heo-shadow-light2black: 0 5px 12px -5px rgba(102, 68, 68, 0.00);
|
||||
--heo-card-border: #e3e8f7;
|
||||
--heo-shadow-border: 0 8px 16px -4px #2c2d300c;
|
||||
--style-border-forever: 2px solid var(--heo-main);
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: var(--heo-fontcolor);
|
||||
color: var(--heo-background);
|
||||
}
|
||||
|
||||
[data-theme=light] {
|
||||
--heo-theme: #425AEF;
|
||||
--heo-theme-op: #4259ef23;
|
||||
--heo-theme-op-deep: #4259efdd;
|
||||
--heo-theme-none: #4259ef01;
|
||||
--heo-blue: #425AEF;
|
||||
--heo-red: #D8213C;
|
||||
--heo-pink: #FF7C7C;
|
||||
--heo-green: #28a63f;
|
||||
--heo-yellow: #c28b00;
|
||||
--heo-yellow-op: #d99c001a;
|
||||
--heo-orange: #e38100;
|
||||
|
@ -82,23 +105,18 @@
|
|||
--heo-shadow-light2black: 0 5px 12px -5px rgba(102, 68, 68, 0.00);
|
||||
--heo-card-border: #e3e8f7;
|
||||
--heo-shadow-border: 0 8px 16px -4px #2c2d300c;
|
||||
--style-border: 1px solid var(--heo-card-border);
|
||||
--style-border-always: 1px solid var(--heo-card-border);
|
||||
--style-border-hover: 1px solid var(--heo-main);
|
||||
--style-border-hover-always: 1px solid var(--heo-main);
|
||||
--style-border-dashed: 1px dashed var(--heo-theme-op);
|
||||
--style-border-forever: 2px solid var(--heo-main);
|
||||
}
|
||||
|
||||
[data-theme=dark] {
|
||||
--heo-theme: #f2b94b;
|
||||
--heo-theme-op: #f2b94b23;
|
||||
--heo-theme-op-deep: #f2b94bdd;
|
||||
--heo-theme-none: #f2b94b00;
|
||||
--heo-theme: #0084FF;
|
||||
--heo-theme-op: #0084FF23;
|
||||
--heo-theme-op-deep: #0084ffdd;
|
||||
--heo-theme-none: #0084FF00;
|
||||
--heo-blue: #0084FF;
|
||||
--heo-red: #FF3842;
|
||||
--heo-pink: #d44040;
|
||||
--heo-green: #3e9f50;
|
||||
--heo-pink: #FF7C7C;
|
||||
--heo-green: #57bd6a;
|
||||
--heo-yellow: #ffc93e;
|
||||
--heo-yellow-op: #ffc93e30;
|
||||
--heo-orange: #ff953e;
|
||||
|
@ -109,7 +127,7 @@
|
|||
--heo-maskbgdeep: rgba(0, 0, 0, 0.85);
|
||||
--heo-hovertext: #0A84FF;
|
||||
--heo-ahoverbg: #fff;
|
||||
--heo-lighttext: var(--heo-theme);
|
||||
--heo-lighttext: #f2b94b;
|
||||
--heo-secondtext: #a1a2b8;
|
||||
--heo-scrollbar: rgba(200, 200, 223, 0.4);
|
||||
--heo-card-btn-bg: #30343f;
|
||||
|
@ -122,58 +140,11 @@
|
|||
--heo-card-bg-none: #1d1b2600;
|
||||
--heo-shadow-lightblack: 0 5px 12px -5px rgba(102, 68, 68, 0.0);
|
||||
--heo-shadow-light2black: 0 5px 12px -5px rgba(102, 68, 68, 0.0);
|
||||
--heo-card-border: #3d3d3f;
|
||||
--heo-card-border: #282829;
|
||||
--heo-shadow-border: 0 8px 16px -4px #00000050;
|
||||
--style-border: 1px solid var(--heo-card-border);
|
||||
--style-border-always: 1px solid var(--heo-card-border);
|
||||
--style-border-hover: 1px solid var(--heo-theme);
|
||||
--style-border-hover-always: 1px solid var(--heo-theme);
|
||||
--style-border-dashed: 1px dashed var(--heo-theme-op);
|
||||
--style-border-forever: 2px solid var(--heo-lighttext);
|
||||
}
|
||||
|
||||
[data-theme="dark"] #footer::before, [data-theme="dark"] #page-header::before, [data-theme="dark"] #web_bg::before {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
content: "";
|
||||
}
|
||||
|
||||
[data-theme="dark"] #article-container pre > code {
|
||||
background: rgb(23, 23, 23);
|
||||
}
|
||||
|
||||
[data-theme="dark"] #article-container figure.highlight {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
[data-theme="dark"] #article-container .note code {
|
||||
background: rgba(27, 31, 35, 0.05);
|
||||
}
|
||||
|
||||
[data-theme="dark"] #article-container .aplayer {
|
||||
filter: brightness(0.8);
|
||||
}
|
||||
|
||||
[data-theme="dark"] #article-container kbd {
|
||||
border-color: rgb(105, 105, 105);
|
||||
background-color: rgb(82, 82, 82);
|
||||
color: rgb(226, 241, 255);
|
||||
}
|
||||
|
||||
[data-theme="dark"] .note {
|
||||
filter: brightness(0.9);
|
||||
}
|
||||
|
||||
[data-theme="dark"] img {
|
||||
filter: brightness(0.8);
|
||||
}
|
||||
|
||||
[data-theme="dark"] #aside-content .aside-list > .aside-list-item:not(:last-child) {
|
||||
border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
:root {
|
||||
--style-border: 0px solid var(--heo-card-border);
|
|
@ -0,0 +1,82 @@
|
|||
var fdata = {
|
||||
apiurl: "https://moments.yzczi.com/",
|
||||
defaultFish: 500,
|
||||
hungryFish: 500,
|
||||
}
|
||||
//可通过 var fdataUser 替换默认值
|
||||
if (typeof (fdataUser) !== "undefined") {
|
||||
for (var key in fdataUser) {
|
||||
if (fdataUser[key]) {
|
||||
fdata[key] = fdataUser[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
var randomPostTimes = 0;
|
||||
var randomPostWorking = false;
|
||||
var randomPostTips = ["钓到了绝世好文!", "在河边打了个喷嚏,吓跑了", "你和小伙伴抢夺着", "你击败了巨龙,在巢穴中发现了", "挖掘秦始皇坟时找到了", "在路边闲逛的时候随手买了一个", "从学校班主任那拿来了孩子上课偷偷看的", "你的同桌无情的从你的语文书中撕下了那篇你最喜欢的", "考古学家近日发现了", "外星人降临地球学习地球文化,落地时被你塞了", "从图书馆顶层的隐秘角落里发现了闪着金光的", "徒弟修炼走火入魔,为师立刻掏出了", "在大山中唱山歌,隔壁的阿妹跑来了,带着", "隔壁家的孩子数学考了满分,都是因为看了", "隔壁家的孩子英语考了满分,都是因为看了", "小米研发了全新一代MIX手机,据说灵感", "修炼渡劫成功,还好提前看了", "库克坐上了苹果CEO的宝座,因为他面试的时候看了", "阿里巴巴大喊芝麻开门,映入眼帘的就是", "师傅说练武要先炼心,然后让我好生研读", "科考队在南极大陆发现了被冰封的", "飞机窗户似乎被一张纸糊上了,仔细一看是", "历史上满写的仁义道德四个字,透过字缝里却全是", "十几年前的录音机似乎还能够使用,插上电发现正在播的是", "新版语文书拟增加一篇熟读并背诵的", "经调查,99%的受访者都没有背诵过", "今年的高考满分作文是", "唐僧揭开了佛祖压在五指山上的", "科学家发现能够解决衰老的秘密,就是每日研读", "英特尔发布了全新的至强处理器,其芯片的制造原理都是", "新的iPhone产能很足,新的进货渠道是", "今年亩产突破了八千万斤,多亏了", "陆隐一统天上宗,在无数祖境高手的目光下宣读了", "黑钻风跟白钻风说道,吃了唐僧肉能长生不老,他知道是因为看了", "上卫生间没带纸,直接提裤跑路也不愿意玷污手中", "种下一篇文章就会产生很多很多文章,我种下了", "三十年河东,三十年河西,莫欺我没有看过", "踏破铁血无觅处,得来全靠", "今日双色球中了两千万,预测全靠", "因为卷子上没写名字,老师罚抄", "为了抗议世间的不公,割破手指写下了", "在艺术大街上被贴满了相同的纸,走近一看是", "这区区迷阵岂能难得住我?其实能走出来多亏了", "今日被一篇文章顶上了微博热搜,它是", "你送给乞丐一个暴富秘籍,它是", "UZI一个走A拿下五杀,在事后采访时说他当时回想起了", "科学家解刨了第一个感染丧尸病毒的人,发现丧尸抗体存在于"];
|
||||
var randomPostClick = 0;
|
||||
|
||||
function fetchRandomPost() {
|
||||
console.log(fdata.apiurl)
|
||||
if (randomPostWorking == false) {
|
||||
randomPostWorking = true;
|
||||
//获取旋转角度
|
||||
let randomRotate = randomPostTimes * 360;
|
||||
let randomPostTipsItem = randomPostTips[Math.floor(Math.random() * randomPostTips.length)];
|
||||
let randomPostLevel = "";
|
||||
if (randomPostTimes > 10000) {
|
||||
randomPostLevel = "愿者上钩";
|
||||
} else if (randomPostTimes > 1000) {
|
||||
randomPostLevel = "俯览天下";
|
||||
} else if (randomPostTimes > 1000) {
|
||||
randomPostLevel = "超越神了";
|
||||
} else if (randomPostTimes > 100) {
|
||||
randomPostLevel = "绝世渔夫";
|
||||
} else if (randomPostTimes > 75) {
|
||||
randomPostLevel = "钓鱼王者";
|
||||
} else if (randomPostTimes > 50) {
|
||||
randomPostLevel = "钓鱼宗师";
|
||||
} else if (randomPostTimes > 20) {
|
||||
randomPostLevel = "钓鱼专家";
|
||||
} else if (randomPostTimes > 5) {
|
||||
randomPostLevel = "钓鱼高手";
|
||||
} else {
|
||||
randomPostLevel = "钓鱼新手";
|
||||
}
|
||||
if (randomPostTimes >= 5) {
|
||||
document.getElementById("random-post").innerHTML = `钓鱼中... (Lv.` + randomPostTimes + ` 当前称号:` + randomPostLevel + `)`;
|
||||
} else {
|
||||
document.getElementById("random-post").innerHTML = `钓鱼中...`;
|
||||
}
|
||||
|
||||
$(".random-post-start").css("transform", "rotate(" + randomRotate + "deg)")
|
||||
window.setTimeout(function () {
|
||||
//判断是否饥饿
|
||||
if (((randomPostClick * fdata.hungryFish + fdata.defaultFish) < randomPostTimes) && (Math.round(Math.random()) == 0)) {
|
||||
document.getElementById("random-post").innerHTML = "因为只钓鱼不吃鱼,过分饥饿导致本次钓鱼失败..."
|
||||
randomPostWorking = false;
|
||||
} else {
|
||||
var fetchUrl = fdata.apiurl + 'randompost';
|
||||
fetch(fetchUrl)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
var title = json.title;
|
||||
var link = json.link;
|
||||
var author = json.author;
|
||||
if (document.querySelector('#random-post')) {
|
||||
document.getElementById("random-post").innerHTML = randomPostTipsItem + `来自友链 <b>` + author + `</b> 的文章:<a class="random-friends-post" onclick="randomClickLink()" target="_blank" href="` + link + `" rel="external nofollow">` + title + `</a>`;
|
||||
}
|
||||
})
|
||||
randomPostWorking = false;
|
||||
}
|
||||
randomPostTimes += 1;
|
||||
}, 2000)
|
||||
}
|
||||
}
|
||||
|
||||
fetchRandomPost();
|
||||
|
||||
//添加点击统计
|
||||
function randomClickLink() {
|
||||
randomPostClick += 1;
|
||||
}
|
|
@ -0,0 +1,650 @@
|
|||
/**
|
||||
* Swiper 8.0.6
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
* https://swiperjs.com
|
||||
*
|
||||
* Copyright 2014-2022 Vladimir Kharlampidi
|
||||
*
|
||||
* Released under the MIT License
|
||||
*
|
||||
* Released on: February 14, 2022
|
||||
*/
|
||||
@font-face {
|
||||
font-family: swiper-icons;
|
||||
src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA');
|
||||
font-weight: 400;
|
||||
font-style: normal
|
||||
}
|
||||
|
||||
:root {
|
||||
--swiper-theme-color: #007aff
|
||||
}
|
||||
|
||||
.swiper {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
z-index: 1
|
||||
}
|
||||
|
||||
.swiper-vertical>.swiper-wrapper {
|
||||
flex-direction: column
|
||||
}
|
||||
|
||||
.swiper-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
transition-property: transform;
|
||||
box-sizing: content-box
|
||||
}
|
||||
|
||||
.swiper-android .swiper-slide,.swiper-wrapper {
|
||||
transform: translate3d(0px,0,0)
|
||||
}
|
||||
|
||||
.swiper-pointer-events {
|
||||
touch-action: pan-y
|
||||
}
|
||||
|
||||
.swiper-pointer-events.swiper-vertical {
|
||||
touch-action: pan-x
|
||||
}
|
||||
|
||||
.swiper-slide {
|
||||
flex-shrink: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
transition-property: transform
|
||||
}
|
||||
|
||||
.swiper-slide-invisible-blank {
|
||||
visibility: hidden
|
||||
}
|
||||
|
||||
.swiper-autoheight,.swiper-autoheight .swiper-slide {
|
||||
height: auto
|
||||
}
|
||||
|
||||
.swiper-autoheight .swiper-wrapper {
|
||||
align-items: flex-start;
|
||||
transition-property: transform,height
|
||||
}
|
||||
|
||||
.swiper-backface-hidden .swiper-slide {
|
||||
transform: translateZ(0);
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden
|
||||
}
|
||||
|
||||
.swiper-3d,.swiper-3d.swiper-css-mode .swiper-wrapper {
|
||||
perspective: 1200px
|
||||
}
|
||||
|
||||
.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-wrapper {
|
||||
transform-style: preserve-3d
|
||||
}
|
||||
|
||||
.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
z-index: 10
|
||||
}
|
||||
|
||||
.swiper-3d .swiper-slide-shadow {
|
||||
background: rgba(0,0,0,.15)
|
||||
}
|
||||
|
||||
.swiper-3d .swiper-slide-shadow-left {
|
||||
background-image: linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))
|
||||
}
|
||||
|
||||
.swiper-3d .swiper-slide-shadow-right {
|
||||
background-image: linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))
|
||||
}
|
||||
|
||||
.swiper-3d .swiper-slide-shadow-top {
|
||||
background-image: linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))
|
||||
}
|
||||
|
||||
.swiper-3d .swiper-slide-shadow-bottom {
|
||||
background-image: linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))
|
||||
}
|
||||
|
||||
.swiper-css-mode>.swiper-wrapper {
|
||||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none
|
||||
}
|
||||
|
||||
.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar {
|
||||
display: none
|
||||
}
|
||||
|
||||
.swiper-css-mode>.swiper-wrapper>.swiper-slide {
|
||||
scroll-snap-align: start start
|
||||
}
|
||||
|
||||
.swiper-horizontal.swiper-css-mode>.swiper-wrapper {
|
||||
scroll-snap-type: x mandatory
|
||||
}
|
||||
|
||||
.swiper-vertical.swiper-css-mode>.swiper-wrapper {
|
||||
scroll-snap-type: y mandatory
|
||||
}
|
||||
|
||||
.swiper-centered>.swiper-wrapper::before {
|
||||
content: '';
|
||||
flex-shrink: 0;
|
||||
order: 9999
|
||||
}
|
||||
|
||||
.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child {
|
||||
margin-inline-start:var(--swiper-centered-offset-before)}
|
||||
|
||||
.swiper-centered.swiper-horizontal>.swiper-wrapper: :before {
|
||||
height:100%;
|
||||
min-height: 1px;
|
||||
width: var(--swiper-centered-offset-after)
|
||||
}
|
||||
|
||||
.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child {
|
||||
margin-block-start:var(--swiper-centered-offset-before)}
|
||||
|
||||
.swiper-centered.swiper-vertical>.swiper-wrapper: :before {
|
||||
width:100%;
|
||||
min-width: 1px;
|
||||
height: var(--swiper-centered-offset-after)
|
||||
}
|
||||
|
||||
.swiper-centered>.swiper-wrapper>.swiper-slide {
|
||||
scroll-snap-align: center center
|
||||
}
|
||||
|
||||
.swiper-virtual .swiper-slide {
|
||||
-webkit-backface-visibility: hidden;
|
||||
transform: translateZ(0)
|
||||
}
|
||||
|
||||
.swiper-virtual.swiper-css-mode .swiper-wrapper::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after {
|
||||
height: 1px;
|
||||
width: var(--swiper-virtual-size)
|
||||
}
|
||||
|
||||
.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after {
|
||||
width: 1px;
|
||||
height: var(--swiper-virtual-size)
|
||||
}
|
||||
|
||||
:root {
|
||||
--swiper-navigation-size: 44px
|
||||
}
|
||||
|
||||
.swiper-button-next,.swiper-button-prev {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: calc(var(--swiper-navigation-size)/ 44 * 27);
|
||||
height: var(--swiper-navigation-size);
|
||||
margin-top: calc(0px - (var(--swiper-navigation-size)/ 2));
|
||||
z-index: 10;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--swiper-navigation-color,var(--swiper-theme-color))
|
||||
}
|
||||
|
||||
.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled {
|
||||
opacity: .35;
|
||||
cursor: auto;
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.swiper-button-next:after,.swiper-button-prev:after {
|
||||
font-family: swiper-icons;
|
||||
font-size: var(--swiper-navigation-size);
|
||||
text-transform: none!important;
|
||||
letter-spacing: 0;
|
||||
text-transform: none;
|
||||
font-variant: initial;
|
||||
line-height: 1
|
||||
}
|
||||
|
||||
.swiper-button-prev,.swiper-rtl .swiper-button-next {
|
||||
left: 10px;
|
||||
right: auto
|
||||
}
|
||||
|
||||
.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after {
|
||||
content: 'prev'
|
||||
}
|
||||
|
||||
.swiper-button-next,.swiper-rtl .swiper-button-prev {
|
||||
right: 10px;
|
||||
left: auto
|
||||
}
|
||||
|
||||
.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after {
|
||||
content: 'next'
|
||||
}
|
||||
|
||||
.swiper-button-lock {
|
||||
display: none
|
||||
}
|
||||
|
||||
.swiper-pagination {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
transition: .3s opacity;
|
||||
transform: translate3d(0,0,0);
|
||||
z-index: 10
|
||||
}
|
||||
|
||||
.swiper-pagination.swiper-pagination-hidden {
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction {
|
||||
bottom: 10px;
|
||||
left: 0;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.swiper-pagination-bullets-dynamic {
|
||||
overflow: hidden;
|
||||
font-size: 0
|
||||
}
|
||||
|
||||
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
||||
transform: scale(.33);
|
||||
position: relative
|
||||
}
|
||||
|
||||
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {
|
||||
transform: scale(1)
|
||||
}
|
||||
|
||||
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {
|
||||
transform: scale(1)
|
||||
}
|
||||
|
||||
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {
|
||||
transform: scale(.66)
|
||||
}
|
||||
|
||||
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {
|
||||
transform: scale(.33)
|
||||
}
|
||||
|
||||
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {
|
||||
transform: scale(.66)
|
||||
}
|
||||
|
||||
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
|
||||
transform: scale(.33)
|
||||
}
|
||||
|
||||
.swiper-pagination-bullet {
|
||||
width: var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));
|
||||
height: var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
background: var(--swiper-pagination-bullet-inactive-color,#000);
|
||||
opacity: var(--swiper-pagination-bullet-inactive-opacity, .2)
|
||||
}
|
||||
|
||||
button.swiper-pagination-bullet {
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none
|
||||
}
|
||||
|
||||
.swiper-pagination-clickable .swiper-pagination-bullet {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.swiper-pagination-bullet:only-child {
|
||||
display: none!important
|
||||
}
|
||||
|
||||
.swiper-pagination-bullet-active {
|
||||
opacity: var(--swiper-pagination-bullet-opacity, 1);
|
||||
background: var(--swiper-pagination-color,var(--swiper-theme-color))
|
||||
}
|
||||
|
||||
.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets {
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
transform: translate3d(0px,-50%,0)
|
||||
}
|
||||
|
||||
.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet {
|
||||
margin: var(--swiper-pagination-bullet-vertical-gap,6px) 0;
|
||||
display: block
|
||||
}
|
||||
|
||||
.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 8px
|
||||
}
|
||||
|
||||
.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
||||
display: inline-block;
|
||||
transition: .2s transform,.2s top
|
||||
}
|
||||
|
||||
.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
|
||||
margin: 0 var(--swiper-pagination-bullet-horizontal-gap,4px)
|
||||
}
|
||||
|
||||
.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
||||
transition: .2s transform,.2s left
|
||||
}
|
||||
|
||||
.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
||||
transition: .2s transform,.2s right
|
||||
}
|
||||
|
||||
.swiper-pagination-progressbar {
|
||||
background: rgba(0,0,0,.25);
|
||||
position: absolute
|
||||
}
|
||||
|
||||
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
||||
background: var(--swiper-pagination-color,var(--swiper-theme-color));
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform: scale(0);
|
||||
transform-origin: left top
|
||||
}
|
||||
|
||||
.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
||||
transform-origin: right top
|
||||
}
|
||||
|
||||
.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
left: 0;
|
||||
top: 0
|
||||
}
|
||||
|
||||
.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar {
|
||||
width: 4px;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0
|
||||
}
|
||||
|
||||
.swiper-pagination-lock {
|
||||
display: none
|
||||
}
|
||||
|
||||
.swiper-scrollbar {
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
-ms-touch-action: none;
|
||||
background: rgba(0,0,0,.1)
|
||||
}
|
||||
|
||||
.swiper-horizontal>.swiper-scrollbar {
|
||||
position: absolute;
|
||||
left: 1%;
|
||||
bottom: 3px;
|
||||
z-index: 50;
|
||||
height: 5px;
|
||||
width: 98%
|
||||
}
|
||||
|
||||
.swiper-vertical>.swiper-scrollbar {
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: 1%;
|
||||
z-index: 50;
|
||||
width: 5px;
|
||||
height: 98%
|
||||
}
|
||||
|
||||
.swiper-scrollbar-drag {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
background: rgba(0,0,0,.5);
|
||||
border-radius: 10px;
|
||||
left: 0;
|
||||
top: 0
|
||||
}
|
||||
|
||||
.swiper-scrollbar-cursor-drag {
|
||||
cursor: move
|
||||
}
|
||||
|
||||
.swiper-scrollbar-lock {
|
||||
display: none
|
||||
}
|
||||
|
||||
.swiper-zoom-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain
|
||||
}
|
||||
|
||||
.swiper-slide-zoomed {
|
||||
cursor: move
|
||||
}
|
||||
|
||||
.swiper-lazy-preloader {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -21px;
|
||||
margin-top: -21px;
|
||||
z-index: 10;
|
||||
transform-origin: 50%;
|
||||
box-sizing: border-box;
|
||||
border: 4px solid var(--swiper-preloader-color,var(--swiper-theme-color));
|
||||
border-radius: 50%;
|
||||
border-top-color: transparent
|
||||
}
|
||||
|
||||
.swiper-slide-visible .swiper-lazy-preloader {
|
||||
animation: swiper-preloader-spin 1s infinite linear
|
||||
}
|
||||
|
||||
.swiper-lazy-preloader-white {
|
||||
--swiper-preloader-color: #fff
|
||||
}
|
||||
|
||||
.swiper-lazy-preloader-black {
|
||||
--swiper-preloader-color: #000
|
||||
}
|
||||
|
||||
@keyframes swiper-preloader-spin {
|
||||
100% {
|
||||
transform: rotate(360deg)
|
||||
}
|
||||
}
|
||||
|
||||
.swiper .swiper-notification {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
z-index: -1000
|
||||
}
|
||||
|
||||
.swiper-free-mode>.swiper-wrapper {
|
||||
transition-timing-function: ease-out;
|
||||
margin: 0 auto
|
||||
}
|
||||
|
||||
.swiper-grid>.swiper-wrapper {
|
||||
flex-wrap: wrap
|
||||
}
|
||||
|
||||
.swiper-grid-column>.swiper-wrapper {
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column
|
||||
}
|
||||
|
||||
.swiper-fade.swiper-free-mode .swiper-slide {
|
||||
transition-timing-function: ease-out
|
||||
}
|
||||
|
||||
.swiper-fade .swiper-slide {
|
||||
pointer-events: none;
|
||||
transition-property: opacity
|
||||
}
|
||||
|
||||
.swiper-fade .swiper-slide .swiper-slide {
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.swiper-fade .swiper-slide-active,.swiper-fade .swiper-slide-active .swiper-slide-active {
|
||||
pointer-events: auto
|
||||
}
|
||||
|
||||
.swiper-cube {
|
||||
overflow: visible
|
||||
}
|
||||
|
||||
.swiper-cube .swiper-slide {
|
||||
pointer-events: none;
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
z-index: 1;
|
||||
visibility: hidden;
|
||||
transform-origin: 0 0;
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.swiper-cube .swiper-slide .swiper-slide {
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.swiper-cube.swiper-rtl .swiper-slide {
|
||||
transform-origin: 100% 0
|
||||
}
|
||||
|
||||
.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-active .swiper-slide-active {
|
||||
pointer-events: auto
|
||||
}
|
||||
|
||||
.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-next,.swiper-cube .swiper-slide-next+.swiper-slide,.swiper-cube .swiper-slide-prev {
|
||||
pointer-events: auto;
|
||||
visibility: visible
|
||||
}
|
||||
|
||||
.swiper-cube .swiper-slide-shadow-bottom,.swiper-cube .swiper-slide-shadow-left,.swiper-cube .swiper-slide-shadow-right,.swiper-cube .swiper-slide-shadow-top {
|
||||
z-index: 0;
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden
|
||||
}
|
||||
|
||||
.swiper-cube .swiper-cube-shadow {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: .6;
|
||||
z-index: 0
|
||||
}
|
||||
|
||||
.swiper-cube .swiper-cube-shadow:before {
|
||||
content: '';
|
||||
background: #000;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
filter: blur(50px)
|
||||
}
|
||||
|
||||
.swiper-flip {
|
||||
overflow: visible
|
||||
}
|
||||
|
||||
.swiper-flip .swiper-slide {
|
||||
pointer-events: none;
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
z-index: 1
|
||||
}
|
||||
|
||||
.swiper-flip .swiper-slide .swiper-slide {
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.swiper-flip .swiper-slide-active,.swiper-flip .swiper-slide-active .swiper-slide-active {
|
||||
pointer-events: auto
|
||||
}
|
||||
|
||||
.swiper-flip .swiper-slide-shadow-bottom,.swiper-flip .swiper-slide-shadow-left,.swiper-flip .swiper-slide-shadow-right,.swiper-flip .swiper-slide-shadow-top {
|
||||
z-index: 0;
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden
|
||||
}
|
||||
|
||||
.swiper-creative .swiper-slide {
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
overflow: hidden;
|
||||
transition-property: transform,opacity,height
|
||||
}
|
||||
|
||||
.swiper-cards {
|
||||
overflow: visible
|
||||
}
|
||||
|
||||
.swiper-cards .swiper-slide {
|
||||
transform-origin: center bottom;
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
overflow: hidden
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
.toc{overflow-y:auto}.toc>.toc-list{overflow:hidden;position:relative}.toc>.toc-list li{list-style:none}.js-toc{overflow-y:hidden}.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}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(a,b){"function"==typeof define&&define.amd?define("waterfall",function(){return b}):"object"==typeof module&&module.exports?module.exports=b:a.waterfall=b}(this,function(a){function b(a){return window.getComputedStyle(a)}function c(a,c){return parseFloat(b(c)["margin"+a])||0}function d(a){return parseFloat(a)+"px"}function e(a){return parseFloat(a.style.top)}function f(a){return parseFloat(a.style.left)}function g(a){return parseFloat(b(a).width)}function h(a){return parseFloat(b(a).height)}function i(a){return e(a)+h(a)+c("Bottom",a)}function j(a){return f(a)+g(a)+c("Right",a)}function k(a){a=a.sort(function(a,b){var c=i(b)-i(a);return c||f(b)-f(a)})}function l(a){var b=a;k(b),this.add=function(a){b.push(a),k(b),b.pop()},this.min=function(){return b[b.length-1]},this.max=function(){return b[0]}}function m(a,b,c){a.style.position="absolute",a.style.top=d(b),a.style.left=d(c)}function n(a){m(a,0,c("Left",a))}function o(a,b){m(b,a.style.top,j(a)+c("Left",b))}function p(a,b){m(b,i(a)+c("Top",b),f(a))}function q(a,b){a.style.position="relative",a.style.height=d(i(b)+c("Bottom",b))}function r(b,c){return j(b[c-1])+g(b[c])<=g(a)}"string"==typeof a&&(a=document.querySelector(a));var s=a.children;s.length&&n(s[0]);for(var t=1;t<s.length&&r(s,t);t++)o(s[t-1],s[t]);for(var u=[].slice.call(s,0,t),v=new l(u);t<s.length;t++)p(v.min(),s[t]),v.add(s[t]);q(a,v.max())});
|
|
@ -0,0 +1,797 @@
|
|||
// var full_page = document.getElementsByClassName("full_page");
|
||||
// if (full_page.length != 0) {
|
||||
// full_page[0].style.background = "transparent";
|
||||
// }
|
||||
|
||||
|
||||
function checkOpen() {
|
||||
}
|
||||
|
||||
checkOpen.toString = function () {
|
||||
this.opened = true;
|
||||
};
|
||||
|
||||
//封面纯色
|
||||
function coverColor() {
|
||||
var path = document.getElementById("post-cover")?.src;
|
||||
// console.log(path);
|
||||
if (path !== undefined) {
|
||||
|
||||
// 获取颜色 https://github.com/fast-average-color/fast-average-color
|
||||
const fac = new FastAverageColor();
|
||||
|
||||
fac.getColorAsync(path, {
|
||||
// 忽略白色
|
||||
ignoredColor: [255, 255, 255, 255]
|
||||
})
|
||||
.then(color => {
|
||||
/**
|
||||
* 获取数据后的处理程序
|
||||
*/
|
||||
var value = color.hex;
|
||||
// console.log(value);
|
||||
// document.getElementById('page-header').style.backgroundColor=value;
|
||||
// document.styleSheets[0].addRule('#page-header:before','background: '+ value +'!important');
|
||||
|
||||
if (getContrastYIQ(value) === "light") {
|
||||
value = LightenDarkenColor(colorHex(value), -40)
|
||||
}
|
||||
|
||||
document.styleSheets[0].addRule(':root', '--heo-main:' + value + '!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main-op:' + value + '23!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main-op-deep:' + value + 'dd!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main-none:' + value + '00!important');
|
||||
heo.initThemeColor()
|
||||
document.getElementById("coverdiv").classList.add("loaded");
|
||||
})
|
||||
.catch(e => {
|
||||
console.log(e);
|
||||
});
|
||||
|
||||
} else {
|
||||
// document.styleSheets[0].addRule('#page-header:before','background: none!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main: var(--heo-theme)!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main-op: var(--heo-theme-op)!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main-op-deep:var(--heo-theme-op-deep)!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main-none: var(--heo-theme-none)!important');
|
||||
heo.initThemeColor()
|
||||
}
|
||||
}
|
||||
|
||||
//RGB颜色转化为16进制颜色
|
||||
function colorHex(str) {
|
||||
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
||||
var that = str;
|
||||
if (/^(rgb|RGB)/.test(that)) {
|
||||
var aColor = that.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
|
||||
var strHex = "#";
|
||||
for (var i = 0; i < aColor.length; i++) {
|
||||
var hex = Number(aColor[i]).toString(16);
|
||||
if (hex === "0") {
|
||||
hex += hex;
|
||||
}
|
||||
strHex += hex;
|
||||
}
|
||||
if (strHex.length !== 7) {
|
||||
strHex = that;
|
||||
}
|
||||
return strHex;
|
||||
} else if (reg.test(that)) {
|
||||
var aNum = that.replace(/#/, "").split("");
|
||||
if (aNum.length === 6) {
|
||||
return that;
|
||||
} else if (aNum.length === 3) {
|
||||
var numHex = "#";
|
||||
for (var i = 0; i < aNum.length; i += 1) {
|
||||
numHex += (aNum[i] + aNum[i]);
|
||||
}
|
||||
return numHex;
|
||||
}
|
||||
} else {
|
||||
return that;
|
||||
}
|
||||
}
|
||||
|
||||
//16进制颜色转化为RGB颜色
|
||||
function colorRgb(str) {
|
||||
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
||||
var sColor = str.toLowerCase();
|
||||
if (sColor && reg.test(sColor)) {
|
||||
if (sColor.length === 4) {
|
||||
var sColorNew = "#";
|
||||
for (var i = 1; i < 4; i += 1) {
|
||||
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
|
||||
}
|
||||
sColor = sColorNew;
|
||||
}
|
||||
//处理六位的颜色值
|
||||
var sColorChange = [];
|
||||
for (var i = 1; i < 7; i += 2) {
|
||||
sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2)));
|
||||
}
|
||||
return "rgb(" + sColorChange.join(",") + ")";
|
||||
} else {
|
||||
return sColor;
|
||||
}
|
||||
}
|
||||
|
||||
//变暗变亮主方法
|
||||
function LightenDarkenColor(col, amt) {
|
||||
var usePound = false;
|
||||
|
||||
if (col[0] == "#") {
|
||||
col = col.slice(1);
|
||||
usePound = true;
|
||||
}
|
||||
|
||||
var num = parseInt(col, 16);
|
||||
|
||||
var r = (num >> 16) + amt;
|
||||
|
||||
if (r > 255) r = 255;
|
||||
else if (r < 0) r = 0;
|
||||
|
||||
var b = ((num >> 8) & 0x00FF) + amt;
|
||||
|
||||
if (b > 255) b = 255;
|
||||
else if (b < 0) b = 0;
|
||||
|
||||
var g = (num & 0x0000FF) + amt;
|
||||
|
||||
if (g > 255) g = 255;
|
||||
else if (g < 0) g = 0;
|
||||
|
||||
|
||||
return (usePound ? "#" : "") + String("000000" + (g | (b << 8) | (r << 16)).toString(16)).slice(-6);
|
||||
}
|
||||
|
||||
//判断是否为亮色
|
||||
function getContrastYIQ(hexcolor) {
|
||||
var colorrgb = colorRgb(hexcolor);
|
||||
var colors = colorrgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
||||
var red = colors[1];
|
||||
var green = colors[2];
|
||||
var blue = colors[3];
|
||||
var brightness;
|
||||
brightness = (red * 299) + (green * 587) + (blue * 114);
|
||||
brightness = brightness / 255000;
|
||||
if (brightness >= 0.5) {
|
||||
return "light";
|
||||
} else {
|
||||
return "dark";
|
||||
}
|
||||
}
|
||||
|
||||
//导航栏文章
|
||||
function navTitle() {
|
||||
var titlevalue = document.title;
|
||||
var postName = document.getElementsByClassName("post-title")[0];
|
||||
if (postName == null || postName == '') {
|
||||
document.getElementById("page-name-text").innerHTML = titlevalue;
|
||||
} else {
|
||||
document.getElementById("page-name-text").innerHTML = postName?.innerText;
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = function () {
|
||||
var copybtnlist = document.getElementsByClassName("copybtn")
|
||||
for (var i = 0; i < copybtnlist.length; i++) {
|
||||
document.getElementsByClassName("copybtn")[i].addEventListener("click", function () {
|
||||
showcopy();
|
||||
});
|
||||
}
|
||||
heo.initThemeColor();
|
||||
}
|
||||
|
||||
function showcopy() {
|
||||
if (GLOBAL_CONFIG.Snackbar !== undefined) {
|
||||
btf.snackbarShow(GLOBAL_CONFIG.copy.success)
|
||||
} else {
|
||||
const prevEle = ctx.previousElementSibling
|
||||
prevEle.innerText = GLOBAL_CONFIG.copy.success
|
||||
prevEle.style.opacity = 1
|
||||
setTimeout(() => {
|
||||
prevEle.style.opacity = 0
|
||||
}, 700)
|
||||
}
|
||||
}
|
||||
|
||||
//导航栏上显示标题
|
||||
// var OriginTitile = document.title;
|
||||
// var titleTime;
|
||||
// document.addEventListener('visibilitychange', function () {
|
||||
// if (document.hidden) {
|
||||
// // $('[rel="shortcut icon"]').attr('href', "https://cdn.jsdelivr.net/gh/Akilarlxh/Akilarlxh.github.io@v3.3.3_3/img/siteicon/favicon.png");
|
||||
// document.title = '张洪Heo';
|
||||
// clearTimeout(titleTime);
|
||||
// }
|
||||
// else {
|
||||
// // $('[rel="shortcut icon"]').attr('href', "https://cdn.jsdelivr.net/gh/Akilarlxh/Akilarlxh.github.io@v3.3.3_3/img/siteicon/favicon.png");
|
||||
// document.title = OriginTitile;
|
||||
// // titleTime = setTimeout(function () {
|
||||
// // document.title = OriginTitile;
|
||||
// // }, 2000);
|
||||
// }
|
||||
// });
|
||||
|
||||
// 早上好问好
|
||||
// 获取时间
|
||||
var getTimeState = () => {
|
||||
// 获取当前时间
|
||||
var timeNow = new Date();
|
||||
// 获取当前小时
|
||||
var hours = timeNow.getHours();
|
||||
// 设置默认文字
|
||||
var text = ``;
|
||||
// 判断当前时间段
|
||||
if (hours >= 0 && hours <= 5) {
|
||||
text = `晚安`;
|
||||
} else if (hours > 5 && hours <= 10) {
|
||||
text = `早上好`;
|
||||
} else if (hours > 10 && hours <= 14) {
|
||||
text = `中午好`;
|
||||
} else if (hours > 14 && hours <= 18) {
|
||||
text = `下午好`;
|
||||
} else if (hours > 18 && hours <= 24) {
|
||||
text = `晚上好`;
|
||||
}
|
||||
// console.log(`hours >>>>>`, hours);
|
||||
// console.log(`text >>>>`, text);
|
||||
// 返回当前时间段对应的状态
|
||||
return text;
|
||||
};
|
||||
|
||||
function fly_to_top() {
|
||||
document.getElementById("guli_top").classList.add("open_wing");
|
||||
setTimeout(function () {
|
||||
document.getElementById("guli_top").classList.add("flying");
|
||||
btf.scrollToDest(0, 300);
|
||||
}, 300);
|
||||
setTimeout(function () {
|
||||
// 这里就是处理的事件
|
||||
document.getElementById("guli_top").classList.remove("flying");
|
||||
document.getElementById("guli_top").classList.remove("open_wing");
|
||||
document.getElementById("guli_top").style.cssText = "opacity: ''; transform: ''";
|
||||
}, 600)
|
||||
}
|
||||
|
||||
//深色模式切换
|
||||
var navFn = {
|
||||
switchDarkMode: () => { // Switch Between Light And Dark Mode
|
||||
const nowMode = document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light'
|
||||
if (nowMode === 'light') {
|
||||
activateDarkMode()
|
||||
saveToLocal.set('theme', 'dark', 2)
|
||||
GLOBAL_CONFIG.Snackbar !== undefined && btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night, false, 2000)
|
||||
} else {
|
||||
activateLightMode()
|
||||
saveToLocal.set('theme', 'light', 2)
|
||||
GLOBAL_CONFIG.Snackbar !== undefined && btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day, false, 2000)
|
||||
}
|
||||
// handle some cases
|
||||
typeof utterancesTheme === 'function' && utterancesTheme();
|
||||
typeof FB === 'object' && window.loadFBComment();
|
||||
window.DISQUS && document.getElementById('disqus_thread').children.length && setTimeout(() => window.disqusReset(), 200)
|
||||
|
||||
//统计图
|
||||
let color = document.documentElement.getAttribute('data-theme') === 'light' ? '#363636' : '#F7F7FA'
|
||||
if (document.getElementById('posts-chart')) {
|
||||
let postsOptionNew = postsOption
|
||||
postsOptionNew.textStyle.color = color
|
||||
postsOptionNew.title.textStyle.color = color
|
||||
postsOptionNew.xAxis.axisLine.lineStyle.color = color
|
||||
postsOptionNew.yAxis.axisLine.lineStyle.color = color
|
||||
postsChart.setOption(postsOptionNew)
|
||||
}
|
||||
if (document.getElementById('tags-chart')) {
|
||||
let tagsOptionNew = tagsOption
|
||||
tagsOptionNew.textStyle.color = color
|
||||
tagsOptionNew.title.textStyle.color = color
|
||||
tagsOptionNew.xAxis.axisLine.lineStyle.color = color
|
||||
tagsOptionNew.yAxis.axisLine.lineStyle.color = color
|
||||
tagsChart.setOption(tagsOptionNew)
|
||||
}
|
||||
if (document.getElementById('categories-chart')) {
|
||||
let categoriesOptionNew = categoriesOption
|
||||
categoriesOptionNew.textStyle.color = color
|
||||
categoriesOptionNew.title.textStyle.color = color
|
||||
categoriesOptionNew.legend.textStyle.color = color
|
||||
categoriesChart.setOption(categoriesOptionNew)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 移除赞赏蒙版
|
||||
function RemoveRewardMask() {
|
||||
if (!document.querySelector(".reward-main")) return;
|
||||
document.querySelector(".reward-main").style.display = "none";
|
||||
document.getElementById("quit-box").style.display = "none";
|
||||
}
|
||||
|
||||
//添加赞赏蒙版
|
||||
function AddRewardMask() {
|
||||
if (!document.querySelector(".reward-main")) return;
|
||||
document.querySelector(".reward-main").style.display = "flex";
|
||||
document.getElementById("quit-box").style.display = "flex";
|
||||
}
|
||||
|
||||
|
||||
//监听蒙版关闭
|
||||
document.addEventListener('touchstart', e => {
|
||||
RemoveRewardMask()
|
||||
}, false)
|
||||
|
||||
//监听ctrl+C
|
||||
$(document).unbind('keydown').bind('keydown', function (e) {
|
||||
if ((e.ctrlKey || e.metaKey) && (e.keyCode == 67) && (selectTextNow != '')) {
|
||||
btf.snackbarShow('复制成功,复制和转载请标注本文地址');
|
||||
rm.rightmenuCopyText(selectTextNow);
|
||||
return false;
|
||||
}
|
||||
})
|
||||
|
||||
//判断国内国外
|
||||
// var foreignTips = (function () {
|
||||
// var fetchUrl = "https://api.ooomn.com/api/ip"
|
||||
// fetch(fetchUrl)
|
||||
// .then(res => res.json())
|
||||
// .then(json =>{
|
||||
// var country = json.country;
|
||||
// console.log(country);
|
||||
// if (country != '中国'){
|
||||
// btf.snackbarShow('使用国外网络访问可能无法访问文章图片,敬请谅解。Blog pictures only serve mainland China.')
|
||||
// }
|
||||
// })
|
||||
// });
|
||||
|
||||
//颜色
|
||||
document.addEventListener('scroll', btf.throttle(function () {
|
||||
heo.initThemeColor()
|
||||
}, 200))
|
||||
|
||||
//友链随机传送
|
||||
function travelling() {
|
||||
var fetchUrl = "https://moments.zhheo.com/randomfriend"
|
||||
fetch(fetchUrl)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
var name = json.name;
|
||||
var link = json.link;
|
||||
var msg = "点击前往按钮进入随机一个友链,不保证跳转网站的安全性和可用性。本次随机到的是本站友链:「" + name + "」";
|
||||
document.styleSheets[0].addRule(':root', '--heo-snackbar-time:' + 8000 + 'ms!important');
|
||||
Snackbar.show({
|
||||
text: msg,
|
||||
duration: 8000,
|
||||
pos: 'top-center',
|
||||
actionText: '前往',
|
||||
onActionClick: function (element) {
|
||||
//Set opacity of element to 0 to close Snackbar
|
||||
$(element).css('opacity', 0);
|
||||
window.open(link, '_blank');
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
//前往黑洞
|
||||
function toforeverblog() {
|
||||
var msg = "点击前往按钮进入「十年之约」项目中的成员博客,不保证跳转网站的安全性和可用性";
|
||||
Snackbar.show({
|
||||
text: msg,
|
||||
duration: 8000,
|
||||
pos: 'top-center',
|
||||
actionText: '前往',
|
||||
onActionClick: function (element) {
|
||||
//Set opacity of element to 0 to close Snackbar
|
||||
$(element).css('opacity', 0);
|
||||
window.open(link, 'https://www.foreverblog.cn/go.html');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//前往开往项目
|
||||
function totraveling() {
|
||||
btf.snackbarShow('即将跳转到「开往」项目的成员博客,不保证跳转网站的安全性和可用性', false, 5000);
|
||||
setTimeout(function () {
|
||||
window.open('https://travellings.link/');
|
||||
}, "5000");
|
||||
}
|
||||
|
||||
// 移除加载动画
|
||||
function removeLoading() {
|
||||
setTimeout(function () {
|
||||
preloader.endLoading();
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
//移除pwa
|
||||
navigator.serviceWorker.getRegistrations().then(function (registrations) {
|
||||
for (let registration of registrations) {
|
||||
registration.unregister()
|
||||
}
|
||||
})
|
||||
|
||||
function addFriendLink() {
|
||||
var input = document.getElementsByClassName('el-textarea__inner')[0];
|
||||
let evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent('input', true, true);
|
||||
input.value = '昵称(请勿包含博客等字样):\n网站地址(要求博客地址,请勿提交个人主页):\n头像图片url(请提供尽可能清晰的图片,我会上传到我自己的图床):\n描述:\n';
|
||||
input.dispatchEvent(evt);
|
||||
heo.scrollTo("#post-comment");
|
||||
input.focus();
|
||||
input.setSelectionRange(-1, -1);
|
||||
}
|
||||
|
||||
//从一个给定的数组arr中,随机返回num个不重复项
|
||||
function getArrayItems(arr, num) {
|
||||
//新建一个数组,将传入的数组复制过来,用于运算,而不要直接操作传入的数组;
|
||||
var temp_array = new Array();
|
||||
for (var index in arr) {
|
||||
temp_array.push(arr[index]);
|
||||
}
|
||||
//取出的数值项,保存在此数组
|
||||
var return_array = new Array();
|
||||
for (var i = 0; i < num; i++) {
|
||||
//判断如果数组还有可以取出的元素,以防下标越界
|
||||
if (temp_array.length > 0) {
|
||||
//在数组中产生一个随机索引
|
||||
var arrIndex = Math.floor(Math.random() * temp_array.length);
|
||||
//将此随机索引的对应的数组元素值复制出来
|
||||
return_array[i] = temp_array[arrIndex];
|
||||
//然后删掉此索引的数组元素,这时候temp_array变为新的数组
|
||||
temp_array.splice(arrIndex, 1);
|
||||
} else {
|
||||
//数组中数据项取完后,退出循环,比如数组本来只有10项,但要求取出20项.
|
||||
break;
|
||||
}
|
||||
}
|
||||
return return_array;
|
||||
}
|
||||
|
||||
// 检测按键
|
||||
window.onkeydown = function (e) {
|
||||
if (e.keyCode === 123) {
|
||||
btf.snackbarShow('开发者模式已打开,请遵循GPL协议', false, 3000)
|
||||
}
|
||||
}
|
||||
|
||||
// 阻止搜索滚动
|
||||
// document.querySelector('#algolia-search').addEventListener('wheel', (e) => {
|
||||
// e.preventDefault()
|
||||
// })
|
||||
document.querySelector('#console').addEventListener('wheel', (e) => {
|
||||
e.preventDefault()
|
||||
})
|
||||
// document.querySelector('#loading-box').addEventListener('wheel', (e) => {
|
||||
// e.preventDefault()
|
||||
// })
|
||||
|
||||
//自动调整即刻短文尺寸
|
||||
window.addEventListener('resize', function () {
|
||||
if (document.querySelector('#waterfall')) {
|
||||
heo.reflashEssayWaterFall();
|
||||
}
|
||||
});
|
||||
|
||||
//首页大卡片恢复显示
|
||||
$(".topGroup").hover(function () {
|
||||
// console.log("卡片悬浮");
|
||||
}, function () {
|
||||
hoverOnCommentBarrage = false;
|
||||
|
||||
if (document.getElementById("todayCard")) {
|
||||
document.getElementById("todayCard").classList.remove('hide');
|
||||
document.getElementById('todayCard').style.zIndex = 1;
|
||||
// console.log("卡片停止悬浮");
|
||||
}
|
||||
});
|
||||
|
||||
//评论增加放大功能
|
||||
// 如果当前页有评论就执行函数
|
||||
if (document.getElementById('post-comment')) owoBig();
|
||||
|
||||
function owoBig() {
|
||||
// 监听dom插入
|
||||
document.getElementById('post-comment').addEventListener('DOMNodeInserted', (dom) => {
|
||||
// 如果有class且值为OwO-body
|
||||
if (dom.target.classList && dom.target.classList.value == 'OwO-body') {
|
||||
let owo_body = dom.target
|
||||
if (owo_body) {
|
||||
let owo_time = ''
|
||||
let flag = true;
|
||||
// 创建盒子
|
||||
let div = document.createElement('div')
|
||||
div.id = 'owo-big'
|
||||
document.querySelector('body').appendChild(div)
|
||||
|
||||
// 禁用右键(手机端长按会出现右键菜单,为了体验给禁用掉)
|
||||
owo_body.addEventListener('contextmenu', e => e.preventDefault())
|
||||
|
||||
// 鼠标移入
|
||||
owo_body.addEventListener('mouseover', (e) => {
|
||||
if (e.target.tagName == 'LI' && flag) {
|
||||
flag = false;
|
||||
// 移入300毫秒后显示盒子
|
||||
owo_time = setTimeout(() => {
|
||||
let m = 3 // 设置倍数
|
||||
let height = e.path[0].clientHeight * m // 盒子高
|
||||
let width = e.path[0].clientWidth * m // 盒子宽
|
||||
let left = (e.x - e.offsetX) - (width - e.path[0].clientWidth) / 2 // 盒子与屏幕左边距离
|
||||
let top = e.y - e.offsetY // 盒子与屏幕顶部距离
|
||||
|
||||
div.style.height = height + 'px'
|
||||
div.style.width = width + 'px'
|
||||
div.style.left = left + 'px'
|
||||
div.style.top = top + 'px'
|
||||
div.style.display = 'flex'
|
||||
div.innerHTML = `<img src="${e.target.querySelector('img').src}">`
|
||||
}, 300);
|
||||
}
|
||||
})
|
||||
|
||||
// 鼠标移出
|
||||
owo_body.addEventListener('mouseout', (e) => {
|
||||
div.style.display = 'none';
|
||||
flag = true
|
||||
clearTimeout(owo_time)
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//文章页面上一篇下一篇
|
||||
document.addEventListener('scroll', btf.throttle(function () {
|
||||
//滚动条高度+视窗高度 = 可见区域底部高度
|
||||
var visibleBottom = window.scrollY + document.documentElement.clientHeight;
|
||||
//可见区域顶部高度
|
||||
var visibleTop = window.scrollY;
|
||||
// 获取翻页按钮容器
|
||||
var pagination = document.getElementById('pagination');
|
||||
// 获取位置监测容器,此处采用评论区
|
||||
var eventlistner = document.getElementById('post-tools');
|
||||
if (eventlistner && pagination) {
|
||||
var centerY = eventlistner.offsetTop + (eventlistner.offsetHeight / 2);
|
||||
if (document.body.clientWidth > 1300) {
|
||||
if (centerY < visibleTop) {
|
||||
pagination.classList.add("show-window");
|
||||
} else {
|
||||
pagination.classList.remove("show-window");
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 200));
|
||||
|
||||
|
||||
// 页面百分比
|
||||
function percent() {
|
||||
let a = document.documentElement.scrollTop || window.pageYOffset, // 卷去高度
|
||||
b = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight) - document.documentElement.clientHeight, // 整个网页高度
|
||||
result = Math.round(a / b * 100), // 计算百分比
|
||||
btn = document.querySelector("#percent"); // 获取按钮
|
||||
//滚动条高度+视窗高度 = 可见区域底部高度
|
||||
var visibleBottom = window.scrollY + document.documentElement.clientHeight;
|
||||
// 获取位置监测容器,此处采用评论区
|
||||
var eventlistner = document.getElementById('post-tools') || document.getElementById('footer');
|
||||
var centerY = eventlistner.offsetTop + (eventlistner.offsetHeight / 2);
|
||||
if ((centerY < visibleBottom) || (result > 90)) {
|
||||
document.querySelector("#nav-totop").classList.add("long");
|
||||
btn.innerHTML = "返回顶部";
|
||||
} else {
|
||||
document.querySelector("#nav-totop").classList.remove("long");
|
||||
btn.innerHTML = result;
|
||||
}
|
||||
window.onscroll = percent;
|
||||
}
|
||||
|
||||
//检查是否开启快捷键
|
||||
// if (localStorage.getItem('keyboardToggle') !== 'false') {
|
||||
// document.querySelector("#consoleKeyboard").classList.add("on");
|
||||
// } else {
|
||||
// document.querySelector("#consoleKeyboard").classList.remove("on");
|
||||
// }
|
||||
|
||||
//响应esc键
|
||||
$(window).on('keydown', function (ev) {
|
||||
|
||||
// Escape
|
||||
if (ev.keyCode == 27) {
|
||||
heo.hideLoading();
|
||||
heo.hideConsole();
|
||||
rm.hideRightMenu();
|
||||
}
|
||||
|
||||
if (heo_keyboard && ev.shiftKey && !heo_intype) {
|
||||
|
||||
// 显示快捷键面板 shift键
|
||||
// if (ev.keyCode == 16) {
|
||||
// document.querySelector("#keyboard-tips").classList.add("show");
|
||||
// }
|
||||
|
||||
//关闭快捷键 shift+K
|
||||
if (ev.keyCode == 75) {
|
||||
heo.keyboardToggle();
|
||||
return false;
|
||||
}
|
||||
|
||||
//响应打开控制台键 shift+A
|
||||
if (ev.keyCode == 65) {
|
||||
heo.showConsole();
|
||||
return false;
|
||||
}
|
||||
|
||||
//音乐控制 shift+M
|
||||
if (ev.keyCode == 77) {
|
||||
heo.musicToggle();
|
||||
return false;
|
||||
}
|
||||
|
||||
//随机文章 shift+R
|
||||
if (ev.keyCode == 82) {
|
||||
toRandomPost();
|
||||
return false;
|
||||
}
|
||||
|
||||
//回到首页 shift+H
|
||||
if (ev.keyCode == 72) {
|
||||
pjax.loadUrl("/");
|
||||
return false;
|
||||
}
|
||||
|
||||
//深色模式 shift+D
|
||||
if (ev.keyCode == 68) {
|
||||
rm.switchDarkMode();
|
||||
return false;
|
||||
}
|
||||
|
||||
//友链鱼塘 shift+F
|
||||
if (ev.keyCode == 70) {
|
||||
pjax.loadUrl("/moments/");
|
||||
return false;
|
||||
}
|
||||
|
||||
//友情链接页面 shift+L
|
||||
if (ev.keyCode == 76) {
|
||||
pjax.loadUrl("/link/");
|
||||
return false;
|
||||
}
|
||||
|
||||
//关于本站 shift+P
|
||||
if (ev.keyCode == 80) {
|
||||
pjax.loadUrl("/about/");
|
||||
return false;
|
||||
}
|
||||
|
||||
//在线工具 shift+T
|
||||
if (ev.keyCode == 84) {
|
||||
pjax.loadUrl("/tlink/");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// $(window).on('keyup', function (ev) {
|
||||
// // 显示快捷键面板
|
||||
// if (ev.keyCode == 16) {
|
||||
// document.querySelector("#keyboard-tips").classList.remove("show");
|
||||
// }
|
||||
// });
|
||||
|
||||
//输入状态检测
|
||||
$("input").focus(function () {
|
||||
heo_intype = true;
|
||||
});
|
||||
$("textarea").focus(function () {
|
||||
heo_intype = true;
|
||||
});
|
||||
$("input").focusout(function () {
|
||||
heo_intype = false;
|
||||
});
|
||||
$("textarea").focusout(function () {
|
||||
heo_intype = false;
|
||||
});
|
||||
|
||||
//老旧浏览器检测
|
||||
function browserTC() {
|
||||
btf.snackbarShow("");
|
||||
Snackbar.show({
|
||||
text: '为了保护访客访问安全,本站已停止对你正在使用的过低版本浏览器的支持',
|
||||
actionText: '关闭',
|
||||
duration: '6000',
|
||||
pos: 'bottom-right'
|
||||
});
|
||||
}
|
||||
|
||||
function browserVersion() {
|
||||
var userAgent = navigator.userAgent;
|
||||
var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1;
|
||||
var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
|
||||
var isEdge = userAgent.indexOf("Edge") > -1 && !isIE;
|
||||
var isFirefox = userAgent.indexOf("Firefox") > -1;
|
||||
var isOpera = userAgent.indexOf("Opera") > -1 || userAgent.indexOf("OPR") > -1;
|
||||
var isChrome = userAgent.indexOf("Chrome") > -1 && userAgent.indexOf("Safari") > -1 && userAgent.indexOf("Edge") == -1 && userAgent.indexOf("OPR") == -1;
|
||||
var isSafari = userAgent.indexOf("Safari") > -1 && userAgent.indexOf("Chrome") == -1 && userAgent.indexOf("Edge") == -1 && userAgent.indexOf("OPR") == -1;
|
||||
if (isEdge) {
|
||||
if (userAgent.split('Edge/')[1].split('.')[0] < 90) {
|
||||
browserTC()
|
||||
}
|
||||
} else if (isFirefox) {
|
||||
if (userAgent.split('Firefox/')[1].split('.')[0] < 90) {
|
||||
browserTC()
|
||||
}
|
||||
} else if (isOpera) {
|
||||
if (userAgent.split('OPR/')[1].split('.')[0] < 80) {
|
||||
browserTC()
|
||||
}
|
||||
} else if (isChrome) {
|
||||
if (userAgent.split('Chrome/')[1].split('.')[0] < 90) {
|
||||
browserTC()
|
||||
}
|
||||
} else if (isSafari) {
|
||||
//不知道Safari多少版本才算老旧
|
||||
}
|
||||
}
|
||||
|
||||
function setCookies(obj, limitTime) {
|
||||
let data = new Date(new Date().getTime() + limitTime * 24 * 60 * 60 * 1000).toUTCString()
|
||||
for (let i in obj) {
|
||||
document.cookie = i + '=' + obj[i] + ';expires=' + data
|
||||
}
|
||||
}
|
||||
|
||||
function getCookie(name) {
|
||||
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
|
||||
if (arr = document.cookie.match(reg))
|
||||
return unescape(arr[2]);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
if (getCookie('browsertc') != 1) {
|
||||
setCookies({
|
||||
browsertc: 1,
|
||||
}, 1); //设置cookie缓存一天,即一天弹一次
|
||||
browserVersion();
|
||||
}
|
||||
|
||||
//当前窗口得到焦点
|
||||
// window.onfocus = function () {
|
||||
// document.querySelector("#keyboard-tips").classList.remove("show");
|
||||
// };
|
||||
|
||||
//注入函数
|
||||
document.addEventListener('pjax:send', function () {
|
||||
console.clear();
|
||||
Pace.restart();
|
||||
heo.showLoading();
|
||||
})
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// coverColor()
|
||||
navTitle()
|
||||
percent()
|
||||
heo.topPostScroll()
|
||||
heo.topCategoriesBarScroll()
|
||||
heo.sayhi()
|
||||
heo.addTag()
|
||||
heo.stopImgRightDrag()
|
||||
// heo.addFriendLinksInFooter()
|
||||
heo.qrcodeCreate()
|
||||
heo.hidecookie()
|
||||
heo.onlyHome()
|
||||
heo.addNavBackgroundInit()
|
||||
heo.initIndexEssay()
|
||||
// heo.changeTimeInEssay()
|
||||
heo.reflashEssayWaterFall()
|
||||
heo.addMediumInEssay()
|
||||
heo.darkModeStatus()
|
||||
// heo.categoriesBarActive()
|
||||
heo.initThemeColor()
|
||||
heo.hideLoading()
|
||||
// heo.tagPageActive()
|
||||
})
|
||||
window.onscroll = function () {
|
||||
percent();
|
||||
};
|
|
@ -0,0 +1,791 @@
|
|||
// var full_page = document.getElementsByClassName("full_page");
|
||||
// if (full_page.length != 0) {
|
||||
// full_page[0].style.background = "transparent";
|
||||
// }
|
||||
|
||||
|
||||
function checkOpen() {
|
||||
}
|
||||
|
||||
checkOpen.toString = function () {
|
||||
this.opened = true;
|
||||
};
|
||||
|
||||
//封面纯色
|
||||
function coverColor() {
|
||||
var path = document.getElementById("post-cover")?.src;
|
||||
// console.log(path);
|
||||
if (path !== undefined) {
|
||||
|
||||
// 获取颜色 https://github.com/fast-average-color/fast-average-color
|
||||
const fac = new FastAverageColor();
|
||||
|
||||
fac.getColorAsync(path, {
|
||||
// 忽略白色
|
||||
ignoredColor: [255, 255, 255, 255]
|
||||
})
|
||||
.then(color => {
|
||||
/**
|
||||
* 获取数据后的处理程序
|
||||
*/
|
||||
var value = color.hex;
|
||||
// console.log(value);
|
||||
// document.getElementById('page-header').style.backgroundColor=value;
|
||||
// document.styleSheets[0].addRule('#page-header:before','background: '+ value +'!important');
|
||||
|
||||
if (getContrastYIQ(value) === "light") {
|
||||
value = LightenDarkenColor(colorHex(value), -40)
|
||||
}
|
||||
|
||||
document.styleSheets[0].addRule(':root', '--heo-main:' + value + '!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main-op:' + value + '23!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main-op-deep:' + value + 'dd!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main-none:' + value + '00!important');
|
||||
heo.initThemeColor()
|
||||
document.getElementById("coverdiv").classList.add("loaded");
|
||||
})
|
||||
.catch(e => {
|
||||
console.log(e);
|
||||
});
|
||||
|
||||
} else {
|
||||
// document.styleSheets[0].addRule('#page-header:before','background: none!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main: var(--heo-theme)!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main-op: var(--heo-theme-op)!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main-op-deep:var(--heo-theme-op-deep)!important');
|
||||
document.styleSheets[0].addRule(':root', '--heo-main-none: var(--heo-theme-none)!important');
|
||||
heo.initThemeColor()
|
||||
}
|
||||
}
|
||||
|
||||
//RGB颜色转化为16进制颜色
|
||||
function colorHex(str) {
|
||||
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
||||
var that = str;
|
||||
if (/^(rgb|RGB)/.test(that)) {
|
||||
var aColor = that.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
|
||||
var strHex = "#";
|
||||
for (var i = 0; i < aColor.length; i++) {
|
||||
var hex = Number(aColor[i]).toString(16);
|
||||
if (hex === "0") {
|
||||
hex += hex;
|
||||
}
|
||||
strHex += hex;
|
||||
}
|
||||
if (strHex.length !== 7) {
|
||||
strHex = that;
|
||||
}
|
||||
return strHex;
|
||||
} else if (reg.test(that)) {
|
||||
var aNum = that.replace(/#/, "").split("");
|
||||
if (aNum.length === 6) {
|
||||
return that;
|
||||
} else if (aNum.length === 3) {
|
||||
var numHex = "#";
|
||||
for (var i = 0; i < aNum.length; i += 1) {
|
||||
numHex += (aNum[i] + aNum[i]);
|
||||
}
|
||||
return numHex;
|
||||
}
|
||||
} else {
|
||||
return that;
|
||||
}
|
||||
}
|
||||
|
||||
//16进制颜色转化为RGB颜色
|
||||
function colorRgb(str) {
|
||||
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
||||
var sColor = str.toLowerCase();
|
||||
if (sColor && reg.test(sColor)) {
|
||||
if (sColor.length === 4) {
|
||||
var sColorNew = "#";
|
||||
for (var i = 1; i < 4; i += 1) {
|
||||
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
|
||||
}
|
||||
sColor = sColorNew;
|
||||
}
|
||||
//处理六位的颜色值
|
||||
var sColorChange = [];
|
||||
for (var i = 1; i < 7; i += 2) {
|
||||
sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2)));
|
||||
}
|
||||
return "rgb(" + sColorChange.join(",") + ")";
|
||||
} else {
|
||||
return sColor;
|
||||
}
|
||||
}
|
||||
|
||||
//变暗变亮主方法
|
||||
function LightenDarkenColor(col, amt) {
|
||||
var usePound = false;
|
||||
|
||||
if (col[0] == "#") {
|
||||
col = col.slice(1);
|
||||
usePound = true;
|
||||
}
|
||||
|
||||
var num = parseInt(col, 16);
|
||||
|
||||
var r = (num >> 16) + amt;
|
||||
|
||||
if (r > 255) r = 255;
|
||||
else if (r < 0) r = 0;
|
||||
|
||||
var b = ((num >> 8) & 0x00FF) + amt;
|
||||
|
||||
if (b > 255) b = 255;
|
||||
else if (b < 0) b = 0;
|
||||
|
||||
var g = (num & 0x0000FF) + amt;
|
||||
|
||||
if (g > 255) g = 255;
|
||||
else if (g < 0) g = 0;
|
||||
|
||||
|
||||
return (usePound ? "#" : "") + String("000000" + (g | (b << 8) | (r << 16)).toString(16)).slice(-6);
|
||||
}
|
||||
|
||||
//判断是否为亮色
|
||||
function getContrastYIQ(hexcolor) {
|
||||
var colorrgb = colorRgb(hexcolor);
|
||||
var colors = colorrgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
||||
var red = colors[1];
|
||||
var green = colors[2];
|
||||
var blue = colors[3];
|
||||
var brightness;
|
||||
brightness = (red * 299) + (green * 587) + (blue * 114);
|
||||
brightness = brightness / 255000;
|
||||
if (brightness >= 0.5) {
|
||||
return "light";
|
||||
} else {
|
||||
return "dark";
|
||||
}
|
||||
}
|
||||
|
||||
//导航栏文章
|
||||
function navTitle() {
|
||||
var titlevalue = document.title;
|
||||
var postName = document.getElementsByClassName("post-title")[0];
|
||||
if (postName == null || postName == '') {
|
||||
document.getElementById("page-name-text").innerHTML = titlevalue;
|
||||
} else {
|
||||
document.getElementById("page-name-text").innerHTML = postName?.innerText;
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = function () {
|
||||
var copybtnlist = document.getElementsByClassName("copybtn")
|
||||
for (var i = 0; i < copybtnlist.length; i++) {
|
||||
document.getElementsByClassName("copybtn")[i].addEventListener("click", function () {
|
||||
showcopy();
|
||||
});
|
||||
}
|
||||
heo.initThemeColor();
|
||||
}
|
||||
|
||||
function showcopy() {
|
||||
if (GLOBAL_CONFIG.Snackbar !== undefined) {
|
||||
btf.snackbarShow(GLOBAL_CONFIG.copy.success)
|
||||
} else {
|
||||
const prevEle = ctx.previousElementSibling
|
||||
prevEle.innerText = GLOBAL_CONFIG.copy.success
|
||||
prevEle.style.opacity = 1
|
||||
setTimeout(() => {
|
||||
prevEle.style.opacity = 0
|
||||
}, 700)
|
||||
}
|
||||
}
|
||||
|
||||
//导航栏上显示标题
|
||||
// var OriginTitile = document.title;
|
||||
// var titleTime;
|
||||
// document.addEventListener('visibilitychange', function () {
|
||||
// if (document.hidden) {
|
||||
// // $('[rel="shortcut icon"]').attr('href', "https://cdn.jsdelivr.net/gh/Akilarlxh/Akilarlxh.github.io@v3.3.3_3/img/siteicon/favicon.png");
|
||||
// document.title = '张洪Heo';
|
||||
// clearTimeout(titleTime);
|
||||
// }
|
||||
// else {
|
||||
// // $('[rel="shortcut icon"]').attr('href', "https://cdn.jsdelivr.net/gh/Akilarlxh/Akilarlxh.github.io@v3.3.3_3/img/siteicon/favicon.png");
|
||||
// document.title = OriginTitile;
|
||||
// // titleTime = setTimeout(function () {
|
||||
// // document.title = OriginTitile;
|
||||
// // }, 2000);
|
||||
// }
|
||||
// });
|
||||
|
||||
// 早上好问好
|
||||
// 获取时间
|
||||
var getTimeState = () => {
|
||||
// 获取当前时间
|
||||
var timeNow = new Date();
|
||||
// 获取当前小时
|
||||
var hours = timeNow.getHours();
|
||||
// 设置默认文字
|
||||
var text = ``;
|
||||
// 判断当前时间段
|
||||
if (hours >= 0 && hours <= 5) {
|
||||
text = `晚安`;
|
||||
} else if (hours > 5 && hours <= 10) {
|
||||
text = `早上好`;
|
||||
} else if (hours > 10 && hours <= 14) {
|
||||
text = `中午好`;
|
||||
} else if (hours > 14 && hours <= 18) {
|
||||
text = `下午好`;
|
||||
} else if (hours > 18 && hours <= 24) {
|
||||
text = `晚上好`;
|
||||
}
|
||||
// console.log(`hours >>>>>`, hours);
|
||||
// console.log(`text >>>>`, text);
|
||||
// 返回当前时间段对应的状态
|
||||
return text;
|
||||
};
|
||||
|
||||
function fly_to_top() {
|
||||
document.getElementById("guli_top").classList.add("open_wing");
|
||||
setTimeout(function () {
|
||||
document.getElementById("guli_top").classList.add("flying");
|
||||
btf.scrollToDest(0, 300);
|
||||
}, 300);
|
||||
setTimeout(function () {
|
||||
// 这里就是处理的事件
|
||||
document.getElementById("guli_top").classList.remove("flying");
|
||||
document.getElementById("guli_top").classList.remove("open_wing");
|
||||
document.getElementById("guli_top").style.cssText = "opacity: ''; transform: ''";
|
||||
}, 600)
|
||||
}
|
||||
|
||||
//深色模式切换
|
||||
var navFn = {
|
||||
switchDarkMode: () => { // Switch Between Light And Dark Mode
|
||||
const nowMode = document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light'
|
||||
if (nowMode === 'light') {
|
||||
activateDarkMode()
|
||||
saveToLocal.set('theme', 'dark', 2)
|
||||
GLOBAL_CONFIG.Snackbar !== undefined && btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night, false, 2000)
|
||||
} else {
|
||||
activateLightMode()
|
||||
saveToLocal.set('theme', 'light', 2)
|
||||
GLOBAL_CONFIG.Snackbar !== undefined && btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day, false, 2000)
|
||||
}
|
||||
// handle some cases
|
||||
typeof utterancesTheme === 'function' && utterancesTheme();
|
||||
typeof FB === 'object' && window.loadFBComment();
|
||||
window.DISQUS && document.getElementById('disqus_thread').children.length && setTimeout(() => window.disqusReset(), 200)
|
||||
|
||||
//统计图
|
||||
let color = document.documentElement.getAttribute('data-theme') === 'light' ? '#363636' : '#F7F7FA'
|
||||
if (document.getElementById('posts-chart')) {
|
||||
let postsOptionNew = postsOption
|
||||
postsOptionNew.textStyle.color = color
|
||||
postsOptionNew.title.textStyle.color = color
|
||||
postsOptionNew.xAxis.axisLine.lineStyle.color = color
|
||||
postsOptionNew.yAxis.axisLine.lineStyle.color = color
|
||||
postsChart.setOption(postsOptionNew)
|
||||
}
|
||||
if (document.getElementById('tags-chart')) {
|
||||
let tagsOptionNew = tagsOption
|
||||
tagsOptionNew.textStyle.color = color
|
||||
tagsOptionNew.title.textStyle.color = color
|
||||
tagsOptionNew.xAxis.axisLine.lineStyle.color = color
|
||||
tagsOptionNew.yAxis.axisLine.lineStyle.color = color
|
||||
tagsChart.setOption(tagsOptionNew)
|
||||
}
|
||||
if (document.getElementById('categories-chart')) {
|
||||
let categoriesOptionNew = categoriesOption
|
||||
categoriesOptionNew.textStyle.color = color
|
||||
categoriesOptionNew.title.textStyle.color = color
|
||||
categoriesOptionNew.legend.textStyle.color = color
|
||||
categoriesChart.setOption(categoriesOptionNew)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 移除赞赏蒙版
|
||||
function RemoveRewardMask() {
|
||||
if (!document.querySelector(".reward-main")) return;
|
||||
document.querySelector(".reward-main").style.display = "none";
|
||||
document.getElementById("quit-box").style.display = "none";
|
||||
}
|
||||
|
||||
//添加赞赏蒙版
|
||||
function AddRewardMask() {
|
||||
if (!document.querySelector(".reward-main")) return;
|
||||
document.querySelector(".reward-main").style.display = "flex";
|
||||
document.getElementById("quit-box").style.display = "flex";
|
||||
}
|
||||
|
||||
|
||||
//监听蒙版关闭
|
||||
document.addEventListener('touchstart', e => {
|
||||
RemoveRewardMask()
|
||||
}, false)
|
||||
|
||||
//监听ctrl+C
|
||||
$(document).unbind('keydown').bind('keydown', function (e) {
|
||||
if ((e.ctrlKey || e.metaKey) && (e.keyCode == 67) && (selectTextNow != '')) {
|
||||
btf.snackbarShow('复制成功,复制和转载请标注本文地址');
|
||||
rm.rightmenuCopyText(selectTextNow);
|
||||
return false;
|
||||
}
|
||||
})
|
||||
|
||||
//判断国内国外
|
||||
// var foreignTips = (function () {
|
||||
// var fetchUrl = "https://api.ooomn.com/api/ip"
|
||||
// fetch(fetchUrl)
|
||||
// .then(res => res.json())
|
||||
// .then(json =>{
|
||||
// var country = json.country;
|
||||
// console.log(country);
|
||||
// if (country != '中国'){
|
||||
// btf.snackbarShow('使用国外网络访问可能无法访问文章图片,敬请谅解。Blog pictures only serve mainland China.')
|
||||
// }
|
||||
// })
|
||||
// });
|
||||
|
||||
//颜色
|
||||
document.addEventListener('scroll', btf.throttle(function () {
|
||||
heo.initThemeColor()
|
||||
}, 200))
|
||||
|
||||
//友链随机传送
|
||||
function travelling() {
|
||||
var fetchUrl = "https://moments.0206.ink/randomfriend"
|
||||
fetch(fetchUrl)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
var name = json.name;
|
||||
var link = json.link;
|
||||
var msg = "点击前往按钮进入随机一个友链,不保证跳转网站的安全性和可用性。本次随机到的是本站友链:「" + name + "」";
|
||||
document.styleSheets[0].addRule(':root', '--heo-snackbar-time:' + 8000 + 'ms!important');
|
||||
Snackbar.show({
|
||||
text: msg,
|
||||
duration: 8000,
|
||||
pos: 'top-center',
|
||||
actionText: '前往',
|
||||
onActionClick: function (element) {
|
||||
//Set opacity of element to 0 to close Snackbar
|
||||
$(element).css('opacity', 0);
|
||||
window.open(link, '_blank');
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
//前往黑洞
|
||||
function toforeverblog() {
|
||||
var msg = "点击前往按钮进入「十年之约」项目中的成员博客,不保证跳转网站的安全性和可用性";
|
||||
Snackbar.show({
|
||||
text: msg,
|
||||
duration: 8000,
|
||||
pos: 'top-center',
|
||||
actionText: '前往',
|
||||
onActionClick: function (element) {
|
||||
//Set opacity of element to 0 to close Snackbar
|
||||
$(element).css('opacity', 0);
|
||||
window.open(link, 'https://www.foreverblog.cn/go.html');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//前往开往项目
|
||||
function totraveling() {
|
||||
btf.snackbarShow('即将跳转到「开往」项目的成员博客,不保证跳转网站的安全性和可用性', false, 5000);
|
||||
setTimeout(function () {
|
||||
window.open('https://travellings.link/');
|
||||
}, "5000");
|
||||
}
|
||||
|
||||
// 移除加载动画
|
||||
function removeLoading() {
|
||||
setTimeout(function () {
|
||||
preloader.endLoading();
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
//移除pwa
|
||||
navigator.serviceWorker.getRegistrations().then(function (registrations) {
|
||||
for (let registration of registrations) {
|
||||
registration.unregister()
|
||||
}
|
||||
})
|
||||
|
||||
function addFriendLink() {
|
||||
var input = document.getElementsByClassName('el-textarea__inner')[0];
|
||||
let evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent('input', true, true);
|
||||
input.value = '昵称(请勿包含博客等字样):\n网站地址(要求博客地址,请勿提交个人主页):\n头像图片url(请提供尽可能清晰的图片,我会上传到我自己的图床):\n描述:\n';
|
||||
input.dispatchEvent(evt);
|
||||
heo.scrollTo("#post-comment");
|
||||
input.focus();
|
||||
input.setSelectionRange(-1, -1);
|
||||
}
|
||||
|
||||
//从一个给定的数组arr中,随机返回num个不重复项
|
||||
function getArrayItems(arr, num) {
|
||||
//新建一个数组,将传入的数组复制过来,用于运算,而不要直接操作传入的数组;
|
||||
var temp_array = new Array();
|
||||
for (var index in arr) {
|
||||
temp_array.push(arr[index]);
|
||||
}
|
||||
//取出的数值项,保存在此数组
|
||||
var return_array = new Array();
|
||||
for (var i = 0; i < num; i++) {
|
||||
//判断如果数组还有可以取出的元素,以防下标越界
|
||||
if (temp_array.length > 0) {
|
||||
//在数组中产生一个随机索引
|
||||
var arrIndex = Math.floor(Math.random() * temp_array.length);
|
||||
//将此随机索引的对应的数组元素值复制出来
|
||||
return_array[i] = temp_array[arrIndex];
|
||||
//然后删掉此索引的数组元素,这时候temp_array变为新的数组
|
||||
temp_array.splice(arrIndex, 1);
|
||||
} else {
|
||||
//数组中数据项取完后,退出循环,比如数组本来只有10项,但要求取出20项.
|
||||
break;
|
||||
}
|
||||
}
|
||||
return return_array;
|
||||
}
|
||||
|
||||
// 检测按键
|
||||
window.onkeydown = function (e) {
|
||||
if (e.keyCode === 123) {
|
||||
btf.snackbarShow('开发者模式已打开,请遵循GPL协议', false, 3000)
|
||||
}
|
||||
}
|
||||
|
||||
// 阻止搜索滚动
|
||||
// document.querySelector('#algolia-search').addEventListener('wheel', (e) => {
|
||||
// e.preventDefault()
|
||||
// })
|
||||
document.querySelector('#console').addEventListener('wheel', (e) => {
|
||||
e.preventDefault()
|
||||
})
|
||||
// document.querySelector('#loading-box').addEventListener('wheel', (e) => {
|
||||
// e.preventDefault()
|
||||
// })
|
||||
|
||||
//自动调整即刻短文尺寸
|
||||
window.addEventListener("resize", (function () {
|
||||
document.querySelector("#waterfall") && heo.reflashEssayWaterFall()
|
||||
}
|
||||
));
|
||||
|
||||
//首页大卡片恢复显示
|
||||
$(".topGroup").hover(function () {
|
||||
// console.log("卡片悬浮");
|
||||
}, function () {
|
||||
hoverOnCommentBarrage = false;
|
||||
|
||||
if (document.getElementById("todayCard")) {
|
||||
document.getElementById("todayCard").classList.remove('hide');
|
||||
document.getElementById('todayCard').style.zIndex = 1;
|
||||
// console.log("卡片停止悬浮");
|
||||
}
|
||||
});
|
||||
|
||||
//评论增加放大功能
|
||||
// 如果当前页有评论就执行函数
|
||||
if (document.getElementById('post-comment')) owoBig();
|
||||
|
||||
function owoBig() {
|
||||
// 监听dom插入
|
||||
document.getElementById('post-comment').addEventListener('DOMNodeInserted', (dom) => {
|
||||
// 如果有class且值为OwO-body
|
||||
if (dom.target.classList && dom.target.classList.value == 'OwO-body') {
|
||||
let owo_body = dom.target
|
||||
if (owo_body) {
|
||||
let owo_time = ''
|
||||
let flag = true;
|
||||
// 创建盒子
|
||||
let div = document.createElement('div')
|
||||
div.id = 'owo-big'
|
||||
document.querySelector('body').appendChild(div)
|
||||
|
||||
// 禁用右键(手机端长按会出现右键菜单,为了体验给禁用掉)
|
||||
owo_body.addEventListener('contextmenu', e => e.preventDefault())
|
||||
|
||||
// 鼠标移入
|
||||
owo_body.addEventListener('mouseover', (e) => {
|
||||
if (e.target.tagName == 'LI' && flag) {
|
||||
flag = false;
|
||||
// 移入300毫秒后显示盒子
|
||||
owo_time = setTimeout(() => {
|
||||
let m = 3 // 设置倍数
|
||||
let height = e.path[0].clientHeight * m // 盒子高
|
||||
let width = e.path[0].clientWidth * m // 盒子宽
|
||||
let left = (e.x - e.offsetX) - (width - e.path[0].clientWidth) / 2 // 盒子与屏幕左边距离
|
||||
let top = e.y - e.offsetY // 盒子与屏幕顶部距离
|
||||
|
||||
div.style.height = height + 'px'
|
||||
div.style.width = width + 'px'
|
||||
div.style.left = left + 'px'
|
||||
div.style.top = top + 'px'
|
||||
div.style.display = 'flex'
|
||||
div.innerHTML = `<img src="${e.target.querySelector('img').src}">`
|
||||
}, 300);
|
||||
}
|
||||
})
|
||||
|
||||
// 鼠标移出
|
||||
owo_body.addEventListener('mouseout', (e) => {
|
||||
div.style.display = 'none';
|
||||
flag = true
|
||||
clearTimeout(owo_time)
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//文章页面上一篇下一篇
|
||||
// document.addEventListener('scroll', btf.throttle(function () {
|
||||
// //滚动条高度+视窗高度 = 可见区域底部高度
|
||||
// var visibleBottom = window.scrollY + document.documentElement.clientHeight;
|
||||
// //可见区域顶部高度
|
||||
// var visibleTop = window.scrollY;
|
||||
// // 获取翻页按钮容器
|
||||
// var pagination = document.getElementById('pagination');
|
||||
// // 获取位置监测容器,此处采用评论区
|
||||
// var eventlistner = document.getElementById('post-tools');
|
||||
// if (eventlistner && pagination) {
|
||||
// var centerY = eventlistner.offsetTop + (eventlistner.offsetHeight / 2);
|
||||
// if (document.body.clientWidth > 1300) {
|
||||
// if (centerY < visibleTop) {
|
||||
// pagination.classList.add("show-window");
|
||||
// } else {
|
||||
// pagination.classList.remove("show-window");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }, 200));
|
||||
|
||||
|
||||
// 页面百分比
|
||||
function percent() {
|
||||
let e = document.documentElement.scrollTop || window.pageYOffset
|
||||
,
|
||||
t = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight) - document.documentElement.clientHeight
|
||||
, o = Math.round(e / t * 100)
|
||||
, n = document.querySelector("#percent");
|
||||
var a = window.scrollY + document.documentElement.clientHeight
|
||||
, i = document.getElementById("post-tools") || document.getElementById("footer");
|
||||
i.offsetTop + i.offsetHeight / 2 < a || o > 90 ? (document.querySelector("#nav-totop").classList.add("long"),
|
||||
n.innerHTML = "返回顶部") : (document.querySelector("#nav-totop").classList.remove("long"),
|
||||
o >= 0 && (n.innerHTML = o)),
|
||||
endresult = t - e,
|
||||
endresult < 100 ? $(".needEndHide").addClass("hide") : $(".needEndHide").removeClass("hide"),
|
||||
window.onscroll = percent
|
||||
}
|
||||
|
||||
//检查是否开启快捷键
|
||||
// if (localStorage.getItem('keyboardToggle') !== 'false') {
|
||||
// document.querySelector("#consoleKeyboard").classList.add("on");
|
||||
// } else {
|
||||
// document.querySelector("#consoleKeyboard").classList.remove("on");
|
||||
// }
|
||||
|
||||
//响应esc键
|
||||
$(window).on('keydown', function (ev) {
|
||||
|
||||
// Escape
|
||||
if (ev.keyCode == 27) {
|
||||
heo.hideLoading();
|
||||
heo.hideConsole();
|
||||
rm.hideRightMenu();
|
||||
}
|
||||
|
||||
if (heo_keyboard && ev.shiftKey && !heo_intype) {
|
||||
|
||||
// 显示快捷键面板 shift键
|
||||
// if (ev.keyCode == 16) {
|
||||
// document.querySelector("#keyboard-tips").classList.add("show");
|
||||
// }
|
||||
|
||||
//关闭快捷键 shift+K
|
||||
if (ev.keyCode == 75) {
|
||||
heo.keyboardToggle();
|
||||
return false;
|
||||
}
|
||||
|
||||
//响应打开控制台键 shift+A
|
||||
if (ev.keyCode == 65) {
|
||||
heo.showConsole();
|
||||
return false;
|
||||
}
|
||||
|
||||
//音乐控制 shift+M
|
||||
if (ev.keyCode == 77) {
|
||||
heo.musicToggle();
|
||||
return false;
|
||||
}
|
||||
|
||||
//随机文章 shift+R
|
||||
if (ev.keyCode == 82) {
|
||||
toRandomPost();
|
||||
return false;
|
||||
}
|
||||
|
||||
//回到首页 shift+H
|
||||
if (ev.keyCode == 72) {
|
||||
pjax.loadUrl("/");
|
||||
return false;
|
||||
}
|
||||
|
||||
//深色模式 shift+D
|
||||
if (ev.keyCode == 68) {
|
||||
rm.switchDarkMode();
|
||||
return false;
|
||||
}
|
||||
|
||||
//友链鱼塘 shift+F
|
||||
if (ev.keyCode == 70) {
|
||||
pjax.loadUrl("/moments/");
|
||||
return false;
|
||||
}
|
||||
|
||||
//友情链接页面 shift+L
|
||||
if (ev.keyCode == 76) {
|
||||
pjax.loadUrl("/link/");
|
||||
return false;
|
||||
}
|
||||
|
||||
//关于本站 shift+P
|
||||
if (ev.keyCode == 80) {
|
||||
pjax.loadUrl("/about/");
|
||||
return false;
|
||||
}
|
||||
|
||||
//在线工具 shift+T
|
||||
if (ev.keyCode == 84) {
|
||||
pjax.loadUrl("/tlink/");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// $(window).on('keyup', function (ev) {
|
||||
// // 显示快捷键面板
|
||||
// if (ev.keyCode == 16) {
|
||||
// document.querySelector("#keyboard-tips").classList.remove("show");
|
||||
// }
|
||||
// });
|
||||
|
||||
//输入状态检测
|
||||
$("input").focus(function () {
|
||||
heo_intype = true;
|
||||
});
|
||||
$("textarea").focus(function () {
|
||||
heo_intype = true;
|
||||
});
|
||||
$("input").focusout(function () {
|
||||
heo_intype = false;
|
||||
});
|
||||
$("textarea").focusout(function () {
|
||||
heo_intype = false;
|
||||
});
|
||||
|
||||
//老旧浏览器检测
|
||||
function browserTC() {
|
||||
btf.snackbarShow("");
|
||||
Snackbar.show({
|
||||
text: '为了保护访客访问安全,本站已停止对你正在使用的过低版本浏览器的支持',
|
||||
actionText: '关闭',
|
||||
duration: '6000',
|
||||
pos: 'bottom-right'
|
||||
});
|
||||
}
|
||||
|
||||
function browserVersion() {
|
||||
var userAgent = navigator.userAgent;
|
||||
var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1;
|
||||
var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
|
||||
var isEdge = userAgent.indexOf("Edge") > -1 && !isIE;
|
||||
var isFirefox = userAgent.indexOf("Firefox") > -1;
|
||||
var isOpera = userAgent.indexOf("Opera") > -1 || userAgent.indexOf("OPR") > -1;
|
||||
var isChrome = userAgent.indexOf("Chrome") > -1 && userAgent.indexOf("Safari") > -1 && userAgent.indexOf("Edge") == -1 && userAgent.indexOf("OPR") == -1;
|
||||
var isSafari = userAgent.indexOf("Safari") > -1 && userAgent.indexOf("Chrome") == -1 && userAgent.indexOf("Edge") == -1 && userAgent.indexOf("OPR") == -1;
|
||||
if (isEdge) {
|
||||
if (userAgent.split('Edge/')[1].split('.')[0] < 90) {
|
||||
browserTC()
|
||||
}
|
||||
} else if (isFirefox) {
|
||||
if (userAgent.split('Firefox/')[1].split('.')[0] < 90) {
|
||||
browserTC()
|
||||
}
|
||||
} else if (isOpera) {
|
||||
if (userAgent.split('OPR/')[1].split('.')[0] < 80) {
|
||||
browserTC()
|
||||
}
|
||||
} else if (isChrome) {
|
||||
if (userAgent.split('Chrome/')[1].split('.')[0] < 90) {
|
||||
browserTC()
|
||||
}
|
||||
} else if (isSafari) {
|
||||
//不知道Safari多少版本才算老旧
|
||||
}
|
||||
}
|
||||
|
||||
function setCookies(obj, limitTime) {
|
||||
let data = new Date(new Date().getTime() + limitTime * 24 * 60 * 60 * 1000).toUTCString()
|
||||
for (let i in obj) {
|
||||
document.cookie = i + '=' + obj[i] + ';expires=' + data
|
||||
}
|
||||
}
|
||||
|
||||
function getCookie(name) {
|
||||
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
|
||||
if (arr = document.cookie.match(reg))
|
||||
return unescape(arr[2]);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
if (getCookie('browsertc') != 1) {
|
||||
setCookies({
|
||||
browsertc: 1,
|
||||
}, 1); //设置cookie缓存一天,即一天弹一次
|
||||
browserVersion();
|
||||
}
|
||||
|
||||
//当前窗口得到焦点
|
||||
// window.onfocus = function () {
|
||||
// document.querySelector("#keyboard-tips").classList.remove("show");
|
||||
// };
|
||||
|
||||
//注入函数
|
||||
document.addEventListener('pjax:send', function () {
|
||||
Pace.restart();
|
||||
heo.showLoading();
|
||||
})
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// coverColor()
|
||||
navTitle()
|
||||
percent()
|
||||
heo.topPostScroll()
|
||||
heo.topCategoriesBarScroll()
|
||||
heo.sayhi()
|
||||
heo.addTag()
|
||||
heo.stopImgRightDrag()
|
||||
link.addFriendLinksInFooter()
|
||||
heo.qrcodeCreate()
|
||||
heo.onlyHome()
|
||||
|
||||
heo.addNavBackgroundInit()
|
||||
heo.initIndexEssay()
|
||||
// heo.changeTimeInEssay()
|
||||
heo.reflashEssayWaterFall()
|
||||
//heo.addMediumInEssay()
|
||||
heo.darkModeStatus()
|
||||
// heo.categoriesBarActive()
|
||||
heo.initThemeColor()
|
||||
heo.hideLoading()
|
||||
// heo.tagPageActive()
|
||||
})
|
||||
window.onscroll = function () {
|
||||
percent();
|
||||
};
|
|
@ -0,0 +1,181 @@
|
|||
.comment-barrage {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
right: 20px;
|
||||
padding: 0 0 20px 10px;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: end;
|
||||
align-items: flex-end;
|
||||
z-index: 999;
|
||||
transition: 0.3s;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.comment-barrage {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.comment-barrage-item {
|
||||
min-width: 300px;
|
||||
max-width: 300px;
|
||||
width: fit-content;
|
||||
min-height: 80px;
|
||||
max-height: 150px;
|
||||
margin: 4px;
|
||||
padding: 8px 14px;
|
||||
background: var(--heo-maskbgdeep);
|
||||
border-radius: 8px;
|
||||
color: var(--heo-fontcolor);
|
||||
animation: barrageIn 0.6s cubic-bezier(0.42, 0, 0.3, 1.11);
|
||||
transition: 0.3s;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: var(--style-border);
|
||||
backdrop-filter: saturate(180%) blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
position: fixed;
|
||||
box-shadow: var(--heo-shadow-border);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.comment-barrage-item:hover {
|
||||
border: var(--style-border-hover);
|
||||
box-shadow: var(--heo-shadow-main);
|
||||
}
|
||||
|
||||
.comment-barrage-item.out {
|
||||
opacity: 0;
|
||||
animation: barrageOut 0.6s cubic-bezier(0.42, 0, 0.3, 1.11);
|
||||
}
|
||||
|
||||
.comment-barrage-item.hovered {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.comment-barrage-item .comment-barrage-close {
|
||||
color: var(--heo-secondtext);
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.comment-barrage-item .comment-barrage-close:hover {
|
||||
color: var(--heo-main);
|
||||
}
|
||||
|
||||
.comment-barrage-item .comment-barrage-close .heofont {
|
||||
font-size: 18px !important;
|
||||
}
|
||||
|
||||
.comment-barrage-item pre {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.comment-barrage-item li {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.comment-barrage-item p img:not(.tk-owo-emotion) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.comment-barrage-item p img.tk-owo-emotion {
|
||||
width: 16px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
transform: translateY(2px);
|
||||
}
|
||||
|
||||
.comment-barrage-item blockquote {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.comment-barrage-item br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.comment-barrage-item .barrageHead {
|
||||
height: 30px;
|
||||
padding: 0;
|
||||
line-height: 30px;
|
||||
font-size: 12px;
|
||||
border-bottom: var(--style-border);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.comment-barrage-item .barrageHead .barrageTitle {
|
||||
color: var(--heo-card-bg);
|
||||
margin-right: 8px;
|
||||
background: var(--heo-fontcolor);
|
||||
line-height: 1;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.comment-barrage-item .barrageHead .barrageTitle:hover {
|
||||
background: var(--heo-main);
|
||||
color: var(--heo-white);
|
||||
}
|
||||
|
||||
.comment-barrage-item .barrageAvatar {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 0;
|
||||
margin-left: auto;
|
||||
margin-right: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--heo-secondbg);
|
||||
}
|
||||
|
||||
.comment-barrage-item .barrageContent {
|
||||
font-size: 14px !important;
|
||||
font-weight: normal !important;
|
||||
height: calc(100% - 30px);
|
||||
overflow: hidden;
|
||||
width: fit-content;
|
||||
max-height: 48px;
|
||||
}
|
||||
|
||||
.comment-barrage-item .barrageContent a {
|
||||
pointer-events: none;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.comment-barrage-item .barrageContent::-webkit-scrollbar {
|
||||
height: 0;
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.comment-barrage-item .barrageContent::-webkit-scrollbar-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.comment-barrage-item p {
|
||||
margin: 8px 0;
|
||||
line-height: 1.3;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.comment-barrage-item .barrageContent h1, .comment-barrage-item .barrageContent h2, .comment-barrage-item .barrageContent h3, .comment-barrage-item .barrageContent h4 {
|
||||
font-size: 14px !important;
|
||||
font-weight: normal !important;
|
||||
margin: 8px 0 !important;
|
||||
}
|
||||
|
||||
.comment-barrage-item .barrageHead .barrageTitle.barrageBloggerTitle {
|
||||
background: var(--heo-orange)
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
var commentBarrageConfig = {
|
||||
//同时最多显示弹幕数
|
||||
maxBarrage: 1,
|
||||
//弹幕显示间隔时间ms
|
||||
barrageTime: 4000,
|
||||
//twikoo部署地址腾讯云的为环境ID
|
||||
twikooUrl: "https://twikoo.yzczi.com/",
|
||||
//token获取见上方
|
||||
accessToken: "a0b1120dcbdd45579833ceab6ec112f7",
|
||||
pageUrl: window.location.pathname,
|
||||
barrageTimer: [],
|
||||
barrageList: [],
|
||||
barrageIndex: 0,
|
||||
dom: document.querySelector('.comment-barrage'),
|
||||
}
|
||||
|
||||
var commentInterval = null;
|
||||
var hoverOnCommentBarrage = false;
|
||||
|
||||
$(".comment-barrage").hover(function () {
|
||||
hoverOnCommentBarrage = true;
|
||||
//console.log("热评悬浮");
|
||||
}, function () {
|
||||
hoverOnCommentBarrage = false;
|
||||
//console.log("停止悬浮");
|
||||
});
|
||||
|
||||
function initCommentBarrage() {
|
||||
//console.log("开始创建热评")
|
||||
|
||||
var data = JSON.stringify({
|
||||
"event": "COMMENT_GET",
|
||||
"commentBarrageConfig.accessToken": commentBarrageConfig.accessToken,
|
||||
"url": commentBarrageConfig.pageUrl
|
||||
});
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.withCredentials = true;
|
||||
xhr.addEventListener("readystatechange", function () {
|
||||
if (this.readyState === 4) {
|
||||
commentBarrageConfig.barrageList = commentLinkFilter(JSON.parse(this.responseText).data);
|
||||
commentBarrageConfig.dom.innerHTML = '';
|
||||
}
|
||||
});
|
||||
xhr.open("POST", commentBarrageConfig.twikooUrl);
|
||||
xhr.setRequestHeader("Content-Type", "application/json");
|
||||
xhr.send(data);
|
||||
|
||||
|
||||
clearInterval(commentInterval);
|
||||
commentInterval = null;
|
||||
|
||||
commentInterval = setInterval(() => {
|
||||
if (commentBarrageConfig.barrageList.length && !hoverOnCommentBarrage) {
|
||||
popCommentBarrage(commentBarrageConfig.barrageList[commentBarrageConfig.barrageIndex]);
|
||||
commentBarrageConfig.barrageIndex += 1;
|
||||
commentBarrageConfig.barrageIndex %= commentBarrageConfig.barrageList.length;
|
||||
}
|
||||
if ((commentBarrageConfig.barrageTimer.length > (commentBarrageConfig.barrageList.length > commentBarrageConfig.maxBarrage ? commentBarrageConfig.maxBarrage : commentBarrageConfig.barrageList.length)) && !hoverOnCommentBarrage) {
|
||||
removeCommentBarrage(commentBarrageConfig.barrageTimer.shift())
|
||||
}
|
||||
}, commentBarrageConfig.barrageTime)
|
||||
}
|
||||
|
||||
function commentLinkFilter(data) {
|
||||
data.sort((a, b) => {
|
||||
return a.created - b.created;
|
||||
})
|
||||
let newData = [];
|
||||
data.forEach(item => {
|
||||
newData.push(...getCommentReplies(item));
|
||||
});
|
||||
return newData;
|
||||
}
|
||||
|
||||
function getCommentReplies(item) {
|
||||
if (item.replies) {
|
||||
let replies = [item];
|
||||
item.replies.forEach(item => {
|
||||
replies.push(...getCommentReplies(item));
|
||||
})
|
||||
return replies;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
function popCommentBarrage(data) {
|
||||
let barrage = document.createElement('div');
|
||||
let width = commentBarrageConfig.dom.clientWidth;
|
||||
let height = commentBarrageConfig.dom.clientHeight;
|
||||
barrage.className = 'comment-barrage-item'
|
||||
barrage.innerHTML = `
|
||||
<div class="barrageHead">
|
||||
<a class="barrageTitle" href="#post-comment">热评</a>
|
||||
<div class="barrageNick">${data.nick}</div>
|
||||
<img class="barrageAvatar" src="https://cravatar.cn/avatar/${data.mailMd5}"/>
|
||||
<a class="comment-barrage-close" href="javascript:heo.switchCommentBarrage()"><i class="anzhiyufont anzhiyu-icon-xmark"></i></a>
|
||||
</div>
|
||||
<a class="barrageContent" href="#${data.id}">${data.comment}</a>
|
||||
`
|
||||
commentBarrageConfig.barrageTimer.push(barrage);
|
||||
commentBarrageConfig.dom.append(barrage);
|
||||
}
|
||||
|
||||
function removeCommentBarrage(barrage) {
|
||||
barrage.className = 'comment-barrage-item out';
|
||||
setTimeout(() => {
|
||||
commentBarrageConfig.dom.removeChild(barrage);
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
|
||||
// 自动隐藏
|
||||
document.addEventListener('scroll', btf.throttle(function () {
|
||||
//滚动条高度+视窗高度 = 可见区域底部高度
|
||||
var visibleBottom = window.scrollY + document.documentElement.clientHeight;
|
||||
//可见区域顶部高度
|
||||
var visibleTop = window.scrollY;
|
||||
// 获取翻页按钮容器
|
||||
var pagination = document.querySelector('.comment-barrage');
|
||||
// 获取位置监测容器,此处采用评论区
|
||||
var eventlistner = document.getElementById('post-comment');
|
||||
if (eventlistner && pagination) {
|
||||
var centerY = eventlistner.offsetTop + (eventlistner.offsetHeight / 2);
|
||||
if (document.body.clientWidth > 768) {
|
||||
if (centerY > visibleBottom) {
|
||||
pagination.style.bottom = '0';
|
||||
} else {
|
||||
pagination.style.bottom = '-200px';
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 200))
|
||||
|
||||
// 自动隐藏
|
||||
// const commentEntryCallback = (entries) => {
|
||||
// const commentBarrage = document.querySelector(".comment-barrage");
|
||||
// const postComment = document.getElementById("post-comment");
|
||||
|
||||
// entries.forEach(entry => {
|
||||
// if (postComment && commentBarrage && document.body.clientWidth > 768) {
|
||||
// commentBarrage.style.bottom = entry.isIntersecting ? "-200px" : "0";
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
|
||||
// 创建IntersectionObserver实例
|
||||
|
||||
|
||||
initCommentBarrage();
|
||||
|
||||
if (localStorage.getItem('commentBarrageSwitch') !== 'false') {
|
||||
$(".comment-barrage").show();
|
||||
$(".menu-commentBarrage-text").text("关闭热评");
|
||||
document.querySelector("#consoleCommentBarrage").classList.add("on");
|
||||
} else {
|
||||
$(".comment-barrage").hide();
|
||||
$(".menu-commentBarrage-text").text("显示热评");
|
||||
document.querySelector("#consoleCommentBarrage").classList.remove("on");
|
||||
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener('pjax:send', function () {
|
||||
clearInterval(commentInterval);
|
||||
});
|
|
@ -0,0 +1 @@
|
|||
.comment-barrage{position:fixed;bottom:0;right:20px;padding:0 0 20px 10px;z-index:100;display:flex;flex-direction:column;justify-content:end;align-items:flex-end;z-index:999;transition:.3s;-webkit-user-select:none}@media screen and (max-width:768px){.comment-barrage{display:none!important}}.comment-barrage-item{min-width:300px;max-width:300px;width:fit-content;min-height:80px;max-height:150px;margin:4px;padding:8px 14px;background:var(--heo-maskbgdeep);border-radius:8px;color:var(--heo-fontcolor);animation:barrageIn .6s cubic-bezier(.42,0,.3,1.11);transition:.3s;display:flex;flex-direction:column;border:var(--style-border);backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:blur(20px);position:fixed;box-shadow:var(--heo-shadow-border);overflow:hidden}.comment-barrage-item:hover{border:var(--style-border-hover);box-shadow:var(--heo-shadow-main)}.comment-barrage-item.out{opacity:0;animation:barrageOut .6s cubic-bezier(.42,0,.3,1.11)}.comment-barrage-item.hovered{opacity:0}.comment-barrage-item .comment-barrage-close{color:var(--heo-secondtext);cursor:pointer;line-height:1;margin:4px}.comment-barrage-item .comment-barrage-close:hover{color:var(--heo-main)}.comment-barrage-item .comment-barrage-close .heofont{font-size:18px!important}.comment-barrage-item pre{display:none}.comment-barrage-item li{display:none}.comment-barrage-item p img:not(.tk-owo-emotion){display:none}.comment-barrage-item p img.tk-owo-emotion{width:16px;padding:0;margin:0;transform:translateY(2px)}.comment-barrage-item blockquote{display:none}.comment-barrage-item br{display:none}.comment-barrage-item .barrageHead{height:30px;padding:0;line-height:30px;font-size:12px;border-bottom:var(--style-border);display:flex;justify-content:space-between;align-items:center;font-weight:700;padding-bottom:6px}.comment-barrage-item .barrageHead .barrageTitle{color:var(--heo-card-bg);margin-right:8px;background:var(--heo-fontcolor);line-height:1;padding:4px;border-radius:4px;white-space:nowrap}.comment-barrage-item .barrageHead .barrageTitle:hover{background:var(--heo-main);color:var(--heo-white)}.comment-barrage-item .barrageAvatar{width:16px;height:16px;margin:0;margin-left:auto;margin-right:8px;border-radius:50%;background:var(--heo-secondbg)}.comment-barrage-item .barrageContent{font-size:14px!important;font-weight:400!important;height:calc(100% - 30px);overflow:hidden;width:fit-content;max-height:48px}.comment-barrage-item .barrageContent a{pointer-events:none;font-size:14px!important}.comment-barrage-item .barrageContent::-webkit-scrollbar{height:0;width:4px}.comment-barrage-item .barrageContent::-webkit-scrollbar-button{display:none}.comment-barrage-item p{margin:8px 0;line-height:1.3;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;font-size:14px}.comment-barrage-item .barrageContent h1,.comment-barrage-item .barrageContent h2,.comment-barrage-item .barrageContent h3,.comment-barrage-item .barrageContent h4{font-size:14px!important;font-weight:400!important;margin:8px 0!important}.comment-barrage-item .barrageHead .barrageTitle.barrageBloggerTitle{background:var(--heo-orange)}
|
|
@ -0,0 +1,48 @@
|
|||
/* 首行缩进 */
|
||||
/* .post-content p {
|
||||
text-indent: 2em;
|
||||
} */
|
||||
|
||||
/* 代码块纯黑色背景 */
|
||||
code[class*=" language-"], pre[class*=" language-"] {
|
||||
background: #18171d;
|
||||
}
|
||||
|
||||
/* banner 字体图标大小及位置 */
|
||||
i.iconfont.icon-arrow-right.banner-righticon {
|
||||
font-size: 66px;
|
||||
}
|
||||
|
||||
span.bannerText {
|
||||
display: block;
|
||||
margin-top: 35px;
|
||||
}
|
||||
|
||||
/* 自我介绍渐变色背景 */
|
||||
#aside-content > .card-widget.card-info::before {
|
||||
background: linear-gradient(-25deg, #0084ff, #031764, #67044d);
|
||||
background-size: 400%;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
content: '';
|
||||
animation: gradient 15s ease infinite;
|
||||
}
|
||||
|
||||
/* 列表样式及缩进 */
|
||||
ul li {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#article-container ol li:not(.tab), #article-container ul li:not(.tab) {
|
||||
/* margin-left: 2em; */
|
||||
}
|
||||
|
||||
#article-container pre > code {
|
||||
background: transparent !important;
|
||||
/* 解决文章界面代码超长时溢出问题 */
|
||||
/* display: block;
|
||||
overflow: auto; */
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
code[class*=" language-"],pre[class*=" language-"]{background:#18171d}i.iconfont.icon-arrow-right.banner-righticon{font-size:66px}span.bannerText{display:block;margin-top:35px}#aside-content>.card-widget.card-info::before{background:linear-gradient(-25deg,#0084ff,#031764,#67044d);background-size:400%;position:absolute;width:100%;height:100%;left:0;top:0;content:'';animation:gradient 15s ease infinite}ul li{font-size:18px}#article-container pre>code{background:0 0!important}
|
|
@ -0,0 +1,512 @@
|
|||
@charset "utf-8";
|
||||
/*
|
||||
Last Modified time : 20220211 98:00 by https://immmmm.com
|
||||
已适配 FriendCircle 公共库和主库
|
||||
*/
|
||||
:root {
|
||||
--lmm-fontcolor: #363636;
|
||||
--lmm-background: #f7f9fe;
|
||||
--lmm-floorcolor: #a9a9b3;
|
||||
--lmm-dark-fontcolor: #a9a9b3;
|
||||
--lmm-dack-background: #252627;
|
||||
--lmm-dark-floorcolor: #454545;
|
||||
}
|
||||
|
||||
[data-theme=light] {
|
||||
--lmm-fontcolor: #363636;
|
||||
--lmm-background: #f7f9fe;
|
||||
--lmm-floorcolor: #a9a9b3;
|
||||
}
|
||||
|
||||
[data-theme=dark] {
|
||||
--lmm-fontcolor: #a9a9b3;
|
||||
--lmm-background: #252627;
|
||||
--lmm-floorcolor: #454545;
|
||||
}
|
||||
|
||||
/* 基本信息 */
|
||||
#cf-state {
|
||||
font-size: 16px;
|
||||
border-radius: 8px;
|
||||
box-shadow: none;
|
||||
max-width: 810px;
|
||||
margin: auto;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.cf-state-data {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.cf-data-friends, .cf-data-active, .cf-data-article {
|
||||
height: 60px;
|
||||
background: transparent;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 33%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cf-label {
|
||||
font-size: 16px;
|
||||
padding: 0 3%;
|
||||
align-self: center;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.cf-message {
|
||||
align-self: center;
|
||||
text-align: center;
|
||||
padding: 0 3%;
|
||||
width: 50%;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
/* 排序按钮 */
|
||||
#cf-change {
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
padding: 12px 0 4px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 更多按钮 */
|
||||
#cf-more {
|
||||
width: 40%;
|
||||
max-width: 810px;
|
||||
height: 30px;
|
||||
margin: auto;
|
||||
margin-top: 1rem;
|
||||
border-radius: 12px;
|
||||
font-weight: bolder;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
cursor: pointer;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
#cf-more:hover {
|
||||
width: 60%;
|
||||
background: var(--heo-main);
|
||||
color: var(--heo-white);
|
||||
border: var(--style-border-hover);
|
||||
box-shadow: var(--heo-shadow-main);
|
||||
}
|
||||
|
||||
#cf-more i.fas::before {
|
||||
content: "∞";
|
||||
}
|
||||
|
||||
/* 主容器 */
|
||||
#cf-container {
|
||||
width: 100%;
|
||||
max-width: 1500px;
|
||||
height: auto;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#cf-container a {
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#cf-container a:hover {
|
||||
color: var(--heo-lighttext) !important;
|
||||
border-bottom: none !important;
|
||||
background-color: var(--heo-none) !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
#cf-container .img-alt {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cf-article-avatar {
|
||||
line-height: 35px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.cf-img-avatar {
|
||||
align-self: center;
|
||||
text-align: center;
|
||||
width: 22px !important;
|
||||
height: 22px !important;
|
||||
min-width: 22px !important;
|
||||
min-height: 22px !important;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
|
||||
img.cf-img-avatar {
|
||||
margin-bottom: 0 !important;
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
.cf-article-author {
|
||||
line-height: 35px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
margin-left: 5px;
|
||||
align-self: center;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.cf-article-avatar a:hover span {
|
||||
color: var(--heo-lighttext);
|
||||
}
|
||||
|
||||
.cf-article-author:hover {
|
||||
color: var(--heo-lighttext);
|
||||
}
|
||||
|
||||
.cf-article-author .cf-img-avatar {
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
|
||||
.cf-article-floor {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0.5rem;
|
||||
font-style: italic;
|
||||
font-size: 3rem;
|
||||
line-height: 1.5rem;
|
||||
z-index: 1;
|
||||
font-weight: 400;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cf-article-title {
|
||||
font-weight: 500;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
margin-right: auto;
|
||||
display: block;
|
||||
letter-spacing: 1.5px;
|
||||
font-size: 18px;
|
||||
align-self: start;
|
||||
text-align: left;
|
||||
line-height: 1.2;
|
||||
padding: 0;
|
||||
margin-bottom: 10px;
|
||||
transition: 0.3s;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box !important;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.cf-article-time {
|
||||
font-size: 14px;
|
||||
text-align: right;
|
||||
float: right;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.cf-time-updated, .cf-time-created {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cf-time-updated i.fas, .cf-time-created i.far {
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.cf-article-time i:before {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* 底部 */
|
||||
#cf-footer {
|
||||
margin: 1rem 0;
|
||||
text-align: right;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.cf-data-lastupdated {
|
||||
font-size: 13px;
|
||||
text-align: right;
|
||||
display: block;
|
||||
color: var(--heo-secondtext);
|
||||
}
|
||||
|
||||
/* 个人文章列表层 */
|
||||
#cf-overlay, #cf-overshow {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#cf-overlay {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
background-color: rgba(255, 255, 255, 0.42);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
backdrop-filter: blur(10px);
|
||||
overflow-y: auto;
|
||||
pointer-events: all;
|
||||
transition: all 0.1s ease;
|
||||
z-index: 998;
|
||||
}
|
||||
|
||||
#cf-overshow {
|
||||
bottom: 100%;
|
||||
left: 0;
|
||||
transition: all 0.3s ease;
|
||||
z-index: 999;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
#cf-overlay.cf-show-now {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#cf-overshow.cf-show-now {
|
||||
bottom: 0;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.cf-overshow {
|
||||
text-align: center;
|
||||
border-radius: 20px;
|
||||
position: absolute;
|
||||
width: 320px;
|
||||
min-height: 170px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.093);
|
||||
background: var(--heo-theme);
|
||||
}
|
||||
|
||||
.cf-overshow-head:hover img.cf-img-avatar {
|
||||
transform: rotate(360deg);
|
||||
transition: 0.8s;
|
||||
}
|
||||
|
||||
.cf-overshow .cf-overshow-head a {
|
||||
color: var(--heo-white);
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
margin-top: -5px;
|
||||
padding: 5px 8px 5px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.cf-overshow img.cf-img-avatar {
|
||||
background: #fff;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
margin: -45px auto 0 !important;
|
||||
box-shadow: 0 12px 40px rgb(0 0 0 / 9%);
|
||||
transform: rotate(-360deg);
|
||||
transition: 0.8s;
|
||||
}
|
||||
|
||||
.cf-overshow p {
|
||||
margin: 0.3rem 5px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.cf-overshow p a.cf-article-title {
|
||||
text-decoration: none !important;
|
||||
display: block;
|
||||
text-align: justify;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
font-size: 15px;
|
||||
line-height: 1.2;
|
||||
letter-spacing: normal;
|
||||
max-height: 50px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
display: box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
color: var(--heo-fontcolor);
|
||||
}
|
||||
|
||||
.cf-overshow p span {
|
||||
z-index: 1;
|
||||
font-size: 12px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
#cf-container .cf-overshow p a:hover {
|
||||
letter-spacing: 1px;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.cf-overshow .cf-overshow-content {
|
||||
padding: 10px 15px 10px;
|
||||
border-bottom-left-radius: 20px;
|
||||
border-bottom-right-radius: 20px;
|
||||
background: var(--heo-card-bg);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 70vh;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.cf-overshow .cf-overshow-content .cf-article-title {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#cf-overshow .cf-overshow-close {
|
||||
position: sticky;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 颜色 */
|
||||
#cf-state, #cf-more {
|
||||
background: var(--heo-card-bg);
|
||||
color: var(--heo-fontcolor);
|
||||
border: var(--style-border);
|
||||
box-shadow: var(--heo-shadow-border);
|
||||
}
|
||||
|
||||
#cf-change, .cf-time-updated, .cf-time-created, .cf-article-floor {
|
||||
color: var(--heo-fontcolor);
|
||||
opacity: 0.4;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.cf-article-author, .cf-article a.cf-article-title, .cf-article:hover .cf-article-floor, .cf-article:hover .cf-time-created, .cf-article:hover .cf-time-updated {
|
||||
color: var(--heo-fontcolor);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.cf-article {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
box-shadow: var(--heo-shadow-border);
|
||||
margin: 8px 0;
|
||||
border-radius: 8px;
|
||||
font-weight: bolder;
|
||||
overflow: hidden;
|
||||
transition: all ease-out .3s;
|
||||
position: relative;
|
||||
padding: 0.8rem;
|
||||
padding-bottom: 0.4rem;
|
||||
width: calc(50% - 12px);
|
||||
background: var(--heo-card-bg);
|
||||
border: var(--style-border-always);
|
||||
}
|
||||
|
||||
.cf-article:hover {
|
||||
transition: 0.3s;
|
||||
border: var(--style-border-hover);
|
||||
box-shadow: var(--heo-shadow-main);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.cf-article {
|
||||
box-shadow: none !important;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#cf-change span:hover {
|
||||
color: var(--heo-lighttext);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#cf-change .cf-change-now {
|
||||
color: var(--heo-lighttext);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.cf-overshow p a:hover {
|
||||
color: var(--heo-lighttext) !important;
|
||||
}
|
||||
|
||||
.cf-overshow p span {
|
||||
color: var(--heo-fontcolor);
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
/* 暗色主题 */
|
||||
.dark-theme #cf-overlay, .theme-dark #cf-overlay {
|
||||
background-color: rgba(59, 61, 66, 0.42);
|
||||
}
|
||||
|
||||
.dark-theme .cf-overshow, .theme-dark .cf-overshow {
|
||||
background: #292a2d;
|
||||
}
|
||||
|
||||
.dark-theme .cf-overshow p a, .theme-dark .cf-overshow p a {
|
||||
color: var(--lmm-fontcolor);
|
||||
}
|
||||
|
||||
.dark-theme .cf-overshow .cf-overshow-content, .theme-dark .cf-overshow .cf-overshow-content {
|
||||
background: #eaeaea;
|
||||
}
|
||||
|
||||
.dark-theme #cf-state, .dark-theme #cf-more, .theme-dark #cf-state, .theme-dark #cf-more {
|
||||
background: var(--lmm-dack-background);
|
||||
color: var(--lmm-dark-fontcolor);
|
||||
}
|
||||
|
||||
.dark-theme #cf-change, .dark-theme .cf-time-updated, .dark-theme .cf-time-created, .dark-theme .cf-article-floor, .theme-dark #cf-change, .theme-dark .cf-time-updated, .theme-dark .cf-time-created, .theme-dark .cf-article-floor {
|
||||
color: var(--lmm-dark-floorcolor);
|
||||
}
|
||||
|
||||
.dark-theme .cf-article-author, .dark-theme .cf-article a.cf-article-title, .theme-dark .cf-article-author, .theme-dark .cf-article a.cf-article-title {
|
||||
color: var(--lmm-dark-fontcolor);
|
||||
}
|
||||
|
||||
.dark-theme .cf-article, .theme-dark .cf-article {
|
||||
background: var(--lmm-dack-background);
|
||||
}
|
||||
|
||||
.dark-theme .cf-article:hover .cf-article-floor, .dark-theme .cf-article:hover .cf-time-created, .dark-theme .cf-article:hover .cf-time-updated, .dark-theme .cf-overshow p span, .theme-dark .cf-article:hover .cf-article-floor, .theme-dark .cf-article:hover .cf-time-created, .theme-dark .cf-article:hover .cf-time-updated, .theme-dark .cf-overshow p span {
|
||||
color: var(--lmm-dark-fontcolor);
|
||||
}
|
||||
|
||||
/* 移动端适配 */
|
||||
@media screen and (max-width: 400px) {
|
||||
#cf-state {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.cf-article-time i {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 300px) {
|
||||
#cf-state, .cf-article-time {
|
||||
display: none;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,362 @@
|
|||
/*
|
||||
Last Modified time : 20220211 15:38 by https://immmmm.com
|
||||
已适配 FriendCircle 公共库和主库
|
||||
*/
|
||||
|
||||
//默认数据
|
||||
var fdata = {
|
||||
jsonurl: '',
|
||||
apiurl: 'https://moments.0206.ink/',
|
||||
apipublicurl: '', //默认公共库
|
||||
initnumber: 20, //首次加载文章数
|
||||
stepnumber: 20, //更多加载文章数
|
||||
article_sort: 'created', //文章排序 updated or created
|
||||
error_img: 'https://sdn.geekzu.org/avatar/57d8260dfb55501c37dde588e7c3852c'
|
||||
}
|
||||
//可通过 var fdataUser 替换默认值
|
||||
if (typeof (fdataUser) !== "undefined") {
|
||||
for (var key in fdataUser) {
|
||||
if (fdataUser[key]) {
|
||||
fdata[key] = fdataUser[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
var article_num = '', sortNow = '', UrlNow = '', friends_num = ''
|
||||
var container = document.getElementById('cf-container') || document.getElementById('fcircleContainer');
|
||||
// 获取本地 排序值、加载apiUrl,实现记忆效果
|
||||
var localSortNow = localStorage.getItem("sortNow")
|
||||
var localUrlNow = localStorage.getItem("urlNow")
|
||||
if (localSortNow && localUrlNow) {
|
||||
sortNow = localSortNow
|
||||
UrlNow = localUrlNow
|
||||
} else {
|
||||
sortNow = fdata.article_sort
|
||||
if (fdata.jsonurl) {
|
||||
UrlNow = fdata.apipublicurl + 'postjson?jsonlink=' + fdata.jsonurl + "&"
|
||||
} else if (fdata.apiurl) {
|
||||
UrlNow = fdata.apiurl + 'all?'
|
||||
} else {
|
||||
UrlNow = fdata.apipublicurl + 'all?'
|
||||
}
|
||||
console.log("当前模式:" + UrlNow)
|
||||
localStorage.setItem("urlNow", UrlNow)
|
||||
localStorage.setItem("sortNow", sortNow)
|
||||
}
|
||||
|
||||
// 打印基本信息
|
||||
function loadStatistical(sdata) {
|
||||
article_num = sdata.article_num
|
||||
friends_num = sdata.friends_num
|
||||
var messageBoard = `
|
||||
<div id="cf-state" class="cf-new-add">
|
||||
<div class="cf-state-data">
|
||||
<div class="cf-data-friends" onclick="openToShow()">
|
||||
<span class="cf-label">订阅</span>
|
||||
<span class="cf-message">${sdata.friends_num}</span>
|
||||
</div>
|
||||
<div class="cf-data-active" onclick="changeEgg()">
|
||||
<span class="cf-label">活跃</span>
|
||||
<span class="cf-message">${sdata.active_num}</span>
|
||||
</div>
|
||||
<div class="cf-data-article" onclick="clearLocal()">
|
||||
<span class="cf-label">日志</span>
|
||||
<span class="cf-message">${sdata.article_num}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="cf-change">
|
||||
<span id="cf-change-created" data-sort="created" onclick="changeSort(event)" class="${sortNow == 'created' ? 'cf-change-now' : ''}">Created</span> | <span id="cf-change-updated" data-sort="updated" onclick="changeSort(event)" class="${sortNow == 'updated' ? 'cf-change-now' : ''}" >Updated</span>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
var loadMoreBtn = `
|
||||
|
||||
`;
|
||||
if (container) {
|
||||
// container.insertAdjacentHTML('beforebegin', messageBoard);
|
||||
container.insertAdjacentHTML('afterend', loadMoreBtn);
|
||||
}
|
||||
}
|
||||
|
||||
// 打印文章内容 cf-article
|
||||
function loadArticleItem(datalist, start, end) {
|
||||
var articleItem = '';
|
||||
var articleNum = article_num;
|
||||
var endFor = end
|
||||
if (end > articleNum) {
|
||||
endFor = articleNum
|
||||
}
|
||||
if (start < articleNum) {
|
||||
for (var i = start; i < endFor; i++) {
|
||||
var item = datalist[i];
|
||||
articleItem += `
|
||||
<div class="cf-article">
|
||||
<a class="cf-article-title" href="${item.link}" target="_blank" rel="noopener nofollow" data-title="${item.title}">${item.title}</a>
|
||||
<span class="cf-article-floor">${item.floor}</span>
|
||||
<div class="cf-article-avatar no-lightbox flink-item-icon">
|
||||
<a onclick="openMeShow(event)" data-link="${item.link}" class="" target="_blank" rel="noopener nofollow" href="javascript:;"><img class="cf-img-avatar avatar" src= "${item.avatar}" alt="avatar" onerror="this.src='${fdata.error_img}'; this.onerror = null;"><span class="cf-article-author">${item.author}</span></a>
|
||||
<span class="cf-article-time">
|
||||
<span class="cf-time-created" style="${sortNow == 'created' ? '' : 'display:none'}">${item.created}</span>
|
||||
<span class="cf-time-updated" style="${sortNow == 'updated' ? '' : 'display:none'}"><i class="fas fa-history">更新于</i>${item.updated}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
container.insertAdjacentHTML('beforeend', articleItem);
|
||||
// 预载下一页文章
|
||||
fetchNextArticle()
|
||||
} else {
|
||||
// 文章加载到底
|
||||
document.getElementById('cf-more').outerHTML = `<div id="cf-more" class="cf-new-add" onclick="loadNoArticle()"><small>一切皆有尽头!</small></div>`
|
||||
}
|
||||
}
|
||||
|
||||
// 打印个人卡片 cf-overshow
|
||||
function loadFcircleShow(userinfo, articledata) {
|
||||
var showHtml = `
|
||||
<div class="cf-overshow">
|
||||
<div class="cf-overshow-head">
|
||||
<img class="cf-img-avatar avatar" src= "${userinfo.avatar}" alt="avatar" onerror="this.src='${fdata.error_img}'; this.onerror = null;">
|
||||
<a class="" target="_blank" rel="noopener nofollow" href="${userinfo.link}">${userinfo.author}</a>
|
||||
</div>
|
||||
<div class="cf-overshow-content">
|
||||
`
|
||||
for (var i = 0; i < userinfo.article_num; i++) {
|
||||
var item = articledata[i];
|
||||
showHtml += `
|
||||
<p><a class="cf-article-title" href="${item.link}" target="_blank" rel="noopener nofollow" data-title="${item.title}">${item.title}</a><span>${item.created}</span></p>
|
||||
`
|
||||
}
|
||||
showHtml += '</div></div>'
|
||||
document.getElementById('cf-overshow').insertAdjacentHTML('beforeend', showHtml);
|
||||
document.getElementById('cf-overshow').className = 'cf-show-now';
|
||||
}
|
||||
|
||||
// 预载下一页文章,存为本地数据 nextArticle
|
||||
function fetchNextArticle() {
|
||||
var start = document.getElementsByClassName('cf-article').length
|
||||
var end = start + fdata.stepnumber
|
||||
var articleNum = article_num;
|
||||
if (end > articleNum) {
|
||||
end = articleNum
|
||||
}
|
||||
if (start < articleNum) {
|
||||
UrlNow = localStorage.getItem("urlNow")
|
||||
var fetchUrl = UrlNow + "rule=" + sortNow + "&start=" + start + "&end=" + end
|
||||
//console.log(fetchUrl)
|
||||
fetch(fetchUrl)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
var nextArticle = eval(json.article_data);
|
||||
console.log("已预载" + "?rule=" + sortNow + "&start=" + start + "&end=" + end)
|
||||
localStorage.setItem("nextArticle", JSON.stringify(nextArticle))
|
||||
})
|
||||
} else if (start = articleNum) {
|
||||
document.getElementById('cf-more').outerHTML = `<div id="cf-more" class="cf-new-add" onclick="loadNoArticle()"><small>一切皆有尽头!</small></div>`
|
||||
}
|
||||
window.lazyLoadInstance.update()
|
||||
}
|
||||
|
||||
// 显示下一页文章,从本地缓存 nextArticle 中获取
|
||||
function loadNextArticle() {
|
||||
var nextArticle = JSON.parse(localStorage.getItem("nextArticle"));
|
||||
var articleItem = ""
|
||||
for (var i = 0; i < nextArticle.length; i++) {
|
||||
var item = nextArticle[i];
|
||||
articleItem += `
|
||||
<div class="cf-article">
|
||||
<a class="cf-article-title" href="${item.link}" target="_blank" rel="noopener nofollow" data-title="${item.title}">${item.title}</a>
|
||||
<span class="cf-article-floor">${item.floor}</span>
|
||||
<div class="cf-article-avatar no-lightbox flink-item-icon">
|
||||
<a onclick="openMeShow(event)" data-link="${item.link}" class="" target="_blank" rel="noopener nofollow" href="javascript:;"><img class="cf-img-avatar avatar" src= "https://bu.dusays.com/2023/03/03/6401a7902b8de.png" data-lazy-src="${item.avatar}" alt="avatar" onerror="this.src='${fdata.error_img}'; this.onerror = null;"><span class="cf-article-author">${item.author}</span></a>
|
||||
<span class="cf-article-time">
|
||||
<span class="cf-time-created" style="${sortNow == 'created' ? '' : 'display:none'}">${item.created}</span>
|
||||
<span class="cf-time-updated" style="${sortNow == 'updated' ? '' : 'display:none'}"><i class="fas fa-history">更新于</i>${item.updated}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
container.insertAdjacentHTML('beforeend', articleItem);
|
||||
|
||||
// 同时预载下一页文章
|
||||
fetchNextArticle()
|
||||
}
|
||||
|
||||
// 没有更多文章
|
||||
function loadNoArticle() {
|
||||
var articleSortData = sortNow + "ArticleData"
|
||||
localStorage.removeItem(articleSortData)
|
||||
localStorage.removeItem("statisticalData")
|
||||
//localStorage.removeItem("sortNow")
|
||||
document.getElementById('cf-more').remove()
|
||||
window.scrollTo(0, document.getElementsByClassName('cf-state').offsetTop)
|
||||
}
|
||||
|
||||
// 清空本地数据
|
||||
function clearLocal() {
|
||||
localStorage.removeItem("updatedArticleData")
|
||||
localStorage.removeItem("createdArticleData")
|
||||
localStorage.removeItem("nextArticle")
|
||||
localStorage.removeItem("statisticalData")
|
||||
localStorage.removeItem("sortNow")
|
||||
localStorage.removeItem("urlNow")
|
||||
location.reload();
|
||||
}
|
||||
|
||||
//
|
||||
function checkVersion() {
|
||||
var url = fdata.apiurl + "version"
|
||||
fetch(url)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
console.log(json)
|
||||
var nowStatus = json.status, nowVersion = json.current_version, newVersion = json.latest_version
|
||||
var versionID = document.getElementById('cf-version-up')
|
||||
if (nowStatus == 0) {
|
||||
versionID.innerHTML = "当前版本:v" + nowVersion
|
||||
} else if (nowStatus == 1) {
|
||||
versionID.innerHTML = "发现新版本:v" + nowVersion + " ↦ " + newVersion
|
||||
} else {
|
||||
versionID.innerHTML = "网络错误,检测失败!"
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 切换为公共全库
|
||||
function changeEgg() {
|
||||
//有自定义json或api执行切换
|
||||
if (fdata.jsonurl || fdata.apiurl) {
|
||||
document.querySelectorAll('.cf-new-add').forEach(el => el.remove());
|
||||
localStorage.removeItem("updatedArticleData")
|
||||
localStorage.removeItem("createdArticleData")
|
||||
localStorage.removeItem("nextArticle")
|
||||
localStorage.removeItem("statisticalData")
|
||||
container.innerHTML = ""
|
||||
UrlNow = localStorage.getItem("urlNow")
|
||||
//console.log("新"+UrlNow)
|
||||
var UrlNowPublic = fdata.apipublicurl + 'all?'
|
||||
if (UrlNow !== UrlNowPublic) { //非完整默认公开库
|
||||
changeUrl = fdata.apipublicurl + 'all?'
|
||||
} else {
|
||||
if (fdata.jsonurl) {
|
||||
changeUrl = fdata.apipublicurl + 'postjson?jsonlink=' + fdata.jsonurl + "&"
|
||||
} else if (fdata.apiurl) {
|
||||
changeUrl = fdata.apiurl + 'all?'
|
||||
}
|
||||
}
|
||||
localStorage.setItem("urlNow", changeUrl)
|
||||
FetchFriendCircle(sortNow, changeUrl)
|
||||
} else {
|
||||
clearLocal();
|
||||
}
|
||||
}
|
||||
|
||||
// 首次加载文章
|
||||
function FetchFriendCircle(sortNow, changeUrl) {
|
||||
var end = fdata.initnumber
|
||||
var fetchUrl = UrlNow + "rule=" + sortNow + "&start=0&end=" + end
|
||||
if (changeUrl) {
|
||||
fetchUrl = changeUrl + "rule=" + sortNow + "&start=0&end=" + end
|
||||
}
|
||||
//console.log(fetchUrl)
|
||||
fetch(fetchUrl)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
var statisticalData = json.statistical_data;
|
||||
var articleData = eval(json.article_data);
|
||||
var articleSortData = sortNow + "ArticleData";
|
||||
loadStatistical(statisticalData);
|
||||
loadArticleItem(articleData, 0, end)
|
||||
localStorage.setItem("statisticalData", JSON.stringify(statisticalData))
|
||||
localStorage.setItem(articleSortData, JSON.stringify(articleData))
|
||||
})
|
||||
}
|
||||
|
||||
// 点击切换排序
|
||||
function changeSort(event) {
|
||||
sortNow = event.currentTarget.dataset.sort
|
||||
localStorage.setItem("sortNow", sortNow)
|
||||
document.querySelectorAll('.cf-new-add').forEach(el => el.remove());
|
||||
container.innerHTML = "";
|
||||
changeUrl = localStorage.getItem("urlNow")
|
||||
//console.log(changeUrl)
|
||||
initFriendCircle(sortNow, changeUrl)
|
||||
if (fdata.apiurl) {
|
||||
checkVersion()
|
||||
}
|
||||
}
|
||||
|
||||
//查询个人文章列表
|
||||
function openMeShow(event) {
|
||||
event.preventDefault()
|
||||
var parse_url = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/;
|
||||
var meLink = event.currentTarget.dataset.link.replace(parse_url, '$1:$2$3')
|
||||
console.log(meLink)
|
||||
var fetchUrl = ''
|
||||
if (fdata.apiurl) {
|
||||
fetchUrl = fdata.apiurl + "post?link=" + meLink
|
||||
} else {
|
||||
fetchUrl = fdata.apipublicurl + "post?link=" + meLink
|
||||
}
|
||||
//console.log(fetchUrl)
|
||||
if (noClick == 'ok') {
|
||||
noClick = 'no'
|
||||
fetchShow(fetchUrl)
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭 show
|
||||
function closeShow() {
|
||||
document.getElementById('cf-overlay').className -= 'cf-show-now';
|
||||
document.getElementById('cf-overshow').className -= 'cf-show-now';
|
||||
document.getElementById('cf-overshow').innerHTML = '';
|
||||
}
|
||||
|
||||
// 点击开往
|
||||
var noClick = 'ok';
|
||||
|
||||
function openToShow() {
|
||||
var fetchUrl = ''
|
||||
if (fdata.apiurl) {
|
||||
fetchUrl = fdata.apiurl + "post"
|
||||
} else {
|
||||
fetchUrl = fdata.apipublicurl + "post"
|
||||
}
|
||||
//console.log(fetchUrl)
|
||||
if (noClick == 'ok') {
|
||||
noClick = 'no'
|
||||
fetchShow(fetchUrl)
|
||||
}
|
||||
}
|
||||
|
||||
// 展示个人文章列表
|
||||
function fetchShow(url) {
|
||||
var closeHtml = `
|
||||
<div class="cf-overshow-close" onclick="closeShow()"></div>
|
||||
`
|
||||
document.getElementById('cf-overlay').className = 'cf-show-now';
|
||||
document.getElementById('cf-overshow').insertAdjacentHTML('afterbegin', closeHtml);
|
||||
console.log("开往" + url)
|
||||
fetch(url)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
//console.log(json)
|
||||
noClick = 'ok'
|
||||
var statisticalData = json.statistical_data;
|
||||
var articleData = eval(json.article_data);
|
||||
loadFcircleShow(statisticalData, articleData)
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化方法
|
||||
function initFriendCircle(sortNow, changeUrl) {
|
||||
var articleSortData = sortNow + "ArticleData";
|
||||
var localStatisticalData = JSON.parse(localStorage.getItem("statisticalData"));
|
||||
var localArticleData = JSON.parse(localStorage.getItem(articleSortData));
|
||||
container.innerHTML = "";
|
||||
FetchFriendCircle(sortNow, changeUrl);
|
||||
}
|
||||
|
||||
// 执行初始化
|
||||
initFriendCircle(sortNow);
|
|
@ -0,0 +1,7 @@
|
|||
/* PrismJS 1.29.0
|
||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+abap+abnf+actionscript+ada+agda+al+antlr4+apacheconf+apex+apl+applescript+aql+arduino+arff+armasm+arturo+asciidoc+aspnet+asm6502+asmatmel+autohotkey+autoit+avisynth+avro-idl+awk+bash+basic+batch+bbcode+bbj+bicep+birb+bison+bnf+bqn+brainfuck+brightscript+bro+bsl+c+csharp+cpp+cfscript+chaiscript+cil+cilkc+cilkcpp+clojure+cmake+cobol+coffeescript+concurnas+csp+cooklang+coq+crystal+css-extras+csv+cue+cypher+d+dart+dataweave+dax+dhall+diff+django+dns-zone-file+docker+dot+ebnf+editorconfig+eiffel+ejs+elixir+elm+etlua+erb+erlang+excel-formula+fsharp+factor+false+firestore-security-rules+flow+fortran+ftl+gml+gap+gcode+gdscript+gedcom+gettext+gherkin+git+glsl+gn+linker-script+go+go-module+gradle+graphql+groovy+haml+handlebars+haskell+haxe+hcl+hlsl+hoon+http+hpkp+hsts+ichigojam+icon+icu-message-format+idris+ignore+inform7+ini+io+j+java+javadoc+javadoclike+javastacktrace+jexl+jolie+jq+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+js-templates+julia+keepalived+keyman+kotlin+kumir+kusto+latex+latte+less+lilypond+liquid+lisp+livescript+llvm+log+lolcode+lua+magma+makefile+markdown+markup-templating+mata+matlab+maxscript+mel+mermaid+metafont+mizar+mongodb+monkey+moonscript+n1ql+n4js+nand2tetris-hdl+naniscript+nasm+neon+nevod+nginx+nim+nix+nsis+objectivec+ocaml+odin+opencl+openqasm+oz+parigp+parser+pascal+pascaligo+psl+pcaxis+peoplecode+perl+php+phpdoc+php-extras+plant-uml+plsql+powerquery+powershell+processing+prolog+promql+properties+protobuf+pug+puppet+pure+purebasic+purescript+python+qsharp+q+qml+qore+r+racket+cshtml+jsx+tsx+reason+regex+rego+renpy+rescript+rest+rip+roboconf+robotframework+ruby+rust+sas+sass+scss+scala+scheme+shell-session+smali+smalltalk+smarty+sml+solidity+solution-file+soy+sparql+splunk-spl+sqf+sql+squirrel+stan+stata+iecst+stylus+supercollider+swift+systemd+t4-templating+t4-cs+t4-vb+tap+tcl+tt2+textile+toml+tremor+turtle+twig+typescript+typoscript+unrealscript+uorazor+uri+v+vala+vbnet+velocity+verilog+vhdl+vim+visual-basic+warpscript+wasm+web-idl+wgsl+wiki+wolfram+wren+xeora+xml-doc+xojo+xquery+yaml+yang+zig&plugins=line-numbers+custom-class+show-language+highlight-keywords+previewers+toolbar+match-braces */
|
||||
code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}
|
||||
pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}
|
||||
div.code-toolbar{position:relative}div.code-toolbar>.toolbar{position:absolute;z-index:10;top:.3em;right:.2em;transition:opacity .3s ease-in-out;opacity:0}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar:focus-within>.toolbar{opacity:1}div.code-toolbar>.toolbar>.toolbar-item{display:inline-block}div.code-toolbar>.toolbar>.toolbar-item>a{cursor:pointer}div.code-toolbar>.toolbar>.toolbar-item>button{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar>.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar>.toolbar-item>span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,.2);box-shadow:0 2px 0 0 rgba(0,0,0,.2);border-radius:.5em}div.code-toolbar>.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar>.toolbar-item>span:focus,div.code-toolbar>.toolbar>.toolbar-item>span:hover{color:inherit;text-decoration:none}
|
||||
.prism-previewer,.prism-previewer:after,.prism-previewer:before{position:absolute;pointer-events:none}.prism-previewer,.prism-previewer:after{left:50%}.prism-previewer{margin-top:-48px;width:32px;height:32px;margin-left:-16px;z-index:10;opacity:0;-webkit-transition:opacity .25s;-o-transition:opacity .25s;transition:opacity .25s}.prism-previewer.flipped{margin-top:0;margin-bottom:-48px}.prism-previewer:after,.prism-previewer:before{content:'';position:absolute;pointer-events:none}.prism-previewer:before{top:-5px;right:-5px;left:-5px;bottom:-5px;border-radius:10px;border:5px solid #fff;box-shadow:0 0 3px rgba(0,0,0,.5) inset,0 0 10px rgba(0,0,0,.75)}.prism-previewer:after{top:100%;width:0;height:0;margin:5px 0 0 -7px;border:7px solid transparent;border-color:rgba(255,0,0,0);border-top-color:#fff}.prism-previewer.flipped:after{top:auto;bottom:100%;margin-top:0;margin-bottom:5px;border-top-color:rgba(255,0,0,0);border-bottom-color:#fff}.prism-previewer.active{opacity:1}.prism-previewer-angle:before{border-radius:50%;background:#fff}.prism-previewer-angle:after{margin-top:4px}.prism-previewer-angle svg{width:32px;height:32px;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.prism-previewer-angle[data-negative] svg{-webkit-transform:scaleX(-1) rotate(-90deg);-moz-transform:scaleX(-1) rotate(-90deg);-ms-transform:scaleX(-1) rotate(-90deg);-o-transform:scaleX(-1) rotate(-90deg);transform:scaleX(-1) rotate(-90deg)}.prism-previewer-angle circle{fill:transparent;stroke:#2d3438;stroke-opacity:.9;stroke-width:32;stroke-dasharray:0,500}.prism-previewer-gradient{background-image:linear-gradient(45deg,#bbb 25%,transparent 25%,transparent 75%,#bbb 75%,#bbb),linear-gradient(45deg,#bbb 25%,#eee 25%,#eee 75%,#bbb 75%,#bbb);background-size:10px 10px;background-position:0 0,5px 5px;width:64px;margin-left:-32px}.prism-previewer-gradient:before{content:none}.prism-previewer-gradient div{position:absolute;top:-5px;left:-5px;right:-5px;bottom:-5px;border-radius:10px;border:5px solid #fff;box-shadow:0 0 3px rgba(0,0,0,.5) inset,0 0 10px rgba(0,0,0,.75)}.prism-previewer-color{background-image:linear-gradient(45deg,#bbb 25%,transparent 25%,transparent 75%,#bbb 75%,#bbb),linear-gradient(45deg,#bbb 25%,#eee 25%,#eee 75%,#bbb 75%,#bbb);background-size:10px 10px;background-position:0 0,5px 5px}.prism-previewer-color:before{background-color:inherit;background-clip:padding-box}.prism-previewer-easing{margin-top:-76px;margin-left:-30px;width:60px;height:60px;background:#333}.prism-previewer-easing.flipped{margin-bottom:-116px}.prism-previewer-easing svg{width:60px;height:60px}.prism-previewer-easing circle{fill:#2d3438;stroke:#fff}.prism-previewer-easing path{fill:none;stroke:#fff;stroke-linecap:round;stroke-width:4}.prism-previewer-easing line{stroke:#fff;stroke-opacity:.5;stroke-width:2}@-webkit-keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}@-o-keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}@-moz-keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}@keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}.prism-previewer-time:before{border-radius:50%;background:#fff}.prism-previewer-time:after{margin-top:4px}.prism-previewer-time svg{width:32px;height:32px;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.prism-previewer-time circle{fill:transparent;stroke:#2d3438;stroke-opacity:.9;stroke-width:32;stroke-dasharray:0,500;stroke-dashoffset:0;-webkit-animation:prism-previewer-time linear infinite 3s;-moz-animation:prism-previewer-time linear infinite 3s;-o-animation:prism-previewer-time linear infinite 3s;animation:prism-previewer-time linear infinite 3s}
|
||||
.token.punctuation.brace-hover,.token.punctuation.brace-selected{outline:solid 1px}.rainbow-braces .token.punctuation.brace-level-1,.rainbow-braces .token.punctuation.brace-level-5,.rainbow-braces .token.punctuation.brace-level-9{color:#e50;opacity:1}.rainbow-braces .token.punctuation.brace-level-10,.rainbow-braces .token.punctuation.brace-level-2,.rainbow-braces .token.punctuation.brace-level-6{color:#0b3;opacity:1}.rainbow-braces .token.punctuation.brace-level-11,.rainbow-braces .token.punctuation.brace-level-3,.rainbow-braces .token.punctuation.brace-level-7{color:#26f;opacity:1}.rainbow-braces .token.punctuation.brace-level-12,.rainbow-braces .token.punctuation.brace-level-4,.rainbow-braces .token.punctuation.brace-level-8{color:#e0e;opacity:1}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,161 @@
|
|||
/**
|
||||
* a11y-dark theme for JavaScript, CSS, and HTML
|
||||
* Based on the okaidia theme: https://github.com/PrismJS/prism/blob/gh-pages/themes/prism-okaidia.css
|
||||
* @author ericwbailey
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #f8f8f2;
|
||||
background: none;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: 0.5em 0;
|
||||
overflow: auto;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #2b2b2b;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 0.1em;
|
||||
border-radius: 0.3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #d4d0ab;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #fefefe;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #ffa07a;
|
||||
}
|
||||
|
||||
.token.boolean,
|
||||
.token.number {
|
||||
color: #00e0e0;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #abe338;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string,
|
||||
.token.variable {
|
||||
color: #00e0e0;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.function {
|
||||
color: #ffd700;
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #00e0e0;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important {
|
||||
color: #ffd700;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
@media screen and (-ms-high-contrast: active) {
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: windowText;
|
||||
background: window;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: window;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
background: highlight;
|
||||
color: window;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.function,
|
||||
.token.keyword,
|
||||
.token.operator,
|
||||
.token.selector {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.attr-value,
|
||||
.token.comment,
|
||||
.token.doctype,
|
||||
.token.function,
|
||||
.token.keyword,
|
||||
.token.operator,
|
||||
.token.property,
|
||||
.token.string {
|
||||
color: highlight;
|
||||
}
|
||||
|
||||
.token.attr-value,
|
||||
.token.url {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
/**
|
||||
* atom-dark theme for `prism.js`
|
||||
* Based on Atom's `atom-dark` theme: https://github.com/atom/atom-dark-syntax
|
||||
* @author Joe Gibson (@gibsjose)
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #c5c8c6;
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
|
||||
font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #1d1f21;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #7C7C7C;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #c5c8c6;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.keyword,
|
||||
.token.tag {
|
||||
color: #96CBFE;
|
||||
}
|
||||
|
||||
.token.class-name {
|
||||
color: #FFFFB6;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.token.boolean,
|
||||
.token.constant {
|
||||
color: #99CC99;
|
||||
}
|
||||
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #f92672;
|
||||
}
|
||||
|
||||
.token.number {
|
||||
color: #FF73FD;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #A8FF60;
|
||||
}
|
||||
|
||||
.token.variable {
|
||||
color: #C6C5FE;
|
||||
}
|
||||
|
||||
.token.operator {
|
||||
color: #EDEDED;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
color: #FFFFB6;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.url {
|
||||
color: #96CBFE;
|
||||
}
|
||||
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #87C38A;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value {
|
||||
color: #F9EE98;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #DAD085;
|
||||
}
|
||||
|
||||
.token.regex {
|
||||
color: #E9C062;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #fd971f;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
|
@ -0,0 +1,176 @@
|
|||
/*
|
||||
|
||||
Name: Base16 Atelier Sulphurpool Light
|
||||
Author: Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool)
|
||||
|
||||
Prism template by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/prism/)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
|
||||
font-size: 14px;
|
||||
line-height: 1.375;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
background: #f5f7ff;
|
||||
color: #5e6687;
|
||||
}
|
||||
|
||||
pre > code[class*="language-"] {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #dfe2f1;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #dfe2f1;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #898ea4;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #5e6687;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.boolean,
|
||||
.token.number {
|
||||
color: #c76b29;
|
||||
}
|
||||
|
||||
.token.property {
|
||||
color: #c08b30;
|
||||
}
|
||||
|
||||
.token.tag {
|
||||
color: #3d8fd1;
|
||||
}
|
||||
|
||||
.token.string {
|
||||
color: #22a2c9;
|
||||
}
|
||||
|
||||
.token.selector {
|
||||
color: #6679cc;
|
||||
}
|
||||
|
||||
.token.attr-name {
|
||||
color: #c76b29;
|
||||
}
|
||||
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #22a2c9;
|
||||
}
|
||||
|
||||
.token.attr-value,
|
||||
.token.keyword,
|
||||
.token.control,
|
||||
.token.directive,
|
||||
.token.unit {
|
||||
color: #ac9739;
|
||||
}
|
||||
|
||||
.token.statement,
|
||||
.token.regex,
|
||||
.token.atrule {
|
||||
color: #22a2c9;
|
||||
}
|
||||
|
||||
.token.placeholder,
|
||||
.token.variable {
|
||||
color: #3d8fd1;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
border-bottom: 1px dotted #202746;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #c94922;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
pre > code.highlight {
|
||||
outline: 0.4em solid #c94922;
|
||||
outline-offset: .4em;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Numbers plugin
|
||||
* http://prismjs.com/plugins/line-numbers/
|
||||
*/
|
||||
.line-numbers .line-numbers-rows {
|
||||
border-right-color: #dfe2f1;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
color: #979db4;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Highlight plugin
|
||||
* http://prismjs.com/plugins/line-highlight/
|
||||
*/
|
||||
.line-highlight {
|
||||
background: rgba(107, 115, 148, 0.2);
|
||||
background: -webkit-linear-gradient(left, rgba(107, 115, 148, 0.2) 70%, rgba(107, 115, 148, 0));
|
||||
background: linear-gradient(to right, rgba(107, 115, 148, 0.2) 70%, rgba(107, 115, 148, 0));
|
||||
}
|
|
@ -0,0 +1,176 @@
|
|||
/*
|
||||
* Based on Plugin: Syntax Highlighter CB
|
||||
* Plugin URI: http://wp.tutsplus.com/tutorials/plugins/adding-a-syntax-highlighter-shortcode-using-prism-js
|
||||
* Description: Highlight your code snippets with an easy to use shortcode based on Lea Verou's Prism.js.
|
||||
* Version: 1.0.0
|
||||
* Author: c.bavota
|
||||
* Author URI: http://bavotasan.comhttp://wp.tutsplus.com/tutorials/plugins/adding-a-syntax-highlighter-shortcode-using-prism-js/ */
|
||||
/* http://cbavota.bitbucket.org/syntax-highlighter/ */
|
||||
|
||||
/* ===== ===== */
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #fff;
|
||||
text-shadow: 0 1px 1px #000;
|
||||
font-family: Menlo, Monaco, "Courier New", monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
word-spacing: normal;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: 1.4;
|
||||
background: none;
|
||||
border: 0;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"] code {
|
||||
float: left;
|
||||
padding: 0 15px 0 0;
|
||||
}
|
||||
|
||||
pre[class*="language-"],
|
||||
:not(pre) > code[class*="language-"] {
|
||||
background: #222;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 15px;
|
||||
margin: 1em 0;
|
||||
overflow: auto;
|
||||
-moz-border-radius: 8px;
|
||||
-webkit-border-radius: 8px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 5px 10px;
|
||||
line-height: 1;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #797979;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.operator,
|
||||
.token.punctuation {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.boolean {
|
||||
color: #ffd893;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.hex,
|
||||
.token.string {
|
||||
color: #B0C975;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.token.attr-name,
|
||||
.token.keyword {
|
||||
color: #c27628;
|
||||
}
|
||||
|
||||
.token.regex {
|
||||
color: #9B71C6;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.constant {
|
||||
color: #e5a638;
|
||||
}
|
||||
|
||||
.token.variable {
|
||||
color: #fdfba8;
|
||||
}
|
||||
|
||||
.token.number {
|
||||
color: #8799B0;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.deliminator {
|
||||
color: #E45734;
|
||||
}
|
||||
|
||||
/* Line highlight plugin */
|
||||
pre[data-line] {
|
||||
position: relative;
|
||||
padding: 1em 0 1em 3em;
|
||||
}
|
||||
|
||||
.line-highlight {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin-top: 1em; /* Same as .prism's padding-top */
|
||||
background: rgba(255, 255, 255, .2);
|
||||
pointer-events: none;
|
||||
line-height: inherit;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.line-highlight:before,
|
||||
.line-highlight[data-end]:after {
|
||||
content: attr(data-start);
|
||||
position: absolute;
|
||||
top: .3em;
|
||||
left: .6em;
|
||||
min-width: 1em;
|
||||
padding: 0 .5em;
|
||||
background-color: rgba(255, 255, 255, .3);
|
||||
color: #fff;
|
||||
font: bold 65%/1.5 sans-serif;
|
||||
text-align: center;
|
||||
-moz-border-radius: 8px;
|
||||
-webkit-border-radius: 8px;
|
||||
border-radius: 8px;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.line-highlight[data-end]:after {
|
||||
content: attr(data-end);
|
||||
top: auto;
|
||||
bottom: .4em;
|
||||
}
|
||||
|
||||
/* for line numbers */
|
||||
.line-numbers-rows {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.line-numbers-rows span {
|
||||
padding-right: 10px;
|
||||
border-right: 3px #d9d336 solid;
|
||||
}
|
|
@ -0,0 +1,317 @@
|
|||
/**
|
||||
* Coldark Theme for Prism.js
|
||||
* Theme variation: Cold
|
||||
* Tested with HTML, CSS, JS, JSON, PHP, YAML, Bash script
|
||||
* @author Armand Philippot <contact@armandphilippot.com>
|
||||
* @homepage https://github.com/ArmandPhilippot/coldark-prism
|
||||
* @license MIT
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #111b27;
|
||||
background: none;
|
||||
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
background: #8da1b9;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
background: #8da1b9;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: 0.5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #e3eaf2;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 0.1em 0.3em;
|
||||
border-radius: 0.3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #3c526d;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #111b27;
|
||||
}
|
||||
|
||||
.token.delimiter.important,
|
||||
.token.selector .parent,
|
||||
.token.tag,
|
||||
.token.tag .token.punctuation {
|
||||
color: #006d6d;
|
||||
}
|
||||
|
||||
.token.attr-name,
|
||||
.token.boolean,
|
||||
.token.boolean.important,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.selector .token.attribute {
|
||||
color: #755f00;
|
||||
}
|
||||
|
||||
.token.class-name,
|
||||
.token.key,
|
||||
.token.parameter,
|
||||
.token.property,
|
||||
.token.property-access,
|
||||
.token.variable {
|
||||
color: #005a8e;
|
||||
}
|
||||
|
||||
.token.attr-value,
|
||||
.token.inserted,
|
||||
.token.color,
|
||||
.token.selector .token.value,
|
||||
.token.string,
|
||||
.token.string .token.url-link {
|
||||
color: #116b00;
|
||||
}
|
||||
|
||||
.token.builtin,
|
||||
.token.keyword-array,
|
||||
.token.package,
|
||||
.token.regex {
|
||||
color: #af00af;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.selector .token.class,
|
||||
.token.selector .token.id {
|
||||
color: #7c00aa;
|
||||
}
|
||||
|
||||
.token.atrule .token.rule,
|
||||
.token.combinator,
|
||||
.token.keyword,
|
||||
.token.operator,
|
||||
.token.pseudo-class,
|
||||
.token.pseudo-element,
|
||||
.token.selector,
|
||||
.token.unit {
|
||||
color: #a04900;
|
||||
}
|
||||
|
||||
.token.deleted,
|
||||
.token.important {
|
||||
color: #c22f2e;
|
||||
}
|
||||
|
||||
.token.keyword-this,
|
||||
.token.this {
|
||||
color: #005a8e;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.keyword-this,
|
||||
.token.this,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.delimiter.important {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.language-markdown .token.title,
|
||||
.language-markdown .token.title .token.punctuation {
|
||||
color: #005a8e;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.language-markdown .token.blockquote.punctuation {
|
||||
color: #af00af;
|
||||
}
|
||||
|
||||
.language-markdown .token.code {
|
||||
color: #006d6d;
|
||||
}
|
||||
|
||||
.language-markdown .token.hr.punctuation {
|
||||
color: #005a8e;
|
||||
}
|
||||
|
||||
.language-markdown .token.url > .token.content {
|
||||
color: #116b00;
|
||||
}
|
||||
|
||||
.language-markdown .token.url-link {
|
||||
color: #755f00;
|
||||
}
|
||||
|
||||
.language-markdown .token.list.punctuation {
|
||||
color: #af00af;
|
||||
}
|
||||
|
||||
.language-markdown .token.table-header {
|
||||
color: #111b27;
|
||||
}
|
||||
|
||||
.language-json .token.operator {
|
||||
color: #111b27;
|
||||
}
|
||||
|
||||
.language-scss .token.variable {
|
||||
color: #006d6d;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Show Invisibles plugin
|
||||
* https://prismjs.com/plugins/show-invisibles/
|
||||
*/
|
||||
.token.tab:not(:empty):before,
|
||||
.token.cr:before,
|
||||
.token.lf:before,
|
||||
.token.space:before {
|
||||
color: #3c526d;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Toolbar plugin
|
||||
* https://prismjs.com/plugins/toolbar/
|
||||
*/
|
||||
div.code-toolbar > .toolbar a,
|
||||
div.code-toolbar > .toolbar button {
|
||||
color: #e3eaf2;
|
||||
background: #005a8e;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar a:hover,
|
||||
div.code-toolbar > .toolbar a:focus,
|
||||
div.code-toolbar > .toolbar button:hover,
|
||||
div.code-toolbar > .toolbar button:focus {
|
||||
color: #e3eaf2;
|
||||
background: #005a8eda;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar span,
|
||||
div.code-toolbar > .toolbar span:hover,
|
||||
div.code-toolbar > .toolbar span:focus {
|
||||
color: #e3eaf2;
|
||||
background: #3c526d;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Highlight plugin
|
||||
* http://prismjs.com/plugins/line-highlight/
|
||||
*/
|
||||
.line-highlight {
|
||||
background: #8da1b92f;
|
||||
background: linear-gradient(to right, #8da1b92f 70%, #8da1b925);
|
||||
}
|
||||
|
||||
.line-highlight:before,
|
||||
.line-highlight[data-end]:after {
|
||||
background-color: #3c526d;
|
||||
color: #e3eaf2;
|
||||
box-shadow: 0 1px #8da1b9;
|
||||
}
|
||||
|
||||
pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before {
|
||||
background-color: #3c526d1f;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Numbers plugin
|
||||
* http://prismjs.com/plugins/line-numbers/
|
||||
*/
|
||||
.line-numbers .line-numbers-rows {
|
||||
border-right: 1px solid #8da1b97a;
|
||||
background: #d0dae77a;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
color: #3c526dda;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Match Braces plugin
|
||||
* https://prismjs.com/plugins/match-braces/
|
||||
*/
|
||||
.rainbow-braces .token.punctuation.brace-level-1,
|
||||
.rainbow-braces .token.punctuation.brace-level-5,
|
||||
.rainbow-braces .token.punctuation.brace-level-9 {
|
||||
color: #755f00;
|
||||
}
|
||||
|
||||
.rainbow-braces .token.punctuation.brace-level-2,
|
||||
.rainbow-braces .token.punctuation.brace-level-6,
|
||||
.rainbow-braces .token.punctuation.brace-level-10 {
|
||||
color: #af00af;
|
||||
}
|
||||
|
||||
.rainbow-braces .token.punctuation.brace-level-3,
|
||||
.rainbow-braces .token.punctuation.brace-level-7,
|
||||
.rainbow-braces .token.punctuation.brace-level-11 {
|
||||
color: #005a8e;
|
||||
}
|
||||
|
||||
.rainbow-braces .token.punctuation.brace-level-4,
|
||||
.rainbow-braces .token.punctuation.brace-level-8,
|
||||
.rainbow-braces .token.punctuation.brace-level-12 {
|
||||
color: #7c00aa;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Diff Highlight plugin
|
||||
* https://prismjs.com/plugins/diff-highlight/
|
||||
*/
|
||||
pre.diff-highlight > code .token.deleted:not(.prefix),
|
||||
pre > code.diff-highlight .token.deleted:not(.prefix) {
|
||||
background-color: #c22f2e1f;
|
||||
}
|
||||
|
||||
pre.diff-highlight > code .token.inserted:not(.prefix),
|
||||
pre > code.diff-highlight .token.inserted:not(.prefix) {
|
||||
background-color: #116b001f;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Command Line plugin
|
||||
* https://prismjs.com/plugins/command-line/
|
||||
*/
|
||||
.command-line-prompt {
|
||||
border-right: 1px solid #8da1b97a;
|
||||
}
|
||||
|
||||
.command-line-prompt > span:before {
|
||||
color: #3c526dda;
|
||||
}
|
|
@ -0,0 +1,317 @@
|
|||
/**
|
||||
* Coldark Theme for Prism.js
|
||||
* Theme variation: Dark
|
||||
* Tested with HTML, CSS, JS, JSON, PHP, YAML, Bash script
|
||||
* @author Armand Philippot <contact@armandphilippot.com>
|
||||
* @homepage https://github.com/ArmandPhilippot/coldark-prism
|
||||
* @license MIT
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #e3eaf2;
|
||||
background: none;
|
||||
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
background: #3c526d;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
background: #3c526d;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: 0.5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #111b27;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 0.1em 0.3em;
|
||||
border-radius: 0.3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #8da1b9;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #e3eaf2;
|
||||
}
|
||||
|
||||
.token.delimiter.important,
|
||||
.token.selector .parent,
|
||||
.token.tag,
|
||||
.token.tag .token.punctuation {
|
||||
color: #66cccc;
|
||||
}
|
||||
|
||||
.token.attr-name,
|
||||
.token.boolean,
|
||||
.token.boolean.important,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.selector .token.attribute {
|
||||
color: #e6d37a;
|
||||
}
|
||||
|
||||
.token.class-name,
|
||||
.token.key,
|
||||
.token.parameter,
|
||||
.token.property,
|
||||
.token.property-access,
|
||||
.token.variable {
|
||||
color: #6cb8e6;
|
||||
}
|
||||
|
||||
.token.attr-value,
|
||||
.token.inserted,
|
||||
.token.color,
|
||||
.token.selector .token.value,
|
||||
.token.string,
|
||||
.token.string .token.url-link {
|
||||
color: #91d076;
|
||||
}
|
||||
|
||||
.token.builtin,
|
||||
.token.keyword-array,
|
||||
.token.package,
|
||||
.token.regex {
|
||||
color: #f4adf4;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.selector .token.class,
|
||||
.token.selector .token.id {
|
||||
color: #c699e3;
|
||||
}
|
||||
|
||||
.token.atrule .token.rule,
|
||||
.token.combinator,
|
||||
.token.keyword,
|
||||
.token.operator,
|
||||
.token.pseudo-class,
|
||||
.token.pseudo-element,
|
||||
.token.selector,
|
||||
.token.unit {
|
||||
color: #e9ae7e;
|
||||
}
|
||||
|
||||
.token.deleted,
|
||||
.token.important {
|
||||
color: #cd6660;
|
||||
}
|
||||
|
||||
.token.keyword-this,
|
||||
.token.this {
|
||||
color: #6cb8e6;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.keyword-this,
|
||||
.token.this,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.delimiter.important {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.language-markdown .token.title,
|
||||
.language-markdown .token.title .token.punctuation {
|
||||
color: #6cb8e6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.language-markdown .token.blockquote.punctuation {
|
||||
color: #f4adf4;
|
||||
}
|
||||
|
||||
.language-markdown .token.code {
|
||||
color: #66cccc;
|
||||
}
|
||||
|
||||
.language-markdown .token.hr.punctuation {
|
||||
color: #6cb8e6;
|
||||
}
|
||||
|
||||
.language-markdown .token.url .token.content {
|
||||
color: #91d076;
|
||||
}
|
||||
|
||||
.language-markdown .token.url-link {
|
||||
color: #e6d37a;
|
||||
}
|
||||
|
||||
.language-markdown .token.list.punctuation {
|
||||
color: #f4adf4;
|
||||
}
|
||||
|
||||
.language-markdown .token.table-header {
|
||||
color: #e3eaf2;
|
||||
}
|
||||
|
||||
.language-json .token.operator {
|
||||
color: #e3eaf2;
|
||||
}
|
||||
|
||||
.language-scss .token.variable {
|
||||
color: #66cccc;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Show Invisibles plugin
|
||||
* https://prismjs.com/plugins/show-invisibles/
|
||||
*/
|
||||
.token.tab:not(:empty):before,
|
||||
.token.cr:before,
|
||||
.token.lf:before,
|
||||
.token.space:before {
|
||||
color: #8da1b9;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Toolbar plugin
|
||||
* https://prismjs.com/plugins/toolbar/
|
||||
*/
|
||||
div.code-toolbar > .toolbar a,
|
||||
div.code-toolbar > .toolbar button {
|
||||
color: #111b27;
|
||||
background: #6cb8e6;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar a:hover,
|
||||
div.code-toolbar > .toolbar a:focus,
|
||||
div.code-toolbar > .toolbar button:hover,
|
||||
div.code-toolbar > .toolbar button:focus {
|
||||
color: #111b27;
|
||||
background: #6cb8e6da;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar span,
|
||||
div.code-toolbar > .toolbar span:hover,
|
||||
div.code-toolbar > .toolbar span:focus {
|
||||
color: #111b27;
|
||||
background: #8da1b9;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Highlight plugin
|
||||
* http://prismjs.com/plugins/line-highlight/
|
||||
*/
|
||||
.line-highlight {
|
||||
background: #3c526d5f;
|
||||
background: linear-gradient(to right, #3c526d5f 70%, #3c526d55);
|
||||
}
|
||||
|
||||
.line-highlight:before,
|
||||
.line-highlight[data-end]:after {
|
||||
background-color: #8da1b9;
|
||||
color: #111b27;
|
||||
box-shadow: 0 1px #3c526d;
|
||||
}
|
||||
|
||||
pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before {
|
||||
background-color: #8da1b918;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Numbers plugin
|
||||
* http://prismjs.com/plugins/line-numbers/
|
||||
*/
|
||||
.line-numbers .line-numbers-rows {
|
||||
border-right: 1px solid #0b121b;
|
||||
background: #0b121b7a;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
color: #8da1b9da;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Match Braces plugin
|
||||
* https://prismjs.com/plugins/match-braces/
|
||||
*/
|
||||
.rainbow-braces .token.punctuation.brace-level-1,
|
||||
.rainbow-braces .token.punctuation.brace-level-5,
|
||||
.rainbow-braces .token.punctuation.brace-level-9 {
|
||||
color: #e6d37a;
|
||||
}
|
||||
|
||||
.rainbow-braces .token.punctuation.brace-level-2,
|
||||
.rainbow-braces .token.punctuation.brace-level-6,
|
||||
.rainbow-braces .token.punctuation.brace-level-10 {
|
||||
color: #f4adf4;
|
||||
}
|
||||
|
||||
.rainbow-braces .token.punctuation.brace-level-3,
|
||||
.rainbow-braces .token.punctuation.brace-level-7,
|
||||
.rainbow-braces .token.punctuation.brace-level-11 {
|
||||
color: #6cb8e6;
|
||||
}
|
||||
|
||||
.rainbow-braces .token.punctuation.brace-level-4,
|
||||
.rainbow-braces .token.punctuation.brace-level-8,
|
||||
.rainbow-braces .token.punctuation.brace-level-12 {
|
||||
color: #c699e3;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Diff Highlight plugin
|
||||
* https://prismjs.com/plugins/diff-highlight/
|
||||
*/
|
||||
pre.diff-highlight > code .token.deleted:not(.prefix),
|
||||
pre > code.diff-highlight .token.deleted:not(.prefix) {
|
||||
background-color: #cd66601f;
|
||||
}
|
||||
|
||||
pre.diff-highlight > code .token.inserted:not(.prefix),
|
||||
pre > code.diff-highlight .token.inserted:not(.prefix) {
|
||||
background-color: #91d0761f;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Command Line plugin
|
||||
* https://prismjs.com/plugins/command-line/
|
||||
*/
|
||||
.command-line-prompt {
|
||||
border-right: 1px solid #0b121b;
|
||||
}
|
||||
|
||||
.command-line-prompt > span:before {
|
||||
color: #8da1b9da;
|
||||
}
|
|
@ -0,0 +1,140 @@
|
|||
/**
|
||||
* Coy without shadows
|
||||
* Based on Tim Shedor's Coy theme for prism.js
|
||||
* Author: RunDevelopment
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
background: none;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
font-size: 1em;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
position: relative;
|
||||
border-left: 10px solid #358ccb;
|
||||
box-shadow: -1px 0 0 0 #358ccb, 0 0 0 1px #dfdfdf;
|
||||
background-color: #fdfdfd;
|
||||
background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
|
||||
background-size: 3em 3em;
|
||||
background-origin: content-box;
|
||||
background-attachment: local;
|
||||
margin: .5em 0;
|
||||
padding: 0 1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"] > code {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
position: relative;
|
||||
padding: .2em;
|
||||
border-radius: 0.3em;
|
||||
color: #c92c2c;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
display: inline;
|
||||
white-space: normal;
|
||||
background-color: #fdfdfd;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.block-comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #7D8B99;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #5F6364;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.function-name,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #c92c2c;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.function,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #2f9c0a;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.token.variable {
|
||||
color: #a67f59;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword,
|
||||
.token.class-name {
|
||||
color: #1990b8;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #a67f59;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.token.important {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
|
@ -0,0 +1,159 @@
|
|||
/**
|
||||
* Darcula theme
|
||||
*
|
||||
* Adapted from a theme based on:
|
||||
* IntelliJ Darcula Theme (https://github.com/bulenkov/Darcula)
|
||||
*
|
||||
* @author Alexandre Paradis <service.paradis@gmail.com>
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #a9b7c6;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
color: inherit;
|
||||
background: rgba(33, 66, 131, .85);
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
color: inherit;
|
||||
background: rgba(33, 66, 131, .85);
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #2b2b2b;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.cdata {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.token.delimiter,
|
||||
.token.boolean,
|
||||
.token.keyword,
|
||||
.token.selector,
|
||||
.token.important,
|
||||
.token.atrule {
|
||||
color: #cc7832;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.punctuation,
|
||||
.token.attr-name {
|
||||
color: #a9b7c6;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.tag .punctuation,
|
||||
.token.doctype,
|
||||
.token.builtin {
|
||||
color: #e8bf6a;
|
||||
}
|
||||
|
||||
.token.entity,
|
||||
.token.number,
|
||||
.token.symbol {
|
||||
color: #6897bb;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.constant,
|
||||
.token.variable {
|
||||
color: #9876aa;
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.char {
|
||||
color: #6a8759;
|
||||
}
|
||||
|
||||
.token.attr-value,
|
||||
.token.attr-value .punctuation {
|
||||
color: #a5c261;
|
||||
}
|
||||
|
||||
.token.attr-value .punctuation:first-child {
|
||||
color: #a9b7c6;
|
||||
}
|
||||
|
||||
.token.url {
|
||||
color: #287bde;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #ffc66d;
|
||||
}
|
||||
|
||||
.token.regex {
|
||||
background: #364135;
|
||||
}
|
||||
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
background: #294436;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
background: #484a4a;
|
||||
}
|
||||
|
||||
code.language-css .token.property,
|
||||
code.language-css .token.property + .token.punctuation {
|
||||
color: #a9b7c6;
|
||||
}
|
||||
|
||||
code.language-css .token.id {
|
||||
color: #ffc66d;
|
||||
}
|
||||
|
||||
code.language-css .token.selector > .token.class,
|
||||
code.language-css .token.selector > .token.attribute,
|
||||
code.language-css .token.selector > .token.pseudo-class,
|
||||
code.language-css .token.selector > .token.pseudo-element {
|
||||
color: #ffc66d;
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
/**
|
||||
* Dracula Theme originally by Zeno Rocha [@zenorocha]
|
||||
* https://draculatheme.com/
|
||||
*
|
||||
* Ported for PrismJS by Albert Vallverdu [@byverdu]
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #f8f8f2;
|
||||
background: none;
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #282a36;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #6272a4;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #ff79c6;
|
||||
}
|
||||
|
||||
.token.boolean,
|
||||
.token.number {
|
||||
color: #bd93f9;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #50fa7b;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string,
|
||||
.token.variable {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #f1fa8c;
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #8be9fd;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important {
|
||||
color: #ffb86c;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
|
@ -0,0 +1,172 @@
|
|||
/*
|
||||
Name: Duotone Dark
|
||||
Author: Simurai, adapted from DuoTone themes for Atom (http://simurai.com/projects/2016/01/01/duotone-themes)
|
||||
|
||||
Conversion: Bram de Haan (http://atelierbram.github.io/Base2Tone-prism/output/prism/prism-base2tone-evening-dark.css)
|
||||
Generated with Base16 Builder (https://github.com/base16-builder/base16-builder)
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
|
||||
font-size: 14px;
|
||||
line-height: 1.375;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
background: #2a2734;
|
||||
color: #9a86fd;
|
||||
}
|
||||
|
||||
pre > code[class*="language-"] {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #6a51e6;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #6a51e6;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #6c6783;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #6c6783;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.operator,
|
||||
.token.number {
|
||||
color: #e09142;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.function {
|
||||
color: #9a86fd;
|
||||
}
|
||||
|
||||
.token.tag-id,
|
||||
.token.selector,
|
||||
.token.atrule-id {
|
||||
color: #eeebff;
|
||||
}
|
||||
|
||||
code.language-javascript,
|
||||
.token.attr-name {
|
||||
color: #c4b9fe;
|
||||
}
|
||||
|
||||
code.language-css,
|
||||
code.language-scss,
|
||||
.token.boolean,
|
||||
.token.string,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.language-scss .token.string,
|
||||
.style .token.string,
|
||||
.token.attr-value,
|
||||
.token.keyword,
|
||||
.token.control,
|
||||
.token.directive,
|
||||
.token.unit,
|
||||
.token.statement,
|
||||
.token.regex,
|
||||
.token.atrule {
|
||||
color: #ffcc99;
|
||||
}
|
||||
|
||||
.token.placeholder,
|
||||
.token.variable {
|
||||
color: #ffcc99;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
border-bottom: 1px dotted #eeebff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #c4b9fe;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
pre > code.highlight {
|
||||
outline: .4em solid #8a75f5;
|
||||
outline-offset: .4em;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Numbers plugin
|
||||
* http://prismjs.com/plugins/line-numbers/
|
||||
*/
|
||||
.line-numbers .line-numbers-rows {
|
||||
border-right-color: #2c2937;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
color: #3c3949;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Highlight plugin
|
||||
* http://prismjs.com/plugins/line-highlight/
|
||||
*/
|
||||
.line-highlight {
|
||||
background: rgba(224, 145, 66, 0.2);
|
||||
background: -webkit-linear-gradient(left, rgba(224, 145, 66, 0.2) 70%, rgba(224, 145, 66, 0));
|
||||
background: linear-gradient(to right, rgba(224, 145, 66, 0.2) 70%, rgba(224, 145, 66, 0));
|
||||
}
|
|
@ -0,0 +1,172 @@
|
|||
/*
|
||||
Name: Duotone Earth
|
||||
Author: Simurai, adapted from DuoTone themes for Atom (http://simurai.com/projects/2016/01/01/duotone-themes)
|
||||
|
||||
Conversion: Bram de Haan (http://atelierbram.github.io/Base2Tone-prism/output/prism/prism-base2tone-earth-dark.css)
|
||||
Generated with Base16 Builder (https://github.com/base16-builder/base16-builder)
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
|
||||
font-size: 14px;
|
||||
line-height: 1.375;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
background: #322d29;
|
||||
color: #88786d;
|
||||
}
|
||||
|
||||
pre > code[class*="language-"] {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #6f5849;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #6f5849;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #6a5f58;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #6a5f58;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.operator,
|
||||
.token.number {
|
||||
color: #bfa05a;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.function {
|
||||
color: #88786d;
|
||||
}
|
||||
|
||||
.token.tag-id,
|
||||
.token.selector,
|
||||
.token.atrule-id {
|
||||
color: #fff3eb;
|
||||
}
|
||||
|
||||
code.language-javascript,
|
||||
.token.attr-name {
|
||||
color: #a48774;
|
||||
}
|
||||
|
||||
code.language-css,
|
||||
code.language-scss,
|
||||
.token.boolean,
|
||||
.token.string,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.language-scss .token.string,
|
||||
.style .token.string,
|
||||
.token.attr-value,
|
||||
.token.keyword,
|
||||
.token.control,
|
||||
.token.directive,
|
||||
.token.unit,
|
||||
.token.statement,
|
||||
.token.regex,
|
||||
.token.atrule {
|
||||
color: #fcc440;
|
||||
}
|
||||
|
||||
.token.placeholder,
|
||||
.token.variable {
|
||||
color: #fcc440;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
border-bottom: 1px dotted #fff3eb;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #a48774;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
pre > code.highlight {
|
||||
outline: .4em solid #816d5f;
|
||||
outline-offset: .4em;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Numbers plugin
|
||||
* http://prismjs.com/plugins/line-numbers/
|
||||
*/
|
||||
.line-numbers .line-numbers-rows {
|
||||
border-right-color: #35302b;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
color: #46403d;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Highlight plugin
|
||||
* http://prismjs.com/plugins/line-highlight/
|
||||
*/
|
||||
.line-highlight {
|
||||
background: rgba(191, 160, 90, 0.2);
|
||||
background: -webkit-linear-gradient(left, rgba(191, 160, 90, 0.2) 70%, rgba(191, 160, 90, 0));
|
||||
background: linear-gradient(to right, rgba(191, 160, 90, 0.2) 70%, rgba(191, 160, 90, 0));
|
||||
}
|
|
@ -0,0 +1,172 @@
|
|||
/*
|
||||
Name: Duotone Forest
|
||||
Author: by Simurai, adapted from DuoTone themes for Atom (http://simurai.com/projects/2016/01/01/duotone-themes)
|
||||
|
||||
Conversion: Bram de Haan (http://atelierbram.github.io/Base2Tone-prism/output/prism/prism-base2tone-forest-dark.css)
|
||||
Generated with Base16 Builder (https://github.com/base16-builder/base16-builder)
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
|
||||
font-size: 14px;
|
||||
line-height: 1.375;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
background: #2a2d2a;
|
||||
color: #687d68;
|
||||
}
|
||||
|
||||
pre > code[class*="language-"] {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #435643;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #435643;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #535f53;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #535f53;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.operator,
|
||||
.token.number {
|
||||
color: #a2b34d;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.function {
|
||||
color: #687d68;
|
||||
}
|
||||
|
||||
.token.tag-id,
|
||||
.token.selector,
|
||||
.token.atrule-id {
|
||||
color: #f0fff0;
|
||||
}
|
||||
|
||||
code.language-javascript,
|
||||
.token.attr-name {
|
||||
color: #b3d6b3;
|
||||
}
|
||||
|
||||
code.language-css,
|
||||
code.language-scss,
|
||||
.token.boolean,
|
||||
.token.string,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.language-scss .token.string,
|
||||
.style .token.string,
|
||||
.token.attr-value,
|
||||
.token.keyword,
|
||||
.token.control,
|
||||
.token.directive,
|
||||
.token.unit,
|
||||
.token.statement,
|
||||
.token.regex,
|
||||
.token.atrule {
|
||||
color: #e5fb79;
|
||||
}
|
||||
|
||||
.token.placeholder,
|
||||
.token.variable {
|
||||
color: #e5fb79;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
border-bottom: 1px dotted #f0fff0;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #b3d6b3;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
pre > code.highlight {
|
||||
outline: .4em solid #5c705c;
|
||||
outline-offset: .4em;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Numbers plugin
|
||||
* http://prismjs.com/plugins/line-numbers/
|
||||
*/
|
||||
.line-numbers .line-numbers-rows {
|
||||
border-right-color: #2c302c;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
color: #3b423b;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Highlight plugin
|
||||
* http://prismjs.com/plugins/line-highlight/
|
||||
*/
|
||||
.line-highlight {
|
||||
background: rgba(162, 179, 77, 0.2);
|
||||
background: -webkit-linear-gradient(left, rgba(162, 179, 77, 0.2) 70%, rgba(162, 179, 77, 0));
|
||||
background: linear-gradient(to right, rgba(162, 179, 77, 0.2) 70%, rgba(162, 179, 77, 0));
|
||||
}
|
|
@ -0,0 +1,172 @@
|
|||
/*
|
||||
Name: Duotone Light
|
||||
Author: Simurai, adapted from DuoTone themes for Atom (http://simurai.com/projects/2016/01/01/duotone-themes)
|
||||
|
||||
Conversion: Bram de Haan (http://atelierbram.github.io/Base2Tone-prism/output/prism/prism-base2tone-morning-light.css)
|
||||
Generated with Base16 Builder (https://github.com/base16-builder/base16-builder)
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
|
||||
font-size: 14px;
|
||||
line-height: 1.375;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
background: #faf8f5;
|
||||
color: #728fcb;
|
||||
}
|
||||
|
||||
pre > code[class*="language-"] {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #faf8f5;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #faf8f5;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #b6ad9a;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #b6ad9a;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.operator,
|
||||
.token.number {
|
||||
color: #063289;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.function {
|
||||
color: #b29762;
|
||||
}
|
||||
|
||||
.token.tag-id,
|
||||
.token.selector,
|
||||
.token.atrule-id {
|
||||
color: #2d2006;
|
||||
}
|
||||
|
||||
code.language-javascript,
|
||||
.token.attr-name {
|
||||
color: #896724;
|
||||
}
|
||||
|
||||
code.language-css,
|
||||
code.language-scss,
|
||||
.token.boolean,
|
||||
.token.string,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.language-scss .token.string,
|
||||
.style .token.string,
|
||||
.token.attr-value,
|
||||
.token.keyword,
|
||||
.token.control,
|
||||
.token.directive,
|
||||
.token.unit,
|
||||
.token.statement,
|
||||
.token.regex,
|
||||
.token.atrule {
|
||||
color: #728fcb;
|
||||
}
|
||||
|
||||
.token.placeholder,
|
||||
.token.variable {
|
||||
color: #93abdc;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
border-bottom: 1px dotted #2d2006;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #896724;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
pre > code.highlight {
|
||||
outline: .4em solid #896724;
|
||||
outline-offset: .4em;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Numbers plugin
|
||||
* http://prismjs.com/plugins/line-numbers/
|
||||
*/
|
||||
.line-numbers .line-numbers-rows {
|
||||
border-right-color: #ece8de;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
color: #cdc4b1;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Highlight plugin
|
||||
* http://prismjs.com/plugins/line-highlight/
|
||||
*/
|
||||
.line-highlight {
|
||||
background: rgba(45, 32, 6, 0.2);
|
||||
background: -webkit-linear-gradient(left, rgba(45, 32, 6, 0.2) 70%, rgba(45, 32, 6, 0));
|
||||
background: linear-gradient(to right, rgba(45, 32, 6, 0.2) 70%, rgba(45, 32, 6, 0));
|
||||
}
|
|
@ -0,0 +1,172 @@
|
|||
/*
|
||||
Name: Duotone Sea
|
||||
Author: by Simurai, adapted from DuoTone themes by Simurai for Atom (http://simurai.com/projects/2016/01/01/duotone-themes)
|
||||
|
||||
Conversion: Bram de Haan (http://atelierbram.github.io/Base2Tone-prism/output/prism/prism-base2tone-sea-dark.css)
|
||||
Generated with Base16 Builder (https://github.com/base16-builder/base16-builder)
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
|
||||
font-size: 14px;
|
||||
line-height: 1.375;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
background: #1d262f;
|
||||
color: #57718e;
|
||||
}
|
||||
|
||||
pre > code[class*="language-"] {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #004a9e;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #004a9e;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #4a5f78;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #4a5f78;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.operator,
|
||||
.token.number {
|
||||
color: #0aa370;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.function {
|
||||
color: #57718e;
|
||||
}
|
||||
|
||||
.token.tag-id,
|
||||
.token.selector,
|
||||
.token.atrule-id {
|
||||
color: #ebf4ff;
|
||||
}
|
||||
|
||||
code.language-javascript,
|
||||
.token.attr-name {
|
||||
color: #7eb6f6;
|
||||
}
|
||||
|
||||
code.language-css,
|
||||
code.language-scss,
|
||||
.token.boolean,
|
||||
.token.string,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.language-scss .token.string,
|
||||
.style .token.string,
|
||||
.token.attr-value,
|
||||
.token.keyword,
|
||||
.token.control,
|
||||
.token.directive,
|
||||
.token.unit,
|
||||
.token.statement,
|
||||
.token.regex,
|
||||
.token.atrule {
|
||||
color: #47ebb4;
|
||||
}
|
||||
|
||||
.token.placeholder,
|
||||
.token.variable {
|
||||
color: #47ebb4;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
border-bottom: 1px dotted #ebf4ff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #7eb6f6;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
pre > code.highlight {
|
||||
outline: .4em solid #34659d;
|
||||
outline-offset: .4em;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Numbers plugin
|
||||
* http://prismjs.com/plugins/line-numbers/
|
||||
*/
|
||||
.line-numbers .line-numbers-rows {
|
||||
border-right-color: #1f2932;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
color: #2c3847;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Highlight plugin
|
||||
* http://prismjs.com/plugins/line-highlight/
|
||||
*/
|
||||
.line-highlight {
|
||||
background: rgba(10, 163, 112, 0.2);
|
||||
background: -webkit-linear-gradient(left, rgba(10, 163, 112, 0.2) 70%, rgba(10, 163, 112, 0));
|
||||
background: linear-gradient(to right, rgba(10, 163, 112, 0.2) 70%, rgba(10, 163, 112, 0));
|
||||
}
|
|
@ -0,0 +1,172 @@
|
|||
/*
|
||||
Name: Duotone Space
|
||||
Author: Simurai, adapted from DuoTone themes for Atom (http://simurai.com/projects/2016/01/01/duotone-themes)
|
||||
|
||||
Conversion: Bram de Haan (http://atelierbram.github.io/Base2Tone-prism/output/prism/prism-base2tone-space-dark.css)
|
||||
Generated with Base16 Builder (https://github.com/base16-builder/base16-builder)
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
|
||||
font-size: 14px;
|
||||
line-height: 1.375;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
background: #24242e;
|
||||
color: #767693;
|
||||
}
|
||||
|
||||
pre > code[class*="language-"] {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #5151e6;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #5151e6;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #5b5b76;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #5b5b76;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.operator,
|
||||
.token.number {
|
||||
color: #dd672c;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.function {
|
||||
color: #767693;
|
||||
}
|
||||
|
||||
.token.tag-id,
|
||||
.token.selector,
|
||||
.token.atrule-id {
|
||||
color: #ebebff;
|
||||
}
|
||||
|
||||
code.language-javascript,
|
||||
.token.attr-name {
|
||||
color: #aaaaca;
|
||||
}
|
||||
|
||||
code.language-css,
|
||||
code.language-scss,
|
||||
.token.boolean,
|
||||
.token.string,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.language-scss .token.string,
|
||||
.style .token.string,
|
||||
.token.attr-value,
|
||||
.token.keyword,
|
||||
.token.control,
|
||||
.token.directive,
|
||||
.token.unit,
|
||||
.token.statement,
|
||||
.token.regex,
|
||||
.token.atrule {
|
||||
color: #fe8c52;
|
||||
}
|
||||
|
||||
.token.placeholder,
|
||||
.token.variable {
|
||||
color: #fe8c52;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
border-bottom: 1px dotted #ebebff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #aaaaca;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
pre > code.highlight {
|
||||
outline: .4em solid #7676f4;
|
||||
outline-offset: .4em;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Numbers plugin
|
||||
* http://prismjs.com/plugins/line-numbers/
|
||||
*/
|
||||
.line-numbers .line-numbers-rows {
|
||||
border-right-color: #262631;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
color: #393949;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Highlight plugin
|
||||
* http://prismjs.com/plugins/line-highlight/
|
||||
*/
|
||||
.line-highlight {
|
||||
background: rgba(221, 103, 44, 0.2);
|
||||
background: -webkit-linear-gradient(left, rgba(221, 103, 44, 0.2) 70%, rgba(221, 103, 44, 0));
|
||||
background: linear-gradient(to right, rgba(221, 103, 44, 0.2) 70%, rgba(221, 103, 44, 0));
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
/**
|
||||
* GHColors theme by Avi Aryan (http://aviaryan.in)
|
||||
* Inspired by Github syntax coloring
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #393A34;
|
||||
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
font-size: .9em;
|
||||
line-height: 1.2em;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre > code[class*="language-"] {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
border: 1px solid #dddddd;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .2em;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
background: #f8f8f8;
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #999988;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.attr-value {
|
||||
color: #e3116c;
|
||||
}
|
||||
|
||||
.token.punctuation,
|
||||
.token.operator {
|
||||
color: #393A34; /* no highlight */
|
||||
}
|
||||
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.token.symbol,
|
||||
.token.number,
|
||||
.token.boolean,
|
||||
.token.variable,
|
||||
.token.constant,
|
||||
.token.property,
|
||||
.token.regex,
|
||||
.token.inserted {
|
||||
color: #36acaa;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.keyword,
|
||||
.token.attr-name,
|
||||
.language-autohotkey .token.selector {
|
||||
color: #00a4db;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.deleted,
|
||||
.language-autohotkey .token.tag {
|
||||
color: #9a050f;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.selector,
|
||||
.language-autohotkey .token.keyword {
|
||||
color: #00009f;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.function,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
/**
|
||||
* Gruvbox dark theme
|
||||
*
|
||||
* Adapted from a theme based on:
|
||||
* Vim Gruvbox dark Theme (https://github.com/morhetz/gruvbox)
|
||||
*
|
||||
* @author Azat S. <to@azat.io>
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #ebdbb2; /* fg1 / fg */
|
||||
font-family: Consolas, Monaco, "Andale Mono", monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
color: #fbf1c7; /* fg0 */
|
||||
background: #7c6f64; /* bg4 */
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
color: #fbf1c7; /* fg0 */
|
||||
background: #7c6f64; /* bg4 */
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: 0.5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #1d2021; /* bg0_h */
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 0.1em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.cdata {
|
||||
color: #a89984; /* fg4 / gray1 */
|
||||
}
|
||||
|
||||
.token.delimiter,
|
||||
.token.boolean,
|
||||
.token.keyword,
|
||||
.token.selector,
|
||||
.token.important,
|
||||
.token.atrule {
|
||||
color: #fb4934; /* red2 */
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.punctuation,
|
||||
.token.attr-name {
|
||||
color: #a89984; /* fg4 / gray1 */
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.tag .punctuation,
|
||||
.token.doctype,
|
||||
.token.builtin {
|
||||
color: #fabd2f; /* yellow2 */
|
||||
}
|
||||
|
||||
.token.entity,
|
||||
.token.number,
|
||||
.token.symbol {
|
||||
color: #d3869b; /* purple2 */
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.constant,
|
||||
.token.variable {
|
||||
color: #fb4934; /* red2 */
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.char {
|
||||
color: #b8bb26; /* green2 */
|
||||
}
|
||||
|
||||
.token.attr-value,
|
||||
.token.attr-value .punctuation {
|
||||
color: #a89984; /* fg4 / gray1 */
|
||||
}
|
||||
|
||||
.token.url {
|
||||
color: #b8bb26; /* green2 */
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #fabd2f; /* yellow2 */
|
||||
}
|
||||
|
||||
.token.regex {
|
||||
background: #b8bb26; /* green2 */
|
||||
}
|
||||
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
background: #a89984; /* fg4 / gray1 */
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
background: #fb4934; /* red2 */
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
/**
|
||||
* Gruvbox light theme
|
||||
*
|
||||
* Based on Gruvbox: https://github.com/morhetz/gruvbox
|
||||
* Adapted from PrismJS gruvbox-dark theme: https://github.com/schnerring/prism-themes/blob/master/themes/prism-gruvbox-dark.css
|
||||
*
|
||||
* @author Michael Schnerring (https://schnerring.net)
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #3c3836; /* fg1 / fg */
|
||||
font-family: Consolas, Monaco, "Andale Mono", monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
color: #282828; /* fg0 */
|
||||
background: #a89984; /* bg4 */
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
color: #282828; /* fg0 */
|
||||
background: #a89984; /* bg4 */
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: 0.5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f9f5d7; /* bg0_h */
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 0.1em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.cdata {
|
||||
color: #7c6f64; /* fg4 / gray1 */
|
||||
}
|
||||
|
||||
.token.delimiter,
|
||||
.token.boolean,
|
||||
.token.keyword,
|
||||
.token.selector,
|
||||
.token.important,
|
||||
.token.atrule {
|
||||
color: #9d0006; /* red2 */
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.punctuation,
|
||||
.token.attr-name {
|
||||
color: #7c6f64; /* fg4 / gray1 */
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.tag .punctuation,
|
||||
.token.doctype,
|
||||
.token.builtin {
|
||||
color: #b57614; /* yellow2 */
|
||||
}
|
||||
|
||||
.token.entity,
|
||||
.token.number,
|
||||
.token.symbol {
|
||||
color: #8f3f71; /* purple2 */
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.constant,
|
||||
.token.variable {
|
||||
color: #9d0006; /* red2 */
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.char {
|
||||
color: #797403; /* green2 */
|
||||
}
|
||||
|
||||
.token.attr-value,
|
||||
.token.attr-value .punctuation {
|
||||
color: #7c6f64; /* fg4 / gray1 */
|
||||
}
|
||||
|
||||
.token.url {
|
||||
color: #797403; /* green2 */
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #b57614; /* yellow2 */
|
||||
}
|
||||
|
||||
.token.regex {
|
||||
background: #797403; /* green2 */
|
||||
}
|
||||
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
background: #7c6f64; /* fg4 / gray1 */
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
background: #9d0006; /* red2 */
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
/**
|
||||
* MIT License
|
||||
* Copyright (c) 2021 Ayush Saini
|
||||
* Holi Theme for prism.js
|
||||
* @author Ayush Saini <@AyushCodes on Twitter>
|
||||
*/
|
||||
|
||||
code[class*='language-'],
|
||||
pre[class*='language-'] {
|
||||
color: #d6e7ff;
|
||||
background: #030314;
|
||||
text-shadow: none;
|
||||
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
|
||||
font-size: 1em;
|
||||
line-height: 1.5;
|
||||
letter-spacing: .2px;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
text-align: left;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*='language-']::-moz-selection,
|
||||
pre[class*='language-'] ::-moz-selection,
|
||||
code[class*='language-']::-moz-selection,
|
||||
code[class*='language-'] ::-moz-selection,
|
||||
pre[class*='language-']::selection,
|
||||
pre[class*='language-'] ::selection,
|
||||
code[class*='language-']::selection,
|
||||
code[class*='language-'] ::selection {
|
||||
color: inherit;
|
||||
background: #1d3b54;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
pre[class*='language-'] {
|
||||
border: 1px solid #2a4555;
|
||||
border-radius: 5px;
|
||||
padding: 1.5em 1em;
|
||||
margin: 1em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*='language-'] {
|
||||
color: #f0f6f6;
|
||||
background: #2a4555;
|
||||
padding: 0.2em 0.3em;
|
||||
border-radius: 0.2em;
|
||||
box-decoration-break: clone;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #446e69;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #d6b007;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #d6e7ff;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #e60067;
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.char {
|
||||
color: #49c6ec;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #ec8e01;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #0fe468;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #78f3e9;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #d6e7ff;
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
@import url(https://fonts.googleapis.com/css?family=Fira+Mono);
|
||||
|
||||
/*
|
||||
* Hopscotch
|
||||
* by Jan T. Sott
|
||||
* https://github.com/idleberg/Hopscotch
|
||||
*
|
||||
* This work is licensed under the Creative Commons CC0 1.0 Universal License
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
font-family: "Fira Mono", Menlo, Monaco, "Lucida Console", "Courier New", Courier, monospace;
|
||||
font-size: 16px;
|
||||
line-height: 1.375;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
word-spacing: normal;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
background: #322931;
|
||||
color: #b9b5b8;
|
||||
}
|
||||
|
||||
pre > code[class*="language-"] {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #797379;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #b9b5b8;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.null,
|
||||
.token.operator,
|
||||
.token.boolean,
|
||||
.token.number {
|
||||
color: #fd8b19;
|
||||
}
|
||||
|
||||
.token.property {
|
||||
color: #fdcc59;
|
||||
}
|
||||
|
||||
.token.tag {
|
||||
color: #1290bf;
|
||||
}
|
||||
|
||||
.token.string {
|
||||
color: #149b93;
|
||||
}
|
||||
|
||||
.token.selector {
|
||||
color: #c85e7c;
|
||||
}
|
||||
|
||||
.token.attr-name {
|
||||
color: #fd8b19;
|
||||
}
|
||||
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #149b93;
|
||||
}
|
||||
|
||||
.token.attr-value,
|
||||
.token.keyword,
|
||||
.token.control,
|
||||
.token.directive,
|
||||
.token.unit {
|
||||
color: #8fc13e;
|
||||
}
|
||||
|
||||
.token.statement,
|
||||
.token.regex,
|
||||
.token.atrule {
|
||||
color: #149b93;
|
||||
}
|
||||
|
||||
.token.placeholder,
|
||||
.token.variable {
|
||||
color: #1290bf;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #dd464c;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
pre > code.highlight {
|
||||
outline: .4em solid red;
|
||||
outline-offset: .4em;
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
/**
|
||||
* Lucario Theme originally by Raphael Amorim [@raphamorim]
|
||||
* https://github.com/raphamorim/lucario
|
||||
*
|
||||
* Ported for PrismJS by Christopher Kapic [@christopher-kapic]
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #f8f8f2;
|
||||
background: none;
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
|
||||
font-family: Monaco, Consolas, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #263E52;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #5c98cd;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #F05E5D;
|
||||
}
|
||||
|
||||
.token.boolean,
|
||||
.token.number {
|
||||
color: #BC94F9;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #FCFCD6;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string,
|
||||
.token.variable {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #66D8EF;
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #6EB26E;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important {
|
||||
color: #F05E5D;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
|
@ -0,0 +1,205 @@
|
|||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
color: #eee;
|
||||
background: #2f2f2f;
|
||||
font-family: Roboto Mono, monospace;
|
||||
font-size: 1em;
|
||||
line-height: 1.5em;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
code[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection {
|
||||
background: #363636;
|
||||
}
|
||||
|
||||
code[class*="language-"]::selection,
|
||||
pre[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection,
|
||||
pre[class*="language-"] ::selection {
|
||||
background: #363636;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"] {
|
||||
white-space: normal;
|
||||
border-radius: 0.2em;
|
||||
padding: 0.1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"] {
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
margin: 0.5em 0;
|
||||
padding: 1.25em 1em;
|
||||
}
|
||||
|
||||
.language-css > code,
|
||||
.language-sass > code,
|
||||
.language-scss > code {
|
||||
color: #fd9170;
|
||||
}
|
||||
|
||||
[class*="language-"] .namespace {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.token.atrule {
|
||||
color: #c792ea;
|
||||
}
|
||||
|
||||
.token.attr-name {
|
||||
color: #ffcb6b;
|
||||
}
|
||||
|
||||
.token.attr-value {
|
||||
color: #a5e844;
|
||||
}
|
||||
|
||||
.token.attribute {
|
||||
color: #a5e844;
|
||||
}
|
||||
|
||||
.token.boolean {
|
||||
color: #c792ea;
|
||||
}
|
||||
|
||||
.token.builtin {
|
||||
color: #ffcb6b;
|
||||
}
|
||||
|
||||
.token.cdata {
|
||||
color: #80cbc4;
|
||||
}
|
||||
|
||||
.token.char {
|
||||
color: #80cbc4;
|
||||
}
|
||||
|
||||
.token.class {
|
||||
color: #ffcb6b;
|
||||
}
|
||||
|
||||
.token.class-name {
|
||||
color: #f2ff00;
|
||||
}
|
||||
|
||||
.token.comment {
|
||||
color: #616161;
|
||||
}
|
||||
|
||||
.token.constant {
|
||||
color: #c792ea;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
color: #ff6666;
|
||||
}
|
||||
|
||||
.token.doctype {
|
||||
color: #616161;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
color: #ff6666;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #c792ea;
|
||||
}
|
||||
|
||||
.token.hexcode {
|
||||
color: #f2ff00;
|
||||
}
|
||||
|
||||
.token.id {
|
||||
color: #c792ea;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #c792ea;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
color: #80cbc4;
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #c792ea;
|
||||
}
|
||||
|
||||
.token.number {
|
||||
color: #fd9170;
|
||||
}
|
||||
|
||||
.token.operator {
|
||||
color: #89ddff;
|
||||
}
|
||||
|
||||
.token.prolog {
|
||||
color: #616161;
|
||||
}
|
||||
|
||||
.token.property {
|
||||
color: #80cbc4;
|
||||
}
|
||||
|
||||
.token.pseudo-class {
|
||||
color: #a5e844;
|
||||
}
|
||||
|
||||
.token.pseudo-element {
|
||||
color: #a5e844;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #89ddff;
|
||||
}
|
||||
|
||||
.token.regex {
|
||||
color: #f2ff00;
|
||||
}
|
||||
|
||||
.token.selector {
|
||||
color: #ff6666;
|
||||
}
|
||||
|
||||
.token.string {
|
||||
color: #a5e844;
|
||||
}
|
||||
|
||||
.token.symbol {
|
||||
color: #c792ea;
|
||||
}
|
||||
|
||||
.token.tag {
|
||||
color: #ff6666;
|
||||
}
|
||||
|
||||
.token.unit {
|
||||
color: #fd9170;
|
||||
}
|
||||
|
||||
.token.url {
|
||||
color: #ff6666;
|
||||
}
|
||||
|
||||
.token.variable {
|
||||
color: #ff6666;
|
||||
}
|
|
@ -0,0 +1,207 @@
|
|||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
color: #90a4ae;
|
||||
background: #fafafa;
|
||||
font-family: Roboto Mono, monospace;
|
||||
font-size: 1em;
|
||||
line-height: 1.5em;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
code[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection {
|
||||
background: #cceae7;
|
||||
color: #263238;
|
||||
}
|
||||
|
||||
code[class*="language-"]::selection,
|
||||
pre[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection,
|
||||
pre[class*="language-"] ::selection {
|
||||
background: #cceae7;
|
||||
color: #263238;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"] {
|
||||
white-space: normal;
|
||||
border-radius: 0.2em;
|
||||
padding: 0.1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"] {
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
margin: 0.5em 0;
|
||||
padding: 1.25em 1em;
|
||||
}
|
||||
|
||||
.language-css > code,
|
||||
.language-sass > code,
|
||||
.language-scss > code {
|
||||
color: #f76d47;
|
||||
}
|
||||
|
||||
[class*="language-"] .namespace {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.token.atrule {
|
||||
color: #7c4dff;
|
||||
}
|
||||
|
||||
.token.attr-name {
|
||||
color: #39adb5;
|
||||
}
|
||||
|
||||
.token.attr-value {
|
||||
color: #f6a434;
|
||||
}
|
||||
|
||||
.token.attribute {
|
||||
color: #f6a434;
|
||||
}
|
||||
|
||||
.token.boolean {
|
||||
color: #7c4dff;
|
||||
}
|
||||
|
||||
.token.builtin {
|
||||
color: #39adb5;
|
||||
}
|
||||
|
||||
.token.cdata {
|
||||
color: #39adb5;
|
||||
}
|
||||
|
||||
.token.char {
|
||||
color: #39adb5;
|
||||
}
|
||||
|
||||
.token.class {
|
||||
color: #39adb5;
|
||||
}
|
||||
|
||||
.token.class-name {
|
||||
color: #6182b8;
|
||||
}
|
||||
|
||||
.token.comment {
|
||||
color: #aabfc9;
|
||||
}
|
||||
|
||||
.token.constant {
|
||||
color: #7c4dff;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
color: #e53935;
|
||||
}
|
||||
|
||||
.token.doctype {
|
||||
color: #aabfc9;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
color: #e53935;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #7c4dff;
|
||||
}
|
||||
|
||||
.token.hexcode {
|
||||
color: #f76d47;
|
||||
}
|
||||
|
||||
.token.id {
|
||||
color: #7c4dff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #7c4dff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
color: #39adb5;
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #7c4dff;
|
||||
}
|
||||
|
||||
.token.number {
|
||||
color: #f76d47;
|
||||
}
|
||||
|
||||
.token.operator {
|
||||
color: #39adb5;
|
||||
}
|
||||
|
||||
.token.prolog {
|
||||
color: #aabfc9;
|
||||
}
|
||||
|
||||
.token.property {
|
||||
color: #39adb5;
|
||||
}
|
||||
|
||||
.token.pseudo-class {
|
||||
color: #f6a434;
|
||||
}
|
||||
|
||||
.token.pseudo-element {
|
||||
color: #f6a434;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #39adb5;
|
||||
}
|
||||
|
||||
.token.regex {
|
||||
color: #6182b8;
|
||||
}
|
||||
|
||||
.token.selector {
|
||||
color: #e53935;
|
||||
}
|
||||
|
||||
.token.string {
|
||||
color: #f6a434;
|
||||
}
|
||||
|
||||
.token.symbol {
|
||||
color: #7c4dff;
|
||||
}
|
||||
|
||||
.token.tag {
|
||||
color: #e53935;
|
||||
}
|
||||
|
||||
.token.unit {
|
||||
color: #f76d47;
|
||||
}
|
||||
|
||||
.token.url {
|
||||
color: #e53935;
|
||||
}
|
||||
|
||||
.token.variable {
|
||||
color: #e53935;
|
||||
}
|
|
@ -0,0 +1,210 @@
|
|||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
color: #c3cee3;
|
||||
background: #263238;
|
||||
font-family: Roboto Mono, monospace;
|
||||
font-size: 1em;
|
||||
line-height: 1.5em;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
code[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection {
|
||||
background: #363636;
|
||||
}
|
||||
|
||||
code[class*="language-"]::selection,
|
||||
pre[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection,
|
||||
pre[class*="language-"] ::selection {
|
||||
background: #363636;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"] {
|
||||
white-space: normal;
|
||||
border-radius: 0.2em;
|
||||
padding: 0.1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"] {
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
margin: 0.5em 0;
|
||||
padding: 1.25em 1em;
|
||||
}
|
||||
|
||||
.language-css > code,
|
||||
.language-sass > code,
|
||||
.language-scss > code {
|
||||
color: #fd9170;
|
||||
}
|
||||
|
||||
[class*="language-"] .namespace {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.token.atrule {
|
||||
color: #c792ea;
|
||||
}
|
||||
|
||||
.token.attr-name {
|
||||
color: #ffcb6b;
|
||||
}
|
||||
|
||||
.token.attr-value {
|
||||
color: #c3e88d;
|
||||
}
|
||||
|
||||
.token.attribute {
|
||||
color: #c3e88d;
|
||||
}
|
||||
|
||||
.token.boolean {
|
||||
color: #c792ea;
|
||||
}
|
||||
|
||||
.token.builtin {
|
||||
color: #ffcb6b;
|
||||
}
|
||||
|
||||
.token.cdata {
|
||||
color: #80cbc4;
|
||||
}
|
||||
|
||||
.token.char {
|
||||
color: #80cbc4;
|
||||
}
|
||||
|
||||
.token.class {
|
||||
color: #ffcb6b;
|
||||
}
|
||||
|
||||
.token.class-name {
|
||||
color: #f2ff00;
|
||||
}
|
||||
|
||||
.token.color {
|
||||
color: #f2ff00;
|
||||
}
|
||||
|
||||
.token.comment {
|
||||
color: #546e7a;
|
||||
}
|
||||
|
||||
.token.constant {
|
||||
color: #c792ea;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
color: #f07178;
|
||||
}
|
||||
|
||||
.token.doctype {
|
||||
color: #546e7a;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
color: #f07178;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #c792ea;
|
||||
}
|
||||
|
||||
.token.hexcode {
|
||||
color: #f2ff00;
|
||||
}
|
||||
|
||||
.token.id {
|
||||
color: #c792ea;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #c792ea;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
color: #80cbc4;
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #c792ea;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.number {
|
||||
color: #fd9170;
|
||||
}
|
||||
|
||||
.token.operator {
|
||||
color: #89ddff;
|
||||
}
|
||||
|
||||
.token.prolog {
|
||||
color: #546e7a;
|
||||
}
|
||||
|
||||
.token.property {
|
||||
color: #80cbc4;
|
||||
}
|
||||
|
||||
.token.pseudo-class {
|
||||
color: #c3e88d;
|
||||
}
|
||||
|
||||
.token.pseudo-element {
|
||||
color: #c3e88d;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #89ddff;
|
||||
}
|
||||
|
||||
.token.regex {
|
||||
color: #f2ff00;
|
||||
}
|
||||
|
||||
.token.selector {
|
||||
color: #f07178;
|
||||
}
|
||||
|
||||
.token.string {
|
||||
color: #c3e88d;
|
||||
}
|
||||
|
||||
.token.symbol {
|
||||
color: #c792ea;
|
||||
}
|
||||
|
||||
.token.tag {
|
||||
color: #f07178;
|
||||
}
|
||||
|
||||
.token.unit {
|
||||
color: #f07178;
|
||||
}
|
||||
|
||||
.token.url {
|
||||
color: #fd9170;
|
||||
}
|
||||
|
||||
.token.variable {
|
||||
color: #f07178;
|
||||
}
|
|
@ -0,0 +1,158 @@
|
|||
/**
|
||||
* MIT License
|
||||
* Copyright (c) 2018 Sarah Drasner
|
||||
* Sarah Drasner's[@sdras] Night Owl
|
||||
* Ported by Sara vieria [@SaraVieira]
|
||||
* Added by Souvik Mandal [@SimpleIndian]
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #d6deeb;
|
||||
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
font-size: 1em;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: rgba(29, 59, 83, 0.99);
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: rgba(29, 59, 83, 0.99);
|
||||
}
|
||||
|
||||
@media print {
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: 0.5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: white;
|
||||
background: #011627;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 0.1em;
|
||||
border-radius: 0.3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.cdata {
|
||||
color: rgb(99, 119, 119);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: rgb(199, 146, 234);
|
||||
}
|
||||
|
||||
.namespace {
|
||||
color: rgb(178, 204, 214);
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
color: rgba(239, 83, 80, 0.56);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.symbol,
|
||||
.token.property {
|
||||
color: rgb(128, 203, 196);
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.operator,
|
||||
.token.keyword {
|
||||
color: rgb(127, 219, 202);
|
||||
}
|
||||
|
||||
.token.boolean {
|
||||
color: rgb(255, 88, 116);
|
||||
}
|
||||
|
||||
.token.number {
|
||||
color: rgb(247, 140, 108);
|
||||
}
|
||||
|
||||
.token.constant,
|
||||
.token.function,
|
||||
.token.builtin,
|
||||
.token.char {
|
||||
color: rgb(130, 170, 255);
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.doctype {
|
||||
color: rgb(199, 146, 234);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.attr-name,
|
||||
.token.inserted {
|
||||
color: rgb(173, 219, 103);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.url,
|
||||
.token.entity,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: rgb(173, 219, 103);
|
||||
}
|
||||
|
||||
.token.class-name,
|
||||
.token.atrule,
|
||||
.token.attr-value {
|
||||
color: rgb(255, 203, 139);
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: rgb(214, 222, 235);
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
|
@ -0,0 +1,124 @@
|
|||
/**
|
||||
* Nord Theme Originally by Arctic Ice Studio
|
||||
* https://nordtheme.com
|
||||
*
|
||||
* Ported for PrismJS by Zane Hitchcoxc (@zwhitchcox) and Gabriel Ramos (@gabrieluizramos)
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #f8f8f2;
|
||||
background: none;
|
||||
font-family: "Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #2E3440;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #636f88;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.token.number {
|
||||
color: #B48EAD;
|
||||
}
|
||||
|
||||
.token.boolean {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #A3BE8C;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string,
|
||||
.token.variable {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important {
|
||||
color: #EBCB8B;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
|
@ -0,0 +1,252 @@
|
|||
/**
|
||||
* One Dark theme for prism.js
|
||||
* Based on Atom's One Dark theme: https://github.com/atom/atom/tree/master/packages/one-dark-syntax
|
||||
*/
|
||||
|
||||
/**
|
||||
* One Dark colours in terms of RGB (accurate as of commit 8ae45ca on 6 Sep 2018)
|
||||
* @mono-1: #abb2bf
|
||||
* @mono-2: #828997
|
||||
* @mono-3: #5c6370
|
||||
* @hue-1: #56b6c2 <- cyan
|
||||
* @hue-2: #61afef <- blue
|
||||
* @hue-3: #c678dd <- purple
|
||||
* @hue-4: #98c379 <- green
|
||||
* @hue-5: #e06c75 <- red 1
|
||||
* @hue-5-2: #be5046 <- red 2
|
||||
* @hue-6: #d19a66 <- yellow 1
|
||||
* @hue-6-2: #e5c07b <- yellow 2
|
||||
* @syntax-fg: #abb2bf
|
||||
* @syntax-bg: #282c34
|
||||
* @syntax-gutter: #636d83
|
||||
* @syntax-guide: #abb2bf26
|
||||
* @syntax-accent: #528bff
|
||||
* @syntax-selection-color: #3e4451
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #282c34;
|
||||
color: #abb2bf;
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
|
||||
font-family: "Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 2;
|
||||
-o-tab-size: 2;
|
||||
tab-size: 2;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Selection */
|
||||
code[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] *::-moz-selection {
|
||||
background: #3e4451;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
code[class*="language-"]::selection,
|
||||
pre[class*="language-"] *::selection {
|
||||
background: #3e4451;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .2em .3em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
/* Print */
|
||||
@media print {
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.cdata {
|
||||
color: #5c6370;
|
||||
}
|
||||
|
||||
.token.doctype,
|
||||
.token.punctuation,
|
||||
.token.entity {
|
||||
color: #abb2bf;
|
||||
}
|
||||
|
||||
.token.attr-name,
|
||||
.token.class-name,
|
||||
.token.boolean,
|
||||
.token.constant,
|
||||
.token.number,
|
||||
.token.atrule {
|
||||
color: #d19a66;
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #c678dd;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.symbol,
|
||||
.token.deleted,
|
||||
.token.important {
|
||||
color: #e06c75;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted,
|
||||
.token.regex,
|
||||
.token.attr-value,
|
||||
.token.attr-value > .token.punctuation {
|
||||
color: #98c379;
|
||||
}
|
||||
|
||||
.token.variable,
|
||||
.token.operator,
|
||||
.token.function {
|
||||
color: #61afef;
|
||||
}
|
||||
|
||||
.token.url {
|
||||
color: #56b6c2;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* HTML overrides */
|
||||
.token.attr-value > .token.punctuation.attr-equals,
|
||||
.token.special-attr > .token.attr-value > .token.value.css {
|
||||
color: #abb2bf;
|
||||
}
|
||||
|
||||
/* CSS overrides */
|
||||
.language-css .token.selector {
|
||||
color: #e06c75;
|
||||
}
|
||||
|
||||
.language-css .token.property {
|
||||
color: #abb2bf;
|
||||
}
|
||||
|
||||
.language-css .token.url {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.language-css .token.function,
|
||||
.language-css .token.url > .token.function {
|
||||
color: #56b6c2;
|
||||
}
|
||||
|
||||
.language-css .token.url > .token.string.url {
|
||||
color: #98c379;
|
||||
}
|
||||
|
||||
.language-css .token.important,
|
||||
.language-css .token.atrule .token.rule {
|
||||
color: #c678dd;
|
||||
}
|
||||
|
||||
/* JS overrides */
|
||||
.language-javascript .token.operator {
|
||||
color: #c678dd;
|
||||
}
|
||||
|
||||
.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation {
|
||||
color: #be5046;
|
||||
}
|
||||
|
||||
/* JSON overrides */
|
||||
.language-json .token.operator {
|
||||
color: #abb2bf;
|
||||
}
|
||||
|
||||
.language-json .token.null.keyword {
|
||||
color: #d19a66;
|
||||
}
|
||||
|
||||
/* MD overrides */
|
||||
.language-markdown .token.url,
|
||||
.language-markdown .token.url > .token.operator,
|
||||
.language-markdown .token.url-reference.url > .token.string {
|
||||
color: #abb2bf;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.language-markdown .token.url > .token.content {
|
||||
color: #61afef;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.language-markdown .token.url > .token.url,
|
||||
.language-markdown .token.url-reference.url {
|
||||
color: #56b6c2;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.language-markdown .token.blockquote.punctuation,
|
||||
.language-markdown .token.hr.punctuation {
|
||||
color: #5c6370;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.language-markdown .token.code-snippet {
|
||||
color: #98c379;
|
||||
}
|
||||
|
||||
.language-markdown .token.bold .token.content {
|
||||
color: #d19a66;
|
||||
}
|
||||
|
||||
.language-markdown .token.italic .token.content {
|
||||
color: #c678dd;
|
||||
}
|
||||
|
||||
.language-markdown .token.strike .token.content,
|
||||
.language-markdown .token.strike .token.punctuation,
|
||||
.language-markdown .token.list.punctuation,
|
||||
.language-markdown .token.title.important > .token.punctuation {
|
||||
color: #e06c75;
|
||||
}
|
||||
|
||||
/* General */
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .8;
|
||||
}
|
|
@ -0,0 +1,241 @@
|
|||
/**
|
||||
* One Light theme for prism.js
|
||||
* Based on Atom's One Light theme: https://github.com/atom/atom/tree/master/packages/one-light-syntax
|
||||
*/
|
||||
|
||||
/**
|
||||
* One Light colours in terms of RGB (accurate as of commit eb064bf on 19 Feb 2021)
|
||||
* @mono-1: #383a42
|
||||
* @mono-2: #696c77
|
||||
* @mono-3: #a0a1a7
|
||||
* @hue-1: #0184bc <- cyan
|
||||
* @hue-2: #4078f2 <- blue
|
||||
* @hue-3: #a626a4 <- purple
|
||||
* @hue-4: #50a14f <- green
|
||||
* @hue-5: #e45649 <- red 1
|
||||
* @hue-5-2: #ca1243 <- red 2
|
||||
* @hue-6: #b76b01 <- orange 1
|
||||
* @hue-6-2: #cb7701 <- orange 2
|
||||
* @syntax-fg: #383a42
|
||||
* @syntax-bg: #fafafa
|
||||
* @syntax-gutter: #9d9d9f
|
||||
* @syntax-guide: #383a4233
|
||||
* @syntax-accent: #526eff
|
||||
* @syntax-selection-color: #e5e5e6
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #fafafa;
|
||||
color: #383a42;
|
||||
font-family: "Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 2;
|
||||
-o-tab-size: 2;
|
||||
tab-size: 2;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Selection */
|
||||
code[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] *::-moz-selection {
|
||||
background: #e5e5e6;
|
||||
}
|
||||
|
||||
code[class*="language-"]::selection,
|
||||
pre[class*="language-"] *::selection {
|
||||
background: #e5e5e6;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: 0.5em 0;
|
||||
overflow: auto;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 0.2em 0.3em;
|
||||
border-radius: 0.3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.cdata {
|
||||
color: #a0a1a7;
|
||||
}
|
||||
|
||||
.token.doctype,
|
||||
.token.punctuation,
|
||||
.token.entity {
|
||||
color: #383a42;
|
||||
}
|
||||
|
||||
.token.attr-name,
|
||||
.token.class-name,
|
||||
.token.boolean,
|
||||
.token.constant,
|
||||
.token.number,
|
||||
.token.atrule {
|
||||
color: #b76b01;
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #a626a4;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.symbol,
|
||||
.token.deleted,
|
||||
.token.important {
|
||||
color: #e45649;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted,
|
||||
.token.regex,
|
||||
.token.attr-value,
|
||||
.token.attr-value > .token.punctuation {
|
||||
color: #50a14f;
|
||||
}
|
||||
|
||||
.token.variable,
|
||||
.token.operator,
|
||||
.token.function {
|
||||
color: #4078f2;
|
||||
}
|
||||
|
||||
.token.url {
|
||||
color: #0184bc;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* HTML overrides */
|
||||
.token.attr-value > .token.punctuation.attr-equals,
|
||||
.token.special-attr > .token.attr-value > .token.value.css {
|
||||
color: #383a42;
|
||||
}
|
||||
|
||||
/* CSS overrides */
|
||||
.language-css .token.selector {
|
||||
color: #e45649;
|
||||
}
|
||||
|
||||
.language-css .token.property {
|
||||
color: #383a42;
|
||||
}
|
||||
|
||||
.language-css .token.url {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.language-css .token.function,
|
||||
.language-css .token.url > .token.function {
|
||||
color: #0184bc;
|
||||
}
|
||||
|
||||
.language-css .token.url > .token.string.url {
|
||||
color: #50a14f;
|
||||
}
|
||||
|
||||
.language-css .token.important,
|
||||
.language-css .token.atrule .token.rule {
|
||||
color: #a626a4;
|
||||
}
|
||||
|
||||
/* JS overrides */
|
||||
.language-javascript .token.operator {
|
||||
color: #a626a4;
|
||||
}
|
||||
|
||||
.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation {
|
||||
color: #ca1243;
|
||||
}
|
||||
|
||||
/* JSON overrides */
|
||||
.language-json .token.operator {
|
||||
color: #383a42;
|
||||
}
|
||||
|
||||
.language-json .token.null.keyword {
|
||||
color: #b76b01;
|
||||
}
|
||||
|
||||
/* MD overrides */
|
||||
.language-markdown .token.url,
|
||||
.language-markdown .token.url > .token.operator,
|
||||
.language-markdown .token.url-reference.url > .token.string {
|
||||
color: #383a42;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.language-markdown .token.url > .token.content {
|
||||
color: #4078f2;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.language-markdown .token.url > .token.url,
|
||||
.language-markdown .token.url-reference.url {
|
||||
color: #0184bc;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.language-markdown .token.blockquote.punctuation,
|
||||
.language-markdown .token.hr.punctuation {
|
||||
color: #a0a1a7;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.language-markdown .token.code-snippet {
|
||||
color: #50a14f;
|
||||
}
|
||||
|
||||
.language-markdown .token.bold .token.content {
|
||||
color: #b76b01;
|
||||
}
|
||||
|
||||
.language-markdown .token.italic .token.content {
|
||||
color: #a626a4;
|
||||
}
|
||||
|
||||
.language-markdown .token.strike .token.content,
|
||||
.language-markdown .token.strike .token.punctuation,
|
||||
.language-markdown .token.list.punctuation,
|
||||
.language-markdown .token.title.important > .token.punctuation {
|
||||
color: #e45649;
|
||||
}
|
||||
|
||||
/* General */
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: 0.8;
|
||||
}
|
|
@ -0,0 +1,151 @@
|
|||
/*
|
||||
* Pojoaque Style by Jason Tate
|
||||
* http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
|
||||
* Based on Solarized Style from http://ethanschoonover.com/solarized
|
||||
* http://softwaremaniacs.org/media/soft/highlight/test.html
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
font-family: Menlo, Monaco, "Courier New", monospace;
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
color: #dccf8f;
|
||||
text-shadow: 0;
|
||||
}
|
||||
|
||||
pre > code[class*="language-"] {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"],
|
||||
:not(pre) > code[class*="language-"] {
|
||||
border-radius: 5px;
|
||||
border: 1px solid #000;
|
||||
color: #DCCF8F;
|
||||
background: #181914 url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQACQYGBgcGCQcHCQ0IBwgNDwsJCQsPEQ4ODw4OERENDg4ODg0RERQUFhQUERoaHBwaGiYmJiYmKysrKysrKysrKwEJCAgJCgkMCgoMDwwODA8TDg4ODhMVDg4PDg4VGhMRERERExoXGhYWFhoXHR0aGh0dJCQjJCQrKysrKysrKysr/8AAEQgAjACMAwEiAAIRAQMRAf/EAF4AAQEBAAAAAAAAAAAAAAAAAAABBwEBAQAAAAAAAAAAAAAAAAAAAAIQAAEDAwIHAQEAAAAAAAAAAADwAREhYaExkUFRcYGxwdHh8REBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AyGFEjHaBS2fDDs2zkhKmBKktb7km+ZwwCnXPkLVmCTMItj6AXFxRS465/BTnkAJvkLkJe+7AKKoi2AtRS2zuAWsCb5GOlBN8gKfmuGHZ8MFqIth3ALmFoFwbwKWyAlTAp17uKqBvgBD8sM4fTjhvAhkzhaRkBMKBrfs7jGPIpzy7gFrAqnC0C0gB0EWwBDW2cBVQwm+QtPpa3wBO3sVvszCnLAhkzgL5/RLf13cLQd8/AGlu0Cb5HTx9KuAEieGJEdcehS3eRTp2ATdt3CpIm+QtZwAhROXFeb7swp/ahaM3kBE/jSIUBc/AWrgBN8uNFAl+b7sAXFxFn2YLUU5Ns7gFX8C4ib+hN8gFWXwK3bZglxEJm+gKdciLPsFV/TClsgJUwKJ5FVA7tvIFrfZhVfGJDcsCKaYgAqv6YRbE+RWOWBtu7+AL3yRalXLyKqAIIfk+zARbDgFyEsncYwJvlgFRW+GEWntIi2P0BooyFxcNr8Ep3+ANLbMO+QyhvbiqdgC0kVvgUUiLYgBS2QtPbiVI1/sgOmG9uO+Y8DW+7jS2zAOnj6O2BndwuIAUtkdRN8gFoK3wwXMQyZwHVbClsuNLd4E3yAUR6FVDBR+BafQGt93LVMxJTv8ABts4CVLhcfYWsCb5kC9/BHdU8CLYFY5bMAd+eX9MGthhpbA1vu4B7+RKkaW2Yq4AQtVBBFsAJU/AuIXBhN8gGWnstefhiZyWvLAEnbYS1uzSFP6Jvn4Baxx70JKkQojLib5AVTey1jjgkKJGO0AKWyOm7N7cSpgSpAdPH0Tfd/gp1z5C1ZgKqN9J2wFxcUUuAFLZAm+QC0Fb4YUVRFsAOvj4KW2dwtYE3yAWk/wS/PLMKfmuGHZ8MAXF/Ja32Yi5haAKWz4Ydm2cSpgU693Atb7km+Zwwh+WGcPpxw3gAkzCLY+iYUDW/Z3Adc/gpzyFrAqnALkJe+7DoItgAtRS2zuKqGE3yAx0oJvkdvYrfZmALURbDuL5/RLf13cAuDeBS2RpbtAm+QFVA3wR+3fUtFHoBDJnC0jIXH0HWsgMY8inPLuOkd9chp4z20ALQLSA8cI9jYAIa2zjzjBd8gRafS1vgiUho/kAKcsCGTOGWvoOpkAtB3z8Hm8x2Ff5ADp4+lXAlIvcmwH/2Q==') repeat left top;
|
||||
}
|
||||
|
||||
pre[class*="language-"] {
|
||||
padding: 12px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 2px 6px;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #586e75;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.number,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #468966;
|
||||
}
|
||||
|
||||
.token.attr-name {
|
||||
color: #b89859;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #dccf8f;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.regex {
|
||||
color: #859900;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.keyword {
|
||||
color: #cb4b16;
|
||||
}
|
||||
|
||||
.token.attr-value {
|
||||
color: #468966;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.variable,
|
||||
.token.placeholder {
|
||||
color: #b58900;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol {
|
||||
color: #b89859;
|
||||
}
|
||||
|
||||
.token.tag {
|
||||
color: #ffb03b;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.statement,
|
||||
.token.deleted {
|
||||
color: #dc322f;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #dccf8f;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/*
|
||||
.pojoaque-colors {
|
||||
color: #586e75;
|
||||
color: #b64926;
|
||||
color: #468966;
|
||||
color: #ffb03b;
|
||||
color: #b58900;
|
||||
color: #b89859;
|
||||
color: #dccf8f;
|
||||
color: #d3a60c;
|
||||
color: #cb4b16;
|
||||
color: #dc322f;
|
||||
color: #073642;
|
||||
color: #181914;
|
||||
}
|
||||
*/
|
|
@ -0,0 +1,200 @@
|
|||
/**
|
||||
* Shades of Purple Theme for Prism.js
|
||||
*
|
||||
* @author Ahmad Awais <https://twitter.com/MrAhmadAwais/>
|
||||
* @support Follow/tweet at https://twitter.com/MrAhmadAwais/
|
||||
*/
|
||||
|
||||
code[class*='language-'],
|
||||
pre[class*='language-'] {
|
||||
color: #9efeff;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
|
||||
font-family: 'Operator Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
font-weight: 400;
|
||||
font-size: 17px;
|
||||
line-height: 25px;
|
||||
letter-spacing: 0.5px;
|
||||
text-shadow: 0 1px #222245;
|
||||
}
|
||||
|
||||
pre[class*='language-']::-moz-selection,
|
||||
pre[class*='language-'] ::-moz-selection,
|
||||
code[class*='language-']::-moz-selection,
|
||||
code[class*='language-'] ::-moz-selection,
|
||||
pre[class*='language-']::selection,
|
||||
pre[class*='language-'] ::selection,
|
||||
code[class*='language-']::selection,
|
||||
code[class*='language-'] ::selection {
|
||||
color: inherit;
|
||||
background: #a599e9;
|
||||
}
|
||||
|
||||
/* Code blocks. */
|
||||
pre[class*='language-'] {
|
||||
padding: 2em;
|
||||
margin: 0.5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*='language-'],
|
||||
pre[class*='language-'] {
|
||||
background: #1e1e3f;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*='language-'] {
|
||||
padding: 0.1em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.token {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.cdata {
|
||||
color: #b362ff;
|
||||
}
|
||||
|
||||
.token.delimiter,
|
||||
.token.keyword,
|
||||
.token.selector,
|
||||
.token.important,
|
||||
.token.atrule {
|
||||
color: #ff9d00;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.attr-name {
|
||||
color: rgb(255, 180, 84);
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.token.boolean {
|
||||
color: rgb(255, 98, 140);
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.tag .punctuation,
|
||||
.token.doctype,
|
||||
.token.builtin {
|
||||
color: rgb(255, 157, 0);
|
||||
}
|
||||
|
||||
.token.entity,
|
||||
.token.symbol {
|
||||
color: #6897bb;
|
||||
}
|
||||
|
||||
.token.number {
|
||||
color: #ff628c;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.constant,
|
||||
.token.variable {
|
||||
color: #ff628c;
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.char {
|
||||
color: #a5ff90;
|
||||
}
|
||||
|
||||
.token.attr-value,
|
||||
.token.attr-value .punctuation {
|
||||
color: #a5c261;
|
||||
}
|
||||
|
||||
.token.attr-value .punctuation:first-child {
|
||||
color: #a9b7c6;
|
||||
}
|
||||
|
||||
.token.url {
|
||||
color: #287bde;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: rgb(250, 208, 0);
|
||||
}
|
||||
|
||||
.token.regex {
|
||||
background: #364135;
|
||||
}
|
||||
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
background: #00ff00;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
background: #ff000d;
|
||||
}
|
||||
|
||||
code.language-css .token.property,
|
||||
code.language-css .token.property + .token.punctuation {
|
||||
color: #a9b7c6;
|
||||
}
|
||||
|
||||
code.language-css .token.id {
|
||||
color: #ffc66d;
|
||||
}
|
||||
|
||||
code.language-css .token.selector > .token.class,
|
||||
code.language-css .token.selector > .token.attribute,
|
||||
code.language-css .token.selector > .token.pseudo-class,
|
||||
code.language-css .token.selector > .token.pseudo-element {
|
||||
color: #ffc66d;
|
||||
}
|
||||
|
||||
.token.class-name {
|
||||
color: #fb94ff;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
background: none;
|
||||
}
|
||||
|
||||
pre .line-highlight,
|
||||
pre .line-highlight.line-highlight,
|
||||
pre > code.line-highlight {
|
||||
margin-top: 36px;
|
||||
background: linear-gradient(to right, rgba(179, 98, 255, 0.17), transparent);
|
||||
}
|
||||
|
||||
pre .line-highlight:before,
|
||||
pre > code.line-highlight:before,
|
||||
pre .line-highlight[data-end]:after,
|
||||
pre > code.line-highlight[data-end]:after {
|
||||
content: '';
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
/**
|
||||
* Solarized dark atom theme for `prism.js`
|
||||
* Based on Atom's `atom-dark` theme: https://github.com/atom/atom-dark-syntax
|
||||
* @author Pranay Chauhan (@PranayChauhan2516)
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #839496;
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
|
||||
font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #002b36;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #586e75;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #93a1a1;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.keyword,
|
||||
.token.tag {
|
||||
color: #268bd2;
|
||||
}
|
||||
|
||||
.token.class-name {
|
||||
color: #FFFFB6;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.token.boolean,
|
||||
.token.constant {
|
||||
color: #b58900;
|
||||
}
|
||||
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #dc322f;
|
||||
}
|
||||
|
||||
.token.number {
|
||||
color: #859900;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #859900;
|
||||
}
|
||||
|
||||
.token.variable {
|
||||
color: #268bd2;
|
||||
}
|
||||
|
||||
.token.operator {
|
||||
color: #EDEDED;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #268bd2;
|
||||
}
|
||||
|
||||
.token.regex {
|
||||
color: #E9C062;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #fd971f;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
color: #FFFFB6;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.url {
|
||||
color: #96CBFE;
|
||||
}
|
||||
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #87C38A;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value {
|
||||
color: #F9EE98;
|
||||
}
|
|
@ -0,0 +1,140 @@
|
|||
/*
|
||||
* Synthwave '84 Theme originally by Robb Owen [@Robb0wen] for Visual Studio Code
|
||||
* Demo: https://marc.dev/demo/prism-synthwave84
|
||||
*
|
||||
* Ported for PrismJS by Marc Backes [@themarcba]
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #f92aad;
|
||||
text-shadow: 0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3;
|
||||
background: none;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
font-size: 1em;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background-color: transparent !important;
|
||||
background-image: linear-gradient(to bottom, #2a2139 75%, #34294f);
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.block-comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #8e8e8e;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.attr-name,
|
||||
.token.namespace,
|
||||
.token.number,
|
||||
.token.unit,
|
||||
.token.hexcode,
|
||||
.token.deleted {
|
||||
color: #e2777a;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.selector {
|
||||
color: #72f1b8;
|
||||
text-shadow: 0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475;
|
||||
}
|
||||
|
||||
.token.function-name {
|
||||
color: #6196cc;
|
||||
}
|
||||
|
||||
.token.boolean,
|
||||
.token.selector .token.id,
|
||||
.token.function {
|
||||
color: #fdfdfd;
|
||||
text-shadow: 0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975;
|
||||
}
|
||||
|
||||
.token.class-name {
|
||||
color: #fff5f6;
|
||||
text-shadow: 0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75;
|
||||
}
|
||||
|
||||
.token.constant,
|
||||
.token.symbol {
|
||||
color: #f92aad;
|
||||
text-shadow: 0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.atrule,
|
||||
.token.keyword,
|
||||
.token.selector .token.class,
|
||||
.token.builtin {
|
||||
color: #f4eee4;
|
||||
text-shadow: 0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575;
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.attr-value,
|
||||
.token.regex,
|
||||
.token.variable {
|
||||
color: #f87c32;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url {
|
||||
color: #67cdcc;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
color: green;
|
||||
}
|
|
@ -0,0 +1,168 @@
|
|||
/**
|
||||
* VS theme by Andrew Lock (https://andrewlock.net)
|
||||
* Inspired by Visual Studio syntax coloring
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #393A34;
|
||||
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
font-size: .9em;
|
||||
line-height: 1.2em;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre > code[class*="language-"] {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
background: #C1DEF1;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
background: #C1DEF1;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
border: 1px solid #dddddd;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .2em;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
background: #f8f8f8;
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #008000;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.string {
|
||||
color: #A31515;
|
||||
}
|
||||
|
||||
.token.punctuation,
|
||||
.token.operator {
|
||||
color: #393A34; /* no highlight */
|
||||
}
|
||||
|
||||
.token.url,
|
||||
.token.symbol,
|
||||
.token.number,
|
||||
.token.boolean,
|
||||
.token.variable,
|
||||
.token.constant,
|
||||
.token.inserted {
|
||||
color: #36acaa;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.keyword,
|
||||
.token.attr-value,
|
||||
.language-autohotkey .token.selector,
|
||||
.language-json .token.boolean,
|
||||
.language-json .token.number,
|
||||
code[class*="language-css"] {
|
||||
color: #0000ff;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #393A34;
|
||||
}
|
||||
|
||||
.token.deleted,
|
||||
.language-autohotkey .token.tag {
|
||||
color: #9a050f;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.language-autohotkey .token.keyword {
|
||||
color: #00009f;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.class-name,
|
||||
.language-json .token.property {
|
||||
color: #2B91AF;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.selector {
|
||||
color: #800000;
|
||||
}
|
||||
|
||||
.token.attr-name,
|
||||
.token.property,
|
||||
.token.regex,
|
||||
.token.entity {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.token.directive.tag .tag {
|
||||
background: #ffff00;
|
||||
color: #393A34;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Numbers plugin
|
||||
* http://prismjs.com/plugins/line-numbers/
|
||||
*/
|
||||
.line-numbers .line-numbers-rows {
|
||||
border-right-color: #a5a5a5;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
color: #2B91AF;
|
||||
}
|
||||
|
||||
/* overrides color-values for the Line Highlight plugin
|
||||
* http://prismjs.com/plugins/line-highlight/
|
||||
*/
|
||||
.line-highlight {
|
||||
background: rgba(193, 222, 241, 0.2);
|
||||
background: -webkit-linear-gradient(left, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0));
|
||||
background: linear-gradient(to right, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0));
|
||||
}
|
|
@ -0,0 +1,290 @@
|
|||
pre[class*="language-"],
|
||||
code[class*="language-"] {
|
||||
color: #d4d4d4;
|
||||
font-size: 13px;
|
||||
text-shadow: none;
|
||||
font-family: Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
line-height: 1.5;
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
code[class*="language-"]::selection,
|
||||
pre[class*="language-"] *::selection,
|
||||
code[class*="language-"] *::selection {
|
||||
text-shadow: none;
|
||||
background: #75a7ca;
|
||||
}
|
||||
|
||||
@media print {
|
||||
pre[class*="language-"],
|
||||
code[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
background: #1e1e1e;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em .3em;
|
||||
border-radius: .3em;
|
||||
color: #db4c69;
|
||||
background: #f9f2f4;
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* Tokens
|
||||
*/
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.doctype .token.doctype-tag {
|
||||
color: #569CD6;
|
||||
}
|
||||
|
||||
.token.doctype .token.name {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog {
|
||||
color: #6a9955;
|
||||
}
|
||||
|
||||
.token.punctuation,
|
||||
.language-html .language-css .token.punctuation,
|
||||
.language-html .language-javascript .token.punctuation {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.inserted,
|
||||
.token.unit {
|
||||
color: #b5cea8;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.deleted {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
.language-css .token.string.url {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
.token.operator.arrow {
|
||||
color: #569CD6;
|
||||
}
|
||||
|
||||
.token.atrule {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
.token.atrule .token.rule {
|
||||
color: #c586c0;
|
||||
}
|
||||
|
||||
.token.atrule .token.url {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.atrule .token.url .token.function {
|
||||
color: #dcdcaa;
|
||||
}
|
||||
|
||||
.token.atrule .token.url .token.punctuation {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #569CD6;
|
||||
}
|
||||
|
||||
.token.keyword.module,
|
||||
.token.keyword.control-flow {
|
||||
color: #c586c0;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.function .token.maybe-class-name {
|
||||
color: #dcdcaa;
|
||||
}
|
||||
|
||||
.token.regex {
|
||||
color: #d16969;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.constant {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.class-name,
|
||||
.token.maybe-class-name {
|
||||
color: #4ec9b0;
|
||||
}
|
||||
|
||||
.token.console {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.parameter {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.interpolation {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.punctuation.interpolation-punctuation {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.token.boolean {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.variable,
|
||||
.token.imports .token.maybe-class-name,
|
||||
.token.exports .token.maybe-class-name {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.selector {
|
||||
color: #d7ba7d;
|
||||
}
|
||||
|
||||
.token.escape {
|
||||
color: #d7ba7d;
|
||||
}
|
||||
|
||||
.token.tag {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.token.tag .token.punctuation {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.token.cdata {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.token.attr-name {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.attr-value,
|
||||
.token.attr-value .token.punctuation {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
.token.attr-value .token.punctuation.attr-equals {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
color: #4ec9b0;
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* Language Specific
|
||||
*/
|
||||
|
||||
pre[class*="language-javascript"],
|
||||
code[class*="language-javascript"],
|
||||
pre[class*="language-jsx"],
|
||||
code[class*="language-jsx"],
|
||||
pre[class*="language-typescript"],
|
||||
code[class*="language-typescript"],
|
||||
pre[class*="language-tsx"],
|
||||
code[class*="language-tsx"] {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
pre[class*="language-css"],
|
||||
code[class*="language-css"] {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
pre[class*="language-html"],
|
||||
code[class*="language-html"] {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
.language-regex .token.anchor {
|
||||
color: #dcdcaa;
|
||||
}
|
||||
|
||||
.language-html .token.punctuation {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* Line highlighting
|
||||
*/
|
||||
pre[data-line] {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
pre[class*="language-"] > code[class*="language-"] {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.line-highlight {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: inherit 0;
|
||||
margin-top: 1em;
|
||||
background: #f7ebc6;
|
||||
box-shadow: inset 5px 0 0 #f7d87c;
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
line-height: inherit;
|
||||
white-space: pre;
|
||||
}
|
|
@ -0,0 +1,189 @@
|
|||
/**
|
||||
* xonokai theme for JavaScript, CSS and HTML
|
||||
* based on: https://github.com/MoOx/sass-prism-theme-base by Maxime Thirouin ~ MoOx --> http://moox.fr/ , which is Loosely based on Monokai textmate theme by http://www.monokai.nl/
|
||||
* license: MIT; http://moox.mit-license.org/
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
-moz-tab-size: 2;
|
||||
-o-tab-size: 2;
|
||||
tab-size: 2;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: normal;
|
||||
font-family: Menlo, Monaco, "Courier New", monospace;
|
||||
font-size: 14px;
|
||||
color: #76d9e6;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
pre > code[class*="language-"] {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre[class*="language-"],
|
||||
:not(pre) > code[class*="language-"] {
|
||||
background: #2a2a2a;
|
||||
}
|
||||
|
||||
pre[class*="language-"] {
|
||||
padding: 15px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #e1e1e8;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
pre[class*="language-"] code {
|
||||
white-space: pre;
|
||||
display: block;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 0.15em 0.2em 0.05em;
|
||||
border-radius: .3em;
|
||||
border: 0.13em solid #7a6652;
|
||||
box-shadow: 1px 1px 0.3em -0.1em #000 inset;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #6f705e;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.boolean,
|
||||
.token.number {
|
||||
color: #a77afe;
|
||||
}
|
||||
|
||||
.token.attr-name,
|
||||
.token.string {
|
||||
color: #e6d06c;
|
||||
}
|
||||
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #e6d06c;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.inserted {
|
||||
color: #a6e22d;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword,
|
||||
.token.important,
|
||||
.token.deleted {
|
||||
color: #ef3b7d;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.statement {
|
||||
color: #76d9e6;
|
||||
}
|
||||
|
||||
.token.placeholder,
|
||||
.token.variable {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.statement,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #bebec5;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
code.language-markup {
|
||||
color: #f9f9f9;
|
||||
}
|
||||
|
||||
code.language-markup .token.tag {
|
||||
color: #ef3b7d;
|
||||
}
|
||||
|
||||
code.language-markup .token.attr-name {
|
||||
color: #a6e22d;
|
||||
}
|
||||
|
||||
code.language-markup .token.attr-value {
|
||||
color: #e6d06c;
|
||||
}
|
||||
|
||||
code.language-markup .token.style,
|
||||
code.language-markup .token.script {
|
||||
color: #76d9e6;
|
||||
}
|
||||
|
||||
code.language-markup .token.script .token.keyword {
|
||||
color: #76d9e6;
|
||||
}
|
||||
|
||||
/* Line highlight plugin */
|
||||
pre[class*="language-"][data-line] {
|
||||
position: relative;
|
||||
padding: 1em 0 1em 3em;
|
||||
}
|
||||
|
||||
pre[data-line] .line-highlight {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 0;
|
||||
margin-top: 1em;
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
pointer-events: none;
|
||||
line-height: inherit;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
pre[data-line] .line-highlight:before,
|
||||
pre[data-line] .line-highlight[data-end]:after {
|
||||
content: attr(data-start);
|
||||
position: absolute;
|
||||
top: .4em;
|
||||
left: .6em;
|
||||
min-width: 1em;
|
||||
padding: 0.2em 0.5em;
|
||||
background-color: rgba(255, 255, 255, 0.4);
|
||||
color: black;
|
||||
font: bold 65%/1 sans-serif;
|
||||
height: 1em;
|
||||
line-height: 1em;
|
||||
text-align: center;
|
||||
border-radius: 999px;
|
||||
text-shadow: none;
|
||||
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
|
||||
pre[data-line] .line-highlight[data-end]:after {
|
||||
content: attr(data-end);
|
||||
top: auto;
|
||||
bottom: .4em;
|
||||
}
|
|
@ -0,0 +1,160 @@
|
|||
/*
|
||||
* Z-Toch
|
||||
* by Zeel Codder
|
||||
* https://github.com/zeel-codder
|
||||
*
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #22da17;
|
||||
font-family: monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
line-height: 25px;
|
||||
font-size: 18px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
pre[class*="language-"] * {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: white;
|
||||
background: #0a143c;
|
||||
padding: 22px;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: 0.5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: rgba(29, 59, 83, 0.99);
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: rgba(29, 59, 83, 0.99);
|
||||
}
|
||||
|
||||
@media print {
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 0.1em;
|
||||
border-radius: 0.3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.cdata {
|
||||
color: rgb(99, 119, 119);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: rgb(199, 146, 234);
|
||||
}
|
||||
|
||||
.namespace {
|
||||
color: rgb(178, 204, 214);
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
color: rgba(239, 83, 80, 0.56);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.symbol,
|
||||
.token.property {
|
||||
color: rgb(128, 203, 196);
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.operator,
|
||||
.token.keyword {
|
||||
color: rgb(127, 219, 202);
|
||||
}
|
||||
|
||||
.token.boolean {
|
||||
color: rgb(255, 88, 116);
|
||||
}
|
||||
|
||||
.token.number {
|
||||
color: rgb(247, 140, 108);
|
||||
}
|
||||
|
||||
.token.constant,
|
||||
.token.function,
|
||||
.token.builtin,
|
||||
.token.char {
|
||||
color: rgb(34 183 199);
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.doctype {
|
||||
color: rgb(199, 146, 234);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.attr-name,
|
||||
.token.inserted {
|
||||
color: rgb(173, 219, 103);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.url,
|
||||
.token.entity,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: rgb(173, 219, 103);
|
||||
}
|
||||
|
||||
.token.class-name,
|
||||
.token.atrule,
|
||||
.token.attr-value {
|
||||
color: rgb(255, 203, 139);
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: rgb(214, 222, 235);
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
|
@ -0,0 +1,420 @@
|
|||
// 初始化函数
|
||||
let rm = {};
|
||||
|
||||
//禁止图片拖拽
|
||||
rm.stopdragimg = $("img");
|
||||
rm.stopdragimg.on("dragstart", function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
// 显示菜单
|
||||
rm.showRightMenu = function (isTrue, x = 0, y = 0) {
|
||||
let $rightMenu = $('#rightMenu');
|
||||
$rightMenu.css('top', x + 'px').css('left', y + 'px');
|
||||
if (isTrue) {
|
||||
$rightMenu.show();
|
||||
stopMaskScroll()
|
||||
} else {
|
||||
$rightMenu.hide();
|
||||
}
|
||||
}
|
||||
|
||||
// 隐藏菜单
|
||||
rm.hideRightMenu = function () {
|
||||
rm.showRightMenu(false);
|
||||
$('#rightmenu-mask').attr('style', 'display: none');
|
||||
}
|
||||
|
||||
// 尺寸
|
||||
let rmWidth = $('#rightMenu').width();
|
||||
let rmHeight = $('#rightMenu').height();
|
||||
|
||||
// 重新定义尺寸
|
||||
rm.reloadrmSize = function () {
|
||||
rmWidth = $('#rightMenu').width();
|
||||
rmHeight = $('#rightMenu').height();
|
||||
}
|
||||
|
||||
// 获取点击的href
|
||||
let domhref = '';
|
||||
let domImgSrc = '';
|
||||
let globalEvent = null;
|
||||
|
||||
// 监听右键初始化
|
||||
window.oncontextmenu = function (event) {
|
||||
if (document.body.clientWidth > 768) {
|
||||
let pageX = event.clientX + 10; //加10是为了防止显示时鼠标遮在菜单上
|
||||
let pageY = event.clientY;
|
||||
// console.log(event);
|
||||
|
||||
//其他额外菜单
|
||||
let $rightMenuOther = $('.rightMenuOther');
|
||||
let $rightMenuPlugin = $('.rightMenuPlugin');
|
||||
let $rightMenuCopyText = $('#menu-copytext');
|
||||
let $rightMenuPasteText = $('#menu-pastetext');
|
||||
let $rightMenuCommentText = $('#menu-commenttext');
|
||||
let $rightMenuNewWindow = $('#menu-newwindow');
|
||||
let $rightMenuCopyLink = $('#menu-copylink');
|
||||
let $rightMenuCopyImg = $('#menu-copyimg');
|
||||
let $rightMenuDownloadImg = $('#menu-downloadimg');
|
||||
let $rightMenuSearch = $('#menu-search');
|
||||
let $rightMenuSearchBaidu = $('#menu-searchBaidu');
|
||||
let $rightMenuMusicToggle = $('#menu-music-toggle');
|
||||
let $rightMenuMusicBack = $('#menu-music-back');
|
||||
let $rightMenuMusicForward = $('#menu-music-forward');
|
||||
let $rightMenuMusicPlaylist = $('#menu-music-playlist');
|
||||
let $rightMenuMusicCopyMusicName = $('#menu-music-copyMusicName');
|
||||
let href = event.target.href;
|
||||
let imgsrc = event.target.currentSrc;
|
||||
|
||||
// 判断模式 扩展模式为有事件
|
||||
let pluginMode = false;
|
||||
$rightMenuOther.show();
|
||||
globalEvent = event;
|
||||
|
||||
// 检查是否需要复制 是否有选中文本
|
||||
if (selectTextNow && window.getSelection()) {
|
||||
pluginMode = true;
|
||||
$rightMenuCopyText.show();
|
||||
$rightMenuCommentText.show();
|
||||
$rightMenuSearch.show();
|
||||
$rightMenuSearchBaidu.show();
|
||||
} else {
|
||||
$rightMenuCopyText.hide();
|
||||
$rightMenuCommentText.hide();
|
||||
$rightMenuSearchBaidu.hide();
|
||||
$rightMenuSearch.hide();
|
||||
}
|
||||
|
||||
//检查是否右键点击了链接a标签
|
||||
if (href) {
|
||||
pluginMode = true;
|
||||
$rightMenuNewWindow.show();
|
||||
$rightMenuCopyLink.show();
|
||||
domhref = href;
|
||||
} else {
|
||||
$rightMenuNewWindow.hide();
|
||||
$rightMenuCopyLink.hide();
|
||||
}
|
||||
|
||||
//检查是否需要复制图片
|
||||
if (imgsrc) {
|
||||
pluginMode = true;
|
||||
$rightMenuCopyImg.show();
|
||||
$rightMenuDownloadImg.show();
|
||||
domImgSrc = imgsrc;
|
||||
} else {
|
||||
$rightMenuCopyImg.hide();
|
||||
$rightMenuDownloadImg.hide();
|
||||
}
|
||||
|
||||
// 判断是否为输入框
|
||||
if (event.target.tagName.toLowerCase() === 'input' || event.target.tagName.toLowerCase() === 'textarea') {
|
||||
console.log('这是一个输入框')
|
||||
pluginMode = true;
|
||||
$rightMenuPasteText.show();
|
||||
} else {
|
||||
$rightMenuPasteText.hide();
|
||||
}
|
||||
|
||||
//判断是否是音乐
|
||||
if (event.target.nodeName == "METING-JS") {
|
||||
console.log('这是一个音乐');
|
||||
pluginMode = true;
|
||||
$rightMenuMusicToggle.show();
|
||||
$rightMenuMusicBack.show();
|
||||
$rightMenuMusicForward.show();
|
||||
$rightMenuMusicPlaylist.show();
|
||||
$rightMenuMusicCopyMusicName.show();
|
||||
} else {
|
||||
$rightMenuMusicToggle.hide();
|
||||
$rightMenuMusicBack.hide();
|
||||
$rightMenuMusicForward.hide();
|
||||
$rightMenuMusicPlaylist.hide();
|
||||
$rightMenuMusicCopyMusicName.hide()
|
||||
}
|
||||
|
||||
// 如果不是扩展模式则隐藏扩展模块
|
||||
if (pluginMode) {
|
||||
$rightMenuOther.hide();
|
||||
$rightMenuPlugin.show();
|
||||
} else {
|
||||
$rightMenuPlugin.hide()
|
||||
}
|
||||
|
||||
rm.reloadrmSize()
|
||||
|
||||
// 鼠标默认显示在鼠标右下方,当鼠标靠右或考下时,将菜单显示在鼠标左方\上方
|
||||
if (pageX + rmWidth > window.innerWidth) {
|
||||
pageX -= rmWidth + 10;
|
||||
}
|
||||
if (pageY + rmHeight > window.innerHeight) {
|
||||
pageY -= pageY + rmHeight - window.innerHeight;
|
||||
}
|
||||
|
||||
rm.showRightMenu(true, pageY, pageX);
|
||||
$('#rightmenu-mask').attr('style', 'display: flex');
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// 下载图片状态
|
||||
rm.downloadimging = false;
|
||||
|
||||
// 复制图片到剪贴板
|
||||
rm.writeClipImg = function (imgsrc) {
|
||||
console.log('按下复制');
|
||||
rm.hideRightMenu();
|
||||
btf.snackbarShow('正在下载中,请稍后', false, 10000)
|
||||
if (rm.downloadimging == false) {
|
||||
rm.downloadimging = true;
|
||||
setTimeout(function () {
|
||||
copyImage(imgsrc);
|
||||
btf.snackbarShow('复制成功!图片已添加盲水印,请遵守版权协议');
|
||||
rm.downloadimging = false;
|
||||
}, "10000")
|
||||
}
|
||||
}
|
||||
|
||||
function imageToBlob(imageURL) {
|
||||
const img = new Image;
|
||||
const c = document.createElement("canvas");
|
||||
const ctx = c.getContext("2d");
|
||||
img.crossOrigin = "";
|
||||
img.src = imageURL;
|
||||
return new Promise(resolve => {
|
||||
img.onload = function () {
|
||||
c.width = this.naturalWidth;
|
||||
c.height = this.naturalHeight;
|
||||
ctx.drawImage(this, 0, 0);
|
||||
c.toBlob((blob) => {
|
||||
// here the image is a blob
|
||||
resolve(blob)
|
||||
}, "image/png", 0.75);
|
||||
};
|
||||
})
|
||||
}
|
||||
|
||||
async function copyImage(imageURL) {
|
||||
const blob = await imageToBlob(imageURL)
|
||||
const item = new ClipboardItem({"image/png": blob});
|
||||
navigator.clipboard.write([item]);
|
||||
}
|
||||
|
||||
rm.switchDarkMode = function () {
|
||||
navFn.switchDarkMode();
|
||||
rm.hideRightMenu();
|
||||
heo.darkModeStatus();
|
||||
//halo.darkComment();
|
||||
}
|
||||
|
||||
rm.copyUrl = function (id) {
|
||||
$("body").after("<input id='copyVal'></input>");
|
||||
var text = id;
|
||||
var input = document.getElementById("copyVal");
|
||||
input.value = text;
|
||||
input.select();
|
||||
input.setSelectionRange(0, input.value.length);
|
||||
document.execCommand("copy");
|
||||
$("#copyVal").remove();
|
||||
}
|
||||
|
||||
function stopMaskScroll() {
|
||||
if (document.getElementById("rightmenu-mask")) {
|
||||
let xscroll = document.getElementById("rightmenu-mask");
|
||||
xscroll.addEventListener("mousewheel", function (e) {
|
||||
//阻止浏览器默认方法
|
||||
rm.hideRightMenu();
|
||||
// e.preventDefault();
|
||||
}, false);
|
||||
}
|
||||
if (document.getElementById("rightMenu")) {
|
||||
let xscroll = document.getElementById("rightMenu");
|
||||
xscroll.addEventListener("mousewheel", function (e) {
|
||||
//阻止浏览器默认方法
|
||||
rm.hideRightMenu();
|
||||
// e.preventDefault();
|
||||
}, false);
|
||||
}
|
||||
}
|
||||
|
||||
rm.rightmenuCopyText = function (txt) {
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard.writeText(txt);
|
||||
}
|
||||
rm.hideRightMenu();
|
||||
}
|
||||
|
||||
rm.copyPageUrl = function () {
|
||||
var url = window.location.href;
|
||||
rm.copyUrl(url);
|
||||
btf.snackbarShow('复制本页链接地址成功', false, 2000);
|
||||
rm.hideRightMenu();
|
||||
}
|
||||
|
||||
rm.sharePage = function () {
|
||||
var content = window.location.href;
|
||||
rm.copyUrl(url);
|
||||
btf.snackbarShow('复制本页链接地址成功', false, 2000);
|
||||
rm.hideRightMenu();
|
||||
}
|
||||
|
||||
// 复制当前选中文本
|
||||
var selectTextNow = '';
|
||||
document.onmouseup = document.ondbclick = selceText;
|
||||
|
||||
function selceText() {
|
||||
var txt;
|
||||
if (document.selection) {
|
||||
txt = document.selection.createRange().text;
|
||||
} else {
|
||||
txt = window.getSelection() + '';
|
||||
}
|
||||
if (txt) {
|
||||
selectTextNow = txt;
|
||||
// console.log(selectTextNow);
|
||||
} else {
|
||||
selectTextNow = '';
|
||||
}
|
||||
}
|
||||
|
||||
// 读取剪切板
|
||||
rm.readClipboard = function () {
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard.readText().then(clipText => rm.insertAtCaret(globalEvent.target, clipText));
|
||||
}
|
||||
}
|
||||
|
||||
// 粘贴文本到焦点
|
||||
rm.insertAtCaret = function (elemt, value) {
|
||||
const startPos = elemt.selectionStart,
|
||||
endPos = elemt.selectionEnd;
|
||||
if (document.selection) {
|
||||
elemt.focus();
|
||||
var sel = document.selection.createRange();
|
||||
sel.text = value;
|
||||
elemt.focus();
|
||||
} else {
|
||||
if (startPos || startPos == '0') {
|
||||
var scrollTop = elemt.scrollTop;
|
||||
elemt.value = elemt.value.substring(0, startPos) + value + elemt.value.substring(endPos, elemt.value.length);
|
||||
elemt.focus();
|
||||
elemt.selectionStart = startPos + value.length;
|
||||
elemt.selectionEnd = startPos + value.length;
|
||||
elemt.scrollTop = scrollTop;
|
||||
} else {
|
||||
elemt.value += value;
|
||||
elemt.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//粘贴文本
|
||||
rm.pasteText = function () {
|
||||
const result = rm.readClipboard() || '';
|
||||
rm.hideRightMenu();
|
||||
}
|
||||
|
||||
//引用到评论
|
||||
rm.rightMenuCommentText = function (txt) {
|
||||
rm.hideRightMenu();
|
||||
var input = document.getElementsByClassName('el-textarea__inner')[0];
|
||||
let evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent('input', true, true);
|
||||
let inputValue = replaceAll(txt, '\n', '\n> ')
|
||||
input.value = '> ' + inputValue + '\n\n';
|
||||
input.dispatchEvent(evt);
|
||||
var domTop = document.querySelector("#post-comment").offsetTop;
|
||||
window.scrollTo(0, domTop - 80);
|
||||
input.focus();
|
||||
input.setSelectionRange(-1, -1);
|
||||
if (document.getElementById("comment-tips")) {
|
||||
document.getElementById("comment-tips").classList.add("show");
|
||||
}
|
||||
}
|
||||
|
||||
//替换所有内容
|
||||
function replaceAll(string, search, replace) {
|
||||
return string.split(search).join(replace);
|
||||
}
|
||||
|
||||
// 百度搜索
|
||||
rm.searchBaidu = function () {
|
||||
btf.snackbarShow('即将跳转到百度搜索', false, 2000);
|
||||
setTimeout(function () {
|
||||
window.open('https://www.baidu.com/s?wd=' + selectTextNow);
|
||||
}, "2000");
|
||||
rm.hideRightMenu();
|
||||
}
|
||||
|
||||
//分享链接
|
||||
rm.copyLink = function () {
|
||||
rm.rightmenuCopyText(domhref);
|
||||
btf.snackbarShow('已复制链接地址');
|
||||
}
|
||||
|
||||
function addRightMenuClickEvent() {
|
||||
// 添加点击事件
|
||||
$('#menu-backward').on('click', function () {
|
||||
window.history.back();
|
||||
rm.hideRightMenu();
|
||||
});
|
||||
$('#menu-forward').on('click', function () {
|
||||
window.history.forward();
|
||||
rm.hideRightMenu();
|
||||
});
|
||||
$('#menu-refresh').on('click', function () {
|
||||
window.location.reload();
|
||||
});
|
||||
$('#menu-top').on('click', function () {
|
||||
btf.scrollToDest(0, 500);
|
||||
rm.hideRightMenu();
|
||||
});
|
||||
$('.menu-link').on('click', rm.hideRightMenu);
|
||||
$('#menu-darkmode').on('click', rm.switchDarkMode);
|
||||
$('#menu-home').on('click', function () {
|
||||
window.location.href = window.location.origin;
|
||||
});
|
||||
$('#menu-randomPost').on('click', function () {
|
||||
toRandomPost()
|
||||
});
|
||||
$('#menu-commentBarrage').on('click', heo.switchCommentBarrage);
|
||||
$('#rightmenu-mask').on('click', rm.hideRightMenu);
|
||||
$('#rightmenu-mask').contextmenu(function () {
|
||||
rm.hideRightMenu();
|
||||
return false;
|
||||
});
|
||||
$('#menu-translate').on('click', function () {
|
||||
rm.hideRightMenu();
|
||||
translateInitialization();
|
||||
});
|
||||
$('#menu-copy').on('click', rm.copyPageUrl);
|
||||
$('#menu-pastetext').on('click', rm.pasteText);
|
||||
$('#menu-copytext').on('click', function () {
|
||||
rm.rightmenuCopyText(selectTextNow);
|
||||
btf.snackbarShow('复制成功,复制和转载请标注本文地址');
|
||||
});
|
||||
$('#menu-commenttext').on('click', function () {
|
||||
rm.rightMenuCommentText(selectTextNow);
|
||||
});
|
||||
$('#menu-newwindow').on('click', function () {
|
||||
window.open(domhref);
|
||||
rm.hideRightMenu();
|
||||
});
|
||||
$('#menu-copylink').on('click', rm.copyLink);
|
||||
$('#menu-downloadimg').on('click', function () {
|
||||
heo.downloadImage(domImgSrc, 'kunkunyu');
|
||||
});
|
||||
$('#menu-copyimg').on('click', function () {
|
||||
rm.writeClipImg(domImgSrc);
|
||||
});
|
||||
$('#menu-searchBaidu').on('click', rm.searchBaidu);
|
||||
//音乐
|
||||
$('#menu-music-toggle').on('click', heo.musicToggle);
|
||||
$('#menu-music-back').on('click', heo.musicSkipBack);
|
||||
$('#menu-music-forward').on('click', heo.musicSkipForward);
|
||||
$('#menu-music-copyMusicName').on('click', function () {
|
||||
rm.rightmenuCopyText(heo.musicGetName());
|
||||
btf.snackbarShow('复制歌曲名称成功', false, 3000);
|
||||
});
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue