diff options
author | Thomas Lange <code@nerdmind.de> | 2017-05-19 01:05:15 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2017-05-21 07:54:28 +0200 |
commit | eeddde7ae72d7f68c0a734d1fe7004cde847d1e5 (patch) | |
tree | 041aeec3474fdd7169c5b6c235674a15423aceea /template/admin/html | |
parent | 6b4faa47d02094d3f9fe637fc83431e7c49004cd (diff) | |
download | blog-2.1.1.tar.gz blog-2.1.1.tar.xz blog-2.1.1.zip |
Several changes have been made to the admin template, which together with the previous commits result in version 2.1.1:v2.1.1
+ Optimization [CSS]: Unused .fa-* classes have been removed.
+ Optimization [CSS]: Hyphens have been disabled for the text within the content editor.
+ Optimization [CSS]: Some elements now have a smaller padding value which has benefits if the page is displayed on a mobile device.
+ Optimization [HTML]: The HTML <section> elements of the formular have been replaced with simple <div> elements because <section> elements should only be used for self-contained areas which have nothing to do with the rest of the content. The using of <section> elements at this place was semantically incorrect.
+ Implemented [JS]: Tab indents which are made by pressing <tab> can now also be removed by pressing <shift>+<tab>.
+ Optimization [JS]: The functions "emoticonReplace" and "markdownReplace" has been renamed to "insertEmoticon" and "insertMarkdown" and have been restructured.
+ Optimization [JS]: The DOMContentLoaded event listeners are not required because the file is included with the "defer" attribute.
+ Optimization [JS]: A function called "delayed" was added which executes a callback function after an delay of 20 ms (the delayed execution of code is necessary for the "insertEmoticon" and "insertMarkdown" functions because the content editor otherwise will losing focus when clicking outside at the emoticon or markdown buttons while the "onmousedown" event listener is still executing).
Diffstat (limited to 'template/admin/html')
-rw-r--r-- | template/admin/html/auth.php | 20 | ||||
-rw-r--r-- | template/admin/html/database.php | 12 | ||||
-rw-r--r-- | template/admin/html/page/form.php | 60 | ||||
-rw-r--r-- | template/admin/html/post/form.php | 60 | ||||
-rw-r--r-- | template/admin/html/user/form.php | 72 |
5 files changed, 112 insertions, 112 deletions
diff --git a/template/admin/html/auth.php b/template/admin/html/auth.php index 0ab2d90..f5852c1 100644 --- a/template/admin/html/auth.php +++ b/template/admin/html/auth.php @@ -10,21 +10,21 @@ <form action="" method="POST"> <input type="hidden" name="token" value="<?=Application::getSecurityToken()?>" /> - <section class="flex"> - <section> + <div class="flex"> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-user-secret"></i></div> <div class="form-label-flex"><label for="form_username"><?=$Language->template('label_username')?></label></div> <div class="form-field-flex"><input id="form_username" name="username" value="<?=escapeHTML($FORM['DATA']['USERNAME'])?>" /></div> - </section> - </section> - <section class="flex"> - <section> + </div> + </div> + <div class="flex"> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-key"></i></div> <div class="form-label-flex"><label for="form_password"><?=$Language->template('label_password')?></label></div> <div class="form-field-flex"><input type="password" id="form_password" name="password" /></div> - </section> - </section> - <section class="flex flex-padding background"> + </div> + </div> + <div class="flex flex-padding background"> <input type="submit" name="auth" value="Auth" /> - </section> + </div> </form>
\ No newline at end of file diff --git a/template/admin/html/database.php b/template/admin/html/database.php index 3aad84e..8e69459 100644 --- a/template/admin/html/database.php +++ b/template/admin/html/database.php @@ -10,17 +10,17 @@ <form action="" method="POST"> <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" /> - <section class="flex flex-padding"> + <div class="flex flex-padding"> <textarea id="content-editor" placeholder="<?=$Language->template('database_warning')?>" name="command"><?=escapeHTML($FORM['COMMAND'])?></textarea> - </section> + </div> <?php if($FORM['RESULT']): ?> - <section class="flex flex-padding background flex-direction-column"> + <div class="flex flex-padding background flex-direction-column"> <pre id="database-result"><?=escapeHTML($FORM['RESULT'])?></pre> - </section> + </div> <?php endif; ?> - <section class="flex flex-padding background"> + <div class="flex flex-padding background"> <input type="submit" name="execute" value="Execute" /> - </section> + </div> </form>
\ No newline at end of file diff --git a/template/admin/html/page/form.php b/template/admin/html/page/form.php index 4ab61ae..93c45fe 100644 --- a/template/admin/html/page/form.php +++ b/template/admin/html/page/form.php @@ -8,13 +8,13 @@ <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" /> <?php if($FORM['TYPE'] !== 'DELETE'): ?> - <section class="flex flex-responsive"> - <section> + <div class="flex flex-responsive"> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-database"></i></div> <div class="form-label-flex"><label for="form_id">ID</label></div> <div class="form-field-flex"><input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="[AUTO_INCREMENT]" value="<?=escapeHTML($FORM['DATA']['ID'])?>" /></div> - </section> - <section> + </div> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-user"></i></div> <div class="form-label-flex"><label for="form_user"><?=$Language->template('label_user')?></label></div> <div class="form-field-flex"> @@ -24,46 +24,46 @@ <?php endforeach; ?> </select> </div> - </section> - </section> - <section class="flex flex-responsive"> - <section> + </div> + </div> + <div class="flex flex-responsive"> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-file-text-o"></i></div> <div class="form-label-flex"><label for="form_name"><?=$Language->template('label_name')?></label></div> <div class="form-field-flex"><input id="form_name" name="name" value="<?=escapeHTML($FORM['DATA']['NAME'])?>" /></div> - </section> - <section> + </div> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-link"></i></div> <div class="form-label-flex"><label for="form_slug"><?=$Language->template('label_slug')?></label></div> <div class="form-field-flex"><input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" /></div> - </section> - </section> - <section class="flex flex-responsive"> - <section> + </div> + </div> + <div class="flex flex-responsive"> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div> <div class="form-label-flex"><label for="form_time_insert"><?=$Language->template('label_insert')?></label></div> <div class="form-field-flex"><input id="form_time_insert" name="time_insert" placeholder="[YYYY-MM-DD HH:II:SS]" value="<?=escapeHTML($FORM['DATA']['TIME_INSERT'])?>" /></div> - </section> - <section> + </div> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div> <div class="form-label-flex"><label for="form_time_update"><?=$Language->template('label_update')?></label></div> <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> - </section> - </section> - <section class="flex flex-padding"> + </div> + </div> + <div class="flex flex-padding"> <textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea> - </section> - <section class="flex flex-padding background flex-arguments"> + </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'])?>" /> - </section> - <section class="flex flex-padding background flex-emoticons"> + </div> + <div class="flex flex-padding background flex-emoticons"> <ul id="emoticon-list" class="button-list emoticons"> <?php foreach(getEmoticons() as $emoticon => $data):?> <li data-emoticon="<?=$emoticon?>" title="<?=$data[1]?>"><?=$data[0]?></li> <?php endforeach; ?> </ul> - </section> - <section class="flex flex-padding background"> + </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> @@ -75,14 +75,14 @@ <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> - </section> + </div> <?php else: ?> - <section class="flex flex-padding background flex-direction-column"> + <div class="flex flex-padding background flex-direction-column"> <?=$HTML?> - </section> + </div> <?php endif; ?> - <section class="flex flex-padding background"> + <div class="flex flex-padding background"> <?php if($FORM['TYPE'] === 'INSERT'): ?> <input type="submit" name="insert" value="<?=$Language->text('insert')?>" /> <?php elseif($FORM['TYPE'] === 'UPDATE'): ?> @@ -90,5 +90,5 @@ <?php elseif($FORM['TYPE'] === 'DELETE'): ?> <input type="submit" name="delete" value="<?=$Language->text('delete')?>" id="delete-button" data-text="<?=$Language->template('sure')?>" /> <?php endif; ?> - </section> + </div> </form>
\ No newline at end of file diff --git a/template/admin/html/post/form.php b/template/admin/html/post/form.php index 3ad4376..14888aa 100644 --- a/template/admin/html/post/form.php +++ b/template/admin/html/post/form.php @@ -8,13 +8,13 @@ <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" /> <?php if($FORM['TYPE'] !== 'DELETE'): ?> - <section class="flex flex-responsive"> - <section> + <div class="flex flex-responsive"> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-database"></i></div> <div class="form-label-flex"><label for="form_id">ID</label></div> <div class="form-field-flex"><input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="[AUTO_INCREMENT]" value="<?=escapeHTML($FORM['DATA']['ID'])?>" /></div> - </section> - <section> + </div> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-user"></i></div> <div class="form-label-flex"><label for="form_user"><?=$Language->template('label_user')?></label></div> <div class="form-field-flex"> @@ -24,46 +24,46 @@ <?php endforeach; ?> </select> </div> - </section> - </section> - <section class="flex flex-responsive"> - <section> + </div> + </div> + <div class="flex flex-responsive"> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-newspaper-o"></i></div> <div class="form-label-flex"><label for="form_name"><?=$Language->template('label_name')?></label></div> <div class="form-field-flex"><input id="form_name" name="name" value="<?=escapeHTML($FORM['DATA']['NAME'])?>" /></div> - </section> - <section> + </div> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-link"></i></div> <div class="form-label-flex"><label for="form_slug"><?=$Language->template('label_slug')?></label></div> <div class="form-field-flex"><input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" /></div> - </section> - </section> - <section class="flex flex-responsive"> - <section> + </div> + </div> + <div class="flex flex-responsive"> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div> <div class="form-label-flex"><label for="form_time_insert"><?=$Language->template('label_insert')?></label></div> <div class="form-field-flex"><input id="form_time_insert" name="time_insert" placeholder="[YYYY-MM-DD HH:II:SS]" value="<?=escapeHTML($FORM['DATA']['TIME_INSERT'])?>" /></div> - </section> - <section> + </div> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div> <div class="form-label-flex"><label for="form_time_update"><?=$Language->template('label_update')?></label></div> <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> - </section> - </section> - <section class="flex flex-padding"> + </div> + </div> + <div class="flex flex-padding"> <textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea> - </section> - <section class="flex flex-padding background flex-arguments"> + </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'])?>" /> - </section> - <section class="flex flex-padding background flex-emoticons"> + </div> + <div class="flex flex-padding background flex-emoticons"> <ul id="emoticon-list" class="button-list emoticons"> <?php foreach(getEmoticons() as $emoticon => $data):?> <li data-emoticon="<?=$emoticon?>" title="<?=$data[1]?>"><?=$data[0]?></li> <?php endforeach; ?> </ul> - </section> - <section class="flex flex-padding background"> + </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> @@ -75,14 +75,14 @@ <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> - </section> + </div> <?php else: ?> - <section class="flex flex-padding background flex-direction-column"> + <div class="flex flex-padding background flex-direction-column"> <?=$HTML?> - </section> + </div> <?php endif; ?> - <section class="flex flex-padding background"> + <div class="flex flex-padding background"> <?php if($FORM['TYPE'] === 'INSERT'): ?> <input type="submit" name="insert" value="<?=$Language->text('insert')?>" /> <?php elseif($FORM['TYPE'] === 'UPDATE'): ?> @@ -90,5 +90,5 @@ <?php elseif($FORM['TYPE'] === 'DELETE'): ?> <input type="submit" name="delete" value="<?=$Language->text('delete')?>" id="delete-button" data-text="<?=$Language->template('sure')?>" /> <?php endif; ?> - </section> + </div> </form>
\ No newline at end of file diff --git a/template/admin/html/user/form.php b/template/admin/html/user/form.php index be8502c..a260ee0 100644 --- a/template/admin/html/user/form.php +++ b/template/admin/html/user/form.php @@ -8,68 +8,68 @@ <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" /> <?php if($FORM['TYPE'] !== 'DELETE'): ?> - <section class="flex flex-responsive"> - <section> + <div class="flex flex-responsive"> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-database"></i></div> <div class="form-label-flex"><label for="form_id">ID</label></div> <div class="form-field-flex"><input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="[AUTO_INCREMENT]" value="<?=escapeHTML($FORM['DATA']['ID'])?>" /></div> - </section> - <section> + </div> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-key"></i></div> <div class="form-label-flex"><label for="form_password"><?=$Language->template('label_password')?></label></div> <div class="form-field-flex"><input id="form_password" name="password" placeholder="[NO CHANGE]" value="<?=escapeHTML($FORM['DATA']['PASSWORD'])?>" type="password" /></div> - </section> - </section> - <section class="flex flex-responsive"> - <section> + </div> + </div> + <div class="flex flex-responsive"> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-user"></i></div> <div class="form-label-flex"><label for="form_fullname"><?=$Language->template('label_fullname')?></label></div> <div class="form-field-flex"><input id="form_fullname" name="fullname" value="<?=escapeHTML($FORM['DATA']['FULLNAME'])?>" /></div> - </section> - <section> + </div> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-envelope-o"></i></div> <div class="form-label-flex"><label for="form_mailaddr"><?=$Language->template('label_mailaddr')?></label></div> <div class="form-field-flex"><input id="form_mailaddr" name="mailaddr" value="<?=escapeHTML($FORM['DATA']['MAILADDR'])?>" /></div> - </section> - </section> - <section class="flex flex-responsive"> - <section> + </div> + </div> + <div class="flex flex-responsive"> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-user-secret"></i></div> <div class="form-label-flex"><label for="form_username"><?=$Language->template('label_username')?></label></div> <div class="form-field-flex"><input id="form_username" name="username" value="<?=escapeHTML($FORM['DATA']['USERNAME'])?>" /></div> - </section> - <section> + </div> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-link"></i></div> <div class="form-label-flex"><label for="form_slug"><?=$Language->template('label_slug')?></label></div> <div class="form-field-flex"><input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" /></div> - </section> - </section> - <section class="flex flex-responsive"> - <section> + </div> + </div> + <div class="flex flex-responsive"> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div> <div class="form-label-flex"><label for="form_time_insert"><?=$Language->template('label_insert')?></label></div> <div class="form-field-flex"><input id="form_time_insert" name="time_insert" placeholder="[YYYY-MM-DD HH:II:SS]" value="<?=escapeHTML($FORM['DATA']['TIME_INSERT'])?>" /></div> - </section> - <section> + </div> + <div class="flex-item"> <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div> <div class="form-label-flex"><label for="form_time_update"><?=$Language->template('label_update')?></label></div> <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> - </section> - </section> - <section class="flex flex-padding"> + </div> + </div> + <div class="flex flex-padding"> <textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea> - </section> - <section class="flex flex-padding background flex-arguments"> + </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'])?>" /> - </section> - <section class="flex flex-padding background flex-emoticons"> + </div> + <div class="flex flex-padding background flex-emoticons"> <ul id="emoticon-list" class="button-list emoticons"> <?php foreach(getEmoticons() as $emoticon => $data):?> <li data-emoticon="<?=$emoticon?>" title="<?=$data[1]?>"><?=$data[0]?></li> <?php endforeach; ?> </ul> - </section> - <section class="flex flex-padding background"> + </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> @@ -81,14 +81,14 @@ <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> - </section> + </div> <?php else: ?> - <section class="flex flex-padding background flex-direction-column"> + <div class="flex flex-padding background flex-direction-column"> <?=$HTML?> - </section> + </div> <?php endif; ?> - <section class="flex flex-padding background"> + <div class="flex flex-padding background"> <?php if($FORM['TYPE'] === 'INSERT'): ?> <input type="submit" name="insert" value="<?=$Language->text('insert')?>" /> <?php elseif($FORM['TYPE'] === 'UPDATE'): ?> @@ -96,5 +96,5 @@ <?php elseif($FORM['TYPE'] === 'DELETE'): ?> <input type="submit" name="delete" value="<?=$Language->text('delete')?>" id="delete-button" data-text="<?=$Language->template('sure')?>" /> <?php endif; ?> - </section> + </div> </form>
\ No newline at end of file |