diff --git a/core/modules/book/book.libraries.yml b/core/modules/book/book.libraries.yml index d2bd52d1f75..bc0241facb1 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 40af371a535..c8a43c7c692 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 116c86b5e99..c1ecb8a40b8 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 49871ad54b5..8a34c91edb0 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 %}