summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-05-31 15:44:11 +0200
committerThomas Lange <code@nerdmind.de>2017-05-31 15:44:11 +0200
commit816959215dff92ee0af295be6d801b4cfa150269 (patch)
tree30cb09dbdeadce4524f380064a778006d890a8ca
parentee982c2ee760d6aeafedcb4343d1bf259ca1fe87 (diff)
downloadblog-816959215dff92ee0af295be6d801b4cfa150269.tar.gz
blog-816959215dff92ee0af295be6d801b4cfa150269.tar.xz
blog-816959215dff92ee0af295be6d801b4cfa150269.zip
Two changes have been made in this commit:
+ Update [core]: Parsedown has been updated to version 1.6.2. + Optimization [admin template]: The markdown buttons have been placed directly above the content editor. + Optimization [admin template]: The content editor has been visually embellished (padding from the parent was removed).
-rw-r--r--core/namespace/Parsedown.php16
-rw-r--r--template/admin/html/database.php2
-rw-r--r--template/admin/html/page/form.php32
-rw-r--r--template/admin/html/post/form.php32
-rw-r--r--template/admin/html/user/form.php32
-rw-r--r--template/admin/rsrc/main.css16
6 files changed, 69 insertions, 61 deletions
diff --git a/core/namespace/Parsedown.php b/core/namespace/Parsedown.php
index 610658b..f5dd0fa 100644
--- a/core/namespace/Parsedown.php
+++ b/core/namespace/Parsedown.php
@@ -448,7 +448,7 @@ class Parsedown
return $Block;
}
- $Block['element']['text']['text'] .= "\n".$Line['body'];;
+ $Block['element']['text']['text'] .= "\n".$Line['body'];
return $Block;
}
@@ -1204,7 +1204,7 @@ class Parsedown
$remainder = $Excerpt['text'];
- if (preg_match('/\[((?:[^][]|(?R))*)\]/', $remainder, $matches))
+ if (preg_match('/\[((?:[^][]++|(?R))*+)\]/', $remainder, $matches))
{
$Element['text'] = $matches[1];
@@ -1217,7 +1217,7 @@ class Parsedown
return;
}
- if (preg_match('/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/', $remainder, $matches))
+ if (preg_match('/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/', $remainder, $matches))
{
$Element['attributes']['href'] = $matches[1];
@@ -1539,10 +1539,10 @@ class Parsedown
'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing',
'i', 'rp', 'del', 'code', 'strike', 'marquee',
'q', 'rt', 'ins', 'font', 'strong',
- 's', 'tt', 'sub', 'mark',
- 'u', 'xm', 'sup', 'nobr',
- 'var', 'ruby',
- 'wbr', 'span',
- 'time',
+ 's', 'tt', 'kbd', 'mark',
+ 'u', 'xm', 'sub', 'nobr',
+ 'sup', 'ruby',
+ 'var', 'span',
+ 'wbr', 'time',
);
}
diff --git a/template/admin/html/database.php b/template/admin/html/database.php
index 8e69459..69dce0a 100644
--- a/template/admin/html/database.php
+++ b/template/admin/html/database.php
@@ -10,7 +10,7 @@
<form action="" method="POST">
<input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
- <div class="flex flex-padding">
+ <div class="flex">
<textarea id="content-editor" placeholder="<?=$Language->template('database_warning')?>" name="command"><?=escapeHTML($FORM['COMMAND'])?></textarea>
</div>
diff --git a/template/admin/html/page/form.php b/template/admin/html/page/form.php
index 93c45fe..8930ec3 100644
--- a/template/admin/html/page/form.php
+++ b/template/admin/html/page/form.php
@@ -50,12 +50,22 @@
<div class="form-field-flex"><input id="form_time_update" name="time_update" placeholder="<?=escapeHTML($FORM['DATA']['TIME_UPDATE'] ? $FORM['DATA']['TIME_UPDATE'] : '[CURRENT_TIMESTAMP]')?>" value="" /></div>
</div>
</div>
- <div class="flex flex-padding">
+ <div class="flex flex-direction-column">
+ <div id="button-list-wrapper">
+ <ul id="markdown-list" class="button-list markdown">
+ <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->template('markdown_bold')?>"></li>
+ <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->template('markdown_italic')?>"></li>
+ <li data-markdown="heading" class="fa fa-header" title="<?=$Language->template('markdown_heading')?>"></li>
+ <li data-markdown="link" class="fa fa-link" title="<?=$Language->template('markdown_link')?>"></li>
+ <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->template('markdown_image')?>"></li>
+ <li data-markdown="code" class="fa fa-code" title="<?=$Language->template('markdown_code')?>"></li>
+ <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->template('markdown_quote')?>"></li>
+ <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->template('markdown_list_ul')?>"></li>
+ <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->template('markdown_list_ol')?>"></li>
+ </ul>
+ </div>
<textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea>
</div>
- <div class="flex flex-padding background flex-arguments">
- <input id="form_argv" name="argv" maxlength="100" placeholder="[ARGUMENT_FOO=one|ARGUMENT_BAR=two …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
- </div>
<div class="flex flex-padding background flex-emoticons">
<ul id="emoticon-list" class="button-list emoticons">
<?php foreach(getEmoticons() as $emoticon => $data):?>
@@ -63,18 +73,8 @@
<?php endforeach; ?>
</ul>
</div>
- <div class="flex flex-padding background">
- <ul id="markdown-list" class="button-list markdown">
- <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->template('markdown_bold')?>"></li>
- <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->template('markdown_italic')?>"></li>
- <li data-markdown="heading" class="fa fa-header" title="<?=$Language->template('markdown_heading')?>"></li>
- <li data-markdown="link" class="fa fa-link" title="<?=$Language->template('markdown_link')?>"></li>
- <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->template('markdown_image')?>"></li>
- <li data-markdown="code" class="fa fa-code" title="<?=$Language->template('markdown_code')?>"></li>
- <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->template('markdown_quote')?>"></li>
- <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->template('markdown_list_ul')?>"></li>
- <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->template('markdown_list_ol')?>"></li>
- </ul>
+ <div class="flex flex-padding background flex-arguments">
+ <input id="form_argv" name="argv" maxlength="100" placeholder="[ARGUMENT_FOO=one|ARGUMENT_BAR=two …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
</div>
<?php else: ?>
<div class="flex flex-padding background flex-direction-column">
diff --git a/template/admin/html/post/form.php b/template/admin/html/post/form.php
index 14888aa..1f69529 100644
--- a/template/admin/html/post/form.php
+++ b/template/admin/html/post/form.php
@@ -50,12 +50,22 @@
<div class="form-field-flex"><input id="form_time_update" name="time_update" placeholder="<?=escapeHTML($FORM['DATA']['TIME_UPDATE'] ? $FORM['DATA']['TIME_UPDATE'] : '[CURRENT_TIMESTAMP]')?>" value="" /></div>
</div>
</div>
- <div class="flex flex-padding">
+ <div class="flex flex-direction-column">
+ <div id="button-list-wrapper">
+ <ul id="markdown-list" class="button-list markdown">
+ <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->template('markdown_bold')?>"></li>
+ <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->template('markdown_italic')?>"></li>
+ <li data-markdown="heading" class="fa fa-header" title="<?=$Language->template('markdown_heading')?>"></li>
+ <li data-markdown="link" class="fa fa-link" title="<?=$Language->template('markdown_link')?>"></li>
+ <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->template('markdown_image')?>"></li>
+ <li data-markdown="code" class="fa fa-code" title="<?=$Language->template('markdown_code')?>"></li>
+ <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->template('markdown_quote')?>"></li>
+ <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->template('markdown_list_ul')?>"></li>
+ <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->template('markdown_list_ol')?>"></li>
+ </ul>
+ </div>
<textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea>
</div>
- <div class="flex flex-padding background flex-arguments">
- <input id="form_argv" name="argv" maxlength="100" placeholder="[ARGUMENT_FOO=one|ARGUMENT_BAR=two …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
- </div>
<div class="flex flex-padding background flex-emoticons">
<ul id="emoticon-list" class="button-list emoticons">
<?php foreach(getEmoticons() as $emoticon => $data):?>
@@ -63,18 +73,8 @@
<?php endforeach; ?>
</ul>
</div>
- <div class="flex flex-padding background">
- <ul id="markdown-list" class="button-list markdown">
- <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->template('markdown_bold')?>"></li>
- <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->template('markdown_italic')?>"></li>
- <li data-markdown="heading" class="fa fa-header" title="<?=$Language->template('markdown_heading')?>"></li>
- <li data-markdown="link" class="fa fa-link" title="<?=$Language->template('markdown_link')?>"></li>
- <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->template('markdown_image')?>"></li>
- <li data-markdown="code" class="fa fa-code" title="<?=$Language->template('markdown_code')?>"></li>
- <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->template('markdown_quote')?>"></li>
- <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->template('markdown_list_ul')?>"></li>
- <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->template('markdown_list_ol')?>"></li>
- </ul>
+ <div class="flex flex-padding background flex-arguments">
+ <input id="form_argv" name="argv" maxlength="100" placeholder="[ARGUMENT_FOO=one|ARGUMENT_BAR=two …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
</div>
<?php else: ?>
<div class="flex flex-padding background flex-direction-column">
diff --git a/template/admin/html/user/form.php b/template/admin/html/user/form.php
index 3da96d2..8156496 100644
--- a/template/admin/html/user/form.php
+++ b/template/admin/html/user/form.php
@@ -56,12 +56,22 @@
<div class="form-field-flex"><input id="form_time_update" name="time_update" placeholder="<?=escapeHTML($FORM['DATA']['TIME_UPDATE'] ? $FORM['DATA']['TIME_UPDATE'] : '[CURRENT_TIMESTAMP]')?>" value="" /></div>
</div>
</div>
- <div class="flex flex-padding">
+ <div class="flex flex-direction-column">
+ <div id="button-list-wrapper">
+ <ul id="markdown-list" class="button-list markdown">
+ <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->template('markdown_bold')?>"></li>
+ <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->template('markdown_italic')?>"></li>
+ <li data-markdown="heading" class="fa fa-header" title="<?=$Language->template('markdown_heading')?>"></li>
+ <li data-markdown="link" class="fa fa-link" title="<?=$Language->template('markdown_link')?>"></li>
+ <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->template('markdown_image')?>"></li>
+ <li data-markdown="code" class="fa fa-code" title="<?=$Language->template('markdown_code')?>"></li>
+ <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->template('markdown_quote')?>"></li>
+ <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->template('markdown_list_ul')?>"></li>
+ <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->template('markdown_list_ol')?>"></li>
+ </ul>
+ </div>
<textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea>
</div>
- <div class="flex flex-padding background flex-arguments">
- <input id="form_argv" name="argv" maxlength="100" placeholder="[ARGUMENT_FOO=one|ARGUMENT_BAR=two …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
- </div>
<div class="flex flex-padding background flex-emoticons">
<ul id="emoticon-list" class="button-list emoticons">
<?php foreach(getEmoticons() as $emoticon => $data):?>
@@ -69,18 +79,8 @@
<?php endforeach; ?>
</ul>
</div>
- <div class="flex flex-padding background">
- <ul id="markdown-list" class="button-list markdown">
- <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->template('markdown_bold')?>"></li>
- <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->template('markdown_italic')?>"></li>
- <li data-markdown="heading" class="fa fa-header" title="<?=$Language->template('markdown_heading')?>"></li>
- <li data-markdown="link" class="fa fa-link" title="<?=$Language->template('markdown_link')?>"></li>
- <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->template('markdown_image')?>"></li>
- <li data-markdown="code" class="fa fa-code" title="<?=$Language->template('markdown_code')?>"></li>
- <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->template('markdown_quote')?>"></li>
- <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->template('markdown_list_ul')?>"></li>
- <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->template('markdown_list_ol')?>"></li>
- </ul>
+ <div class="flex flex-padding background flex-arguments">
+ <input id="form_argv" name="argv" maxlength="100" placeholder="[ARGUMENT_FOO=one|ARGUMENT_BAR=two …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
</div>
<?php else: ?>
<div class="flex flex-padding background flex-direction-column">
diff --git a/template/admin/rsrc/main.css b/template/admin/rsrc/main.css
index ed79989..e19aa31 100644
--- a/template/admin/rsrc/main.css
+++ b/template/admin/rsrc/main.css
@@ -177,11 +177,19 @@ form{border:0.05rem solid #AAA;}
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* Form buttons
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-.button-list {margin:0;padding:0;list-style:none;}
-.button-list > li{display:inline-block;background:#EEE;padding:0.5rem;border:0.05rem solid #AAA;cursor:pointer;}
+#button-list-wrapper{border-bottom:0.05rem solid #AAA;background:#EEE;}
+
+.button-list{margin:0;padding:0;list-style:none;}
+.button-list.emoticons > li{display:inline-block;background:#EEE;padding:0.5rem;border:0.05rem solid #AAA;cursor:pointer;}
.button-list.emoticons > li {padding:0.25rem 0.5rem;}
-.button-list > li:hover,
-.button-list > li:active{background:#CCC;}
+.button-list.emoticons > li:hover,
+.button-list.emoticons > li:active{background:#CCC;}
+
+.button-list.markdown > li{float:left;padding:0.5rem;cursor:pointer;width:1.75rem;height:1.75rem;box-sizing:border-box;text-align:center;}
+.button-list.markdown > li:hover,
+.button-list.markdown > li:active{color:#40779A;}
+
+#content-editor{border:none;margin:0;}
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* Form elements