This commit is contained in:
杜恒 2021-04-23 13:46:11 +08:00
parent b8f3fe7cf0
commit ee09362c4f
14 changed files with 227 additions and 29 deletions

File diff suppressed because one or more lines are too long

View File

@ -1870,7 +1870,7 @@
} }
.joe_card__describe { .joe_card__describe {
position: relative; position: relative;
border: 1px dashed var(--classB); border: 1px dashed var(--classA);
&-title { &-title {
position: absolute; position: absolute;
top: 0; top: 0;
@ -1893,8 +1893,33 @@
} }
} }
} }
.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;
}
}
.joe_detail { .joe_detail {
background: var(--background); background: var(--background);
@ -3544,3 +3569,66 @@
width: 100%; 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;
}
}

View File

@ -50,7 +50,7 @@ class Editor
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-tomorrow.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-tomorrow.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="<?php Helper::options()->themeUrl('typecho/write/css/joe.write.min.css?v=2021042310') ?>"> <link rel="stylesheet" href="<?php Helper::options()->themeUrl('typecho/write/css/joe.write.min.css?v=202104231345') ?>">
<script> <script>
window.JoeConfig = { window.JoeConfig = {
uploadAPI: '<?php Helper::security()->index('/action/upload'); ?>', uploadAPI: '<?php Helper::security()->index('/action/upload'); ?>',
@ -65,9 +65,9 @@ class Editor
</script> </script>
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/typecho-joe-next@6.2.4/plugin/prism/prism.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/typecho-joe-next@6.2.4/plugin/prism/prism.min.js"></script>
<script src="<?php Helper::options()->themeUrl('typecho/write/js/joe.parse.min.js?v=2021042310') ?>"></script> <script src="<?php Helper::options()->themeUrl('typecho/write/js/joe.parse.min.js?v=202104231345') ?>"></script>
<script src="<?php Helper::options()->themeUrl('typecho/write/js/joe.write.chunk.js?v=2021042310') ?>"></script> <script src="<?php Helper::options()->themeUrl('typecho/write/js/joe.write.chunk.js?v=202104231345') ?>"></script>
<script src="<?php Helper::options()->themeUrl('assets/js/joe.short.min.js?v=2021042310') ?>"></script> <script src="<?php Helper::options()->themeUrl('assets/js/joe.short.min.js?v=202104231345') ?>"></script>
<?php <?php
} }
} }

View File

@ -2,7 +2,7 @@
/* 获取主题当前版本号 */ /* 获取主题当前版本号 */
function _getVersion() function _getVersion()
{ {
return "6.6.3"; return "6.6.4";
}; };
/* 判断是否是手机 */ /* 判断是否是手机 */

View File

