This commit is contained in:
杜恒 2021-04-23 17:47:54 +08:00
parent 61db123164
commit 05d5a20244
14 changed files with 83 additions and 31 deletions

File diff suppressed because one or more lines are too long

View File

@ -1620,6 +1620,7 @@
border-radius: var(--radius-inner); border-radius: var(--radius-inner);
border: 1px solid var(--classC); border: 1px solid var(--classC);
background: var(--background); background: var(--background);
line-height: 26px;
&-title { &-title {
padding: 8px 12px; padding: 8px 12px;
border-bottom: 1px solid var(--classC); border-bottom: 1px solid var(--classC);
@ -1641,6 +1642,7 @@
border-left-style: solid; border-left-style: solid;
padding: 8px 15px; padding: 8px 15px;
border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0;
line-height: 26px;
&:hover { &:hover {
.joe_message__icon { .joe_message__icon {
transform: rotate(360deg); transform: rotate(360deg);
@ -1756,6 +1758,7 @@
border-left-width: 4px; border-left-width: 4px;
border-radius: var(--radius-inner); border-radius: var(--radius-inner);
color: var(--routine); color: var(--routine);
line-height: 26px;
*:last-child { *:last-child {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
@ -1764,6 +1767,7 @@
border: 1px solid var(--classC); border: 1px solid var(--classC);
border-radius: var(--radius-inner); border-radius: var(--radius-inner);
overflow: hidden; overflow: hidden;
line-height: 26px;
&-item { &-item {
padding: 12px; padding: 12px;
border-bottom: 1px solid var(--classC); border-bottom: 1px solid var(--classC);
@ -1776,6 +1780,7 @@
} }
} }
.joe_timeline { .joe_timeline {
line-height: 26px;
&__item { &__item {
position: relative; position: relative;
padding-bottom: 15px; padding-bottom: 15px;
@ -1797,7 +1802,7 @@
&-content { &-content {
padding-left: 24px; padding-left: 24px;
position: relative; position: relative;
top: -3px; top: -5px;
*:last-child { *:last-child {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
@ -1817,6 +1822,7 @@
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
border: 1px solid var(--classC); border: 1px solid var(--classC);
border-radius: var(--radius-inner); border-radius: var(--radius-inner);
line-height: 26px;
&__head { &__head {
width: 100%; width: 100%;
overflow-x: auto; overflow-x: auto;
@ -1871,6 +1877,7 @@
.joe_card__describe { .joe_card__describe {
position: relative; position: relative;
border: 1px dashed var(--classA); border: 1px dashed var(--classA);
line-height: 26px;
&-title { &-title {
position: absolute; position: absolute;
top: 0; top: 0;
@ -1921,6 +1928,7 @@
} }
} }
.joe_collapse { .joe_collapse {
line-height: 26px;
&__item { &__item {
margin-bottom: 10px; margin-bottom: 10px;
color: var(--routine); color: var(--routine);

View File

@ -370,20 +370,21 @@ document.addEventListener('DOMContentLoaded', () => {
span.innerHTML = htmlStr; span.innerHTML = htmlStr;
this.appendChild(span); this.appendChild(span);
} }
this.querySelectorAll('.joe_collapse__item-head--label').forEach(item => {
const label = item.getAttribute('label') || '折叠标题';
item.innerHTML = label;
});
this.querySelectorAll('.joe_collapse__item').forEach(item => { this.querySelectorAll('.joe_collapse__item').forEach(item => {
const label = item.getAttribute('label') || '折叠标题';
const head = getChildren(item, 'joe_collapse__item-head'); const head = getChildren(item, 'joe_collapse__item-head');
const headLabel = getChildren(head, 'joe_collapse__item-head--label');
headLabel.innerHTML = label;
const wrapper = getChildren(item, 'joe_collapse__item-wrapper'); const wrapper = getChildren(item, 'joe_collapse__item-wrapper');
const content = getChildren(wrapper, 'joe_collapse__item-wrapper--content'); const content = getChildren(wrapper, 'joe_collapse__item-wrapper--content');
const open = item.getAttribute('open'); const open = item.getAttribute('open');
if (open !== null) { if (open !== null) {
item.classList.add('active'); item.classList.add('active');
wrapper.style.maxHeight = content.offsetHeight + 'px'; wrapper.style.maxHeight = 'none';
} }
head.addEventListener('click', () => { head.addEventListener('click', () => {
wrapper.style.maxHeight = content.offsetHeight + 'px';
let timer = setTimeout(() => {
if (item.classList.contains('active')) { if (item.classList.contains('active')) {
item.classList.remove('active'); item.classList.remove('active');
wrapper.style.maxHeight = 0; wrapper.style.maxHeight = 0;
@ -391,6 +392,8 @@ document.addEventListener('DOMContentLoaded', () => {
item.classList.add('active'); item.classList.add('active');
wrapper.style.maxHeight = content.offsetHeight + 'px'; wrapper.style.maxHeight = content.offsetHeight + 'px';
} }
clearTimeout(timer);
}, 30);
}); });
}); });
} }

File diff suppressed because one or more lines are too long

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=202104231640') ?>"> <link rel="stylesheet" href="<?php Helper::options()->themeUrl('typecho/write/css/joe.write.min.css?v=202104231747') ?>">
<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=202104231640') ?>"></script> <script src="<?php Helper::options()->themeUrl('typecho/write/js/joe.parse.min.js?v=202104231747') ?>"></script>
<script src="<?php Helper::options()->themeUrl('typecho/write/js/joe.write.chunk.js?v=202104231640') ?>"></script> <script src="<?php Helper::options()->themeUrl('typecho/write/js/joe.write.chunk.js?v=202104231747') ?>"></script>
<script src="<?php Helper::options()->themeUrl('assets/js/joe.short.min.js?v=202104231640') ?>"></script> <script src="<?php Helper::options()->themeUrl('assets/js/joe.short.min.js?v=202104231747') ?>"></script>
<?php <?php
} }
} }

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "typecho-joe-next", "name": "typecho-joe-next",
"version": "6.6.5", "version": "6.6.6",
"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=202104231640'); ?>"> <link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.global.min.css?v=202104231747'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.responsive.min.css?v=202104231640'); ?>"> <link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.responsive.min.css?v=202104231747'); ?>">
<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=202104231640'); ?>"></script> <script src="<?php $this->options->themeUrl('assets/js/joe.global.min.js?v=202104231747'); ?>"></script>
<script src="<?php $this->options->themeUrl('assets/js/joe.short.min.js?v=202104231640'); ?>"></script> <script src="<?php $this->options->themeUrl('assets/js/joe.short.min.js?v=202104231747'); ?>"></script>
<?php $this->options->JCustomHeadEnd() ?> <?php $this->options->JCustomHeadEnd() ?>

File diff suppressed because one or more lines are too long

View File

@ -792,6 +792,7 @@ body.fullscreen {
border-radius: 4px; border-radius: 4px;
border: 1px solid #ebeef5; border: 1px solid #ebeef5;
background: #fff; background: #fff;
line-height: 26px;
&-title { &-title {
padding: 8px 10px; padding: 8px 10px;
border-bottom: 1px solid #ebeef5; border-bottom: 1px solid #ebeef5;
@ -813,6 +814,7 @@ body.fullscreen {
border-left-style: solid; border-left-style: solid;
padding: 8px 15px; padding: 8px 15px;
border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0;
line-height: 26px;
&__icon { &__icon {
position: absolute; position: absolute;
top: -9px; top: -9px;
@ -923,6 +925,7 @@ body.fullscreen {
border-left-width: 4px; border-left-width: 4px;
border-radius: 4px; border-radius: 4px;
color: #606266; color: #606266;
line-height: 26px;
*:last-child { *:last-child {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
@ -931,6 +934,7 @@ body.fullscreen {
border: 1px solid #ebeef5; border: 1px solid #ebeef5;
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
line-height: 26px;
&-item { &-item {
padding: 12px; padding: 12px;
border-bottom: 1px solid #ebeef5; border-bottom: 1px solid #ebeef5;
@ -943,6 +947,7 @@ body.fullscreen {
} }
} }
.joe_timeline { .joe_timeline {
line-height: 26px;
&__item { &__item {
position: relative; position: relative;
padding-bottom: 15px; padding-bottom: 15px;
@ -964,7 +969,7 @@ body.fullscreen {
&-content { &-content {
padding-left: 24px; padding-left: 24px;
position: relative; position: relative;
top: -3px; top: -5px;
*:last-child { *:last-child {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
@ -988,6 +993,7 @@ body.fullscreen {
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
border: 1px solid #ebeef5; border: 1px solid #ebeef5;
border-radius: 4px; border-radius: 4px;
line-height: 26px;
&__head { &__head {
width: 100%; width: 100%;
overflow-x: auto; overflow-x: auto;
@ -1037,6 +1043,7 @@ body.fullscreen {
.joe_card__describe { .joe_card__describe {
position: relative; position: relative;
border: 1px dashed #dcdfe6; border: 1px dashed #dcdfe6;
line-height: 26px;
&-title { &-title {
position: absolute; position: absolute;
top: 0; top: 0;
@ -1087,6 +1094,7 @@ body.fullscreen {
} }
} }
.joe_collapse { .joe_collapse {
line-height: 26px;
&__item { &__item {
margin-bottom: 10px; margin-bottom: 10px;
color: #606266; color: #606266;

View File

@ -742,7 +742,7 @@ export default class JoeAction {
} }
handleCopy(cm) { handleCopy(cm) {
this._openModal({ this._openModal({
title: '插入音乐', title: '复制文本',
innerHtml: ` innerHtml: `
<div class="fitem"> <div class="fitem">
<label>显示文案</label> <label>显示文案</label>
@ -773,4 +773,21 @@ export default class JoeAction {
this._replaceSelection(cm, str); this._replaceSelection(cm, str);
cm.focus(); cm.focus();
} }
handleCloud(cm) {
this._openModal({
title: '网盘下载',
innerHtml: `
<div class="fitem">
<label>网盘类型</label>
<select name="type">
<option value="默认网盘" selected>默认网盘</option>
<option value="百度网盘">百度网盘</option>
</select>
</div>
`,
confirm: () => {
}
});
}
} }

View File

@ -220,6 +220,11 @@ export default [
title: '折叠面板', title: '折叠面板',
innerHTML: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="18" height="18"><path d="M944 128H80c-8.8 0-16 7.2-16 16v736c0 8.8 7.2 16 16 16h864c8.8 0 16-7.2 16-16V144c0-8.8-7.2-16-16-16zm-48 64v216H128V192h768zM128 832V472h768v360H128z"/><path d="M706 340.8c6.4 7.6 18 7.6 24.4 0l58.8-69.2c8.8-10.4 1.6-26.4-12-26.4H659.6c-13.6 0-21.2 16-12 26.4l58.4 69.2z"/></svg>' innerHTML: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="18" height="18"><path d="M944 128H80c-8.8 0-16 7.2-16 16v736c0 8.8 7.2 16 16 16h864c8.8 0 16-7.2 16-16V144c0-8.8-7.2-16-16-16zm-48 64v216H128V192h768zM128 832V472h768v360H128z"/><path d="M706 340.8c6.4 7.6 18 7.6 24.4 0l58.8-69.2c8.8-10.4 1.6-26.4-12-26.4H659.6c-13.6 0-21.2 16-12 26.4l58.4 69.2z"/></svg>'
}, },
// {
// type: 'cloud',
// title: '云盘下载',
// innerHTML: '<svg viewBox="0 0 1462 1024" xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M1435.063 668.453a348.891 348.891 0 0 1-102.766 248.246 348.891 348.891 0 0 1-247.003 102.84H377.71a348.891 348.891 0 0 1-247.004-102.84A348.891 348.891 0 0 1 27.941 668.526c0-93.843 36.498-181.98 102.765-248.32a348.672 348.672 0 0 1 210.36-100.937c17.553-69.486 53.54-133.12 105.544-185.125a399.067 399.067 0 0 1 284.16-117.76c130.853 0 253.806 63.927 329.143 171.154a50.25 50.25 0 0 1-82.286 57.71 302.007 302.007 0 0 0-246.71-128.293 302.08 302.08 0 0 0-286.062 206.483c-5.12 15.36-8.997 40.52-11.63 61.805a37.376 37.376 0 0 1-39.058 32.915 257.902 257.902 0 0 0-65.024 4.535 251.1 251.1 0 0 0-200.631 249.782c2.194 135.607 117.467 246.492 253.074 246.492h699.831c136.631 0 249.93-108.252 252.928-244.736a250.88 250.88 0 0 0-250.514-256.512 250.807 250.807 0 0 0-250.514 249.929 51.931 51.931 0 0 1-45.861 50.688 50.322 50.322 0 0 1-54.71-50.03c0-93.842 36.497-182.052 102.765-248.32a348.891 348.891 0 0 1 248.32-102.839c93.842 0 181.98 36.572 248.32 102.84a349.623 349.623 0 0 1 102.912 248.539z"/></svg>'
// },
/* --------------------------- 短代码结束 --------------------------- */ /* --------------------------- 短代码结束 --------------------------- */
{ {
type: 'clean', type: 'clean',

File diff suppressed because one or more lines are too long

View File

@ -333,6 +333,9 @@ class Joe extends JoeAction {
case 'collapse': case 'collapse':
super.handleCollapse(this.cm); super.handleCollapse(this.cm);
break; break;
case 'cloud':
super.handleCloud(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;