This commit is contained in:
haoouba 2021-02-10 23:24:59 +08:00
parent fb0d916901
commit 2bdb1f2571
17 changed files with 3494 additions and 3615 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -88,6 +88,7 @@
column-gap: 15px; column-gap: 15px;
.item { .item {
overflow: hidden; overflow: hidden;
border-radius: var(--radius-inner);
.link { .link {
display: block; display: block;
.inner { .inner {
@ -102,9 +103,8 @@
} }
.image { .image {
width: 100%; width: 100%;
height: 125px; height: 120px;
object-fit: cover; object-fit: cover;
border-radius: var(--radius-inner) var(--radius-inner) 0 0;
transition: opacity 0.35s; transition: opacity 0.35s;
} }
.title { .title {
@ -117,7 +117,6 @@
line-height: 32px; line-height: 32px;
color: var(--minor); color: var(--minor);
background: var(--classD); background: var(--classD);
border-radius: 0 0 5px 5px;
transition: background 0.35s; transition: background 0.35s;
} }
.views { .views {

File diff suppressed because one or more lines are too long

View File

@ -1,280 +1,283 @@
.joe_live { .joe_live {
&__contain { &__contain {
position: relative; position: relative;
background: var(--background); background: var(--background);
border-radius: var(--radius-wrap); border-radius: var(--radius-wrap);
box-shadow: var(--box-shadow); box-shadow: var(--box-shadow);
padding: 60px 15px 15px; padding: 60px 15px 15px;
&-title { &-title {
display: flex; display: flex;
align-items: center; align-items: center;
position: absolute; position: absolute;
top: 15px; top: 15px;
left: -10px; left: -10px;
background: var(--theme); background: var(--theme);
color: #fff; color: #fff;
font-weight: 500; font-weight: 500;
box-shadow: 2px 5px 10px rgba(49, 58, 70, 0.15); box-shadow: 2px 5px 10px rgba(49, 58, 70, 0.15);
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
padding: 0 12px; padding: 0 12px;
border-radius: 2px 2px 2px 0; border-radius: 2px 2px 2px 0;
user-select: none; user-select: none;
&::after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
bottom: -10px; bottom: -10px;
left: -10px; left: -10px;
border-style: solid; border-style: solid;
border-width: 10px; border-width: 10px;
border-color: var(--theme) transparent transparent; border-color: var(--theme) transparent transparent;
transform: rotate(90deg); transform: rotate(90deg);
} }
} }
} }
&__type { &__type {
margin-bottom: 15px; margin-bottom: 15px;
&-title { &-title {
padding-right: 8px; padding-right: 8px;
.icon { .icon {
width: 15px; width: 15px;
height: 15px; height: 15px;
fill: #fff; fill: #fff;
margin-left: 5px; margin-left: 5px;
cursor: pointer; cursor: pointer;
} }
} }
&-list { &-list {
display: grid; display: grid;
gap: 15px; gap: 15px;
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
border-top: 1px solid var(--classC); border-top: 1px solid var(--classC);
padding-top: 15px; padding-top: 15px;
.item { .item {
user-select: none; user-select: none;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
background: var(--classD); background: var(--classD);
height: 28px; height: 28px;
line-height: 28px; line-height: 28px;
border-radius: 14px; border-radius: 14px;
cursor: pointer; cursor: pointer;
color: var(--routine); color: var(--routine);
font-size: 12px; font-size: 12px;
padding: 0 15px; padding: 0 15px;
text-align: center; text-align: center;
transition: color 0.35s, background 0.35s, box-shadow 0.35s, transform 0.35s; transition: color 0.35s, background 0.35s, box-shadow 0.35s, transform 0.35s;
&.active { &.active {
transform: translateY(-2px); transform: translateY(-2px);
color: #fff; color: #fff;
background: var(--theme); background: var(--theme);
box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
} }
&:hover { &:hover {
transform: translateY(-2px); transform: translateY(-2px);
box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
} }
} }
.error { .error {
text-align: center; text-align: center;
color: var(--routine); color: var(--routine);
user-select: none; user-select: none;
} }
} }
} }
&__list { &__list {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
gap: 15px; gap: 15px;
&-item { &-item {
display: block; display: block;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
border-radius: var(--radius-wrap); border-radius: var(--radius-wrap);
.thumb { .thumb {
position: relative; position: relative;
width: 100%; width: 100%;
height: 140px; height: 140px;
.screenshot { .screenshot {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
} }
.recommendTagName { .recommendTagName {
position: absolute; position: absolute;
top: 8px; top: 8px;
right: 8px; right: 8px;
background: #f90; background: #f90;
color: #fff; color: #fff;
font-size: 12px; font-size: 12px;
padding: 2px 8px; padding: 2px 8px;
border-radius: 2px; border-radius: 2px;
font-style: normal; font-style: normal;
z-index: 4; z-index: 4;
} }
&::before { &::before {
content: ''; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0);
transition: background 0.3s ease-out; transition: background 0.3s ease-out;
z-index: 2; z-index: 2;
} }
&::after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
width: 50px; width: 50px;
height: 50px; height: 50px;
margin: -25px 0 0 -25px; margin: -25px 0 0 -25px;
opacity: 0; opacity: 0;
background: url(../img/play.png) no-repeat; background: url(../img/play.png) no-repeat;
transform: scale(2); transform: scale(2);
transition: transform 0.25s ease-out, opacity 0.25s ease-out; transition: transform 0.25s ease-out, opacity 0.25s ease-out;
z-index: 3; z-index: 3;
} }
&:hover { &:hover {
&::before { &::before {
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
} }
&::after { &::after {
opacity: 0.8; opacity: 0.8;
transform: scale(1); transform: scale(1);
} }
} }
} }
.description { .description {
position: relative; position: relative;
background: var(--background); background: var(--background);
padding: 15px 10px 10px; padding: 15px 10px 10px;
.avatar { .avatar {
position: absolute; position: absolute;
top: -20px; top: -20px;
left: 0; left: 0;
z-index: 9; z-index: 9;
.icon { .icon {
height: 35px; height: 35px;
fill: var(--background); fill: var(--background);
} }
img { img {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
width: 25px; width: 25px;
height: 25px; height: 25px;
object-fit: cover; object-fit: cover;
border-radius: 50%; border-radius: 50%;
} }
} }
.nick { .nick {
position: relative; position: relative;
color: var(--minor); color: var(--minor);
font-size: 12px; font-size: 12px;
padding-left: 13px; padding-left: 13px;
margin-bottom: 5px; margin-bottom: 5px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
&::before { &::before {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 0; left: 0;
transform: translateY(-50%); transform: translateY(-50%);
content: ''; content: '';
border: 2px solid #0056ff; border: 2px solid #0056ff;
height: 4px; height: 4px;
width: 4px; width: 4px;
border-radius: 50%; border-radius: 50%;
} }
} }
.introduction { .introduction {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
color: var(--main); color: var(--main);
border-bottom: 1px solid var(--classD); border-bottom: 1px solid var(--classD);
padding-bottom: 8px; padding-bottom: 8px;
margin-bottom: 8px; margin-bottom: 8px;
} }
.meta { .meta {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 12px; font-size: 12px;
color: var(--minor); color: var(--minor);
.icon { .icon {
width: 13px; width: 13px;
height: 13px; height: 13px;
margin-right: 3px; margin-right: 3px;
} }
.name { .name {
color: #f90; color: #f90;
margin-left: auto; margin-left: auto;
} }
} }
} }
} }
&:empty { &:empty {
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
height: 180px; height: 180px;
&::after { &::after {
content: ''; content: '';
display: block; display: block;
width: 70px; width: 70px;
height: 70px; height: 70px;
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTciIGhlaWdodD0iNTciIHZpZXdCb3g9IjAgMCA1NyA1NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHJva2U9IiM0MDllZmYiPg0KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+DQogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiIHN0cm9rZS13aWR0aD0iMiI+DQogICAgICAgICAgICA8Y2lyY2xlIGN4PSI1IiBjeT0iNTAiIHI9IjUiPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN5Ig0KICAgICAgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjIuMnMiDQogICAgICAgICAgICAgICAgICAgICB2YWx1ZXM9IjUwOzU7NTA7NTAiDQogICAgICAgICAgICAgICAgICAgICBjYWxjTW9kZT0ibGluZWFyIg0KICAgICAgICAgICAgICAgICAgICAgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIC8+DQogICAgICAgICAgICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iY3giDQogICAgICAgICAgICAgICAgICAgICBiZWdpbj0iMHMiIGR1cj0iMi4ycyINCiAgICAgICAgICAgICAgICAgICAgIHZhbHVlcz0iNTsyNzs0OTs1Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgPC9jaXJjbGU+DQogICAgICAgICAgICA8Y2lyY2xlIGN4PSIyNyIgY3k9IjUiIHI9IjUiPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN5Ig0KICAgICAgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjIuMnMiDQogICAgICAgICAgICAgICAgICAgICBmcm9tPSI1IiB0bz0iNSINCiAgICAgICAgICAgICAgICAgICAgIHZhbHVlcz0iNTs1MDs1MDs1Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN4Ig0KICAgICAgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjIuMnMiDQogICAgICAgICAgICAgICAgICAgICBmcm9tPSIyNyIgdG89IjI3Ig0KICAgICAgICAgICAgICAgICAgICAgdmFsdWVzPSIyNzs0OTs1OzI3Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgPC9jaXJjbGU+DQogICAgICAgICAgICA8Y2lyY2xlIGN4PSI0OSIgY3k9IjUwIiByPSI1Ij4NCiAgICAgICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJjeSINCiAgICAgICAgICAgICAgICAgICAgIGJlZ2luPSIwcyIgZHVyPSIyLjJzIg0KICAgICAgICAgICAgICAgICAgICAgdmFsdWVzPSI1MDs1MDs1OzUwIg0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN4Ig0KICAgICAgICAgICAgICAgICAgICAgZnJvbT0iNDkiIHRvPSI0OSINCiAgICAgICAgICAgICAgICAgICAgIGJlZ2luPSIwcyIgZHVyPSIyLjJzIg0KICAgICAgICAgICAgICAgICAgICAgdmFsdWVzPSI0OTs1OzI3OzQ5Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgPC9jaXJjbGU+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=); background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTciIGhlaWdodD0iNTciIHZpZXdCb3g9IjAgMCA1NyA1NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHJva2U9IiM0MDllZmYiPg0KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+DQogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiIHN0cm9rZS13aWR0aD0iMiI+DQogICAgICAgICAgICA8Y2lyY2xlIGN4PSI1IiBjeT0iNTAiIHI9IjUiPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN5Ig0KICAgICAgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjIuMnMiDQogICAgICAgICAgICAgICAgICAgICB2YWx1ZXM9IjUwOzU7NTA7NTAiDQogICAgICAgICAgICAgICAgICAgICBjYWxjTW9kZT0ibGluZWFyIg0KICAgICAgICAgICAgICAgICAgICAgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIC8+DQogICAgICAgICAgICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iY3giDQogICAgICAgICAgICAgICAgICAgICBiZWdpbj0iMHMiIGR1cj0iMi4ycyINCiAgICAgICAgICAgICAgICAgICAgIHZhbHVlcz0iNTsyNzs0OTs1Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgPC9jaXJjbGU+DQogICAgICAgICAgICA8Y2lyY2xlIGN4PSIyNyIgY3k9IjUiIHI9IjUiPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN5Ig0KICAgICAgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjIuMnMiDQogICAgICAgICAgICAgICAgICAgICBmcm9tPSI1IiB0bz0iNSINCiAgICAgICAgICAgICAgICAgICAgIHZhbHVlcz0iNTs1MDs1MDs1Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN4Ig0KICAgICAgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjIuMnMiDQogICAgICAgICAgICAgICAgICAgICBmcm9tPSIyNyIgdG89IjI3Ig0KICAgICAgICAgICAgICAgICAgICAgdmFsdWVzPSIyNzs0OTs1OzI3Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgPC9jaXJjbGU+DQogICAgICAgICAgICA8Y2lyY2xlIGN4PSI0OSIgY3k9IjUwIiByPSI1Ij4NCiAgICAgICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJjeSINCiAgICAgICAgICAgICAgICAgICAgIGJlZ2luPSIwcyIgZHVyPSIyLjJzIg0KICAgICAgICAgICAgICAgICAgICAgdmFsdWVzPSI1MDs1MDs1OzUwIg0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN4Ig0KICAgICAgICAgICAgICAgICAgICAgZnJvbT0iNDkiIHRvPSI0OSINCiAgICAgICAgICAgICAgICAgICAgIGJlZ2luPSIwcyIgZHVyPSIyLjJzIg0KICAgICAgICAgICAgICAgICAgICAgdmFsdWVzPSI0OTs1OzI3OzQ5Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgPC9jaXJjbGU+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
} }
&__pagination { &__pagination {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
padding-top: 15px; padding-top: 15px;
&-item { &-item {
user-select: none; user-select: none;
cursor: pointer; cursor: pointer;
margin-left: 5px; margin-left: 5px;
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
padding: 0 15px; padding: 0 15px;
background: var(--background); background: var(--background);
color: var(--main); color: var(--main);
border-radius: 2px; border-radius: 2px;
transition: background 0.35s, color 0.35s; transition: background 0.35s, color 0.35s;
svg { &:first-child {
fill: var(--routine); margin-left: 0;
transition: fill 0.35s; }
} svg {
.next { fill: var(--routine);
transform: rotate(180deg); transition: fill 0.35s;
} }
&.active, .next {
&:hover { transform: rotate(180deg);
color: #fff; }
background: var(--theme); &.active,
svg { &:hover {
fill: #fff; color: #fff;
} background: var(--theme);
} svg {
} fill: #fff;
} }
&__play { }
&-player { }
width: 100%; }
height: 580px; &__play {
background: #000; &-player {
} width: 100%;
} height: 550px;
background: #000;
}
}
} }

View File

@ -1 +1 @@
*{margin:0;padding:0;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{border-radius:4px;background:var(--seat)}::-webkit-scrollbar-track{background:transparent}::-moz-selection{color:#fff;background:var(--theme)}::selection{color:#fff;background:var(--theme)}body{font-size:14px;font-family:'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif}body::before{content:'';position:fixed;top:0;left:0;right:0;bottom:0;z-index:-520;pointer-events:none}input[type='text']{-webkit-appearance:none;border-radius:0;font-size:13px;font-weight:500}iframe{display:block;border:none;margin:0 auto;vertical-align:middle}textarea{resize:none;-webkit-appearance:none}li{list-style:none}a{text-decoration:none}h1,h2,h3,h4,h5,h6{font-weight:500}img{border:0;vertical-align:middle}img[src=''],img:not([src]){border:0;opacity:0}svg,canvas{vertical-align:middle}button{cursor:pointer;-webkit-appearance:none;font-size:13px}table{border-collapse:collapse;border-spacing:0}.joe_main{min-width:0;flex:1;padding:15px 0}.joe_container{display:flex;width:100%;margin:0 auto;padding:0 15px}@media (min-width: 576px){.joe_container{max-width:540px}}@media (min-width: 768px){.joe_container{max-width:720px}}@media (min-width: 992px){.joe_container{max-width:960px}}@media (min-width: 1200px){.joe_container{max-width:1140px}}@media (min-width: 1400px){.joe_container{max-width:1320px}} *{margin:0;padding:0;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{border-radius:4px;background:var(--seat)}::-webkit-scrollbar-track{background:transparent}::-moz-selection{color:#fff;background:var(--theme)}::selection{color:#fff;background:var(--theme)}body{font-size:14px;font-family:'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}body::before{content:'';position:fixed;top:0;left:0;right:0;bottom:0;z-index:-520;pointer-events:none}input[type='text']{-webkit-appearance:none;border-radius:0;font-size:13px;font-weight:500}iframe{display:block;border:none;margin:0 auto;vertical-align:middle}textarea{font-size:14px;resize:none;-webkit-appearance:none}li{list-style:none}a{text-decoration:none}h1,h2,h3,h4,h5,h6{font-weight:500}img{border:0;vertical-align:middle}img[src=''],img:not([src]){border:0;opacity:0}svg,canvas{vertical-align:middle}button{cursor:pointer;-webkit-appearance:none;font-size:13px}table{border-collapse:collapse;border-spacing:0}.joe_main{min-width:0;flex:1;padding:15px 0}.joe_container{display:flex;width:100%;margin:0 auto;padding:0 15px}@media (min-width: 576px){.joe_container{max-width:540px}}@media (min-width: 768px){.joe_container{max-width:720px}}@media (min-width: 992px){.joe_container{max-width:960px}}@media (min-width: 1200px){.joe_container{max-width:1140px}}@media (min-width: 1400px){.joe_container{max-width:1320px}}

View File

@ -29,6 +29,8 @@ body {
font-size: 14px; font-size: 14px;
/* 我们对字体进行统一规范,力求在各个操作系统下都有最佳展示效果。 */ /* 我们对字体进行统一规范,力求在各个操作系统下都有最佳展示效果。 */
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
} }
body::before { body::before {
@ -57,6 +59,7 @@ iframe {
} }
textarea { textarea {
font-size: 14px;
resize: none; resize: none;
-webkit-appearance: none; -webkit-appearance: none;
} }

View File

@ -1 +0,0 @@
@media (max-width: 1760px){html #live2d-widget{visibility:hidden}}@media (max-width: 1400px){html .joe_detail__article-player{height:450px}html .joe_live__play-player{height:520px}html .joe_detail__friends{grid-template-columns:repeat(3, 1fr)}html .joe_video__source-list{grid-template-columns:repeat(7, 1fr)}}@media (max-width: 1200px){html .joe_detail__article-player{height:400px}html .joe_live__list-item .thumb{height:120px}html .joe_live__play-player{height:450px}html .joe_detail__friends{grid-template-columns:repeat(2, 1fr)}html .joe_video__list-item{grid-template-columns:repeat(4, 1fr)}html .joe_video__list-item .item .thumb{height:200px}html .joe_video__player-play{height:450px}html .joe_video__source-list{grid-template-columns:repeat(6, 1fr)}html .joe_wallpaper__list{grid-template-columns:repeat(3, 1fr)}html .joe_index__hot-list .item .link .inner .image{height:80px}html .joe_index__banner{display:block}html .joe_index__banner-recommend{width:100%;margin-left:0;padding-top:15px;display:grid;grid-template-columns:repeat(2, 1fr);-webkit-column-gap:15px;column-gap:15px}html .joe_index__banner-recommend.noswiper{padding-top:0}html .joe_index__banner-recommend .item{height:135px;margin:0 !important}}@media (max-width: 992px){html .joe_detail__article-player{height:360px}html .joe_aside{display:none}html .joe_live__play-player{height:400px}html .joe_video__player-play{height:400px}html .joe_video__source-list{grid-template-columns:repeat(5, 1fr)}html .swiper-container{height:300px}html .swiper-container .item{height:300px}html .joe_header__below{display:none}html .joe_header__above-logo{padding:0;margin:0}html .joe_header__above-logo::after{display:none}html .joe_header__above-nav{display:none}html .joe_index__hot-list .item .link .inner .image{height:100px}}@media (max-width: 768px){html #Joe{display:none}html .noaside::after{content:'移动端适配中...'}}html .noaside .joe_live__list{grid-template-columns:repeat(4, 1fr)}html .noaside .joe_video__list-item{grid-template-columns:repeat(7, 1fr)}html .noaside .joe_wallpaper__list{grid-template-columns:repeat(5, 1fr)}@media (max-width: 1400px){html .noaside .joe_detail__friends{grid-template-columns:repeat(4, 1fr)}html .noaside .joe_video__list-item{grid-template-columns:repeat(6, 1fr)}}@media (max-width: 1200px){html .noaside .joe_detail__friends{grid-template-columns:repeat(3, 1fr)}html .noaside .joe_video__list-item{grid-template-columns:repeat(5, 1fr)}html .noaside .joe_wallpaper__list{grid-template-columns:repeat(4, 1fr)}html .noaside .joe_index__hot-list .item .link .inner .image{height:100px}html .noaside .joe_index__banner-recommend .item{height:150px}}@media (max-width: 992px){html .noaside .joe_live__list{grid-template-columns:repeat(3, 1fr)}html .noaside .joe_detail__friends{grid-template-columns:repeat(2, 1fr)}html .noaside .joe_video__list-item{grid-template-columns:repeat(4, 1fr)}html .noaside .joe_wallpaper__list{grid-template-columns:repeat(3, 1fr)}}

View File

@ -1,179 +0,0 @@
/* 基类:基于 最大屏幕 + 有侧边栏 下进行适配 */
/* 有侧边栏时候的样式 */
html {
@media (max-width: 1760px) {
#live2d-widget {
visibility: hidden;
}
}
@media (max-width: 1400px) {
.joe_detail__article-player {
height: 450px;
}
.joe_live__play-player {
height: 520px;
}
.joe_detail__friends {
grid-template-columns: repeat(3, 1fr);
}
.joe_video__source-list {
grid-template-columns: repeat(7, 1fr);
}
}
@media (max-width: 1200px) {
.joe_detail__article-player {
height: 400px;
}
.joe_live__list-item .thumb {
height: 120px;
}
.joe_live__play-player {
height: 450px;
}
.joe_detail__friends {
grid-template-columns: repeat(2, 1fr);
}
.joe_video__list-item {
grid-template-columns: repeat(4, 1fr);
}
.joe_video__list-item .item .thumb {
height: 200px;
}
.joe_video__player-play {
height: 450px;
}
.joe_video__source-list {
grid-template-columns: repeat(6, 1fr);
}
.joe_wallpaper__list {
grid-template-columns: repeat(3, 1fr);
}
.joe_index__hot-list .item .link .inner .image {
height: 80px;
}
.joe_index__banner {
display: block;
}
.joe_index__banner-recommend {
width: 100%;
margin-left: 0;
padding-top: 15px;
display: grid;
grid-template-columns: repeat(2, 1fr);
column-gap: 15px;
&.noswiper {
padding-top: 0;
}
}
.joe_index__banner-recommend .item {
height: 135px;
margin: 0 !important;
}
}
@media (max-width: 992px) {
.joe_detail__article-player {
height: 360px;
}
.joe_aside {
display: none;
}
.joe_live__play-player {
height: 400px;
}
.joe_video__player-play {
height: 400px;
}
.joe_video__source-list {
grid-template-columns: repeat(5, 1fr);
}
.swiper-container {
height: 300px;
}
.swiper-container .item {
height: 300px;
}
.joe_header__below {
display: none;
}
.joe_header__above-logo {
padding: 0;
margin: 0;
&::after {
display: none;
}
}
.joe_header__above-nav {
display: none;
}
.joe_index__hot-list .item .link .inner .image {
height: 100px;
}
}
@media (max-width: 768px) {
#Joe {
display: none;
}
.noaside::after {
content: '移动端适配中...';
}
}
@media (max-width: 576px) {
}
}
/* 没有侧边栏时候的样式 */
html .noaside {
.joe_live__list {
grid-template-columns: repeat(4, 1fr);
}
.joe_video__list-item {
grid-template-columns: repeat(7, 1fr);
}
.joe_wallpaper__list {
grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 1400px) {
.joe_detail__friends {
grid-template-columns: repeat(4, 1fr);
}
.joe_video__list-item {
grid-template-columns: repeat(6, 1fr);
}
}
@media (max-width: 1200px) {
.joe_detail__friends {
grid-template-columns: repeat(3, 1fr);
}
.joe_video__list-item {
grid-template-columns: repeat(5, 1fr);
}
.joe_wallpaper__list {
grid-template-columns: repeat(4, 1fr);
}
.joe_index__hot-list .item .link .inner .image {
height: 100px;
}
.joe_index__banner-recommend .item {
height: 150px;
}
}
@media (max-width: 992px) {
.joe_live__list {
grid-template-columns: repeat(3, 1fr);
}
.joe_detail__friends {
grid-template-columns: repeat(2, 1fr);
}
.joe_video__list-item {
grid-template-columns: repeat(4, 1fr);
}
.joe_wallpaper__list {
grid-template-columns: repeat(3, 1fr);
}
}
@media (max-width: 768px) {
}
@media (max-width: 576px) {
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,187 +1,187 @@
.joe_video { .joe_video {
&__contain { &__contain {
position: relative; position: relative;
background: var(--background); background: var(--background);
border-radius: var(--radius-wrap); border-radius: var(--radius-wrap);
box-shadow: var(--box-shadow); box-shadow: var(--box-shadow);
padding: 60px 15px 15px; padding: 60px 15px 15px;
&-title { &-title {
position: absolute; position: absolute;
top: 15px; top: 15px;
left: -10px; left: -10px;
background: var(--theme); background: var(--theme);
color: #fff; color: #fff;
font-weight: 500; font-weight: 500;
box-shadow: 2px 5px 10px rgba(49, 58, 70, 0.15); box-shadow: 2px 5px 10px rgba(49, 58, 70, 0.15);
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
padding: 0 12px; padding: 0 12px;
border-radius: 2px 2px 2px 0; border-radius: 2px 2px 2px 0;
user-select: none; user-select: none;
&::after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
bottom: -10px; bottom: -10px;
left: -10px; left: -10px;
border-style: solid; border-style: solid;
border-width: 10px; border-width: 10px;
border-color: var(--theme) transparent transparent; border-color: var(--theme) transparent transparent;
transform: rotate(90deg); transform: rotate(90deg);
} }
} }
} }
&__type { &__type {
margin-bottom: 15px; margin-bottom: 15px;
&-list { &-list {
display: grid; display: grid;
gap: 15px; gap: 15px;
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
border-top: 1px solid var(--classC); border-top: 1px solid var(--classC);
padding-top: 15px; padding-top: 15px;
.item { .item {
user-select: none; user-select: none;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
background: var(--classD); background: var(--classD);
height: 28px; height: 28px;
line-height: 28px; line-height: 28px;
border-radius: 14px; border-radius: 14px;
cursor: pointer; cursor: pointer;
color: var(--routine); color: var(--routine);
font-size: 12px; font-size: 12px;
padding: 0 15px; padding: 0 15px;
text-align: center; text-align: center;
transition: color 0.35s, background 0.35s, box-shadow 0.35s, transform 0.35s; transition: color 0.35s, background 0.35s, box-shadow 0.35s, transform 0.35s;
&.active { &.active {
transform: translateY(-2px); transform: translateY(-2px);
color: #fff; color: #fff;
background: var(--theme); background: var(--theme);
box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
} }
&:hover { &:hover {
transform: translateY(-2px); transform: translateY(-2px);
box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
} }
} }
.error { .error {
text-align: center; text-align: center;
color: var(--routine); color: var(--routine);
user-select: none; user-select: none;
} }
} }
} }
&__list { &__list {
&-item { &-item {
display: grid; display: grid;
gap: 15px; gap: 15px;
grid-template-columns: repeat(5, 1fr); grid-template-columns: repeat(6, 1fr);
border-top: 1px solid var(--classC); border-top: 1px solid var(--classC);
padding-top: 15px; padding-top: 15px;
.item { .item {
position: relative; position: relative;
border-radius: var(--radius-inner); border-radius: var(--radius-inner);
overflow: hidden; overflow: hidden;
.year { .year {
position: absolute; position: absolute;
top: 8px; top: 8px;
right: 8px; right: 8px;
padding: 2px 5px; padding: 2px 5px;
border-radius: 2px; border-radius: 2px;
font-size: 12px; font-size: 12px;
font-style: normal; font-style: normal;
background: #ff6800; background: #ff6800;
color: #fff; color: #fff;
z-index: 3; z-index: 3;
} }
.thumb { .thumb {
position: relative; position: relative;
height: 220px; height: 220px;
.pic { .pic {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
} }
&::before { &::before {
content: ''; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0);
transition: background 0.3s ease-out; transition: background 0.3s ease-out;
z-index: 2; z-index: 2;
} }
&::after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
width: 50px; width: 50px;
height: 50px; height: 50px;
margin: -25px 0 0 -25px; margin: -25px 0 0 -25px;
opacity: 0; opacity: 0;
background: url(../img/play.png) no-repeat; background: url(../img/play.png) no-repeat;
transform: scale(2); transform: scale(2);
transition: transform 0.25s ease-out, opacity 0.25s ease-out; transition: transform 0.25s ease-out, opacity 0.25s ease-out;
z-index: 3; z-index: 3;
} }
&:hover { &:hover {
&::before { &::before {
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
} }
&::after { &::after {
opacity: 0.8; opacity: 0.8;
transform: scale(1); transform: scale(1);
} }
} }
} }
.title { .title {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
padding: 0 10px; padding: 0 10px;
text-align: center; text-align: center;
color: var(--routine); color: var(--routine);
background: var(--classD); background: var(--classD);
height: 34px; height: 34px;
line-height: 34px; line-height: 34px;
font-size: 12px; font-size: 12px;
} }
} }
.error { .error {
text-align: center; text-align: center;
color: var(--minor); color: var(--minor);
} }
&:empty { &:empty {
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
height: 180px; height: 180px;
&::after { &::after {
content: ''; content: '';
display: block; display: block;
width: 70px; width: 70px;
height: 70px; height: 70px;
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTciIGhlaWdodD0iNTciIHZpZXdCb3g9IjAgMCA1NyA1NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHJva2U9IiM0MDllZmYiPg0KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+DQogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiIHN0cm9rZS13aWR0aD0iMiI+DQogICAgICAgICAgICA8Y2lyY2xlIGN4PSI1IiBjeT0iNTAiIHI9IjUiPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN5Ig0KICAgICAgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjIuMnMiDQogICAgICAgICAgICAgICAgICAgICB2YWx1ZXM9IjUwOzU7NTA7NTAiDQogICAgICAgICAgICAgICAgICAgICBjYWxjTW9kZT0ibGluZWFyIg0KICAgICAgICAgICAgICAgICAgICAgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIC8+DQogICAgICAgICAgICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iY3giDQogICAgICAgICAgICAgICAgICAgICBiZWdpbj0iMHMiIGR1cj0iMi4ycyINCiAgICAgICAgICAgICAgICAgICAgIHZhbHVlcz0iNTsyNzs0OTs1Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgPC9jaXJjbGU+DQogICAgICAgICAgICA8Y2lyY2xlIGN4PSIyNyIgY3k9IjUiIHI9IjUiPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN5Ig0KICAgICAgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjIuMnMiDQogICAgICAgICAgICAgICAgICAgICBmcm9tPSI1IiB0bz0iNSINCiAgICAgICAgICAgICAgICAgICAgIHZhbHVlcz0iNTs1MDs1MDs1Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN4Ig0KICAgICAgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjIuMnMiDQogICAgICAgICAgICAgICAgICAgICBmcm9tPSIyNyIgdG89IjI3Ig0KICAgICAgICAgICAgICAgICAgICAgdmFsdWVzPSIyNzs0OTs1OzI3Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgPC9jaXJjbGU+DQogICAgICAgICAgICA8Y2lyY2xlIGN4PSI0OSIgY3k9IjUwIiByPSI1Ij4NCiAgICAgICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJjeSINCiAgICAgICAgICAgICAgICAgICAgIGJlZ2luPSIwcyIgZHVyPSIyLjJzIg0KICAgICAgICAgICAgICAgICAgICAgdmFsdWVzPSI1MDs1MDs1OzUwIg0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN4Ig0KICAgICAgICAgICAgICAgICAgICAgZnJvbT0iNDkiIHRvPSI0OSINCiAgICAgICAgICAgICAgICAgICAgIGJlZ2luPSIwcyIgZHVyPSIyLjJzIg0KICAgICAgICAgICAgICAgICAgICAgdmFsdWVzPSI0OTs1OzI3OzQ5Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgPC9jaXJjbGU+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=); background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTciIGhlaWdodD0iNTciIHZpZXdCb3g9IjAgMCA1NyA1NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHJva2U9IiM0MDllZmYiPg0KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+DQogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiIHN0cm9rZS13aWR0aD0iMiI+DQogICAgICAgICAgICA8Y2lyY2xlIGN4PSI1IiBjeT0iNTAiIHI9IjUiPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN5Ig0KICAgICAgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjIuMnMiDQogICAgICAgICAgICAgICAgICAgICB2YWx1ZXM9IjUwOzU7NTA7NTAiDQogICAgICAgICAgICAgICAgICAgICBjYWxjTW9kZT0ibGluZWFyIg0KICAgICAgICAgICAgICAgICAgICAgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIC8+DQogICAgICAgICAgICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iY3giDQogICAgICAgICAgICAgICAgICAgICBiZWdpbj0iMHMiIGR1cj0iMi4ycyINCiAgICAgICAgICAgICAgICAgICAgIHZhbHVlcz0iNTsyNzs0OTs1Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgPC9jaXJjbGU+DQogICAgICAgICAgICA8Y2lyY2xlIGN4PSIyNyIgY3k9IjUiIHI9IjUiPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN5Ig0KICAgICAgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjIuMnMiDQogICAgICAgICAgICAgICAgICAgICBmcm9tPSI1IiB0bz0iNSINCiAgICAgICAgICAgICAgICAgICAgIHZhbHVlcz0iNTs1MDs1MDs1Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN4Ig0KICAgICAgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjIuMnMiDQogICAgICAgICAgICAgICAgICAgICBmcm9tPSIyNyIgdG89IjI3Ig0KICAgICAgICAgICAgICAgICAgICAgdmFsdWVzPSIyNzs0OTs1OzI3Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgPC9jaXJjbGU+DQogICAgICAgICAgICA8Y2lyY2xlIGN4PSI0OSIgY3k9IjUwIiByPSI1Ij4NCiAgICAgICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJjeSINCiAgICAgICAgICAgICAgICAgICAgIGJlZ2luPSIwcyIgZHVyPSIyLjJzIg0KICAgICAgICAgICAgICAgICAgICAgdmFsdWVzPSI1MDs1MDs1OzUwIg0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN4Ig0KICAgICAgICAgICAgICAgICAgICAgZnJvbT0iNDkiIHRvPSI0OSINCiAgICAgICAgICAgICAgICAgICAgIGJlZ2luPSIwcyIgZHVyPSIyLjJzIg0KICAgICAgICAgICAgICAgICAgICAgdmFsdWVzPSI0OTs1OzI3OzQ5Ig0KICAgICAgICAgICAgICAgICAgICAgY2FsY01vZGU9ImxpbmVhciINCiAgICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICAgICAgICAgICAgPC9jaXJjbGU+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
} }
&-search { &-search {
position: absolute; position: absolute;
top: 15px; top: 15px;
right: 15px; right: 15px;
display: flex; display: flex;
align-items: center; align-items: center;
.input { .input {
width: 180px; width: 180px;
height: 30px; height: 30px;
padding: 0 12px; padding: 0 12px;
color: var(--routine); color: var(--routine);
background: var(--background); background: var(--background);
border: 1px solid var(--theme); border: 1px solid var(--theme);
font-size: 12px; font-size: 12px;
@ -194,157 +194,160 @@
padding: 0 12px; padding: 0 12px;
font-size: 12px; font-size: 12px;
} }
} }
} }
&__pagination { &__pagination {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
padding-top: 15px; padding-top: 15px;
&-item { &-item {
user-select: none; user-select: none;
cursor: pointer; cursor: pointer;
margin-left: 5px; margin-left: 5px;
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
padding: 0 15px; padding: 0 15px;
background: var(--background); background: var(--background);
color: var(--main); color: var(--main);
border-radius: 2px; border-radius: 2px;
transition: background 0.35s, color 0.35s; transition: background 0.35s, color 0.35s;
svg { &:first-child {
fill: var(--routine); margin-left: 0;
transition: fill 0.35s; }
} svg {
.next { fill: var(--routine);
transform: rotate(180deg); transition: fill 0.35s;
} }
&.active, .next {
&:hover { transform: rotate(180deg);
color: #fff; }
background: var(--theme); &.active,
svg { &:hover {
fill: #fff; color: #fff;
} background: var(--theme);
} svg {
} fill: #fff;
} }
&__detail { }
margin-bottom: 15px; }
&-info { }
display: flex; &__detail {
border-top: 1px solid var(--classC); margin-bottom: 15px;
padding-top: 15px; &-info {
.thumbnail { display: flex;
position: relative; border-top: 1px solid var(--classC);
width: 180px; padding-top: 15px;
height: 250px; .thumbnail {
min-width: 180px; position: relative;
min-height: 180px; width: 180px;
margin-right: 15px; height: 250px;
.pic { min-width: 180px;
width: 100%; min-height: 180px;
height: 100%; margin-right: 15px;
object-fit: cover; .pic {
} width: 100%;
.year { height: 100%;
position: absolute; object-fit: cover;
top: 8px; }
right: 8px; .year {
padding: 2px 5px; position: absolute;
border-radius: 2px; top: 8px;
font-size: 12px; right: 8px;
font-style: normal; padding: 2px 5px;
background: #ff6800; border-radius: 2px;
color: #fff; font-size: 12px;
z-index: 3; font-style: normal;
} background: #ff6800;
} color: #fff;
.description { z-index: 3;
overflow: hidden; }
dt { }
font-size: 22px; .description {
color: var(--main); overflow: hidden;
max-width: 100%; dt {
overflow: hidden; font-size: 22px;
text-overflow: ellipsis; color: var(--main);
white-space: nowrap; max-width: 100%;
margin-bottom: 10px; overflow: hidden;
} text-overflow: ellipsis;
dd { white-space: nowrap;
position: relative; margin-bottom: 10px;
padding-left: 45px; }
line-height: 24px; dd {
margin-bottom: 5px; position: relative;
.muted { padding-left: 45px;
position: absolute; line-height: 24px;
left: 0; margin-bottom: 5px;
color: var(--minor); .muted {
} position: absolute;
.text { left: 0;
word-break: break-all; color: var(--minor);
color: var(--routine); }
display: -webkit-box; .text {
-webkit-line-clamp: 2; word-break: break-all;
/*! autoprefixer: off */ color: var(--routine);
-webkit-box-orient: vertical; display: -webkit-box;
/* autoprefixer: on */ -webkit-line-clamp: 2;
overflow: hidden; /*! autoprefixer: off */
text-overflow: ellipsis; -webkit-box-orient: vertical;
} /* autoprefixer: on */
} overflow: hidden;
} text-overflow: ellipsis;
.error { }
color: var(--minor); }
margin: 0 auto; }
user-select: none; .error {
} color: var(--minor);
} margin: 0 auto;
} user-select: none;
&__player { }
margin-bottom: 15px; }
&-play { }
width: 100%; &__player {
height: 480px; margin-bottom: 15px;
background: #000; &-play {
} width: 100%;
} height: 500px;
&__source { background: #000;
margin-bottom: 15px; }
&:last-child { }
margin-bottom: 0; &__source {
} margin-bottom: 15px;
&-list { &:last-child {
display: grid; margin-bottom: 0;
grid-template-columns: repeat(8, 1fr); }
gap: 15px; &-list {
border-top: 1px solid var(--classC); display: grid;
padding-top: 15px; grid-template-columns: repeat(6, 1fr);
.item { gap: 15px;
height: 30px; border-top: 1px solid var(--classC);
line-height: 30px; padding-top: 15px;
border-radius: 14px; .item {
background: var(--classD); height: 30px;
color: var(--routine); line-height: 30px;
cursor: pointer; border-radius: 14px;
text-align: center; background: var(--classD);
font-size: 12px; color: var(--routine);
white-space: nowrap; cursor: pointer;
overflow: hidden; text-align: center;
text-overflow: ellipsis; font-size: 12px;
transition: transform 0.35s, box-shadow 0.35s, background 0.35s, color 0.35s; white-space: nowrap;
padding: 0 10px; overflow: hidden;
&.active { text-overflow: ellipsis;
transform: translateY(-2px); transition: transform 0.35s, box-shadow 0.35s, background 0.35s, color 0.35s;
color: #fff; padding: 0 10px;
background: var(--theme); &.active {
box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); transform: translateY(-2px);
} color: #fff;
&:hover { background: var(--theme);
transform: translateY(-2px); box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); }
} &:hover {
} transform: translateY(-2px);
} box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
} }
}
}
}
} }

File diff suppressed because one or more lines are too long

View File

@ -21,13 +21,13 @@
user-select: none; user-select: none;
&::before { &::before {
content: ''; content: '';
position: absolute; position: absolute;
bottom: -10px; bottom: -10px;
left: -10px; left: -10px;
border-style: solid; border-style: solid;
border-width: 10px; border-width: 10px;
border-color: var(--theme) transparent transparent; border-color: var(--theme) transparent transparent;
transform: rotate(90deg); transform: rotate(90deg);
} }
} }
&-list { &-list {
@ -71,10 +71,13 @@
} }
&__list { &__list {
display: grid; display: grid;
gap: 15px;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
.item { .item {
position: relative; position: relative;
display: block; display: block;
border-radius: var(--radius-wrap);
overflow: hidden;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -150,6 +153,9 @@
color: var(--main); color: var(--main);
border-radius: 2px; border-radius: 2px;
transition: background 0.35s, color 0.35s; transition: background 0.35s, color 0.35s;
&:first-child {
margin-left: 0;
}
svg { svg {
fill: var(--routine); fill: var(--routine);
transition: fill 0.35s; transition: fill 0.35s;

View File

@ -1,123 +1,123 @@
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
/* 初始化昼夜模式 */ /* 初始化昼夜模式 */
{ {
if (localStorage.getItem('data-night')) { if (localStorage.getItem('data-night')) {
$('.joe_action_item.mode .icon-1').addClass('active'); $('.joe_action_item.mode .icon-1').addClass('active')
$('.joe_action_item.mode .icon-2').removeClass('active'); $('.joe_action_item.mode .icon-2').removeClass('active')
} else { } else {
$('html').removeAttr('data-night'); $('html').removeAttr('data-night')
$('.joe_action_item.mode .icon-1').removeClass('active'); $('.joe_action_item.mode .icon-1').removeClass('active')
$('.joe_action_item.mode .icon-2').addClass('active'); $('.joe_action_item.mode .icon-2').addClass('active')
} }
$('.joe_action_item.mode').on('click', () => { $('.joe_action_item.mode').on('click', () => {
if (localStorage.getItem('data-night')) { if (localStorage.getItem('data-night')) {
$('.joe_action_item.mode .icon-1').removeClass('active'); $('.joe_action_item.mode .icon-1').removeClass('active')
$('.joe_action_item.mode .icon-2').addClass('active'); $('.joe_action_item.mode .icon-2').addClass('active')
$('html').removeAttr('data-night'); $('html').removeAttr('data-night')
localStorage.removeItem('data-night'); localStorage.removeItem('data-night')
} else { } else {
$('.joe_action_item.mode .icon-1').addClass('active'); $('.joe_action_item.mode .icon-1').addClass('active')
$('.joe_action_item.mode .icon-2').removeClass('active'); $('.joe_action_item.mode .icon-2').removeClass('active')
$('html').attr('data-night', 'night'); $('html').attr('data-night', 'night')
localStorage.setItem('data-night', 'night'); localStorage.setItem('data-night', 'night')
} }
}); })
} }
/* 动态背景 */ /* 动态背景 */
{ {
if (!Joe.IS_MOBILE && Joe.DYNAMIC_BACKGROUND !== 'off' && Joe.DYNAMIC_BACKGROUND && !Joe.WALLPAPER_BACKGROUND_PC) { if (!Joe.IS_MOBILE && Joe.DYNAMIC_BACKGROUND !== 'off' && Joe.DYNAMIC_BACKGROUND && !Joe.WALLPAPER_BACKGROUND_PC) {
$.getScript(`https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/assets/backdrop/${Joe.DYNAMIC_BACKGROUND}`); $.getScript(`https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/assets/backdrop/${Joe.DYNAMIC_BACKGROUND}`)
} }
} }
/* 搜索框弹窗 */ /* 搜索框弹窗 */
{ {
$('.joe_header__above-search .input').on('click', e => { $('.joe_header__above-search .input').on('click', e => {
e.stopPropagation(); e.stopPropagation()
$('.joe_header__above-search .result').addClass('active'); $('.joe_header__above-search .result').addClass('active')
}); })
$(document).on('click', function () { $(document).on('click', function () {
$('.joe_header__above-search .result').removeClass('active'); $('.joe_header__above-search .result').removeClass('active')
}); })
$(document).on('scroll', function () { $(document).on('scroll', function () {
$('.joe_header__above-search .result').removeClass('active'); $('.joe_header__above-search .result').removeClass('active')
}); })
} }
/* 激活全局下拉框功能 */ /* 激活全局下拉框功能 */
{ {
$('.joe_dropdown').each(function (index, item) { $('.joe_dropdown').each(function (index, item) {
const menu = $(this).find('.joe_dropdown__menu'); const menu = $(this).find('.joe_dropdown__menu')
const trigger = $(item).attr('trigger') || 'click'; const trigger = $(item).attr('trigger') || 'click'
const placement = $(item).attr('placement') || $(this).height() || 0; const placement = $(item).attr('placement') || $(this).height() || 0
menu.css('top', placement); menu.css('top', placement)
if (trigger === 'hover') { if (trigger === 'hover') {
$(this).hover( $(this).hover(
() => $(this).addClass('active'), () => $(this).addClass('active'),
() => $(this).removeClass('active') () => $(this).removeClass('active')
); )
} else { } else {
$(this).on('click', function (e) { $(this).on('click', function (e) {
$(this).toggleClass('active'); $(this).toggleClass('active')
$(document).one('click', () => $(this).removeClass('active')); $(document).one('click', () => $(this).removeClass('active'))
e.stopPropagation(); e.stopPropagation()
}); })
menu.on('click', e => e.stopPropagation()); menu.on('click', e => e.stopPropagation())
} }
}); })
} }
/* 激活全局返回顶部功能 */ /* 激活全局返回顶部功能 */
{ {
const handleScroll = () => ((document.documentElement.scrollTop || document.body.scrollTop) > 300 ? $('.joe_action_item.scroll').addClass('active') : $('.joe_action_item.scroll').removeClass('active')); const handleScroll = () => ((document.documentElement.scrollTop || document.body.scrollTop) > 300 ? $('.joe_action_item.scroll').addClass('active') : $('.joe_action_item.scroll').removeClass('active'))
handleScroll(); handleScroll()
$(window).on('scroll', () => handleScroll()); $(window).on('scroll', () => handleScroll())
$('.joe_action_item.scroll').on('click', () => window.scrollTo({ top: 0, behavior: 'smooth' })); $('.joe_action_item.scroll').on('click', () => window.scrollTo({ top: 0, behavior: 'smooth' }))
} }
/* 激活侧边栏人生倒计时功能 */ /* 激活侧边栏人生倒计时功能 */
{ {
if ($('.joe_aside__item.timelife').length !== 0) { if ($('.joe_aside__item.timelife').length !== 0) {
let timelife = [ let timelife = [
{ title: '今日已经过去', endTitle: '小时', num: 0, percent: '0%' }, { title: '今日已经过去', endTitle: '小时', num: 0, percent: '0%' },
{ title: '这周已经过去', endTitle: '天', num: 0, percent: '0%' }, { title: '这周已经过去', endTitle: '天', num: 0, percent: '0%' },
{ title: '本月已经过去', endTitle: '天', num: 0, percent: '0%' }, { title: '本月已经过去', endTitle: '天', num: 0, percent: '0%' },
{ title: '今年已经过去', endTitle: '个月', num: 0, percent: '0%' } { title: '今年已经过去', endTitle: '个月', num: 0, percent: '0%' }
]; ]
{ {
let nowDate = +new Date(); let nowDate = +new Date()
let todayStartDate = new Date(new Date().toLocaleDateString()).getTime(); let todayStartDate = new Date(new Date().toLocaleDateString()).getTime()
let todayPassHours = (nowDate - todayStartDate) / 1000 / 60 / 60; let todayPassHours = (nowDate - todayStartDate) / 1000 / 60 / 60
let todayPassHoursPercent = (todayPassHours / 24) * 100; let todayPassHoursPercent = (todayPassHours / 24) * 100
timelife[0].num = parseInt(todayPassHours); timelife[0].num = parseInt(todayPassHours)
timelife[0].percent = parseInt(todayPassHoursPercent) + '%'; timelife[0].percent = parseInt(todayPassHoursPercent) + '%'
} }
{ {
let weeks = { 0: 7, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6 }; let weeks = { 0: 7, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6 }
let weekDay = weeks[new Date().getDay()]; let weekDay = weeks[new Date().getDay()]
let weekDayPassPercent = (weekDay / 7) * 100; let weekDayPassPercent = (weekDay / 7) * 100
timelife[1].num = parseInt(weekDay); timelife[1].num = parseInt(weekDay)
timelife[1].percent = parseInt(weekDayPassPercent) + '%'; timelife[1].percent = parseInt(weekDayPassPercent) + '%'
} }
{ {
let year = new Date().getFullYear(); let year = new Date().getFullYear()
let date = new Date().getDate(); let date = new Date().getDate()
let month = new Date().getMonth() + 1; let month = new Date().getMonth() + 1
let monthAll = new Date(year, month, 0).getDate(); let monthAll = new Date(year, month, 0).getDate()
let monthPassPercent = (date / monthAll) * 100; let monthPassPercent = (date / monthAll) * 100
timelife[2].num = date; timelife[2].num = date
timelife[2].percent = parseInt(monthPassPercent) + '%'; timelife[2].percent = parseInt(monthPassPercent) + '%'
} }
{ {
let month = new Date().getMonth() + 1; let month = new Date().getMonth() + 1
let yearPass = (month / 12) * 100; let yearPass = (month / 12) * 100
timelife[3].num = month; timelife[3].num = month
timelife[3].percent = parseInt(yearPass) + '%'; timelife[3].percent = parseInt(yearPass) + '%'
} }
let htmlStr = ''; let htmlStr = ''
timelife.forEach((item, index) => { timelife.forEach((item, index) => {
htmlStr += ` htmlStr += `
<div class="item"> <div class="item">
<div class="title"> <div class="title">
${item.title} ${item.title}
@ -130,218 +130,225 @@ document.addEventListener('DOMContentLoaded', () => {
</div> </div>
<div class="progress-percentage">${item.percent}</div> <div class="progress-percentage">${item.percent}</div>
</div> </div>
</div>`; </div>`
}); })
$('.joe_aside__item.timelife .joe_aside__item-contain').html(htmlStr); $('.joe_aside__item.timelife .joe_aside__item-contain').html(htmlStr)
} }
} }
/* 激活侧边栏天气功能 */ /* 激活侧边栏天气功能 */
{ {
if ($('.joe_aside__item.weather').length !== 0) { if ($('.joe_aside__item.weather').length !== 0) {
const key = $('.joe_aside__item.weather').attr('data-key'); const key = $('.joe_aside__item.weather').attr('data-key')
const style = $('.joe_aside__item.weather').attr('data-style'); const style = $('.joe_aside__item.weather').attr('data-style')
const aqiColor = { 1: 'FFFFFF', 2: '4A4A4A', 3: 'FFFFFF' }; const aqiColor = { 1: 'FFFFFF', 2: '4A4A4A', 3: 'FFFFFF' }
window.WIDGET = { CONFIG: { layout: 2, width: '220', height: '270', background: style, dataColor: aqiColor[style], language: 'zh', key: key } }; window.WIDGET = { CONFIG: { layout: 2, width: '220', height: '270', background: style, dataColor: aqiColor[style], language: 'zh', key: key } }
} }
} }
/* 激活侧边栏排行榜功能 */ /* 激活侧边栏排行榜功能 */
{ {
if ($('.joe_aside__item.ranking').length !== 0) { if ($('.joe_aside__item.ranking').length !== 0) {
$.ajax({ $.ajax({
url: Joe.BASE_API, url: Joe.BASE_API,
type: 'POST', type: 'POST',
data: { routeType: 'aside_ranking' }, data: { routeType: 'aside_ranking' },
success(res) { success(res) {
$('.joe_aside__item.ranking .joe_aside__item-title .text').html(res.title); $('.joe_aside__item.ranking .joe_aside__item-title .text').html(res.title)
let htmlStr = ''; let htmlStr = ''
if (res.code === 1) { if (res.code === 1) {
res.data.forEach((item, index) => { res.data.forEach((item, index) => {
htmlStr += ` htmlStr += `
<li class="item"> <li class="item">
<span class="sort">${index + 1}</span> <span class="sort">${index + 1}</span>
<a class="link" href="${item.url}" title="${item.title}" target="_blank" rel="noopener noreferrer nofollow">${item.title}</a> <a class="link" href="${item.url}" title="${item.title}" target="_blank" rel="noopener noreferrer nofollow">${item.title}</a>
</li> </li>
`; `
}); })
} else { } else {
htmlStr += `<li class="error">数据抓取异常!</li>`; htmlStr += `<li class="error">数据抓取异常!</li>`
} }
$('.joe_aside__item.ranking .joe_aside__item-contain').html(htmlStr); $('.joe_aside__item.ranking .joe_aside__item-contain').html(htmlStr)
} }
}); })
} }
} }
/* 设置侧边栏最后一个元素的高度 */ /* 设置侧边栏最后一个元素的高度 */
{ {
$('.joe_aside__item:last-child').css('top', $('.joe_header').height() + 15); $('.joe_aside__item:last-child').css('top', $('.joe_header').height() + 15)
} }
/* 激活Live2d人物 */ /* 激活Live2d人物 */
{ {
if (Joe.LIVE2D !== 'off' && Joe.LIVE2D) { if (Joe.LIVE2D !== 'off' && Joe.LIVE2D) {
$.getScript('https://cdn.jsdelivr.net/npm/live2d-widget@3.1.4/lib/L2Dwidget.min.js', () => { $.getScript('https://cdn.jsdelivr.net/npm/live2d-widget@3.1.4/lib/L2Dwidget.min.js', () => {
L2Dwidget.init({ L2Dwidget.init({
model: { jsonPath: Joe.LIVE2D, scale: 1 }, model: { jsonPath: Joe.LIVE2D, scale: 1 },
mobile: { show: false }, mobile: { show: false },
display: { position: 'right', width: 160, height: 200, hOffset: 70, vOffset: 0 } display: { position: 'right', width: 160, height: 200, hOffset: 70, vOffset: 0 }
}); })
}); })
} }
} }
/* 计算页面滚动多少 */ /* 计算页面滚动多少 */
{ {
const calcProgress = () => { const calcProgress = () => {
let scrollTop = $(window).scrollTop(); let scrollTop = $(window).scrollTop()
let documentHeight = $(document).height(); let documentHeight = $(document).height()
let windowHeight = $(window).height(); let windowHeight = $(window).height()
let progress = parseInt((scrollTop / (documentHeight - windowHeight)) * 100); let progress = parseInt((scrollTop / (documentHeight - windowHeight)) * 100)
if (progress <= 0) progress = 0; if (progress <= 0) progress = 0
if (progress >= 100) progress = 100; if (progress >= 100) progress = 100
$('.joe_header__below-progress').css('width', progress + '%'); $('.joe_header__below-progress').css('width', progress + '%')
}; }
calcProgress(); calcProgress()
$(window).on('scroll', () => calcProgress()); $(window).on('scroll', () => calcProgress())
} }
/* 判断页面上是否有侧边栏 */ /* 判断页面上是否有侧边栏 */
{ {
const getAside = () => { const getAside = () => {
if ($('.joe_aside').length === 0) { if ($('.joe_aside').length === 0) {
$('body').addClass('noaside'); $('body').addClass('noaside')
} else { } else {
$('body').removeClass('noaside'); $('body').removeClass('noaside')
} }
}; }
getAside(); getAside()
$(window).on('resize', () => getAside()); $(window).on('resize', () => getAside())
} }
/* 评论框点击切换画图模式和文本模式 */ /* 评论框点击切换画图模式和文本模式 */
{ {
$('.joe_comment__respond-type .item').on('click', function () { $('.joe_comment__respond-type .item').on('click', function () {
$(this).addClass('active').siblings().removeClass('active'); $(this).addClass('active').siblings().removeClass('active')
if ($(this).attr('data-type') === 'draw') { if ($(this).attr('data-type') === 'draw') {
$('.joe_comment__respond-form .body .draw').show().siblings().hide(); $('.joe_comment__respond-form .body .draw').show().siblings().hide()
$('#joe_comment_draw').prop('width', $('.joe_comment__respond-form .body').width()); $('#joe_comment_draw').prop('width', $('.joe_comment__respond-form .body').width())
/* 设置表单格式为画图模式 */ /* 设置表单格式为画图模式 */
$('.joe_comment__respond-form').attr('data-type', 'draw'); $('.joe_comment__respond-form').attr('data-type', 'draw')
} else { } else {
$('.joe_comment__respond-form .body .text').show().siblings().hide(); $('.joe_comment__respond-form .body .text').show().siblings().hide()
/* 设置表单格式为文字模式 */ /* 设置表单格式为文字模式 */
$('.joe_comment__respond-form').attr('data-type', 'text'); $('.joe_comment__respond-form').attr('data-type', 'text')
} }
}); })
} }
/* 激活画图功能 */ /* 激活画图功能 */
{ {
if ($('#joe_comment_draw').length !== 0) { if ($('#joe_comment_draw').length !== 0) {
/* 激活画板 */ /* 激活画板 */
window.sketchpad = new Sketchpad({ element: '#joe_comment_draw', height: 300, penSize: 5, color: '303133' }); window.sketchpad = new Sketchpad({ element: '#joe_comment_draw', height: 300, penSize: 5, color: '303133' })
/* 撤销上一步 */ /* 撤销上一步 */
$('.joe_comment__respond-form .body .draw .icon-undo').on('click', () => window.sketchpad.undo()); $('.joe_comment__respond-form .body .draw .icon-undo').on('click', () => window.sketchpad.undo())
/* 动画预览 */ /* 动画预览 */
$('.joe_comment__respond-form .body .draw .icon-animate').on('click', () => window.sketchpad.animate(10)); $('.joe_comment__respond-form .body .draw .icon-animate').on('click', () => window.sketchpad.animate(10))
/* 更改画板的线宽 */ /* 更改画板的线宽 */
$('.joe_comment__respond-form .body .draw .line li').on('click', function () { $('.joe_comment__respond-form .body .draw .line li').on('click', function () {
window.sketchpad.penSize = $(this).attr('data-line'); window.sketchpad.penSize = $(this).attr('data-line')
$(this).addClass('active').siblings().removeClass('active'); $(this).addClass('active').siblings().removeClass('active')
}); })
/* 更改画板的颜色 */ /* 更改画板的颜色 */
$('.joe_comment__respond-form .body .draw .color li').on('click', function () { $('.joe_comment__respond-form .body .draw .color li').on('click', function () {
window.sketchpad.color = $(this).attr('data-color'); window.sketchpad.color = $(this).attr('data-color')
$(this).addClass('active').siblings().removeClass('active'); $(this).addClass('active').siblings().removeClass('active')
}); })
} }
} }
/* 重写评论功能 */ /* 重写评论功能 */
{ {
const respond = $('.joe_comment__respond'); const respond = $('.joe_comment__respond')
/* 重写回复功能 */ /* 重写回复功能 */
$('.joe_comment__reply').on('click', function () { $('.joe_comment__reply').on('click', function () {
/* 父级ID */ /* 父级ID */
const coid = $(this).attr('data-coid'); const coid = $(this).attr('data-coid')
/* 当前的项 */ /* 当前的项 */
const item = $('#' + $(this).attr('data-id')); const item = $('#' + $(this).attr('data-id'))
/* 添加自定义属性表示父级ID */ /* 添加自定义属性表示父级ID */
respond.find('.joe_comment__respond-form').attr('data-coid', coid); respond.find('.joe_comment__respond-form').attr('data-coid', coid)
item.append(respond); item.append(respond)
$(".joe_comment__respond-type .item[data-type='text']").click(); $(".joe_comment__respond-type .item[data-type='text']").click()
$('.joe_comment__cancle').show(); $('.joe_comment__cancle').show()
window.scrollTo({ window.scrollTo({
top: item.offset().top - $('.joe_header').height() - 15, top: item.offset().top - $('.joe_header').height() - 15,
behavior: 'smooth' behavior: 'smooth'
}); })
}); })
/* 重写取消回复功能 */ /* 重写取消回复功能 */
$('.joe_comment__cancle').on('click', function () { $('.joe_comment__cancle').on('click', function () {
/* 移除自定义属性父级ID */ /* 移除自定义属性父级ID */
respond.find('.joe_comment__respond-form').removeAttr('data-coid'); respond.find('.joe_comment__respond-form').removeAttr('data-coid')
$('.joe_comment__cancle').hide(); $('.joe_comment__cancle').hide()
$('.joe_comment__title').after(respond); $('.joe_comment__title').after(respond)
$(".joe_comment__respond-type .item[data-type='text']").click(); $(".joe_comment__respond-type .item[data-type='text']").click()
window.scrollTo({ window.scrollTo({
top: $('.joe_comment').offset().top - $('.joe_header').height() - 15, top: $('.joe_comment').offset().top - $('.joe_header').height() - 15,
behavior: 'smooth' behavior: 'smooth'
}); })
}); })
} }
/* 激活评论提交 */ /* 激活评论提交 */
{ {
let isSubmit = false; let isSubmit = false
$('.joe_comment__respond-form').on('submit', function (e) { $('.joe_comment__respond-form').on('submit', function (e) {
e.preventDefault(); e.preventDefault()
const url = $('.joe_comment__respond-form').attr('action'); const url = $('.joe_comment__respond-form').attr('action')
const type = $('.joe_comment__respond-form').attr('data-type'); const type = $('.joe_comment__respond-form').attr('data-type')
const parent = $('.joe_comment__respond-form').attr('data-coid'); const parent = $('.joe_comment__respond-form').attr('data-coid')
const author = $(".joe_comment__respond-form .head input[name='author']").val(); const author = $(".joe_comment__respond-form .head input[name='author']").val()
const mail = $(".joe_comment__respond-form .head input[name='mail']").val(); const mail = $(".joe_comment__respond-form .head input[name='mail']").val()
let text = $(".joe_comment__respond-form .body textarea[name='text']").val(); let text = $(".joe_comment__respond-form .body textarea[name='text']").val()
if (author.trim() === '') return Qmsg.info('请输入昵称!'); if (author.trim() === '') return Qmsg.info('请输入昵称!')
if (!/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(mail)) return Qmsg.info('请输入正确的邮箱!'); if (!/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(mail)) return Qmsg.info('请输入正确的邮箱!')
if (type === 'text' && text.trim() === '') return Qmsg.info('请输入评论内容!'); if (type === 'text' && text.trim() === '') return Qmsg.info('请输入评论内容!')
if (type === 'draw') { if (type === 'draw') {
const txt = $('#joe_comment_draw')[0].toDataURL('image/webp', 0.1); const txt = $('#joe_comment_draw')[0].toDataURL('image/webp', 0.1)
text = '{!{' + txt + '}!} '; text = '{!{' + txt + '}!} '
} }
if (isSubmit) return; if (isSubmit) return
isSubmit = true; isSubmit = true
$.ajax({ $.ajax({
url, url,
type: 'POST', type: 'POST',
data: { author, mail, text, parent }, data: { author, mail, text, parent },
success(res) { success(res) {
let arr = [], let arr = [],
str = ''; str = ''
arr = $(res).contents(); arr = $(res).contents()
Array.from(arr).forEach(_ => { Array.from(arr).forEach(_ => {
if (_.parentNode.className === 'container') str = _; if (_.parentNode.className === 'container') str = _
}); })
if (!/Joe/.test(res)) return Qmsg.warning(str.textContent.trim() || ''); if (!/Joe/.test(res)) return Qmsg.warning(str.textContent.trim() || '')
window.location.href = Joe.changeURLArg(location.href, 'scroll', 'joe_comment'); window.location.href = Joe.changeURLArg(location.href, 'scroll', 'joe_comment')
}, },
complete: () => (isSubmit = false) complete: () => (isSubmit = false)
}); })
}); })
} }
/* 切换标签显示不同的标题 */ /* 切换标签显示不同的标题 */
{ {
if (Joe.DOCUMENT_TITLE) { if (Joe.DOCUMENT_TITLE) {
const TITLE = document.title; const TITLE = document.title
document.addEventListener('visibilitychange', () => { document.addEventListener('visibilitychange', () => {
if (document.visibilityState === 'hidden') { if (document.visibilityState === 'hidden') {
document.title = Joe.DOCUMENT_TITLE; document.title = Joe.DOCUMENT_TITLE
} else { } else {
document.title = TITLE; document.title = TITLE
} }
}); })
} }
} }
});
/* 小屏幕伸缩侧边栏 */
{
$('.joe_header__above-slide').on('click', function () {
$(this).toggleClass('active')
})
}
})

View File

@ -1,6 +1,11 @@
<header class="joe_header"> <header class="joe_header">
<div class="joe_header__above"> <div class="joe_header__above">
<div class="joe_container"> <div class="joe_container">
<div class="joe_header__above-slide">
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
</div>
<a title="<?php $this->options->title(); ?>" class="joe_header__above-logo" href="<?php $this->options->siteUrl(); ?>"> <a title="<?php $this->options->title(); ?>" class="joe_header__above-logo" href="<?php $this->options->siteUrl(); ?>">
<img class="lazyload" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="<?php $this->options->JLogo() ?>" onerror="javascript: this.src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';" alt="<?php $this->options->title(); ?>" /> <img class="lazyload" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="<?php $this->options->JLogo() ?>" onerror="javascript: this.src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';" alt="<?php $this->options->title(); ?>" />
<svg class="profile-color-modes" height="45" viewBox="0 0 106 60" fill="none" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"> <svg class="profile-color-modes" height="45" viewBox="0 0 106 60" fill="none" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">

View File

@ -47,6 +47,8 @@
<!-- <<<<<<<<<<<<<<<<<<<< 主题开始 >>>>>>>>>>>>>>>>>>>> --> <!-- <<<<<<<<<<<<<<<<<<<< 主题开始 >>>>>>>>>>>>>>>>>>>> -->
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="renderer" content="webkit" /> <meta name="renderer" content="webkit" />
<meta name="format-detection" content="email=no" />
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" /> <meta http-equiv="Cache-Control" content="no-siteapp" />
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" /> <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, shrink-to-fit=no, viewport-fit=cover"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, shrink-to-fit=no, viewport-fit=cover">