用户:Salt lovely/Vector.scss:修订间差异

添加2,113字节 、​ 2022年11月22日 (星期二)
文本替换 - 替换“mcbbs-wiki.cn”为“mcbbs.wiki”
(.)
(文本替换 - 替换“mcbbs-wiki.cn”为“mcbbs.wiki”)
 
(未显示1个用户的3个中间版本)
<pre>$topbar-height: 1.5rem; // 顶栏高度
<pre>// 无边框
$topbar-padding: 0.5rem; // 顶栏高度
$top-gap: 0.5rem; // 主体与顶栏的间隙
$top-height: $topbar-height + $topbar-padding * 2; // 顶部高度
$content-bookborder: 46px; // 四周书页图片宽度
$content-top: calc(
#{$content-bookborder} + #{$top-height + $top-gap}
); // 主体部分高度(顶部+书页背景顶部边框)
/* 源代码: 用户:Salt_lovely/Vector.scss */
// 无边框
@mixin noboder {
border: none;
"DejaVu serif", "Source Han Serif", "Source Han Serif SC";
}
/* 背景 */
// 左侧栏
body {
background: var(--themeimg) 0 0 no-repeat;
background-position: center;
background-attachment: fixed;
background-size: cover;
border-top: none;
font-family: var(--fontfamily);
* {
border-color: var(--linecolor);
}
}
/* 左侧栏 */
#mw-panel {
position: fixed;
margin: 0;
padding: 0;
position: relative;
background-image: none;
font-size: 1rem;
line-height: 1.3rem;
cursor: pointer;
&::after {
position: absolute;
bottom: 0;
right: 0;
opacity: 0;
font-size: 0.75rem;
line-height: 1.3rem;
transition: 0.3s ease;
}
&:hover::after {
opacity: 0.9;
}
}
.body {
}
}
&.salt-close .body {
max-height:> 0px;h1,
> h2,
> h3,
> h4,
> h5,
> h6 {
&::after {
content: "点击展开";
}
}
.body {
max-height: 0px;
}
}
&.salt-open .body {
max-height:> var(--salt-open-heighth1, 100vh);
> h2,
> h3,
> h4,
> h5,
> h6 {
&::after {
content: "点击收起";
}
}
.body {
max-height: var(--salt-open-height, 100vh);
}
}
}
}
/* 最顶部的信息栏 */
// 背景
#p-personal {
body {
width: 100%;
background: var(--themeimg) 0 0 no-repeat;
background-position: centerfixed;
background-attachmenttop: fixed0;
background-sizeright: cover0;
border-topheight: none$topbar-height;
padding: $topbar-padding $topbar-padding * 2;
font-family: var(--fontfamily);
background: url(https://www.mcbbs.net/template/mcbbs/image/top_bg.png);
* {
borderbackground-colorsize: var(--linecolor)contain;
opacity: 0.5;
font-size: 1rem;
// transition: opacity 0.5s ease;
transition-duration: 0.3s;
transition-timing-function: ease;
transition-delay: 0.5s;
&:hover {
opacity: 1;
transition-delay: 0s;
}
ul {
}
// right: 0;
// 主体
float: right;
$content-bookborder: 46px; // 四周书页图片宽度
li {
 
height: 1rem;
$bookborder-lefttop: url(https://s2.ax1x.com/2019/11/28/QFB2X4.png);
margin-top: 0;
$bookborder-top: url(https://s2.ax1x.com/2019/11/28/QFBc1U.png);
margin-bottom: 0;
$bookborder-righttop: url(https://mcbbs-wiki.cn/images/c/cf/body_top-right.png);
font-size: 0.9rem;
 
line-height: 1rem;
$bookborder-left: url(https://www.mcbbs.net/template/mcbbs/image/bg_border_left.png); // 左侧图片
}
$bookborder-right: url(https://mcbbs-wiki.cn/images/1/13/bg_border_right.png); // 右侧图片
 
$bookborder-leftbottom: url(https://s2.ax1x.com/2019/11/28/QFcINd.png);
$bookborder-bottom: url(https://s2.ax1x.com/2019/11/28/QFco4A.png);
$bookborder-rightbottom: url(https://mcbbs-wiki.cn/images/e/e9/body_bottom-right.png);
 
#content {
top: calc(#{$content-bookborder} + 2rem);
padding: 1px $content-bookborder * 1.5;
margin-right: 0.5rem;
margin-bottom: calc(#{$content-bookborder * 2} + 1rem);
overflow: visible;
position: relative;
background: $bookborder-left left top repeat-y,
$bookborder-right right top repeat-y;
background-color: var(--bgcolor);
min-height: 500px;
@include noboder();
&::after,
&::before {
content: "";
left: 0;
height: $content-bookborder;
width: calc(100% - #{$content-bookborder * 2});
padding: 0 $content-bookborder;
display: block;
position: absolute;
}
&::before {
// 上边
top: -$content-bookborder;
background: $bookborder-lefttop left top no-repeat,
$bookborder-righttop right top no-repeat,
$bookborder-top top repeat-x content-box;
}
&::after {
// 下边
bottom: -$content-bookborder;
background: $bookborder-leftbottom left bottom no-repeat,
$bookborder-rightbottom right bottom no-repeat,
$bookborder-bottom bottom repeat-x content-box;
}
}
//* 顶部栏 */
$head-right-offet: 12px; // 右侧导航栏偏移量
#mw-head {
top: calc(#{$content-bookborder} + 2rem)top;
padding: 0 $content-bookborder * 1.5 - $head-right-offet 0
$content-bookborder * 1.5;
#right-navigation {
margin-top: 0rem;
nav,
div,
ul,
span {,
a {
background-image: none;
background-color: transparent;
}
}
ul li {
background-image:li linear-gradient({
0deg,height: 2.7rem;
var(--linecolor) 0%,
var(--bgcolor) 30%
);
&:hover {
background-image: linear-gradient(
0deg,
var(--bgcolor) 20%
);
&:hover {
background-image: linear-gradient(
0deg,
var(--linecolor) 0%,
var(--bgcolor) 12%
);
}
a {
font-size: 0.875rem;
padding-top: 1rem;
text-align: center;
}
&.icon a {
padding-top: 2.5rem;
}
}
a&.menu li {
fontbackground-sizeimage: 0.875rem;linear-gradient(
padding-top: 1rem; 0deg,
} var(--linecolor) 0%,
&.icon a { var(--bgcolor) 12%
padding-top: 2.5rem);
&:hover {
background-image: linear-gradient(
0deg,
var(--linecolor) 0%,
var(--bgcolor) 6%
);
}
}
}
margin-right: 0;
}
/* 主体 */
#p-personal {
 
width: 100%;
$bookborder-lefttop: url(https://s2.ax1x.com/2019/11/28/QFB2X4.png);
position: fixed;
$bookborder-top: url(https://s2.ax1x.com/2019/11/28/QFBc1U.png);
top: 0;
$bookborder-righttop: url(https://mcbbs.wiki/images/c/cf/body_top-right.png);
right: 0;
 
padding: 0.5rem 1rem;
background$bookborder-left: url(https://www.mcbbs.net/template/mcbbs/image/top_bgbg_border_left.png); // 左侧图片
$bookborder-right: url(https://mcbbs.wiki/images/1/13/bg_border_right.png); // 右侧图片
background-size: contain;
 
opacity: 0.5;
$bookborder-leftbottom: url(https://s2.ax1x.com/2019/11/28/QFcINd.png);
font-size: 1rem;
$bookborder-bottom: url(https://s2.ax1x.com/2019/11/28/QFco4A.png);
// transition: opacity 0.5s ease;
$bookborder-rightbottom: url(https://mcbbs.wiki/images/e/e9/body_bottom-right.png);
transition-duration: 0.3s;
 
transition-timing-function: ease;
#content {
transition-delay: 0.5s;
&top:hover {$content-top;
opacitymin-height: 1400px;
padding: 1px $content-bookborder * 1.5;
transition-delay: 0s;
margin-left: 11rem;
margin-right: 0.5rem;
margin-bottom: calc(#{$content-bookborder * 2} + 5rem);
overflow: visible;
position: relative;
background: $bookborder-left left top repeat-y,
$bookborder-right right top repeat-y;
background-color: var(--bgcolor);
@include noboder();
&::after,
&::before {
content: "";
left: 0;
height: $content-bookborder;
width: calc(100% - #{$content-bookborder * 2});
padding: 0 $content-bookborder;
display: block;
position: absolute;
}
ul&::before {
// right: 0;上边
floattop: right-$content-bookborder;
background: $bookborder-lefttop left top no-repeat,
li {
height:$bookborder-righttop 1rem;right top no-repeat,
margin$bookborder-top: 0top repeat-x content-box;
}
margin-bottom: 0;
&::after {
font-size: 0.9rem;
// line-height: 1rem;下边
}bottom: -$content-bookborder;
background: $bookborder-leftbottom left bottom no-repeat,
$bookborder-rightbottom right bottom no-repeat,
$bookborder-bottom bottom repeat-x content-box;
}
}
/* 页脚 */
// 适配
#footer {
@media screen and (max-width: 982px) {
#mwpadding-panelbottom: {0;
margin-top: $content-bookborder;
left: 0;
clear: both;
transition: all 0.3s;
&:hover {
/*鼠标滑过,背景变白*/
background: rgba(255, 255, 255, 0.7);
}
}
//* 滚动公告 */
.topsign {
position: relative;
}
}
/* 适配 */
// 页脚
@media screen and (max-width: 982px) {
#footer {
padding#mw-bottom:panel 0;{
// margin-top left: 35px0;
}
transition: all 0.3s;
&:hover#content {
margin-left: 10rem;
background: rgba(255, 255, 255, 0.7); /*鼠标滑过,背景变白*/
margin-right: 0;
}
}
优秀编辑者、​界面管理员、​监督员、​管理员
1,747

个编辑