Skip to content
Snippets Groups Projects
Commit 14c0a239 authored by catch's avatar catch
Browse files

Issue #3443215 by nicxvan: Remove Book usage from Umami

parent bb0bf9c3
No related branches found
No related tags found
29 merge requests!12227Issue #3181946 by jonmcl, mglaman,!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!9470[10.3.x-only-DO-NOT-MERGE]: #3331771 Fix file_get_contents(): Passing null to parameter,!8540Issue #3457061: Bootstrap Modal dialog Not closing after 10.3.0 Update,!8528Issue #3456871 by Tim Bozeman: Support NULL services,!8373Issue #3427374 by danflanagan8, Vighneshh: taxonomy_tid ViewsArgumentDefault...,!5423Draft: Resolve #3329907 "Test2",!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3742Issue #3328429: Create item list field formatter for displaying ordered and unordered lists,!3731Claro: role=button on status report items,!3651Issue #3347736: Create new SDC component for Olivero (header-search),!3531Issue #3336994: StringFormatter always displays links to entity even if the user in context does not have access,!3478Issue #3337882: Deleted menus are not removed from content type config,!3355Issue #3209129: Scrolling problems when adding a block via layout builder,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3133core/modules/system/css/components/hidden.module.css,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2062Issue #3246454: Add weekly granularity to views date sort,!1105Issue #3025039: New non translatable field on translatable content throws error,!1073issue #3191727: Focus states on mobile second level navigation items fixed,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!877Issue #2708101: Default value for link text is not saved,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493
Pipeline #156938 canceled
/**
* @file
* Styling for the Book module.
*/
.book-navigation .menu {
padding-top: 1em;
padding-bottom: 0;
}
.book-navigation .book-pager {
overflow: auto;
margin: 0;
padding: 0.5em 0;
}
.book-pager__item {
display: inline-block;
list-style-type: none;
vertical-align: top;
}
.book-pager__item--previous {
width: 45%;
text-align: left; /* LTR */
}
[dir="rtl"] .book-pager__item--previous {
float: right;
text-align: right;
}
.book-pager__item--center {
width: 8%;
text-align: center;
}
.book-pager__item--next {
float: right; /* LTR */
width: 45%;
text-align: right; /* LTR */
}
[dir="rtl"] .book-pager__item--next {
float: left;
text-align: left;
}
{#
/**
* @file
* Theme override 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()
*/
#}
<article id="node-{{ node.id }}" class="section-{{ depth }}">
<h1 class="book-heading">{{ title }}</h1>
{{ content }}
{{ children }}
</article>
{#
/**
* @file
* Theme override 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()
*/
#}
<!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.
#}
{% if depth > 1 %}{% for i in 1..depth - 1 %}
<div class="section-{{ i }}">
{% endfor %}{% endif %}
{{ contents }}
{% if depth > 1 %}{% for i in 1..depth - 1 %}
</div>
{% endfor %}{% endif %}
</body>
</html>
{#
/**
* @file
* Theme override 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()
*/
#}
{% for book in book_menus %}
<nav id="book-block-menu-{{ book.id }}" class="book-block-menu" role="navigation" aria-label="{% trans %}Book outline for {{ book.title }}{% endtrans %}">
{{ book.menu }}
</nav>
{% endfor %}
{#
/**
* @file
* Theme override 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()
*/
#}
{{ attach_library('umami/classy.book-navigation') }}
{% if tree or has_links %}
<nav id="book-navigation-{{ book_id }}" class="book-navigation" role="navigation" aria-labelledby="book-label-{{ book_id }}">
{{ tree }}
{% if has_links %}
<h2 class="visually-hidden" id="book-label-{{ book_id }}">{{ 'Book traversal links for'|t }} {{ book_title }}</h2>
<ul class="book-pager">
{% if prev_url %}
<li class="book-pager__item book-pager__item--previous">
<a href="{{ prev_url }}" rel="prev" title="{{ 'Go to previous page'|t }}"><b>{{ '‹'|t }}</b> {{ prev_title }}</a>
</li>
{% endif %}
{% if parent_url %}
<li class="book-pager__item book-pager__item--center">
<a href="{{ parent_url }}" title="{{ 'Go to parent page'|t }}">{{ 'Up'|t }}</a>
</li>
{% endif %}
{% if next_url %}
<li class="book-pager__item book-pager__item--next">
<a href="{{ next_url }}" rel="next" title="{{ 'Go to next page'|t }}">{{ next_title }} <b>{{ '›'|t }}</b></a>
</li>
{% endif %}
</ul>
{% endif %}
</nav>
{% endif %}
{#
/**
* @file
* Theme override 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.
*/
#}
{% import _self as book_tree %}
{#
We call a macro which calls itself to render the full tree.
@see https://twig.symfony.com/doc/3.x/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.addClass('menu') }}>
{% else %}
<ul class="menu">
{% endif %}
{% for item in items %}
{%
set classes = [
'menu-item',
item.is_expanded ? 'menu-item--expanded',
item.is_collapsed ? 'menu-item--collapsed',
item.in_active_trail ? 'menu-item--active-trail',
]
%}
<li{{ item.attributes.addClass(classes) }}>
{{ link(item.title, item.url) }}
{% if item.below %}
{{ book_tree.book_links(item.below, attributes, menu_level + 1) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}
......@@ -111,12 +111,6 @@ classy.base:
css/classy/components/textarea.css: { weight: -10 }
css/classy/components/ui-dialog.css: { weight: -10 }
classy.book-navigation:
version: VERSION
css:
component:
css/classy/components/book-navigation.css: {}
classy.dialog:
version: VERSION
css:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment