mirror of https://github.com/vtrois/kratos
feat: add featured title tool
parent
29b82515f1
commit
9da2e813e3
|
@ -607,9 +607,9 @@ button:focus {
|
|||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.k-main .board .article-panel .a-post.a-none .content{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.k-main .board .article-panel .a-post.a-none .content {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.k-main .board .article-panel .a-meta {
|
||||
padding: 5px 12px;
|
||||
|
@ -716,6 +716,15 @@ button:focus {
|
|||
font-size: 24px;
|
||||
}
|
||||
|
||||
.k-main .details .article .content h2.title {
|
||||
font-size: 20px;
|
||||
padding: 0 10px;
|
||||
border-left: 5px solid #00a2ff;
|
||||
background-color: rgba(243,243,243,.7);
|
||||
line-height: 41px;
|
||||
margin: 16px -16px;
|
||||
}
|
||||
|
||||
.k-main .details .article .content h3 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
@ -733,7 +742,7 @@ button:focus {
|
|||
}
|
||||
|
||||
.k-main .details .article .content p {
|
||||
color: #4a4a4a;
|
||||
color: #151515;
|
||||
white-space: pre-line;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 932 B |
|
@ -1,4 +1,20 @@
|
|||
(function() {
|
||||
tinymce.create('tinymce.plugins.h2title', {
|
||||
init : function(ed, url) {
|
||||
ed.addButton('h2title', {
|
||||
title : '特色标题',
|
||||
image : url+'/images/title.png',
|
||||
onclick : function() {
|
||||
ed.selection.setContent('[h2title]' + ed.selection.getContent() + '[/h2title]');
|
||||
}
|
||||
});
|
||||
},
|
||||
createControl : function(n, cm) {
|
||||
return null;
|
||||
},
|
||||
});
|
||||
tinymce.PluginManager.add('h2title', tinymce.plugins.h2title);
|
||||
|
||||
tinymce.create('tinymce.plugins.success', {
|
||||
init : function(ed, url) {
|
||||
ed.addButton('success', {
|
||||
|
|
|
@ -3,9 +3,18 @@
|
|||
* 文章短代码
|
||||
* @author Seaton Jiang <seaton@vtrois.com>
|
||||
* @license MIT License
|
||||
* @version 2020.02.15
|
||||
* @version 2020.02.26
|
||||
*/
|
||||
|
||||
function h2title($atts, $content = null, $code = "")
|
||||
{
|
||||
$return = '<h2 class="title">';
|
||||
$return .= $content;
|
||||
$return .= '</h2>';
|
||||
return $return;
|
||||
}
|
||||
add_shortcode('h2title', 'h2title');
|
||||
|
||||
function success($atts, $content = null, $code = "")
|
||||
{
|
||||
$return = '<div class="alert alert-success">';
|
||||
|
@ -183,6 +192,7 @@ function more_button()
|
|||
|
||||
function register_button($buttons)
|
||||
{
|
||||
array_push($buttons, " ", "h2title");
|
||||
array_push($buttons, " ", "kbd");
|
||||
array_push($buttons, " ", "mark");
|
||||
array_push($buttons, " ", "striped");
|
||||
|
@ -195,7 +205,6 @@ function register_button($buttons)
|
|||
array_push($buttons, " ", "info");
|
||||
array_push($buttons, " ", "warning");
|
||||
array_push($buttons, " ", "danger");
|
||||
|
||||
array_push($buttons, " ", "successbox");
|
||||
array_push($buttons, " ", "infoboxs");
|
||||
array_push($buttons, " ", "warningbox");
|
||||
|
@ -205,6 +214,7 @@ function register_button($buttons)
|
|||
|
||||
function add_plugin($plugin_array)
|
||||
{
|
||||
$plugin_array['h2title'] = get_bloginfo('template_url') . '/assets/js/buttons/more.js';
|
||||
$plugin_array['kbd'] = get_bloginfo('template_url') . '/assets/js/buttons/more.js';
|
||||
$plugin_array['mark'] = get_bloginfo('template_url') . '/assets/js/buttons/more.js';
|
||||
$plugin_array['striped'] = get_bloginfo('template_url') . '/assets/js/buttons/more.js';
|
||||
|
@ -217,7 +227,6 @@ function add_plugin($plugin_array)
|
|||
$plugin_array['info'] = get_bloginfo('template_url') . '/assets/js/buttons/more.js';
|
||||
$plugin_array['warning'] = get_bloginfo('template_url') . '/assets/js/buttons/more.js';
|
||||
$plugin_array['danger'] = get_bloginfo('template_url') . '/assets/js/buttons/more.js';
|
||||
|
||||
$plugin_array['successbox'] = get_bloginfo('template_url') . '/assets/js/buttons/more.js';
|
||||
$plugin_array['infoboxs'] = get_bloginfo('template_url') . '/assets/js/buttons/more.js';
|
||||
$plugin_array['warningbox'] = get_bloginfo('template_url') . '/assets/js/buttons/more.js';
|
||||
|
|
Loading…
Reference in New Issue