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
typecho/write/css/joe.write.min.css
vendored
2
typecho/write/css/joe.write.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1036,7 +1036,7 @@ body.fullscreen {
|
||||
}
|
||||
.joe_card__describe {
|
||||
position: relative;
|
||||
border: 1px dashed #e4e7ed;
|
||||
border: 1px dashed #dcdfe6;
|
||||
&-title {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -1046,10 +1046,10 @@ body.fullscreen {
|
||||
padding: 0 5px;
|
||||
color: #303133;
|
||||
font-weight: 500;
|
||||
max-width: 200px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 200px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
&-content {
|
||||
color: #606266;
|
||||
@@ -1059,6 +1059,33 @@ body.fullscreen {
|
||||
}
|
||||
}
|
||||
}
|
||||
.joe_lamp {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
border-radius: 1.5px;
|
||||
overflow: hidden;
|
||||
animation: lamp-background linear 4s infinite;
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
animation: lamp-front linear 4s infinite;
|
||||
}
|
||||
&::before {
|
||||
right: 50%;
|
||||
transform-origin: right;
|
||||
}
|
||||
&::after {
|
||||
left: 50%;
|
||||
transform-origin: left;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.cm-modal__wrapper {
|
||||
@@ -1076,3 +1103,67 @@ body.fullscreen {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes lamp-background {
|
||||
0%,
|
||||
24.9% {
|
||||
background-color: #54b5db;
|
||||
}
|
||||
|
||||
25%,
|
||||
49.9% {
|
||||
background-color: #da4733;
|
||||
}
|
||||
|
||||
50%,
|
||||
74.9% {
|
||||
background-color: #3b78e7;
|
||||
}
|
||||
|
||||
75%,
|
||||
to {
|
||||
background-color: #fdba2c;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes lamp-front {
|
||||
0% {
|
||||
transform: scaleX(0);
|
||||
background-color: #da4733;
|
||||
}
|
||||
|
||||
24.9% {
|
||||
transform: scaleX(0.5);
|
||||
background-color: #da4733;
|
||||
}
|
||||
|
||||
25% {
|
||||
transform: scaleX(0);
|
||||
background-color: #3b78e7;
|
||||
}
|
||||
|
||||
49.9% {
|
||||
transform: scaleX(0.5);
|
||||
background-color: #3b78e7;
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scaleX(0);
|
||||
background-color: #fdba2c;
|
||||
}
|
||||
|
||||
74.9% {
|
||||
transform: scaleX(0.5);
|
||||
background-color: #fdba2c;
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: scaleX(0);
|
||||
background-color: #409eff;
|
||||
}
|
||||
|
||||
to {
|
||||
transform: scaleX(0.5);
|
||||
background-color: #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -763,4 +763,9 @@ export default class JoeAction {
|
||||
}
|
||||
});
|
||||
}
|
||||
handleLamp(cm) {
|
||||
const str = `${this._getLineCh(cm) ? '\n\n' : '\n'}{lamp/}\n\n`;
|
||||
this._replaceSelection(cm, str);
|
||||
cm.focus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ export default function createPreviewHtml(str) {
|
||||
|
||||
str = parser.makeHtml(str);
|
||||
|
||||
str = str.replace(/{lamp\/}/g, '<span class="joe_lamp"></span>');
|
||||
str = str.replace(/{x}/g, '<input type="checkbox" class="joe_checkbox" checked disabled></input>');
|
||||
str = str.replace(/{ }/g, '<input type="checkbox" class="joe_checkbox" disabled></input>');
|
||||
str = str.replace(/\:\:\(\s*(呵呵|哈哈|吐舌|太开心|笑眼|花心|小乖|乖|捂嘴笑|滑稽|你懂的|不高兴|怒|汗|黑线|泪|真棒|喷|惊哭|阴险|鄙视|酷|啊|狂汗|what|疑问|酸爽|呀咩爹|委屈|惊讶|睡觉|笑尿|挖鼻|吐|犀利|小红脸|懒得理|勉强|爱心|心碎|玫瑰|礼物|彩虹|太阳|星星月亮|钱币|茶杯|蛋糕|大拇指|胜利|haha|OK|沙发|手纸|香蕉|便便|药丸|红领巾|蜡烛|音乐|灯泡|开心|钱|咦|呼|冷|生气|弱|吐血|狗头)\s*\)/g, function ($0, $1) {
|
||||
|
||||
@@ -203,12 +203,17 @@ export default [
|
||||
{
|
||||
type: 'copy',
|
||||
title: '复制文本',
|
||||
innerHTML: '<svg t="1619140348056" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3613" width="20" height="20"><path d="M731.682 676.057V183.323c0-30.233-24.512-54.746-54.748-54.746H184.216c-30.233 0-54.747 24.513-54.747 54.746v492.734c0 30.208 24.514 54.747 54.747 54.747h492.718c30.235 0 54.748-24.539 54.748-54.747z m-109.493 0H238.963c-30.234 0-54.747-24.538-54.747-54.745V238.07c0-30.233 24.513-54.747 54.747-54.747h383.226c30.234 0 54.745 24.513 54.745 54.747v383.243c0 30.206-24.512 54.744-54.745 54.744z m218.986-383.24h-54.746v54.747c30.232 0 54.746 24.513 54.746 54.76V785.55c0 30.207-24.514 54.746-54.746 54.746H403.202c-30.234 0-54.747-24.539-54.747-54.746h-54.747v54.746c0 30.208 24.513 54.748 54.747 54.748h492.72c30.234 0 54.747-24.54 54.747-54.748V347.564c0-30.235-24.514-54.747-54.747-54.747z" p-id="3614"></path></svg>'
|
||||
innerHTML: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M731.682 676.057V183.323c0-30.233-24.512-54.746-54.748-54.746H184.216c-30.233 0-54.747 24.513-54.747 54.746v492.734c0 30.208 24.514 54.747 54.747 54.747h492.718c30.235 0 54.748-24.539 54.748-54.747zm-109.493 0H238.963c-30.234 0-54.747-24.538-54.747-54.745V238.07c0-30.233 24.513-54.747 54.747-54.747h383.226c30.234 0 54.745 24.513 54.745 54.747v383.243c0 30.206-24.512 54.744-54.745 54.744zm218.986-383.24h-54.746v54.747c30.232 0 54.746 24.513 54.746 54.76V785.55c0 30.207-24.514 54.746-54.746 54.746H403.202c-30.234 0-54.747-24.539-54.747-54.746h-54.747v54.746c0 30.208 24.513 54.748 54.747 54.748h492.72c30.234 0 54.747-24.54 54.747-54.748V347.564c0-30.235-24.514-54.747-54.747-54.747z"/></svg>'
|
||||
},
|
||||
{
|
||||
type: 'card-describe',
|
||||
title: '描述卡片',
|
||||
innerHTML: '<svg t="1619143998920" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21069" width="20" height="20"><path d="M202.666667 149.333333C150.016 149.333333 106.666667 192.682667 106.666667 245.333333v533.333334C106.666667 831.317333 150.016 874.666667 202.666667 874.666667h618.666666c52.650667 0 96-43.349333 96-96v-533.333334C917.333333 192.682667 873.984 149.333333 821.333333 149.333333h-448a32 32 0 0 0-5.504 0.426667c-2.816-0.213333-5.653333-0.426667-8.490666-0.426667H202.666667z m0 64h156.672c14.122667 0 27.690667 5.610667 37.696 15.616l102.997333 103.018667A32 32 0 0 0 522.666667 341.333333h298.666666c18.048 0 32 13.952 32 32v405.333334c0 18.048-13.952 32-32 32h-618.666666c-18.048 0-32-13.952-32-32v-533.333334c0-18.048 13.952-32 32-32z m269.248 0H821.333333c18.048 0 32 13.952 32 32v37.973334a94.016 94.016 0 0 0-32-5.973334H535.914667l-64-64z" p-id="21070"></path></svg>'
|
||||
innerHTML: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M202.667 149.333c-52.651 0-96 43.35-96 96v533.334c0 52.65 43.349 96 96 96h618.666c52.651 0 96-43.35 96-96V245.333c0-52.65-43.349-96-96-96h-448a32 32 0 0 0-5.504.427c-2.816-.213-5.653-.427-8.49-.427H202.667zm0 64h156.672a53.32 53.32 0 0 1 37.696 15.616l102.997 103.019a32 32 0 0 0 22.635 9.365h298.666c18.048 0 32 13.952 32 32v405.334c0 18.048-13.952 32-32 32H202.667c-18.048 0-32-13.952-32-32V245.333c0-18.048 13.952-32 32-32zm269.248 0h349.418c18.048 0 32 13.952 32 32v37.974a94.016 94.016 0 0 0-32-5.974H535.915l-64-64z"/></svg>'
|
||||
},
|
||||
{
|
||||
type: 'lamp',
|
||||
title: '跑马灯',
|
||||
innerHTML: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M848 432a80.064 80.064 0 0 0-73.216 48H217.216A80.096 80.096 0 0 0 144 432a80.096 80.096 0 0 0-80 80c0 44.128 35.904 80 80 80a80 80 0 0 0 73.216-48h557.536a80 80 0 0 0 73.216 48c44.128 0 80-35.872 80-80A80.032 80.032 0 0 0 848 432z"/></svg>'
|
||||
},
|
||||
/* --------------------------- 短代码结束 --------------------------- */
|
||||
{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -327,6 +327,9 @@ class Joe extends JoeAction {
|
||||
case 'card-describe':
|
||||
super.handleCardDescribe(this.cm);
|
||||
break;
|
||||
case 'lamp':
|
||||
super.handleLamp(this.cm);
|
||||
break;
|
||||
case 'preview':
|
||||
el.toggleClass('active');
|
||||
if (el.hasClass('active')) window.JoeConfig.canPreview = true;
|
||||
|
||||
Reference in New Issue
Block a user