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
@@ -2214,6 +2214,42 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
&-progress {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.strip {
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
background: var(--classC);;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
margin-right: 10px;
|
||||
.percent {
|
||||
position: relative;
|
||||
display: block;
|
||||
height: 100%;
|
||||
border-radius: 6px;
|
||||
transition: width 0.35s;
|
||||
&::before{
|
||||
content: "";
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
animation: progress-active 3s ease-in-out infinite;
|
||||
}
|
||||
}
|
||||
}
|
||||
.percentage {
|
||||
color: var(--minor);
|
||||
}
|
||||
}
|
||||
|
||||
/* 以下未测试 */
|
||||
&-protected {
|
||||
@@ -3362,3 +3398,13 @@
|
||||
clip-path: circle(100%);
|
||||
}
|
||||
}
|
||||
@keyframes progress-active {
|
||||
0% {
|
||||
opacity: .3;
|
||||
width: 0
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
width: 100%
|
||||
}
|
||||
}
|
||||
@@ -179,11 +179,28 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-message', JoeMessage);
|
||||
class JoeProgress extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.options = {
|
||||
percentage: /^\d{1,3}%$/.test(this.getAttribute('percentage')) ? this.getAttribute('percentage') : '50%',
|
||||
color: this.getAttribute('color') || '#ff6c6c'
|
||||
};
|
||||
this.innerHTML = `
|
||||
<span class="joe_detail__article-progress">
|
||||
<span class="strip">
|
||||
<span class="percent" style="width: ${this.options.percentage}; background: ${this.options.color};"></span>
|
||||
</span>
|
||||
<span class="percentage">${this.options.percentage}</span>
|
||||
</span>
|
||||
`;
|
||||
}
|
||||
}
|
||||
window.customElements.define('joe-progress', JoeProgress);
|
||||
|
||||
const article = document.querySelector('.joe_detail__article');
|
||||
if (article) article.innerHTML = article.innerHTML.replace(/<p><\/p>/g, '');
|
||||
|
||||
|
||||
/*
|
||||
------------------------以下未测试------------------------------------------
|
||||
*/
|
||||
|
||||
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