Commit 5cb07837 authored by webchick's avatar webchick

Issue #2566771 by Cottser, mortendk, jstoller, LewisNyman, mdrummond, Gints...

Issue #2566771 by Cottser, mortendk, jstoller, LewisNyman, mdrummond, Gints Ērglis, sqndr, Chernous_dn, Manjit.Singh, axe312, emma.maria, davidhernandez, lauriii, jaxxed, akalata: [Voltron patch] Move all remaining *.theme.css to Classy
parent dd570e0c
......@@ -161,9 +161,6 @@ drupal.dialog:
misc/dialog/dialog.js: {}
misc/dialog/dialog.position.js: {}
misc/dialog/dialog.jquery-ui.js: {}
css:
theme:
misc/dialog.theme.css: {}
dependencies:
- core/jquery
- core/drupal
......@@ -199,8 +196,6 @@ drupal.dropbutton:
css:
component:
misc/dropbutton/dropbutton.css: {}
theme:
misc/dropbutton/dropbutton.theme.css: {}
dependencies:
- core/jquery
- core/drupal
......
......@@ -12,10 +12,3 @@ drupal.file:
- core/jquery.once
- core/drupal
- core/drupalSettings
drupal.file.formatter.generic:
version: VERSION
css:
theme:
css/file.theme.css: {}
......@@ -47,11 +47,6 @@ public function viewElements(FieldItemListInterface $items, $langcode) {
unset($item->_attributes);
}
}
if (!empty($elements)) {
$elements['#attached'] = array(
'library' => array('file/drupal.file.formatter.generic'),
);
}
return $elements;
}
......
forum.index:
version: VERSION
css:
component:
css/forum.theme.css: {}
......@@ -224,7 +224,6 @@ protected function build($forums, TermInterface $term, $topics = array(), $paren
'#sortby' => $config->get('topics.order'),
'#forums_per_page' => $config->get('topics.page_limit'),
);
$build['#attached']['library'][] = 'forum/forum.index';
if (empty($term->forum_container->value)) {
$build['#attached']['feed'][] = array('taxonomy/term/' . $term->id() . '/feed', 'RSS - ' . $term->getName());
}
......
form:
version: VERSION
css:
theme:
css/image.theme.css: {}
admin:
version: VERSION
css:
......
......@@ -160,7 +160,6 @@ public static function process($element, FormStateInterface $form_state, $form)
$item['fids'] = $element['fids']['#value'];
$element['#theme'] = 'image_widget';
$element['#attached']['library'][] = 'image/form';
// Add the image preview.
if (!empty($element['#files']) && $element['#preview_image_style']) {
......
......@@ -5,8 +5,6 @@ drupal.user:
css:
component:
css/user.module.css: {}
theme:
css/user.theme.css: {}
dependencies:
- core/jquery
- core/drupal
......@@ -33,4 +31,4 @@ drupal.user.icons:
version: VERSION
css:
theme:
css/user.icons.theme.css: {}
css/user.icons.admin.css: {}
......@@ -31,6 +31,30 @@ book-navigation:
component:
css/components/book-navigation.css: {}
dialog:
version: VERSION
css:
component:
css/components/dialog.css: { weight: -10 }
dropbutton:
version: VERSION
css:
component:
css/components/dropbutton.css: { weight: -10 }
file:
version: VERSION
css:
component:
css/components/file.css: { weight: -10 }
forum:
version: VERSION
css:
component:
css/components/forum.css: { weight: -10 }
indented:
version: VERSION
css:
......@@ -60,3 +84,9 @@ search-results:
css:
component:
css/components/search-results.css: {}
user:
version: VERSION
css:
component:
css/components/user.css: { weight: -10 }
<?php
/**
* @file
* Functions to support theming in the Classy theme.
*/
/**
* Implements hook_library_info_alter().
*/
function classy_library_info_alter(&$libraries, $extension) {
if ($extension == 'user' && isset($libraries['drupal.user'])) {
// @todo Replace with https://www.drupal.org/node/2497667 when possible.
$library_discovery = \Drupal::service('library.discovery');
$library = $library_discovery->getLibraryByName('classy', 'user');
foreach ($library['css'] as $css) {
$libraries['drupal.user']['css']['component'][base_path() . $css['data']] = [];
}
}
if ($extension == 'core' && isset($libraries['drupal.dropbutton'])) {
$libraries['drupal.dropbutton']['dependencies'][] = 'classy/dropbutton';
}
if ($extension == 'core' && isset($libraries['drupal.dialog'])) {
$libraries['drupal.dialog']['dependencies'][] = 'classy/dialog';
}
}
/**
* @file
* Presentational styles for Drupal dialogs.
*/
......
......@@ -19,44 +19,44 @@
}
.file--general,
.file--application-octet-stream {
background-image: url(../icons/application-octet-stream.png);
background-image: url(../../images/icons/application-octet-stream.png);
}
.file--package-x-generic {
background-image: url(../icons/package-x-generic.png);
background-image: url(../../images/icons/package-x-generic.png);
}
.file--x-office-spreadsheet {
background-image: url(../icons/x-office-spreadsheet.png);
background-image: url(../../images/icons/x-office-spreadsheet.png);
}
.file--x-office-document {
background-image: url(../icons/x-office-document.png);
background-image: url(../../images/icons/x-office-document.png);
}
.file--x-office-presentation {
background-image: url(../icons/x-office-presentation.png);
background-image: url(../../images/icons/x-office-presentation.png);
}
.file--text-x-script {
background-image: url(../icons/text-x-script.png);
background-image: url(../../images/icons/text-x-script.png);
}
.file--text-html {
background-image: url(../icons/text-html.png);
background-image: url(../../images/icons/text-html.png);
}
.file--text-plain {
background-image: url(../icons/text-plain.png);
background-image: url(../../images/icons/text-plain.png);
}
.file--application-pdf {
background-image: url(../icons/application-pdf.png);
background-image: url(../../images/icons/application-pdf.png);
}
.file--application-x-executable {
background-image: url(../icons/application-x-executable.png);
background-image: url(../../images/icons/application-x-executable.png);
}
.file--audio {
background-image: url(../icons/audio-x-generic.png);
background-image: url(../../images/icons/audio-x-generic.png);
}
.file--video {
background-image: url(../icons/video-x-generic.png);
background-image: url(../../images/icons/video-x-generic.png);
}
.file--text {
background-image: url(../icons/text-x-generic.png);
background-image: url(../../images/icons/text-x-generic.png);
}
.file--image {
background-image: url(../icons/image-x-generic.png);
background-image: url(../../images/icons/image-x-generic.png);
}
......@@ -8,7 +8,7 @@
margin: 0.5em;
}
.forum__icon {
background-image: url(../icons/forum-icons.png);
background-image: url(../../images/icons/forum-icons.png);
background-repeat: no-repeat;
float: left; /* LTR */
height: 24px;
......
......@@ -10,6 +10,7 @@
* @see template_preprocess_file_managed_file()
*/
#}
{{ attach_library('classy/file') }}
{%
set classes = [
'js-form-managed-file',
......
......@@ -10,6 +10,7 @@
* @see template_preprocess_file_widget()
*/
#}
{{ attach_library('classy/file') }}
<div{{ attributes }}>
{{ element }}
</div>
......@@ -10,6 +10,7 @@
* @see template_preprocess_image_widget()
*/
#}
{{ attach_library('classy/image-widget') }}
<div{{ attributes }}>
{% if data.preview %}
<div class="image-preview">
......
......@@ -14,6 +14,7 @@
* @see template_preprocess_forums()
*/
#}
{{ attach_library('classy/forum') }}
{% if forums_defined %}
<div class="forum">
{{ forums }}
......
......@@ -11,4 +11,5 @@
* @see template_preprocess_file_link()
*/
#}
{{ attach_library('classy/file') }}
<span{{ attributes }}>{{ icon }} {{ link }}</span>
......@@ -92,4 +92,4 @@ seven.drupal.dialog:
version: VERSION
css:
theme:
css/components/dialog.theme.css: {}
css/components/dialog.css: {}
......@@ -186,8 +186,8 @@ function seven_library_info_alter(&$libraries, $extension) {
unset($libraries['jquery.ui']['css']['theme']['assets/vendor/jquery.ui/themes/base/theme.css']);
$libraries['jquery.ui']['dependencies'][] = 'seven/seven.jquery.ui';
}
if ($extension == 'core' && isset($libraries['drupal.dialog'])) {
unset($libraries['drupal.dialog']['css']['theme']['misc/dialog.theme.css']);
$libraries['drupal.dialog']['dependencies'][] = 'seven/seven.drupal.dialog';
if ($extension == 'classy' && isset($libraries['dialog'])) {
unset($libraries['dialog']['css']['component']['css/components/dialog.css']);
$libraries['dialog']['dependencies'][] = 'seven/seven.drupal.dialog';
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment