首页 > 其他分享 >思源笔记—代码片段

思源笔记—代码片段

时间:2024-02-15 12:11:06浏览次数:34  
标签:片段 code 思源 color 笔记 protyle hljs background b3

Vue 引用主题样式

.protyle-wysiwyg [data-node-id].bq, .b3-typography blockquote {
    border-left: 0.25em solid #5ebc1d !important;
    border-radius: 0em 0.31em 0.31em 0.em;
    background-color: rgb(106 241 90 / 5%) !important;
    margin-top: 8px !important;
    .protyle-wysiwyg [: ;}

粉色小屋代码块美化

/*代码块颜色*/
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}
/*!Theme: a11y-dark
  Author: @ericwbailey
  Maintainer: @ericwbailey
  Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css*/
.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}

/*代码块行数背景颜色*/
.protyle-linenumber__rows {
    background-color: #292929;
}

/*代码块行数颜色*/
.protyle-linenumber__rows>span::before {
    color: #cecece;
}

/* 设置顶部三个mac按钮样式 */
.code-block::after {
    content: ' ';
    position: absolute;
    background: #fa625c;
    box-shadow: 23px 0 #fdbc40, 45px 0 #35cd4b;
    border-radius: 7px;
    top: 10px;
    left: 15px;
    height: 12px;
    width: 12px;
    z-index: 1;
}

/*代码块背景颜色*/
.b3-typography div.hljs, .protyle-wysiwyg div.hljs {
    background-color: #2e2d2d;
}

/*语言提醒*/
.b3-typography .code-block .protyle-action .protyle-action__language, .protyle-wysiwyg .code-block .protyle-action .protyle-action__language {
    font-size: 85%;
    color: wheat;
    margin-top: -4px;
	padding-left: 2em;
}

网站引用字体颜色

.protyle-wysiwyg [data-node-id] span[data-type~=a] {
    color: #b54040;
    border-bottom: 1px solid var(--b3-border-color);
}

写味代码块美化

/*代码块颜色*/
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}
/*!Theme: a11y-dark
  Author: @ericwbailey
  Maintainer: @ericwbailey
  Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css*/
.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}

/*代码块背景设置*/
.b3-typography div.hljs, .protyle-wysiwyg div.hljs {
    background: #2e2d2d;
    padding: 30px 10px 22px 10px;
}

/*行号背景设置*/
.protyle-linenumber__rows {
    background-color: #302d2d !important;
}

/*行数颜色设置*/
.protyle-linenumber__rows span::before {
    color: #ffffffad;
}

/*复制按钮代码颜色*/
.code-block .protyle-action .protyle-action__copy, .code-block .protyle-action .protyle-action__menu {
    margin-top: -3px;
    color: wheat;
    background-color: var(--S-list-background);
}

/*语言提醒*/
.b3-typography .code-block .protyle-action .protyle-action__language, .protyle-wysiwyg .code-block .protyle-action .protyle-action__language {
    font-size: 85%;
    color: wheat;
    margin-top: -4px;
	padding-left: 2em;
}
/* 设置顶部三个mac按钮样式 */
.code-block::after {
    content: ' ';
    position: absolute;
    background: #fa625c;
    box-shadow: 23px 0 #fdbc40, 45px 0 #35cd4b;
    border-radius: 7px;
    top: 10px;
    left: 15px;
    height: 12px;
    width: 12px;
    z-index: 1;
}

属性固定

.protyle-wysiwyg [data-node-id][fold="1"]:not(.li):not([data-type="NodeHeading"]) .protyle-attr {
    opacity: 1;
    transform: translateY(100%);
}

.protyle-attr>div:not(.protyle-attr--refcount) {
    margin: 0 4px;
    line-height: 16px;
    color: #bc9638;
    min-width: 12px;
    padding-right: 65px;
    font-weight: bold;
}

写味代码块Light配色设置

