mirror of
https://dl.bcrjl.com/ghg/HaoOuBa/Joe.git
synced 2026-02-17 13:10:05 +08:00
更新
This commit is contained in:
2
assets/css/joe.global.min.css
vendored
2
assets/css/joe.global.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1900,21 +1900,18 @@
|
||||
height: 500px;
|
||||
}
|
||||
&-card_default {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
border-radius: var(--radius-inner);
|
||||
border: 1px solid var(--classC);
|
||||
background: var(--background);
|
||||
> .title {
|
||||
display: block;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--classC);
|
||||
color: var(--main);
|
||||
user-select: none;
|
||||
}
|
||||
> .content {
|
||||
display: block;
|
||||
padding: 12px;
|
||||
color: var(--routine);
|
||||
*:last-child {
|
||||
@@ -2066,7 +2063,7 @@
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
.icon {
|
||||
> .icon {
|
||||
position: absolute;
|
||||
top: -9px;
|
||||
left: -11px;
|
||||
@@ -2091,7 +2088,7 @@
|
||||
border-left-color: #2bde3f;
|
||||
background: #2bde3f20;
|
||||
color: #2bde3f;
|
||||
.icon {
|
||||
> .icon {
|
||||
background: #2bde3f;
|
||||
&::before {
|
||||
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjEyNTE4MDE1ODgxIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQxMTU3IiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwvc3R5bGU+PC9kZWZzPjxwYXRoIGQ9Ik00MTMuMjU1IDY5MS40MzZjMTguNTQ2LTE3LjQ1IDMzLjE4Ni0zMC41NTIgNDcuMDc2LTQ0LjQyNyAxMzMuMDQtMTMyLjgxIDI2Ni4xODItMjY1LjUxMyAzOTguNzI0LTM5OC44MzcgMzIuMDc0LTMyLjI0NCA2NS42NjYtNDguNDUyIDEwNC45OTctMTQuNzUyIDMyLjk4MyAyOC4yNDEgMjguMDQ5IDY3LjQ2NS0xMi45MiAxMDguNTc0LTE1Ny4xNzUgMTU3LjcxLTMxNC41ODcgMzE1LjE4NC00NzIuMjkyIDQ3Mi4zOC00OS4zODkgNDkuMjI1LTc2LjMwOCA0OS41NDYtMTI0LjcxNiAxLjYwNy04NS41OS04NC43NjUtMTcwLjEzNS0xNzAuNTc5LTI1NS44LTI1NS4yNTctMzIuMjkyLTMxLjkyMy00OC42OC02NS41MTYtMTQuOTk3LTEwNC45NzYgMjguMTctMzIuOTk1IDY3LjU1Ny0yOC4xNTUgMTA4LjU1OCAxMi42NzUgNzMuNDI3IDczLjE2IDE0Ni4wNzkgMTQ3LjA5IDIyMS4zNyAyMjMuMDEzeiIgcC1pZD0iNDExNTgiIGZpbGw9IiNmZmZmZmYiPjwvcGF0aD48L3N2Zz4=);
|
||||
@@ -2102,7 +2099,7 @@
|
||||
border-left-color: #1d72f3;
|
||||
background: #1d72f320;
|
||||
color: #1d72f3;
|
||||
.icon {
|
||||
> .icon {
|
||||
background: #1d72f3;
|
||||
&::before {
|
||||
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjEyNTE4MzM4MjIxIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjYxNjg0IiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwvc3R5bGU+PC9kZWZzPjxwYXRoIGQ9Ik03NjcuOTczOTc1IDExNi4zNDYwODZjMCA2NC4yNTI3MzQtNDEuNjgzMjE0IDExNi4zODg3NS05My4wOTM5MzUgMTE2LjM4ODc1UzU4MS43ODYxMDYgMTgwLjU5ODgyIDU4MS43ODYxMDYgMTE2LjM0NjA4NkM1ODEuNzg2MTA2IDUyLjA5MzM1MiA2MjMuNDY5MzIgMCA2NzQuODgwMDQgMFM3NjcuOTczOTc1IDUyLjA5MzM1MiA3NjcuOTczOTc1IDExNi4zNDYwODZ6TTI1NiA1MDQuMjk0MzY1czcwLjgyMzA2Ni0yODQuNzg1NTIzIDI4Ni43NDgwOS0yNzEuMDQ3NTU1YzIxNS45MjUwMjQgMTMuNjk1MzA0IDY3LjIzOTI0OSAyNjEuNDQ4MDQzLTEzLjI2ODY1OSA1MDEuNjQ5MTY2LTgwLjUwNzkwOCAyNDAuMjAxMTIzIDEwMC4yNjE1NyA3MS40MjAzNjkgMTQ1LjQwMDYwOS03LjU1MTYxNiAwIDAtOTMuMTM2NTk5IDQwNi43NjMzMjMtMzY3LjM0MTMyNyAyNjcuNjc3MDYtMTI4LjU0ODEzMi02NS4yMzQwMTcgMzIuMjU0MzYtMzk4LjA1OTc2NSAxMDMuMTIwMDkyLTU0NS41OTM1OTlDNDgxLjU2NzIgMzAxLjgwODY1OCAzMzYuNjM1OTAxIDM4Ny42MDY5NjMgMjU2IDUwNC4yNTE3MDF6IiBmaWxsPSIjZmZmZmZmIiBwLWlkPSI2MTY4NSI+PC9wYXRoPjwvc3ZnPg==);
|
||||
@@ -2113,7 +2110,7 @@
|
||||
border-left-color: #ffc007;
|
||||
background: #ffc00720;
|
||||
color: #ffc007;
|
||||
.icon {
|
||||
> .icon {
|
||||
background: #ffc007;
|
||||
&::before {
|
||||
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjEyNTE4MTI5NTE1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQ3NDkyIiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwvc3R5bGU+PC9kZWZzPjxwYXRoIGQ9Ik00NzkuODE3MTQzIDY2NS42YzEwLjI0IDMwLjcyIDMwLjcyIDUxLjIgNjEuNDQgNTEuMnM1MS4yLTIwLjQ4IDYxLjQ0LTUxLjJsNDAuOTYtNTYzLjJDNjQzLjY1NzE0MyA0MC45NiA1OTIuNDU3MTQzIDAgNTQxLjI1NzE0MyAwIDQ3OS44MTcxNDMgMCA0MzguODU3MTQzIDUxLjIgNDM4Ljg1NzE0MyAxMTIuNjRsNDAuOTYgNTUyLjk2eiBtNjEuNDQgMTUzLjZjLTYxLjQ0IDAtMTAyLjQgNDAuOTYtMTAyLjQgMTAyLjQgMCA2MS40NCA0MC45NiAxMDIuNCAxMDIuNCAxMDIuNCA2MS40NCAwIDEwMi40LTQwLjk2IDEwMi40LTEwMi40IDAtNjEuNDQtNDAuOTYtMTAyLjQtMTAyLjQtMTAyLjR6IiBwLWlkPSI0NzQ5MyIgZmlsbD0iI2ZmZmZmZiI+PC9wYXRoPjwvc3ZnPg==);
|
||||
@@ -2124,14 +2121,14 @@
|
||||
border-left-color: #f56c6c;
|
||||
background: #f56c6c20;
|
||||
color: #f56c6c;
|
||||
.icon {
|
||||
> .icon {
|
||||
background: #f56c6c;
|
||||
&::before {
|
||||
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjEyNTE4MjAyNDk4IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQ4OTE1IiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwvc3R5bGU+PC9kZWZzPjxwYXRoIGQ9Ik0xOTMuOCA4MzAuMmMtMTkuNC0xOS40LTE5LjQtNTEuMyAwLTcwLjdsNTY1LjctNTY1LjdjMTkuNC0xOS40IDUxLjMtMTkuNCA3MC43IDAgMTkuNCAxOS40IDE5LjQgNTEuMyAwIDcwLjdMMjY0LjUgODMwLjJjLTE5LjQgMTkuNC01MS4zIDE5LjQtNzAuNyAweiIgZmlsbD0iI2ZmZmZmZiIgcC1pZD0iNDg5MTYiPjwvcGF0aD48cGF0aCBkPSJNODMwLjIgODMwLjJjLTE5LjQgMTkuNC01MS4zIDE5LjQtNzAuNyAwTDE5My44IDI2NC41Yy0xOS40LTE5LjQtMTkuNC01MS4zIDAtNzAuNyAxOS40LTE5LjQgNTEuMy0xOS40IDcwLjcgMGw1NjUuNyA1NjUuN2MxOS40IDE5LjQgMTkuNCA1MS4zIDAgNzAuN3oiIGZpbGw9IiNmZmZmZmYiIHAtaWQ9IjQ4OTE3Ij48L3BhdGg+PC9zdmc+);
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
> .content {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@@ -2218,7 +2215,7 @@
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.strip {
|
||||
> .strip {
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
@@ -2226,7 +2223,7 @@
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
margin-right: 10px;
|
||||
.percent {
|
||||
> .percent {
|
||||
position: relative;
|
||||
display: block;
|
||||
height: 100%;
|
||||
@@ -2246,12 +2243,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.percentage {
|
||||
> .percentage {
|
||||
color: var(--minor);
|
||||
}
|
||||
}
|
||||
&-callout {
|
||||
display: block;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--classB);
|
||||
border-left-width: 4px;
|
||||
@@ -2262,20 +2258,19 @@
|
||||
}
|
||||
}
|
||||
&-tabs {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background: var(--background);
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
||||
border: 1px solid var(--classC);
|
||||
border-radius: var(--radius-inner);
|
||||
.heads {
|
||||
> .heads {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
display: flex;
|
||||
background: var(--classD);
|
||||
.item {
|
||||
> .item {
|
||||
position: relative;
|
||||
padding: 0 15px;
|
||||
line-height: 40px;
|
||||
@@ -2307,8 +2302,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.bodys {
|
||||
.item {
|
||||
> .bodys {
|
||||
> .item {
|
||||
padding: 15px;
|
||||
*:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
@@ -2317,11 +2312,10 @@
|
||||
}
|
||||
}
|
||||
&-card_list {
|
||||
display: block;
|
||||
border: 1px solid var(--classC);
|
||||
border-radius: var(--radius-inner);
|
||||
overflow: hidden;
|
||||
.item {
|
||||
> .item {
|
||||
padding: 12px 15px;
|
||||
border-bottom: 1px solid var(--classC);
|
||||
&:last-child {
|
||||
@@ -2332,7 +2326,40 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-timeline {
|
||||
> .item {
|
||||
position: relative;
|
||||
padding-bottom: 15px;
|
||||
> .tail {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 6px;
|
||||
height: 100%;
|
||||
border-left: 1px solid var(--classC);
|
||||
}
|
||||
> .circle {
|
||||
position: absolute;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
background-color: var(--background);
|
||||
border-radius: 50%;
|
||||
border: 1px solid #19be6b;
|
||||
}
|
||||
> .content {
|
||||
padding: 1px 1px 10px 24px;
|
||||
position: relative;
|
||||
top: -3px;
|
||||
*:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
> .tail {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 以下未测试 */
|
||||
&-protected {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
$('.joe_detail__article p:empty').remove();
|
||||
|
||||
/* OK */
|
||||
class JoeMtitle extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -14,6 +15,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-mtitle', JoeMtitle);
|
||||
|
||||
/* OK */
|
||||
class JoeDplayer extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -29,6 +32,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-dplayer', JoeDplayer);
|
||||
|
||||
/* OK */
|
||||
class JoeBilibili extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -41,6 +46,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-bilibili', JoeBilibili);
|
||||
|
||||
/* OK */
|
||||
class JoeMp3 extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -71,6 +78,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-mp3', JoeMp3);
|
||||
|
||||
/* OK */
|
||||
class JoeMusic extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -97,6 +106,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-music', JoeMusic);
|
||||
|
||||
/* OK */
|
||||
class JoeMlist extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -123,6 +134,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-mlist', JoeMlist);
|
||||
|
||||
/* OK */
|
||||
class JoeAbtn extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -141,6 +154,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-abtn', JoeAbtn);
|
||||
|
||||
/* OK */
|
||||
class JoeAnote extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -158,6 +173,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-anote', JoeAnote);
|
||||
|
||||
/* OK */
|
||||
class JoeDotted extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -169,6 +186,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-dotted', JoeDotted);
|
||||
|
||||
/* OK */
|
||||
class JoeHide extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -187,6 +206,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-hide', JoeHide);
|
||||
|
||||
/* OK */
|
||||
class JoeCardDefault extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -197,10 +218,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
content: _temp.innerHTML.trim().replace(/^(<br>)|(<br>)$/g, '') || '卡片内容'
|
||||
};
|
||||
const htmlStr = `
|
||||
<span class="joe_detail__article-card_default" style="width: ${this.options.width}">
|
||||
<span class="title">${this.options.label}</span>
|
||||
<span class="content">${this.options.content}</span>
|
||||
</span>
|
||||
<div class="joe_detail__article-card_default" style="width: ${this.options.width}">
|
||||
<div class="title">${this.options.label}</div>
|
||||
<div class="content">${this.options.content}</div>
|
||||
</div>
|
||||
`;
|
||||
if (this.querySelector('._content')) {
|
||||
this.querySelector('._content').innerHTML = htmlStr;
|
||||
@@ -214,6 +235,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-card-default', JoeCardDefault);
|
||||
|
||||
/* OK */
|
||||
class JoeMessage extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -230,6 +253,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-message', JoeMessage);
|
||||
|
||||
/* OK */
|
||||
class JoeProgress extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -248,6 +273,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-progress', JoeProgress);
|
||||
|
||||
/* OK */
|
||||
class JoeCallout extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -257,9 +284,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
content: _temp.innerHTML.trim().replace(/^(<br>)|(<br>)$/g, '') || '标注内容'
|
||||
};
|
||||
const htmlStr = `
|
||||
<span class="joe_detail__article-callout" style="border-left-color: ${this.options.color};">
|
||||
<div class="joe_detail__article-callout" style="border-left-color: ${this.options.color};">
|
||||
${this.options.content}
|
||||
</span>
|
||||
</div>
|
||||
`;
|
||||
if (this.querySelector('._content')) {
|
||||
this.querySelector('._content').innerHTML = htmlStr;
|
||||
@@ -273,6 +300,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-callout', JoeCallout);
|
||||
|
||||
/* OK */
|
||||
class JoeTabs extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -285,10 +314,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
contents += `<div style="display: none" class="item" ${$1}>${$2.trim().replace(/^(<br>)|(<br>)$/g, '')}</div>`;
|
||||
});
|
||||
let htmlStr = `
|
||||
<span class="joe_detail__article-tabs">
|
||||
<div class="joe_detail__article-tabs">
|
||||
<div class="heads">${navs}</div>
|
||||
<div class="bodys">${contents}</div>
|
||||
</span>
|
||||
</div>
|
||||
`;
|
||||
if (this.querySelector('._content')) {
|
||||
this.querySelector('._content').innerHTML = htmlStr;
|
||||
@@ -315,6 +344,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-tabs', JoeTabs);
|
||||
|
||||
/* OK */
|
||||
class JoeCardList extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -324,7 +355,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
_innerHTML.replace(/{card-list-item}([\s\S]*?){\/card-list-item}/g, function ($0, $1) {
|
||||
content += `<div class="item">${$1.trim().replace(/^(<br>)|(<br>)$/g, '')}</div>`;
|
||||
});
|
||||
let htmlStr = `<span class="joe_detail__article-card_list">${content}</span>`;
|
||||
let htmlStr = `<div class="joe_detail__article-card_list">${content}</div>`;
|
||||
if (this.querySelector('._content')) {
|
||||
this.querySelector('._content').innerHTML = htmlStr;
|
||||
} else {
|
||||
@@ -338,6 +369,40 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
window.customElements.define('joe-card-list', JoeCardList);
|
||||
|
||||
/* OK */
|
||||
class JoeTimeline extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
const _temp = this.querySelector('._temp');
|
||||
let _innerHTML = _temp.innerHTML.trim().replace(/^(<br>)|(<br>)$/g, '');
|
||||
let content = '';
|
||||
_innerHTML.replace(/{timeline-item([^}]*)}([\s\S]*?){\/timeline-item}/g, function ($0, $1, $2) {
|
||||
content += `
|
||||
<div class="item">
|
||||
<div class="tail"></div>
|
||||
<div class="circle" ${$1}></div>
|
||||
<div class="content">${$2.trim().replace(/^(<br>)|(<br>)$/g, '')}</div>
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
let htmlStr = `<div class="joe_detail__article-timeline">${content}</div>`;
|
||||
if (this.querySelector('._content')) {
|
||||
this.querySelector('._content').innerHTML = htmlStr;
|
||||
} else {
|
||||
const span = document.createElement('span');
|
||||
span.className = '_content';
|
||||
span.style.display = 'block';
|
||||
span.innerHTML = htmlStr;
|
||||
this.appendChild(span);
|
||||
}
|
||||
this.querySelectorAll('.joe_detail__article-timeline .item .circle').forEach((item, index) => {
|
||||
const color = item.getAttribute('color') || '#19be6b';
|
||||
item.style.borderColor = color;
|
||||
});
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-timeline', JoeTimeline);
|
||||
|
||||
$('.joe_detail__article p:empty').remove();
|
||||
/*
|
||||
------------------------以下未测试------------------------------------------
|
||||
|
||||
2
assets/js/joe.short.min.js
vendored
2
assets/js/joe.short.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user