更新
This commit is contained in:
parent
f217f02207
commit
c95a87b2e3
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
@ -1765,7 +1765,7 @@
|
|||||||
border-radius: var(--radius-inner);
|
border-radius: var(--radius-inner);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
&-item {
|
&-item {
|
||||||
padding: 12px 15px;
|
padding: 12px;
|
||||||
border-bottom: 1px solid var(--classC);
|
border-bottom: 1px solid var(--classC);
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
@ -1868,6 +1868,33 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
|
.joe_card__describe {
|
||||||
|
position: relative;
|
||||||
|
border: 1px dashed var(--classB);
|
||||||
|
&-title {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 8px;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
background: var(--background);
|
||||||
|
padding: 0 5px;
|
||||||
|
color: var(--main);
|
||||||
|
font-weight: 500;
|
||||||
|
max-width: 100px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
&-content {
|
||||||
|
color: var(--routine);
|
||||||
|
padding: 18px 15px 15px;
|
||||||
|
*:last-child {
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.joe_detail {
|
.joe_detail {
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
|
@ -261,6 +261,32 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.customElements.define('joe-callout', JoeCallout);
|
window.customElements.define('joe-callout', JoeCallout);
|
||||||
|
class JoeCardDescribe extends HTMLElement {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
const _temp = getChildren(this, '_temp');
|
||||||
|
this.options = {
|
||||||
|
title: this.getAttribute('title') || '卡片描述',
|
||||||
|
content: _temp.innerHTML.trim().replace(/^(<br>)|(<br>)$/g, '') || '卡片内容'
|
||||||
|
};
|
||||||
|
const htmlStr = `
|
||||||
|
<div class="joe_card__describe">
|
||||||
|
<div class="joe_card__describe-title">${this.options.title}</div>
|
||||||
|
<div class="joe_card__describe-content">${this.options.content}</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
if (getChildren(this, '_content')) {
|
||||||
|
getChildren(this, '_content').innerHTML = htmlStr;
|
||||||
|
} else {
|
||||||
|
const span = document.createElement('span');
|
||||||
|
span.style.display = 'block';
|
||||||
|
span.className = '_content';
|
||||||
|
span.innerHTML = htmlStr;
|
||||||
|
this.appendChild(span);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.customElements.define('joe-card-describe', JoeCardDescribe);
|
||||||
class JoeCardList extends HTMLElement {
|
class JoeCardList extends HTMLElement {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
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
@ -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=202104222248') ?>">
|
<link rel="stylesheet" href="<?php Helper::options()->themeUrl('typecho/write/css/joe.write.min.css?v=2021042310') ?>">
|
||||||
<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=202104222248') ?>"></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.write.chunk.js?v=202104222248') ?>"></script>
|
<script src="<?php Helper::options()->themeUrl('typecho/write/js/joe.write.chunk.js?v=2021042310') ?>"></script>
|
||||||
<script src="<?php Helper::options()->themeUrl('assets/js/joe.short.min.js?v=202104222248') ?>"></script>
|
<script src="<?php Helper::options()->themeUrl('assets/js/joe.short.min.js?v=2021042310') ?>"></script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/* 获取主题当前版本号 */
|
/* 获取主题当前版本号 */
|
||||||
function _getVersion()
|
function _getVersion()
|
||||||
{
|
{
|
||||||
return "6.6.1";
|
return "6.6.2";
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 判断是否是手机 */
|
/* 判断是否是手机 */
|
||||||
|
@ -58,6 +58,9 @@ function _parseContent($post, $login)
|
|||||||
if (strpos($content, '{callout') !== false) {
|
if (strpos($content, '{callout') !== false) {
|
||||||
$content = preg_replace('/{callout([^}]*)}([\s\S]*?){\/callout}/', '<section style="margin-bottom: 15px"><joe-callout $1><span class="_temp" style="display: none">$2</span></joe-callout></section>', $content);
|
$content = preg_replace('/{callout([^}]*)}([\s\S]*?){\/callout}/', '<section style="margin-bottom: 15px"><joe-callout $1><span class="_temp" style="display: none">$2</span></joe-callout></section>', $content);
|
||||||
}
|
}
|
||||||
|
if (strpos($content, '{card-describe') !== false) {
|
||||||
|
$content = preg_replace('/{card-describe([^}]*)}([\s\S]*?){\/card-describe}/', '<section style="margin-bottom: 15px"><joe-card-describe $1><span class="_temp" style="display: none">$2</span></joe-card-describe></section>', $content);
|
||||||
|
}
|
||||||
if (strpos($content, '{tabs') !== false) {
|
if (strpos($content, '{tabs') !== false) {
|
||||||
$content = preg_replace('/{tabs}([\s\S]*?){\/tabs}/', '<section style="margin-bottom: 15px"><joe-tabs><span class="_temp" style="display: none">$1</span></joe-tabs></section>', $content);
|
$content = preg_replace('/{tabs}([\s\S]*?){\/tabs}/', '<section style="margin-bottom: 15px"><joe-tabs><span class="_temp" style="display: none">$1</span></joe-tabs></section>', $content);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "typecho-joe-next",
|
"name": "typecho-joe-next",
|
||||||
"version": "6.6.1",
|
"version": "6.6.2",
|
||||||
"description": "A Theme Of Typecho",
|
"description": "A Theme Of Typecho",
|
||||||
"main": "index.php",
|
"main": "index.php",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -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=202104222248'); ?>">
|
<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.responsive.min.css?v=202104222248'); ?>">
|
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.responsive.min.css?v=2021042310'); ?>">
|
||||||
<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=202104222248'); ?>"></script>
|
<script src="<?php $this->options->themeUrl('assets/js/joe.global.min.js?v=2021042310'); ?>"></script>
|
||||||
<script src="<?php $this->options->themeUrl('assets/js/joe.short.min.js?v=202104222248'); ?>"></script>
|
<script src="<?php $this->options->themeUrl('assets/js/joe.short.min.js?v=2021042310'); ?>"></script>
|
||||||
<?php $this->options->JCustomHeadEnd() ?>
|
<?php $this->options->JCustomHeadEnd() ?>
|
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
File diff suppressed because it is too large
Load Diff
@ -735,6 +735,11 @@ export default class JoeAction {
|
|||||||
this._replaceSelection(cm, str);
|
this._replaceSelection(cm, str);
|
||||||
cm.focus();
|
cm.focus();
|
||||||
}
|
}
|
||||||
|
handleCardDescribe(cm) {
|
||||||
|
const str = `${this._getLineCh(cm) ? '\n\n' : '\n'}{card-describe title="卡片描述"}\n卡片内容\n{/card-describe}\n\n`;
|
||||||
|
this._replaceSelection(cm, str);
|
||||||
|
cm.focus();
|
||||||
|
}
|
||||||
handleCopy(cm) {
|
handleCopy(cm) {
|
||||||
this._openModal({
|
this._openModal({
|
||||||
title: '插入音乐',
|
title: '插入音乐',
|
||||||
|
@ -33,6 +33,7 @@ export default function createPreviewHtml(str) {
|
|||||||
str = str.replace(/{hide[^}]*}([\s\S]*?){\/hide}/g, '<joe-hide></joe-hide>');
|
str = str.replace(/{hide[^}]*}([\s\S]*?){\/hide}/g, '<joe-hide></joe-hide>');
|
||||||
str = str.replace(/{card-default([^}]*)}([\s\S]*?){\/card-default}/g, '<section style="margin-bottom: 15px"><joe-card-default $1><span class="_temp" style="display: none">$2</span></joe-card-default></section>');
|
str = str.replace(/{card-default([^}]*)}([\s\S]*?){\/card-default}/g, '<section style="margin-bottom: 15px"><joe-card-default $1><span class="_temp" style="display: none">$2</span></joe-card-default></section>');
|
||||||
str = str.replace(/{callout([^}]*)}([\s\S]*?){\/callout}/g, '<section style="margin-bottom: 15px"><joe-callout $1><span class="_temp" style="display: none">$2</span></joe-callout></section>');
|
str = str.replace(/{callout([^}]*)}([\s\S]*?){\/callout}/g, '<section style="margin-bottom: 15px"><joe-callout $1><span class="_temp" style="display: none">$2</span></joe-callout></section>');
|
||||||
|
str = str.replace(/{card-describe([^}]*)}([\s\S]*?){\/card-describe}/g, '<section style="margin-bottom: 15px"><joe-card-describe $1><span class="_temp" style="display: none">$2</span></joe-card-describe></section>');
|
||||||
str = str.replace(/{tabs}([\s\S]*?){\/tabs}/g, '<section style="margin-bottom: 15px"><joe-tabs><span class="_temp" style="display: none">$1</span></joe-tabs></section>');
|
str = str.replace(/{tabs}([\s\S]*?){\/tabs}/g, '<section style="margin-bottom: 15px"><joe-tabs><span class="_temp" style="display: none">$1</span></joe-tabs></section>');
|
||||||
str = str.replace(/{card-list}([\s\S]*?){\/card-list}/g, '<section style="margin-bottom: 15px"><joe-card-list><span class="_temp" style="display: none">$1</span></joe-card-list></section>');
|
str = str.replace(/{card-list}([\s\S]*?){\/card-list}/g, '<section style="margin-bottom: 15px"><joe-card-list><span class="_temp" style="display: none">$1</span></joe-card-list></section>');
|
||||||
str = str.replace(/{timeline}([\s\S]*?){\/timeline}/g, '<section style="margin-bottom: 15px"><joe-timeline><span class="_temp" style="display: none">$1</span></joe-timeline></section>');
|
str = str.replace(/{timeline}([\s\S]*?){\/timeline}/g, '<section style="margin-bottom: 15px"><joe-timeline><span class="_temp" style="display: none">$1</span></joe-timeline></section>');
|
||||||
|
@ -205,6 +205,11 @@ export default [
|
|||||||
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 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>'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
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>'
|
||||||
|
},
|
||||||
/* --------------------------- 短代码结束 --------------------------- */
|
/* --------------------------- 短代码结束 --------------------------- */
|
||||||
{
|
{
|
||||||
type: 'clean',
|
type: 'clean',
|
||||||
|
File diff suppressed because one or more lines are too long
@ -324,6 +324,9 @@ class Joe extends JoeAction {
|
|||||||
case 'copy':
|
case 'copy':
|
||||||
super.handleCopy(this.cm);
|
super.handleCopy(this.cm);
|
||||||
break;
|
break;
|
||||||
|
case 'card-describe':
|
||||||
|
super.handleCardDescribe(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;
|
||||||
|
Loading…
Reference in New Issue
Block a user