/*代码块颜色*/
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}
/*!Theme: a11y-dark
  Author: @ericwbailey
  Maintainer: @ericwbailey
  Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css*/
.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}

/*代码块背景设置*/
.b3-typography div.hljs, .protyle-wysiwyg div.hljs {
    background: #2e2d2d;
    padding: 30px 10px 22px 10px;
}

/*行号背景设置*/
.b3-typography .code-block, .protyle-wysiwyg .code-block {
    position: relative;
    padding: 0;
    margin: 1em 0;
    display: flex;
    flex-direction: row-reverse;
    background-color: #302d2d;
}

/*复制按钮代码颜色*/
.code-block .protyle-action .protyle-action__copy, .code-block .protyle-action .protyle-action__menu {
    margin-top: -3px;
    color: wheat;
    background-color: var(--S-list-background);
}

/*行数颜色*/
.protyle-linenumber__rows span::before {
    color: #ffffffad;
}

/*语言提醒*/
.b3-typography .code-block .protyle-action .protyle-action__language, .protyle-wysiwyg .code-block .protyle-action .protyle-action__language {
    font-size: 85%;
    color: wheat;
    margin-top: -4px;
	padding-left: 2em;
}
/* 设置顶部三个mac按钮样式 */
.code-block::after {
    content: ' ';
    position: absolute;
    background: #fa625c;
    box-shadow: 23px 0 #fdbc40, 45px 0 #35cd4b;
    border-radius: 7px;
    top: 10px;
    left: 15px;
    height: 12px;
    width: 12px;
    z-index: 1;
}

标题居中

.protyle-title__input {
    text-align: center;
}

头图半透明

