Move into nested docroot
This commit is contained in:
parent
83a0d3a149
commit
c8b70abde9
13405 changed files with 0 additions and 0 deletions
|
@ -0,0 +1,24 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for rendering book outlines within a block.
|
||||
*
|
||||
* This template is used only when the block is configured to "show block on all
|
||||
* pages", which presents multiple independent books on all pages.
|
||||
*
|
||||
* Available variables:
|
||||
* - book_menus: Book outlines.
|
||||
* - id: The parent book ID.
|
||||
* - title: The parent book title.
|
||||
* - menu: The top-level book links.
|
||||
*
|
||||
* @see template_preprocess_book_all_books_block()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% for book in book_menus %}
|
||||
<nav role="navigation" aria-label="{% trans %}Book outline for {{ book.title }}{% endtrans %}">
|
||||
{{ book.menu }}
|
||||
</nav>
|
||||
{% endfor %}
|
47
web/core/modules/book/templates/book-export-html.html.twig
Normal file
47
web/core/modules/book/templates/book-export-html.html.twig
Normal file
|
@ -0,0 +1,47 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for printed version of book outline.
|
||||
*
|
||||
* Available variables:
|
||||
* - title: Top level node title.
|
||||
* - head: Header tags.
|
||||
* - language: Language object.
|
||||
* - language_rtl: A flag indicating whether the current display language is a
|
||||
* right to left language.
|
||||
* - base_url: URL to the home page.
|
||||
* - contents: Nodes within the current outline rendered through
|
||||
* book-node-export-html.html.twig.
|
||||
*
|
||||
* @see template_preprocess_book_export_html()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<!DOCTYPE html>
|
||||
<html{{ html_attributes }}>
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
{{ page.head }}
|
||||
<base href="{{ base_url }}" />
|
||||
<link type="text/css" rel="stylesheet" href="misc/print.css" />
|
||||
</head>
|
||||
<body>
|
||||
{#
|
||||
The given node is embedded to its absolute depth in a top level section.
|
||||
For example, a child node with depth 2 in the hierarchy is contained in
|
||||
(otherwise empty) div elements corresponding to depth 0 and depth 1. This
|
||||
is intended to support WYSIWYG output - e.g., level 3 sections always look
|
||||
like level 3 sections, no matter their depth relative to the node selected
|
||||
to be exported as printer-friendly HTML.
|
||||
#}
|
||||
|
||||
{% for i in 1..depth-1 if depth > 1 %}
|
||||
<div>
|
||||
{% endfor %}
|
||||
{{ contents }}
|
||||
{% for i in 1..depth-1 if depth > 1 %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</body>
|
||||
</html>
|
57
web/core/modules/book/templates/book-navigation.html.twig
Normal file
57
web/core/modules/book/templates/book-navigation.html.twig
Normal file
|
@ -0,0 +1,57 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to navigate books.
|
||||
*
|
||||
* Presented under nodes that are a part of book outlines.
|
||||
*
|
||||
* Available variables:
|
||||
* - tree: The immediate children of the current node rendered as an unordered
|
||||
* list.
|
||||
* - current_depth: Depth of the current node within the book outline. Provided
|
||||
* for context.
|
||||
* - prev_url: URL to the previous node.
|
||||
* - prev_title: Title of the previous node.
|
||||
* - parent_url: URL to the parent node.
|
||||
* - parent_title: Title of the parent node. Not printed by default. Provided
|
||||
* as an option.
|
||||
* - next_url: URL to the next node.
|
||||
* - next_title: Title of the next node.
|
||||
* - has_links: Flags TRUE whenever the previous, parent or next data has a
|
||||
* value.
|
||||
* - book_id: The book ID of the current outline being viewed. Same as the node
|
||||
* ID containing the entire outline. Provided for context.
|
||||
* - book_url: The book/node URL of the current outline being viewed. Provided
|
||||
* as an option. Not used by default.
|
||||
* - book_title: The book/node title of the current outline being viewed.
|
||||
*
|
||||
* @see template_preprocess_book_navigation()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if tree or has_links %}
|
||||
<nav role="navigation" aria-labelledby="book-label-{{ book_id }}">
|
||||
{{ tree }}
|
||||
{% if has_links %}
|
||||
<h2>{{ 'Book traversal links for'|t }} {{ book_title }}</h2>
|
||||
<ul>
|
||||
{% if prev_url %}
|
||||
<li>
|
||||
<a href="{{ prev_url }}" rel="prev" title="{{ 'Go to previous page'|t }}"><b>{{ '‹'|t }}</b> {{ prev_title }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if parent_url %}
|
||||
<li>
|
||||
<a href="{{ parent_url }}" title="{{ 'Go to parent page'|t }}">{{ 'Up'|t }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if next_url %}
|
||||
<li>
|
||||
<a href="{{ next_url }}" rel="next" title="{{ 'Go to next page'|t }}">{{ next_title }} <b>{{ '›'|t }}</b></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endif %}
|
|
@ -0,0 +1,22 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a single node in a printer-friendly outline.
|
||||
*
|
||||
* Available variables:
|
||||
* - node: Fully loaded node.
|
||||
* - depth: Depth of the current node inside the outline.
|
||||
* - title: Node title.
|
||||
* - content: Node content.
|
||||
* - children: All the child nodes recursively rendered through this file.
|
||||
*
|
||||
* @see template_preprocess_book_node_export_html()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<article>
|
||||
<h1>{{ title }}</h1>
|
||||
{{ content }}
|
||||
{{ children }}
|
||||
</article>
|
49
web/core/modules/book/templates/book-tree.html.twig
Normal file
49
web/core/modules/book/templates/book-tree.html.twig
Normal file
|
@ -0,0 +1,49 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a book tree.
|
||||
*
|
||||
* Returns HTML for a wrapper for a book sub-tree.
|
||||
*
|
||||
* Available variables:
|
||||
* - items: A nested list of book items. Each book item contains:
|
||||
* - attributes: HTML attributes for the book item.
|
||||
* - below: The book item child items.
|
||||
* - title: The book link title.
|
||||
* - url: The book link URL, instance of \Drupal\Core\Url.
|
||||
* - is_expanded: TRUE if the link has visible children within the current
|
||||
* book tree.
|
||||
* - is_collapsed: TRUE if the link has children within the current book tree
|
||||
* that are not currently visible.
|
||||
* - in_active_trail: TRUE if the link is in the active trail.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% import _self as book_tree %}
|
||||
|
||||
{#
|
||||
We call a macro which calls itself to render the full tree.
|
||||
@see http://twig.sensiolabs.org/doc/tags/macro.html
|
||||
#}
|
||||
{{ book_tree.book_links(items, attributes, 0) }}
|
||||
|
||||
{% macro book_links(items, attributes, menu_level) %}
|
||||
{% import _self as book_tree %}
|
||||
{% if items %}
|
||||
{% if menu_level == 0 %}
|
||||
<ul{{ attributes }}>
|
||||
{% else %}
|
||||
<ul>
|
||||
{% endif %}
|
||||
{% for item in items %}
|
||||
<li{{ item.attributes }}>
|
||||
{{ link(item.title, item.url) }}
|
||||
{% if item.below %}
|
||||
{{ book_tree.book_links(item.below, attributes, menu_level + 1) }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
Reference in a new issue