diff --git a/core/modules/system/templates/image.html.twig b/core/modules/system/templates/image.html.twig new file mode 100644 index 0000000..b6b238a --- /dev/null +++ b/core/modules/system/templates/image.html.twig @@ -0,0 +1,14 @@ +{# +/** + * @file + * Default theme implementation of an image. + * + * Available variables: + * - attributes: HTML attributes for the img tag. + * + * @see template_preprocess_image() + * + * @ingroup themeable + */ +#} + diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index 29f1711..85af033 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -6,6 +6,8 @@ */ use Drupal\Core\Template\RenderWrapper; +use Drupal\Component\Utility\String; +use Drupal\Component\Utility\Xss; /** * Implements hook_library_info(). @@ -43,104 +45,63 @@ function seven_preprocess_page(&$variables) { } /** - * Displays the list of available node types for node creation. + * Implements hook_preprocess_HOOK() for list of available node type templates. */ -function seven_node_add_list($variables) { - $content = $variables['content']; - if ($content) { - $output = ''; } - else { - $output = '

' . t('You have not created any content types yet. Go to the content type creation page to add a new content type.', array('@create-content' => url('admin/structure/types/add'))) . '

'; - } - return $output; } /** - * Overrides theme_custom_block_add_list(). + * Implements hook_preprocess_HOOK() for custom block add list templates. + * + * Add variables for the label and the path separately. + * + * Displays the list of available custom block types for creation, adding + * separate variables for the label and the path. * - * Displays the list of available custom block types for creation. */ -function seven_custom_block_add_list($variables) { - $output = ''; - if (!empty($variables['types'])) { - $output = ''; } - return $output; } /** - * Overrides theme_admin_block_content(). + * Implements hook_preprocess_HOOK() for block admin page templates. * * Uses an unordered list markup in both compact and extended mode. */ -function seven_admin_block_content($variables) { - $content = $variables['content']; - $output = ''; - if (!empty($content)) { - $output = system_admin_compact_mode() ? '