diff --git a/core/modules/book/book.libraries.yml b/core/modules/book/book.libraries.yml index d2bd52d1f759f81bbb7792ff485e1ca084457e52..bc0241facb1b527abf572ad2c5ac6a310038ba32 100644 --- a/core/modules/book/book.libraries.yml +++ b/core/modules/book/book.libraries.yml @@ -7,8 +7,3 @@ drupal.book: - core/drupal - core/drupal.form -navigation: - version: VERSION - css: - theme: - css/book.theme.css: {} diff --git a/core/modules/book/book.module b/core/modules/book/book.module index 40af371a5355b5903b35b64e3fb331edaff07940..c8a43c7c692d061675316ebc0920e46f3da0e5de 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -243,11 +243,6 @@ function book_node_view(array &$build, EntityInterface $node, EntityViewDisplayI $build['book_navigation'] = array( '#markup' => drupal_render($book_navigation), '#weight' => 100, - '#attached' => [ - 'library' => [ - 'book/navigation', - ], - ], // The book navigation is a listing of Node entities, so associate its // list cache tag for correct invalidation. '#cache' => [ diff --git a/core/themes/classy/classy.libraries.yml b/core/themes/classy/classy.libraries.yml index 116c86b5e99448523e8b1456664af5ab84728d8a..c1ecb8a40b87050ad91e7aa41e87866ad36cb1b1 100644 --- a/core/themes/classy/classy.libraries.yml +++ b/core/themes/classy/classy.libraries.yml @@ -3,3 +3,9 @@ base: css: theme: css/layout.css: {} + +book-navigation: + version: VERSION + css: + theme: + css/navigation/book.theme.css: {} diff --git a/core/modules/book/css/book.theme.css b/core/themes/classy/css/navigation/book.theme.css similarity index 100% rename from core/modules/book/css/book.theme.css rename to core/themes/classy/css/navigation/book.theme.css diff --git a/core/themes/classy/templates/navigation/book-navigation.html.twig b/core/themes/classy/templates/navigation/book-navigation.html.twig index 49871ad54b545aaa631595eff009a7b2983a354d..8a34c91edb01a68be4f93dcd7200f16c2af98e2c 100644 --- a/core/themes/classy/templates/navigation/book-navigation.html.twig +++ b/core/themes/classy/templates/navigation/book-navigation.html.twig @@ -28,6 +28,7 @@ * @see template_preprocess_book_navigation() */ #} +{{ attach_library('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 }}