/*cssInJS*/
/*题头图透明遮罩*/ 
.protyle-background__img{
-webkit-mask: linear-gradient( #000000 ,#000000,transparent);
}

行间距调整

.protyle-wysiwyg>.p {
 	line-height: 2.3;  /*段落块的行间距,段间距的话前面该改成margin*/
 }

隐藏大纲前面的块标记 H

.sy__outline .b3-list-item__graphic {
    display: none;
}

文档树块间距

.b3-list-item {
    line-height: 35px !important;
    min-height: 28px;
    padding: 0 4px;
    display: flex;
    cursor: pointer;
    align-items: center;
    position: relative;
    background-color: rgba(0,0,0,0);
    text-align: left;
    border: 0;
    color: var(--b3-theme-on-background);
    margin: 1px 8px;
}

.b3-typography blockquote, .b3-typography .bq, .protyle-wysiwyg blockquote, .protyle-wysiwyg .bq {
    padding: 4px;
    color: black;
    border-left: 0.25em solid #ffffff;
    background-color: var(--b3-list-hover);
    margin: 4px 0;
}

代码块字体大小设置

.b3-typography .hljs, .protyle-wysiwyg .hljs {
    border-radius: var(--b3-border-radius);
    padding: 1.6em 4px;
    font-size: 13px !important;
    overflow: auto;
    font-family: var(--b3-font-family-code);
    min-height: 22px !important;
    overflow-x: overlay;
    tab-size: 4;
    flex: 1;
}

写味引用字体颜色

.b3-typography blockquote, .b3-typography .bq, .protyle-wysiwyg blockquote, .protyle-wysiwyg .bq {
    padding: 4px;
    color: #EBEBEB;
    border-left: 0.25em solid #ffffff;
    background-color: var(--b3-list-hover);
    margin: 4px 0;
}

标签:片段,code,思源,color,笔记,protyle,hljs,background,b3
From: https://www.cnblogs.com/NorthPoet/p/18016127/siyuan-note-code-fragment-r6b0m

相关文章

  • 基础图论笔记
    二分图  染色法  例题ACwing860-染色法判断二分图(染色法)-CSDN博客给定一个n个点m条边的无向图,图中可能存在重边和自环。请你判断这个图是否是二分图。输入格式第一行包含两个整数n和m。接下来m行,每行包含两个整数u和v,表示点u和点v之间存在一条边。输出格式如......
  • Go语言精进之路读书笔记第27条——尽量定义小接口
    接口越大,抽象程度越低——RobPike,Go语言之父27.1Go推荐定义小接口无论标准库还是社区项目,都遵循了“尽量定义小接口”的建议,方法数量在1~3个范围内的接口占了绝大多数。27.2小接口的优势1.接口越小,抽象程度越高,被接纳度越高抽象程度越高,对应的集合空间越大。无方法的......
  • 【阅读笔记】空域保边降噪《Side Window Filtering》
    1、保边滤波背景保边滤波器的代表包括双边滤波、引导滤波,但是这类滤波器有一个问题,它们均将待处理的像素点放在了方形滤波窗口的中心。但如果待处理的像素位于图像纹理或者边缘,方形滤波核卷积的处理结果会导致这个边缘变模糊。基于这个观察,《SideWindowFiltering》的作者提出......
  • 2023北京集训 做题笔记
    2023北京集训做题笔记动态规划CF1610HSquidGame钦定\(1\)为根,发现如果\(u,v\)不为祖先后代关系,则选择根能把它们全部消掉剩下的\(u,v\)均为祖先后代,假设\(u\)为祖先如果在一条链上,问题转化为选择尽量少的点覆盖所有线段,与端点重合不算常规做法是按右端点排序,每次......
  • 2024.1 省选集训题单笔记
    CF513E2SubarrayCuts一开始还以为有什么神仙性质,找了半天发现性质不好,要考虑一些暴力点的做法了相邻两段和之差的绝对值,这个限制很难处理我们只能考虑把贡献拆开,如果把每段的位置与和标在一张折线图上,我们发现这张图中的「山峰」产生\(+2\)的贡献,「山谷」产生\(-2\)的贡......
  • NOIP2023 集训做题笔记
    杂项CF1181E2AStoryofOneCountry(Hard)启发式分裂发现如果当前矩形中有一整行或一整列没有穿过城堡内部,就可以分为\(2\)部分而且分开后相当于限制减少,每次贪心的能分就分,朴素实现复杂度为\(O(n^2\logn)\),可通过easyversion考虑优化每次找分割点的过程如果分割点......
  • Codeforces 做题笔记
    1841EFilltheMatrix刚开始思路错了,以为就从下往上铺但发现要尽量让横的连续段断开的次数少,每断开一次相当于数量\(-1\)所以从宽度最大的矩形开始填,尽量填满可以用set维护当前行的连续段,这一列遇到黑格就split,去除宽度为\(1\)的,同时记录加入的时间戳来计算矩形高度vo......
  • 【文化课学习笔记】【化学】选必一:水溶液中的离子反应与平衡(下)
    【化学】选必一:水溶液中的离子反应与平衡(下)盐类水解基本概念定义:盐电离出的离子与水电离出的\(\ce{H+}\)或\(\ce{OH-}\)相互作用生成弱电解质的反应。特点:可逆:水解是可逆反应,在一定条件下达到化学平衡。程度小:通常盐类水解程度很小,一般无沉淀析出、无气体放出。例......
  • 【学习笔记】关于图论的一切
    存图邻接矩阵边集邻接表最小生成树primkruskal最短路dij堆优化spfafloyd欧拉路欧拉回路scc缩点2-sAT二分图基础概念匈牙利DAG最小链覆盖网络流Dinic最小割最大权闭合子图最小割集费用流Zkw双连通问题割边割点双连通分量圆方树生成树计数......
  • KTT学习笔记
    KTT学习笔记KTT是由EI给出的解决区间加正数、区间最大子段和的数据结构。大体的思路是在把普通最大子段和的信息看成和增量有关的一次函数,然后维护增量为多少时取到最大值的信息会改变,相当于是维护凸壳,但是只维护当前段和当前段的末尾位置,通过势能分析可以得到复杂度是\(O(......