Skip to main content

Cnblogs Theme Silence Configure Plain Style Theme

Reference

Change Blog Skin​

Change blog skin to Custom

Page Custom CSS Code​

  1. Check "Disable Template Default CSS"
  2. Import Content of this file and copy it to the code box
  3. Configure code block copy function style and right scrollbar style
/* Copy function button begin */
.cnblogs-markdown pre {
position: relative;
}
.cnblogs-markdown pre > span {
position: absolute;
top: 0;
right: 0;
border-radius: 2px;
padding: 0 10px;
font-size: 12px;
background: rgba(0, 0, 0, 0.4);
color: #fff;
cursor: pointer;
display:none;
}
.cnblogs-markdown pre:hover > span {
display:block;
}
.cnblogs-markdown pre > .copyed {
background: #67c23a;
}
/* Copy function button end */

/* Scrollbar function begin */
/* Main css part style */
::-webkit-scrollbar {
width: 15px; /* Valid for vertical scrollbar */
height: 15px; /* Valid for horizontal scrollbar */
}

/* Define scrollbar track color, inner shadow and rounded corners */
::-webkit-scrollbar-track{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: gainsboro;
border-radius: 3px;
}


/* Define slider color, inner shadow and rounded corners */
::-webkit-scrollbar-thumb{
border-radius: 7px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #42b983;
}

/* Define button style at both ends */
::-webkit-scrollbar-button {
background-color:white;
}

/* Define style at the bottom right corner */
::-webkit-scrollbar-corner {
background:white;
}
/* Scrollbar function end */

Blog Sidebar Announcement​

<script type="text/javascript">
window.$silence = {
avatar: 'https://images.cnblogs.com/cnblogs_com/whalefall541/2033891/t_210920062756123.jpg',// Define Home Avatar

favicon: 'https://files.cnblogs.com/files/whalefall541/1152748.gif', // Define Webpage Favicon

github: 'https://github.com/whalefall541',

defaultMode: 'auto', // Auto Night Mode

defaultTheme: 'c', // Bottom right toolbar color style

catalog: {
enable: true,
index: true,
active: false,
levels: ['h2', 'h3', 'h4']
},

signature: {
enable: true,
author: 'whalefall541',
license: ['Attribution-NonCommercial-ShareAlike 4.0 International', 'https://creativecommons.org/licenses/by-nc-sa/4.0/'],
remark: 'all corpright reserved, if reprinted must include origin website',
},

sponsor: {
enable: true,
text: 'Welcome to follow WeChat Official Account``',
wechat: 'https://images.cnblogs.com/cnblogs_com/whalefall541/2033891/o_210920064116weichat.jpg',

}
};
</script>

<script src="https://files.cnblogs.com/files/whalefall541/silence.min.js"></script>
<script src="https://files.cnblogs.com/files/whalefall541/clipboard.min.js"></script>
<script src="https://files.cnblogs.com/files/whalefall541/cp.js"></script>

Reference Reference Repo

Agreement
The code part of this work is licensed under Apache License 2.0 . You may freely modify and redistribute the code, and use it for commercial purposes, provided that you comply with the license. However, you are required to:
  • Attribution: Retain the original author's signature and code source information in the original and derivative code.
  • Preserve License: Retain the Apache 2.0 license file in the original and derivative code.
The documentation part of this work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License . You may freely share, including copying and distributing this work in any medium or format, and freely adapt, remix, transform, and build upon the material. However, you are required to:
  • Attribution: Give appropriate credit, provide a link to the license, and indicate if changes were made.
  • NonCommercial: You may not use the material for commercial purposes. For commercial use, please contact the author.
  • ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.