Skip to content

Commit

Permalink
feat(NavigationFooter): use content field
Browse files Browse the repository at this point in the history
lets content editor be more flexible and add links
  • Loading branch information
Michael committed Nov 13, 2019
1 parent e7b010f commit 508a2b2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Components/NavigationFooter/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
}
}

.copyright {
.content {
@include reset-content-margins;
margin: 10px 0 0;

@media (min-width: $breakpoint-tablet) {
Expand Down
13 changes: 9 additions & 4 deletions Components/NavigationFooter/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@

Options::addTranslatable('NavigationFooter', [
[
'label' => 'Copyright Text',
'name' => 'copyrightText',
'type' => 'text',
'default_value' => 'Copyright © 2019. All rights reserved'
'label' => 'Content',
'name' => 'contentHtml',
'type' => 'wysiwyg',
'media_upload' => 0,
'delay' => 1,
'toolbar' => 'basic',
'wrapper' => [
'class' => 'autosize'
]
],
]);
4 changes: 2 additions & 2 deletions Components/NavigationFooter/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{% include 'Partials/_menu.twig' with { 'items': menu.get_items, 'level': '0', 'maxLevel': maxLevel } only %}
</nav>
{% endif %}
{% if copyrightText %}
<p class="copyright">{{ copyrightText|e }}</p>
{% if contentHtml %}
<div class="content">{{ contentHtml|e('wp_kses_post') }}</div>
{% endif %}
</div>
</div>

0 comments on commit 508a2b2

Please sign in to comment.