@@ -43,52 +43,57 @@
* @see html.html.twig
*/
#}
<div class="container is-fluid">

<header class="header" role="banner">
{{ page.header }}
</header>

{{ page.primary_menu }}
{{ page.secondary_menu }}
<header class="hero is-info is-bold" role="banner">
<div class="container is-fluid">
<div class="hero-head">
<div class="container is-fluid">
<nav class="nav">
<div class="nav-left">
{{ page.primary_menu }}
</div>
<div class="nav-center">
<a class="nav-item" href="https://github.com/mglaman/porter">
<span class="icon"><i class="fa fa-github"></i></span>
</a>
<a class="nav-item" href="https://twitter.com/nmdmatt">
<span class="icon"><i class="fa fa-twitter"></i></span>
</a>
<a class="nav-item" href="https://www.drupal.org/u/mglaman">
<span class="icon"><i class="fa fa-drupal"></i></span>
</a>
</div>
<div class="nav-right">
{{ page.secondary_menu }}
</div>
</nav>
</div>
</div>
<div class="hero-body">
<div class="container is-fluid">
{{ page.header }}
</div>
</div>
</div>
</header>

{{ page.breadcrumb }}
{{ page.breadcrumb }}

{{ page.highlighted }}

{{ page.help }}

<main role="main" class="columns">
<main role="main" class="section">
<div class="container is-fluid">
<a id="main-content" tabindex="-1"></a>{# link is in html.html.twig #}
<div class="column section">
<div class="container is-fluid">
{{ page.content }}
</div>
</div>{# /.layout-content #}

{% if page.sidebar_first %}
<aside class="column is-3 section" role="complementary">
<div class="container is-fluid">
{{ page.sidebar_first }}
</div>
</aside>
{% endif %}
{{ page.content }}
</div>
</main>

{% if page.sidebar_second %}
<aside class="column is-3 section" role="complementary">
<div class="container is-fluid">
{{ page.sidebar_second }}
</div>
</aside>
{% endif %}
</main>

{% if page.footer %}
<footer class="footer" role="contentinfo">
<div class="container">
{{ page.footer }}
</div>
</footer>
{% endif %}
{% if page.footer %}
<footer class="footer" role="contentinfo">
<div class="container">
{{ page.footer }}
</div>
</footer>
{% endif %}

</div>{# /.layout-container #}
@@ -0,0 +1,44 @@
{#
/**
* @file
* Theme override to display a menu.
*
* Available variables:
* - menu_name: The machine name of the menu.
* - items: A nested list of menu items. Each menu item contains:
* - attributes: HTML attributes for the menu item.
* - below: The menu item child items.
* - title: The menu link title.
* - url: The menu link url, instance of \Drupal\Core\Url
* - localized_options: Menu link localized options.
* - is_expanded: TRUE if the link has visible children within the current
* menu tree.
* - is_collapsed: TRUE if the link has children within the current menu tree
* that are not currently visible.
* - in_active_trail: TRUE if the link is in the active trail.
*/
#}
{% import _self as menus %}

{#
We call a macro which calls itself to render the full tree.
@see http://twig.sensiolabs.org/doc/tags/macro.html
#}
{{ menus.menu_links(items, attributes, 0) }}

{% macro menu_links(items, attributes, menu_level) %}
{% import _self as menus %}
{% if items %}
{% if menu_level == 0 %}
<nav{{ attributes.addClass('nav') }}>
{% else %}
<nav>
{% endif %}
{% for item in items %}
<span{{ item.attributes.addClass('nav-item') }}>
{{ link(item.title, item.url) }}
</span>
{% endfor %}
</nav>
{% endif %}
{% endmacro %}