easy_news-8.x-2.3/templates/layout/page--front.html.twig
templates/layout/page--front.html.twig
{#
/**
* @file
* Theme override to display the front page.
*
* The doctype, html, head and body tags are not in this template. Instead they
* can be found in the html.html.twig template normally located in the
* core/modules/system 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):
* - 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.branding: Items for the site branding region.
* - page.header_ad: Items for the header advertising region.
* - page.main_menu: Items for the primary menu region.
* - page.social_icons: Items for the social network icons region.
* - page.slideshow: Items for the slideshow region.
* - page.highlighted: Items for the highlighted region.
* - page.content: The main content of the current page.
* - page.section_widget_1: Items for the first news section widget.
* - page.section_widget_2: Items for the second news section widget.
* - page.section_widget_3: Items for the third news section widget.
* - page.section_widget_4: Items for the fourth news section widget.
* - page.section_widget_5: Items for the fifth news section widget.
* - page.section_widget_6: Items for the sixth news section widget.
* - page.sidebar_first: Items for the first sidebar.
* - page.sidebar_second: Items for the second sidebar.
* - page.footer: Items for the footer region.
* - page.secondary_menu: Items for the secondary menu region.
* - page.credits: Items for the copyright and credits region.
*
* @see template_preprocess_page()
* @see html.html.twig
*/
#}
{% if page.slideshow %}
{{ attach_library('uikit_slideshow/uikit.slideshow') }}
{% endif %}
<div class="easy-news-header uk-container uk-container-center uk-responsive-width" role="banner">
<div class="uk-grid uk-container-center uk-responsive-width uk-margin-top">
<div class="uk-width-medium-1-2">
{% if page.branding %}
<div class="uk-responsive-width uk-margin-top uk-margin-bottom">
{{ page.branding }}
</div>
{% endif %}
</div>
<div class="uk-width-medium-1-2">
{% if page.header_ad %}
<div class="uk-responsive-width uk-margin-top uk-margin-bottom">
{{ page.header_ad }}
</div>
{% endif %}
</div>
</div>
</div>
<div class="easy-news-main-menu uk-container uk-container-center uk-responsive-width">
<div class="uk-grid uk-responsive-width uk-visible-large">
<div class="uk-width-1-1">
<nav class="uk-navbar uk-responsive-width" role="navigation">
<div class="uk-float-right">
{% if page.social_icons %}
{{ page.social_icons }}
{% endif %}
</div>
<div class="uk-float-left">
{% if page.main_menu %}
{{ page.main_menu }}
{% endif %}
</div>
</nav>
</div>
</div>
<div class="uk-hidden-large">
<nav class="uk-navbar" role="navigation">
{% if page.main_menu %}
<a href="#offcanvas" class="uk-navbar-toggle" data-uk-offcanvas="{mode:'slide'}"></a>
<div class="uk-offcanvas-bar">
{{ page.main_menu }}
</div>
{% endif %}
{% if page.social_icons %}
<div class="uk-margin-small-top uk-align-right uk-margin-right">
{{ page.social_icons }}
</div>
{% endif %}
</nav>
</div>
</div>
<div class="uk-container uk-container-center uk-responsive-width uk-margin-top">
{#
If both slideshow and first sidebar are defined, they will be displayed
beside each other. On small devices, first sidebar appears below slideshow.
If there is no slideshow, first sidebar will be displayed later.
#}
{% if page.slideshow %}
<div class="uk-grid uk-container-center uk-grid-divider uk-margin-bottom">
{% if page.sidebar_first %}
<div class="uk-width-medium-2-3 uk-width-large-3-4">
{% else %}
<div class="uk-width-medium-1-1">
{% endif %}
{{ page.slideshow }}
</div>
{% if page.sidebar_first %}
<div class="uk-container uk-width-medium-1-3 uk-width-large-1-4 uk-margin-bottom">
{{ page.sidebar_first }}
</div>
{% endif %}
</div>
{% endif %}
{#
If second sidebar is defined, it will be displayed beside the main content.
If there was no slideshow above, first sidebar will also be displayed here.
On small devices, sidebar(s) appear(s) below main content.
#}
<div class="uk-grid uk-container-center uk-grid-divider uk-margin-bottom">
{% if (page.sidebar_first or page.sidebar_second) %}
<div class="uk-width-large-3-4 uk-margin-bottom">
{% else %}
<div class="uk-width-large-1-1 uk-margin-bottom">
{% endif %}
{% if page.highlighted %}
<div class="uk-width-1-1">
{{ page.highlighted }}
</div>
{% endif %}
<div class="uk-width-1-1">
<main id="content" class="column main-content" role="main">
<section class="section">
<a id="main-content" tabindex="-1"></a>
{{ page.content }}
</section>
</main>
</div>
{% if (page.section_widget_1 or page.section_widget_2 or page.section_widget_3 or page.section_widget_4 or page.section_widget_5) %}
<div class="uk-grid uk-grid-divider">
<div class="uk-width-medium-1-2">
{{ page.section_widget_1 }}
{{ page.section_widget_2 }}
{{ page.section_widget_3 }}
</div>
<div class="uk-width-medium-1-2">
{{ page.section_widget_4 }}
{{ page.section_widget_5 }}
{{ page.section_widget_6 }}
</div>
</div>
{% endif %}
</div>
{% if (page.sidebar_first or page.sidebar_second) %}
<div class="uk-container uk-width-large-1-4 uk-margin-bottom">
{% else %}
<div class="uk-container uk-width-large-1-1 uk-margin-bottom">
{% endif %}
{% if not (page.slideshow) %}
{% if page.sidebar_first %}
<div class="uk-margin-bottom">
{{ page.sidebar_first }}
</div>
{% endif %}
{% endif %}
{% if page.sidebar_second %}
<div class="uk-margin-bottom">
{{ page.sidebar_second }}
</div>
{% endif %}
</div>
</div>
</div>
{% if page.footer %}
<div class="easy-news-footer uk-container uk-text-center uk-responsive-width">
{{ page.footer }}
</div>
{% endif %}
{% if page.secondary_menu %}
<div class="easy-news-secondary-menu uk-container uk-responsive-width" role="navigation">
{{ page.secondary_menu }}
</div>
{% endif %}
{% if page.credits %}
<div class="easy-news-credits uk-container uk-responsive-width uk-text-center" role="contentinfo">
{{ page.credits }}
</div>
{% endif %}
{% if page.main_menu %}
<div id="offcanvas" class="uk-offcanvas" role="navigation">
<div class="uk-offcanvas-bar">
<ul class="uk-nav uk-nav-offcanvas" data-uk-nav>
{{ page.main_menu }}
</ul>
</div>
</div>
{% endif %}