1、解决主页文章列表摘要信息不显示;2、解决文章内代码块内容溢出;3、屏蔽主页鼠标滚动时控制台频繁报错
This commit is contained in:
parent
7be547c37d
commit
24adb23508
|
@ -336,6 +336,8 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
*/
|
||||
const scrollFn = function () {
|
||||
const $rightside = document.getElementById('rightside')
|
||||
// 解决浏览器滚动时无休止报错
|
||||
if ($rightside === null) { return }
|
||||
const innerHeight = window.innerHeight + 56
|
||||
|
||||
// 當滾動條小于 56 的時候
|
||||
|
|
|
@ -166,7 +166,7 @@ function getContrastYIQ(hexcolor) {
|
|||
function navTitle() {
|
||||
var titlevalue = document.title;
|
||||
var postName = document.getElementsByClassName("post-title")[0];
|
||||
document.getElementById("page-name-text").innerHTML = postName.innerText;
|
||||
document.getElementById("page-name-text").innerHTML = postName?.innerText;
|
||||
}
|
||||
|
||||
window.onload = function () {
|
||||
|
|
|
@ -3,11 +3,6 @@
|
|||
text-indent: 2em;
|
||||
} */
|
||||
|
||||
/* 代码块阴影 Bug */
|
||||
#article-container pre > code {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
/* 代码块纯黑色背景 */
|
||||
code[class*=" language-"], pre[class*=" language-"]{
|
||||
background: #18171d;
|
||||
|
@ -47,4 +42,7 @@ ul li {
|
|||
|
||||
#article-container pre > code {
|
||||
background: transparent !important;
|
||||
/* 解决文章界面代码超长时溢出问题 */
|
||||
display: block;
|
||||
overflow: auto;
|
||||
}
|
||||
|
|
|
@ -8955,7 +8955,7 @@ li {
|
|||
}
|
||||
|
||||
.recent-post-item.post-card-large .recent-post-info .recent-post-info-top .content {
|
||||
opacity: 0 !important;
|
||||
opacity: 0.8 !important;
|
||||
-webkit-line-clamp: 2 !important;
|
||||
}
|
||||
|
||||
|
@ -8965,7 +8965,7 @@ li {
|
|||
}
|
||||
|
||||
.recent-post-item .recent-post-info .recent-post-info-top .content {
|
||||
opacity: 0;
|
||||
opacity: 1;
|
||||
transition: 0.3s;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
|
@ -8978,13 +8978,13 @@ li {
|
|||
|
||||
@media screen and (max-width: 1300px) {
|
||||
.recent-post-item:hover .recent-post-info .recent-post-info-top .content {
|
||||
display: none;
|
||||
display: flow-root;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1300px) {
|
||||
.recent-post-item:hover .recent-post-info .recent-post-info-top .content {
|
||||
display: none;
|
||||
display: flow-root;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9008,7 +9008,7 @@ li {
|
|||
.recent-post-item .recent-post-info .recent-post-info-top .content {
|
||||
opacity: 1;
|
||||
-webkit-line-clamp: 3;
|
||||
display: none;
|
||||
display: flow-root;
|
||||
}
|
||||
|
||||
#recent-posts .recent-post-item .recent-post-info .article-title {
|
||||
|
@ -16636,3 +16636,51 @@ span.hexo-douban-pagenum {
|
|||
line-height: 1;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
/* 首行缩进 */
|
||||
/* .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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue