旧版
- 为什么写博客?
- 用哪个平台?
- 注册账号
- 博客园美化—侧边栏公告
- 博客园美化—页面定制CSS代码
- 写博客上传
- 备份
新版
侧边栏
<input id="linkListFlg" type="hidden" />
<script type="text/javascript">
window.cnblogsConfig = {
info: {
// 用户名
name: '张贺贺',
// 入园时间,年-月-日。入园时间查看方法:鼠标停留园龄时间上,会显示入园时间
startDate: '',
// 用户头像
avatar: 'https://images.cnblogs.com/cnblogs_com/yizhangheka/1695816/o_230526064744_ZVArHsuH5w_0365de1b.png',
// 浏览器 URL 图标
blogIcon: 'https://images.cnblogs.com/cnblogs_com/yizhangheka/1695816/o_230526064744_ZVArHsuH5w_0365de1b.png',
},
banner: {
home: {
//title: "每一个不曾起舞的日子,都是对生命的辜负。", // 主页banner上的标语,显示自定义文字,默认为空,自动获取一句。String []
titleSource: 'one',
background: [ // 随机背景图 String []
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125221958970-1035566697.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231126144643748-696913148.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231126144643130-1229036560.png",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231126144642365-1101295657.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231126144638746-1944074083.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231126144637210-1352648364.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231126144635857-628653032.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231126144635404-1652343181.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231126144630696-1807987962.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125221958103-228009748.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125221952823-1897776141.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125221948500-1391259017.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125221946530-67564547.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125221944507-159693916.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125221944038-1053940868.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125221941556-1289378187.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125214853485-2005414287.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231124184621765-761701941.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231124184607634-1805317887.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231124182153497-2067797759.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231124182024882-1180237463.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231124181943833-221726091.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125214613379-1838124448.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125214350867-1322188558.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125212227582-345168494.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125212051403-1456408124.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125212020114-819240456.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125212006664-912592968.jpg",
"https://img2023.cnblogs.com/blog/1703421/202311/1703421-20231125211814633-113469013.jpg",
],
},
// 文章页头图
article: {
background: [
"https://cdn.jsdelivr.net/gh/BNDong/[email protected]/dist/images//6d995b207bae4175ff28.webp",
"https://cdn.jsdelivr.net/gh/BNDong/[email protected]/dist/images//e58d9f9d0eee6d9b9add.webp",
],
},
},
sidebar: { // 列表数据 ['导航名称', '链接', 'icon']
navList: [
['我的B站', 'https://space.bilibili.com/443654017?spm_id_from=333.1007.0.0'],
],
},
// 页面加载loading
loading: {
rebound: {
tension: 16,
friction: 6,
},
spinner: {
id: 'spinner',
radius: 90,
sides: 3,
depth: 20,
colors: {
background: '#f0f0f0',
stroke: '#272633',
base: null,
child: '#272633',
},
alwaysForward: true, // When false the spring will reverse normally.
restAt: 0.5, // A number from 0.1 to 0.9 || null for full rotation
renderBase: false,
}
},
// Object 顶部进度条
progressBar: {
id: 'top-progress-bar', // 请勿修改该值
color: '#77b6ff',
height: '2px',
duration: 0.2,
},
// 页面标签
title: {
// String "(o゚v゚)ノ Hi" 失去焦点标签文字 当页面失去焦点,页面title显示的文字。
onblur: '(o゚v゚)ノ Hi',
// Number 500 失去焦点变化延时 当页面失去焦点,页面title变化的延时时间,单位毫秒。
// 该配置值为 -1 时,当页面失去焦点,页面title显示的文字不会变化。
onblurTime: 500,
// String "(*´∇`*) 欢迎回来!" 获取焦点标签文字 当页面获取焦点,页面title显示的文字;显示后,延时恢复原title。
focus: '(*´∇`*) 欢迎回来!',
// Number 1000 获取焦点变化延时 当页面获取焦点,页面title变化的延时时间,单位毫秒。
// 该配置值为 -1 时,当页面获取焦点,页面title显示的文字不会变化。
focusTime: 1000,
},
// 页脚
footer: {
// Number 2 页脚样式 1 2 分别代表了不同的样式
style: 1,
// 页脚标语
text: {
// String "" 页脚标语左侧文字。
left: '天天熬夜',
// String "" 页脚标语右侧文字。
right: '迟早猝死',
// Object "" 字体图标
iconFont: {
// 图标名称
icon: "icon-xl",
// 图标颜色
color: "red",
// 图标大小
fontSize: "16px"
}
},
},
// 友情链接
links: {
// Array [] 页脚友链
footer: [
["私信我", 'https://msg.cnblogs.com/send/chenkeer'],
["age", 'https://www.agefans.cc/'],
],
// 友链页
page: [
{
name: 'ZhangHe', // 昵称
introduction: 'IT技术类博客', // 简介
avatar: 'https://images.cnblogs.com/cnblogs_com/yizhangheka/1695816/o_230526064744_ZVArHsuH5w_0365de1b.png', // 头像
},
],
},
// 右下角菜单
rtMenu: {
// url "" 二维码图片Url。
qrCode: '',
// 打赏二维码
reward: {
// 支付宝收款码
alipay: '',
// 微信收款码
wechatpay: ''
},
},
// Object 日/夜间模式 日/夜间模式配置。页面使用日/夜间模式优先级:用户设置 > 自动切换 > 默认。
switchDayNight: {
enable: true, // 是否开启日/夜间模式切换按钮
auto: { // 自动切换相关配置
enable: false, // 开启自动切换
dayHour: 5, // 日间模式开始时间,整数型,24小时制
nightHour: 19 // 夜间模式开始时间,整数型,24小时制
}
},
// 动效 版本 v2.0.3 及之后,所有动效默认配置为关闭。
animate: {
// Object 主页banner动效配置。
homeBanner: {
enable: true, // 是否开启动效
options: {
radius: 15,
density: 0.2,
color: 'rgba(255,255,255, .2)', // 颜色设置,“random” 为随机颜色
clearOffset: 0.3
}
},
// Object 文章页banner动效配置。
articleBanner: {
enable: true,
},
// Object 背景动效
background: {
enable: true,
options: {
colorSaturation: "60%",
colorBrightness: "50%",
colorAlpha: 0.5,
colorCycleSpeed: 5,
verticalPosition: "random",
horizontalSpeed: 200,
ribbonCount: 3,
strokeSize: 0,
parallaxAmount: -0.2,
animateSections: true
}
},
},
// 代码
code: {
// String "" 渲染类型/** 所有可配置项
// cnblogs: 使用博客园默认代码高亮样式。
// hljs: 使用 Highlighting 插件渲染代码高亮样式。
// */
type: 'hljs',
// Object 只有 code.type 为 hljs 时,此配置才生效。
options: {
hljs: {
/** 所有可配置项
default、a11y-dark、a11y-light、agate、an-old-hope、androidstudio、arduino-light、arta、ascetic
、atelier-cave-dark、atelier-cave-light、atelier-dune-dark、atelier-dune-light、atelier-estuary-dark
、atelier-estuary-light、atelier-forest-dark、atelier-forest-light、atelier-heath-dark
、atelier-heath-light、atelier-lakeside-dark、atelier-lakeside-light、atelier-plateau-dark、atelier-plateau-light
、atelier-savanna-dark、atelier-savanna-light、atelier-seaside-dark、atelier-seaside-light
、atelier-sulphurpool-dark、atelier-sulphurpool-light、atom-one-dark-reasonable、atom-one-dark、atom-one-light
、brown-paper、codepen-embed、color-brewer、darcula、dark、darkula、docco、dracula、far
、foundation、github-gist、github、gml、googlecode、grayscale、gruvbox-dark、gruvbox-light、hopscotch
、hybrid、idea、ir-black、isbl-editor-dark、isbl-editor-light、kimbie.dark、kimbie.light、lightfair
、magula、mono-blue、monokai-sublime、monokai、nord、obsidian、ocean、paraiso-dark、paraiso-light、pojoaque
、purebasic、qtcreator_dark、qtcreator_light、railscasts、rainbow、routeros、school-book、shades-of-purple
、solarized-dark、solarized-light、sunburst、tomorrow-night-blue、tomorrow-night-bright
、tomorrow-night-eighties、tomorrow-night、tomorrow、vs、vs2015、xcode、xt256、zenburn
*/
// 代码高亮主题。
theme: 'atom-one-dark-reasonable',
// 语言识别范围,不配置默认不限制,支持语言 > https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md
languages: ['Bash', 'CSS', 'Dockerfile', 'Go', 'HTML', 'XML', 'HTTP']
},
// String "" 代码框高度限制 限制高度。例如:70vh、70%
maxHeight: '70vh',
// Boolean false 代码行号渲染
// 是否渲染代码行号,如开启会在代码框左侧增加行号显示,默认不开启。 不与博客园行号渲染兼容,如果博客园添加代码时勾选显示行号并同时开启此配置,会出现双行号的现象。大家自己权衡使用此配置。
line: true,
// Boolean true 风格代码框 mac风格代码框样式。
macStyle: true,
},
},
// 文章后缀
/*articleSuffix: {
// url "" 文章后缀左侧图片,不配置使用用户头像配置 info.avatar,用户头像没配置使用主题默认头像。
imgUrl: '',
// String "" 关于博主,支持HTML代码,不配置使用默认。
aboutHtml: "I am a good person",
// String "" 版权声明 版权声明,支持HTML代码,不配置使用默认。
copyrightHtml: "版权...",
// String "" 声援博主,支持HTML代码,不配置使用默认。
supportHtml: "声援...",
},*/
// Array [] 控制台输出
consoleList: [
['QQ', '746620446'],
],
// String "" 网站统计
//cnzz: "123456",
}
</script>
<script src="https://cdn.jsdelivr.net/gh/BNDong/[email protected]/dist/simpleMemory.js" defer></script>
<script src="https://blog-static.cnblogs.com/files/zhangfengxian/cnblogs-nav.js"></script>
CSS代码