@ -5,6 +5,11 @@ function _parseContent($post, $login)
$content = $post->content; $content = $post->content;
$content = _parseReply($content); $content = _parseReply($content);
if (strpos($content, '{lamp/}') !== false) {
$content = strtr($content, array(
"{lamp/}" => '<span class="joe_lamp"></span>',
));
}
if (strpos($content, '{x}') !== false || strpos($content, '{ }') !== false) { if (strpos($content, '{x}') !== false || strpos($content, '{ }') !== false) {
$content = strtr($content, array( $content = strtr($content, array(
"{x}" => '<input type="checkbox" class="joe_checkbox" checked disabled></input>', "{x}" => '<input type="checkbox" class="joe_checkbox" checked disabled></input>',

View File

@ -1,6 +1,6 @@
{ {
"name": "typecho-joe-next", "name": "typecho-joe-next",
"version": "6.6.3", "version": "6.6.4",
"description": "A Theme Of Typecho", "description": "A Theme Of Typecho",
"main": "index.php", "main": "index.php",
"keywords": [ "keywords": [

View File

@ -18,8 +18,8 @@
<?php endif; ?> <?php endif; ?>
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.mode.min.css'); ?>"> <link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.mode.min.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.normalize.min.css'); ?>"> <link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.normalize.min.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.global.min.css?v=2021042310'); ?>"> <link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.global.min.css?v=202104231345'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.responsive.min.css?v=2021042310'); ?>"> <link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.responsive.min.css?v=202104231345'); ?>">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typecho-joe-next@6.0.0/plugin/qmsg/qmsg.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typecho-joe-next@6.0.0/plugin/qmsg/qmsg.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.7.2/animate.min.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.7.2/animate.min.css" />
@ -40,6 +40,6 @@
<?php if ($this->options->JCursorEffects && $this->options->JCursorEffects !== 'off') : ?> <?php if ($this->options->JCursorEffects && $this->options->JCursorEffects !== 'off') : ?>
<script src="<?php $this->options->themeUrl('assets/cursor/' . $this->options->JCursorEffects); ?>" async></script> <script src="<?php $this->options->themeUrl('assets/cursor/' . $this->options->JCursorEffects); ?>" async></script>
<?php endif; ?> <?php endif; ?>
<script src="<?php $this->options->themeUrl('assets/js/joe.global.min.js?v=2021042310'); ?>"></script> <script src="<?php $this->options->themeUrl('assets/js/joe.global.min.js?v=202104231345'); ?>"></script>
<script src="<?php $this->options->themeUrl('assets/js/joe.short.min.js?v=2021042310'); ?>"></script> <script src="<?php $this->options->themeUrl('assets/js/joe.short.min.js?v=202104231345'); ?>"></script>
<?php $this->options->JCustomHeadEnd() ?> <?php $this->options->JCustomHeadEnd() ?>

File diff suppressed because one or more lines are too long

View File

@ -1036,7 +1036,7 @@ body.fullscreen {
} }
.joe_card__describe { .joe_card__describe {
position: relative; position: relative;
border: 1px dashed #e4e7ed; border: 1px dashed #dcdfe6;
&-title { &-title {
position: absolute; position: absolute;
top: 0; top: 0;
@ -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) { @media (max-width: 768px) {
.cm-modal__wrapper { .cm-modal__wrapper {
@ -1076,3 +1103,67 @@ body.fullscreen {
width: 100%; 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;
}
}

View File

@ -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();
}
} }

View File

@ -8,6 +8,7 @@ export default function createPreviewHtml(str) {
str = parser.makeHtml(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(/{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(/{ }/g, '<input type="checkbox" class="joe_checkbox" disabled></input>');
str = str.replace(/\:\:\(\s*(呵呵|哈哈|吐舌|太开心|笑眼|花心|小乖|乖|捂嘴笑|滑稽|你懂的|不高兴|怒|汗|黑线|泪|真棒|喷|惊哭|阴险|鄙视|酷|啊|狂汗|what|疑问|酸爽|呀咩爹|委屈|惊讶|睡觉|笑尿|挖鼻|吐|犀利|小红脸|懒得理|勉强|爱心|心碎|玫瑰|礼物|彩虹|太阳|星星月亮|钱币|茶杯|蛋糕|大拇指|胜利|haha|OK|沙发|手纸|香蕉|便便|药丸|红领巾|蜡烛|音乐|灯泡|开心|钱|咦|呼|冷|生气|弱|吐血|狗头)\s*\)/g, function ($0, $1) { str = str.replace(/\:\:\(\s*(呵呵|哈哈|吐舌|太开心|笑眼|花心|小乖|乖|捂嘴笑|滑稽|你懂的|不高兴|怒|汗|黑线|泪|真棒|喷|惊哭|阴险|鄙视|酷|啊|狂汗|what|疑问|酸爽|呀咩爹|委屈|惊讶|睡觉|笑尿|挖鼻|吐|犀利|小红脸|懒得理|勉强|爱心|心碎|玫瑰|礼物|彩虹|太阳|星星月亮|钱币|茶杯|蛋糕|大拇指|胜利|haha|OK|沙发|手纸|香蕉|便便|药丸|红领巾|蜡烛|音乐|灯泡|开心|钱|咦|呼|冷|生气|弱|吐血|狗头)\s*\)/g, function ($0, $1) {

View File

@ -203,12 +203,17 @@ export default [
{ {
type: 'copy', type: 'copy',
title: '复制文本', 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', type: 'card-describe',
title: '描述卡片', 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

View File

@ -327,6 +327,9 @@ class Joe extends JoeAction {
case 'card-describe': case 'card-describe':
super.handleCardDescribe(this.cm); super.handleCardDescribe(this.cm);
break; break;
case 'lamp':
super.handleLamp(this.cm);
break;
case 'preview': case 'preview':
el.toggleClass('active'); el.toggleClass('active');
if (el.hasClass('active')) window.JoeConfig.canPreview = true; if (el.hasClass('active')) window.JoeConfig.canPreview = true;