-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#281: adding page template and preprocess for page assets.
- Loading branch information
Josh Walker
committed
Jun 10, 2016
1 parent
1379a07
commit 5cb115f
Showing
2 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{# | ||
/** | ||
* @file | ||
* Theme override to display a single page. | ||
* | ||
* The doctype, html, head and body tags are not in this template. Instead they | ||
* can be found in the html.html.twig template in this directory. | ||
* | ||
* Available variables: | ||
* | ||
* General utility variables: | ||
* - base_path: The base URL path of the Drupal installation. Will usually be | ||
* "/" unless you have installed Drupal in a sub-directory. | ||
* - is_front: A flag indicating if the current page is the front page. | ||
* - logged_in: A flag indicating if the user is registered and signed in. | ||
* - is_admin: A flag indicating if the user has permission to access | ||
* administration pages. | ||
* | ||
* Site identity: | ||
* - front_page: The URL of the front page. Use this instead of base_path when | ||
* linking to the front page. This includes the language domain or prefix. | ||
* | ||
* Page content (in order of occurrence in the default page.html.twig): | ||
* - messages: Status and error messages. Should be displayed prominently. | ||
* - node: Fully loaded node, if there is an automatically-loaded node | ||
* associated with the page and the node ID is the second argument in the | ||
* page's path (e.g. node/12345 and node/12345/revisions, but not | ||
* comment/reply/12345). | ||
* | ||
* Regions: | ||
* - page.content: The main content of the current page. | ||
* | ||
* @see template_preprocess_page() | ||
* @see html.html.twig | ||
*/ | ||
#} | ||
|
||
{% | ||
set navbar_classes = [ | ||
'navbar', | ||
theme.settings.navbar_inverse ? 'navbar-inverse' : 'navbar-default', | ||
theme.settings.navbar_position ? 'navbar-' ~ theme.settings.navbar_position|clean_class : '', | ||
] | ||
%} | ||
<header{{ navbar_attributes.addClass(navbar_classes) }} id="navbar" role="banner"> | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
{{ branding }} | ||
|
||
<!-- .btn-navbar is used as the toggle for collapsed navbar content --> | ||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> | ||
<span class="sr-only">{{ 'Toggle navigation'|t }}</span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
</div> | ||
|
||
<div class="navbar-collapse collapse"> | ||
<nav role="navigation"> | ||
{{ main_menu }} | ||
</nav> | ||
</div> | ||
</div> | ||
</header> | ||
|
||
<main id="main" class="clearfix js-quickedit-main-content" role="main"> | ||
|
||
<section class="column container"> | ||
|
||
{{ breadcrumb }} | ||
<a id="main-content"></a> | ||
|
||
{{ messages }} | ||
{{ help }} | ||
|
||
{% if action_links %} | ||
<ul class="action-links">{{ action_links }}</ul> | ||
{% endif %} | ||
</section> | ||
|
||
<section class="container main-container"> | ||
{{ page.content }} | ||
</section> | ||
|
||
</main> | ||
|
||
<footer></footer> |