mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-05 05:25:27 +02:00
Add button component (twig) (#188)
* Add button component * Replace old buttons with the new ones * Update icons and border radius * Update add page button * Set size small to add page btn * Update button indentation * Cleanup * icons and button component updated * upd secondary colour, page button call * Update small button padding right Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
This commit is contained in:
parent
f75401d0fb
commit
f714225e20
14 changed files with 177 additions and 46 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
{% block body %}
|
||||
<style>
|
||||
.docs-header__button {
|
||||
.docs-header__menu-add {
|
||||
visibility: hidden;
|
||||
}
|
||||
</style>
|
||||
|
@ -56,12 +56,13 @@
|
|||
<div class="writing-editor">
|
||||
<div id="editorjs"></div>
|
||||
</div>
|
||||
<div class="writing-buttons">
|
||||
<span class="writing-header__save" name="js-submit-save">Save</span>
|
||||
|
||||
<div class="writing-buttons">
|
||||
{% include 'components/button.twig' with {label: 'Save changes', name: 'js-submit-save', icon: 'check'} %}
|
||||
{% if page._id is not empty %}
|
||||
<span class="writing-buttons__remove" name="js-submit-remove">Remove</span>
|
||||
{% include 'components/button.twig' with {label: 'Delete doc', name: 'js-submit-remove', icon: 'trash', style: 'warning'} %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
|
|
@ -18,12 +18,10 @@
|
|||
{% endif %}
|
||||
<time class="page__header-time">
|
||||
Last edit {{ (page.body.time / 1000) | date("M d Y") }}
|
||||
{% if isAuthorized == true %}
|
||||
<a href="/page/edit/{{ page._id }}" class="page__header-button">
|
||||
Edit
|
||||
</a>
|
||||
{% endif %}
|
||||
</time>
|
||||
{% if isAuthorized == true %}
|
||||
{% include 'components/button.twig' with {label: 'Edit', icon: 'pencil', size: 'small', url: '/page/edit/' ~ page._id, class: 'page__header-button'} %}
|
||||
{% endif %}
|
||||
</header>
|
||||
<h1 class="page__title">
|
||||
{{ page.title }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue