init framework & ajout de pages template

This commit is contained in:
armansansd
2021-06-01 15:48:54 +02:00
parent 4b97d6cd1a
commit 0d932a8fa8
47 changed files with 23569 additions and 33 deletions

View File

@@ -0,0 +1,13 @@
{% extends "block.html.twig" %}
{% block content %}
{% if site_logo %}
<a href="{{ path('<front>') }}" rel="home">
<img src="{{ site_logo }}" alt="{{ 'Home'|t }}" />
</a>
{% endif %}
{% if site_name %}
<a href="{{ path('<front>') }}" rel="home">{{ site_name }}</a>
{% endif %}
{{ site_slogan }}
{% endblock %}

View File

@@ -0,0 +1,41 @@
{#
/**
* @file
* Default theme implementation to display a block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
* - label_display: The display settings for the label.
* - provider: The module or other provider that provided this block plugin.
* - Block plugin specific settings will also be stored here.
* - content: The content of this block.
* - attributes: array of HTML attributes populated by modules, intended to
* be added to the main container tag of this template.
* - id: A valid HTML ID and guaranteed unique.
* - title_attributes: Same as attributes, except applied to the main title
* tag that appears in the template.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*
* @see template_preprocess_block()
*
* @ingroup themeable
*/
#}
<div{{ attributes }}>
{{ title_prefix }}
{% if label %}
<h2{{ title_attributes }}>{{ label }}</h2>
{% endif %}
{{ title_suffix }}
{% block content %}
{{ content }}
{% endblock %}
</div>

View File

@@ -0,0 +1,61 @@
{#
/**
* @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):
* - 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).
*
* @see template_preprocess_page()
* @see html.html.twig
*/
#}
<div class="layout-container row collapse home">
{% include directory ~ '\/partials/header.html.twig' %}
{{ page.help }}
<main role="main" class="columns small-12">
<a id="main-content" tabindex="-1"></a>
{# link is in html.html.twig #}
<div class="layout-content">
{{ page.content }}
</div>
{# /.layout-content #}
{% if page.sidebar_first %}
<aside class="layout-sidebar-first" role="complementary">
{{ page.sidebar_first }}
</aside>
{% endif %}
{% if page.sidebar_second %}
<aside class="layout-sidebar-second" role="complementary">
{{ page.sidebar_second }}
</aside>
{% endif %}
</main>
{% include directory ~ '\/partials/footer.html.twig' %}
</div>{# /.layout-container #}

View File

@@ -32,28 +32,16 @@
#}
<div class="layout-container">
<header role="banner">
<section id="header-top">
<div id="header-top-left">
{{ page.header_top_left }}
</div>
<div id="header-top-right">
{{ page.header_top_rigth }}
</div>
</section>
<section id="header-bottom">
{{ page.header_bottom }}
</section>
</header>
{% include directory ~ '\/partials/header.html.twig' %}
{{ page.help }}
<main role="main">
<a id="main-content" tabindex="-1"></a>{# link is in html.html.twig #}
<a id="main-content" tabindex="-1"></a>
{# link is in html.html.twig #}
<div class="layout-content">
{{ page.content }}
</div>{# /.layout-content #}
</div>
{# /.layout-content #}
{% if page.sidebar_first %}
<aside class="layout-sidebar-first" role="complementary">
@@ -69,21 +57,6 @@
</main>
<footer role="contentinfo">
<section id="footer-top">
{{ page.footer_top }}
</section>
<section id="footer-bottom">
<div id="footer-left">
{{ page.footer_bottom_left }}
</div>
<div id="footer-middle">
{{ page.footer_bottom_middle }}
</div>
<div id="footer-right">
{{ page.footer_bottom_right }}
</div>
</section>
</footer>
{% include directory ~ '\/partials/footer.html.twig' %}
</div>{# /.layout-container #}

View File

@@ -0,0 +1,32 @@
{#
/**
* @file
* Default theme implementation to display a view of unformatted rows.
*
* Available variables:
* - title: The title of this group of rows. May be empty.
* - rows: A list of the view's row items.
* - attributes: The row's HTML attributes.
* - content: The row's content.
* - view: The view object.
* - default_row_class: A flag indicating whether default classes should be
* used on rows.
*
* @see template_preprocess_views_view_unformatted()
*
* @ingroup themeable
*/
#}
{% if title %}
<h3>{{ title }}</h3>
{% endif %}
{% for row in rows %}
{%
set row_classes = [
default_row_class ? 'views-row',
]
%}
<div{{ row.attributes.addClass(row_classes) }}>
{{- row.content -}}
</div>
{% endfor %}