diff --git a/core/modules/aggregator/aggregator.pages.inc b/core/modules/aggregator/aggregator.pages.inc index 6248012..bd8d793 100644 --- a/core/modules/aggregator/aggregator.pages.inc +++ b/core/modules/aggregator/aggregator.pages.inc @@ -297,9 +297,14 @@ function theme_aggregator_summary_item($variables) { } /** - * Processes variables for aggregator-item.tpl.php. + * Prepares variables for aggregator item templates. * - * @see aggregator-item.tpl.php + * Default template: aggregator-item.html.twig. + * + * @param array $variables + * An associative array containing: + * - aggregator_item: An individual feed item for display on the aggregator + * page. */ function template_preprocess_aggregator_item(&$variables) { $item = $variables['aggregator_item']; @@ -531,9 +536,14 @@ function theme_aggregator_page_opml($variables) { } /** - * Processes variables for aggregator-summary-items.tpl.php. + * Prepares variables for aggregator summary templates. * - * @see aggregator-summary-items.tpl.php + * Default template: aggregator-summary-items.html.twig. + * + * @param array $variables + * An associative array containing: + * - source: Information about the feed source. + * - summary_items: An array of feed items. */ function template_preprocess_aggregator_summary_items(&$variables) { $variables['title'] = check_plain($variables['source'] instanceof EntityInterface ? $variables['source']->label() : $variables['source']->title); @@ -572,9 +582,13 @@ function template_preprocess_aggregator_summary_item(&$variables) { } /** - * Processes variables for aggregator-feed-source.tpl.php. + * Prepares variables for aggregator feed source templates. + * + * Default template: aggregator-feed-source.html.twig. * - * @see aggregator-feed-source.tpl.php + * @param array $variables + * An associative array containing: + * - aggregator_feed: Information about the feed source. */ function template_preprocess_aggregator_feed_source(&$variables) { $feed = $variables['aggregator_feed']; diff --git a/core/modules/aggregator/templates/aggregator-feed-source.html.twig b/core/modules/aggregator/templates/aggregator-feed-source.html.twig new file mode 100644 index 0000000..33fac7e --- /dev/null +++ b/core/modules/aggregator/templates/aggregator-feed-source.html.twig @@ -0,0 +1,35 @@ +{# +/** + * @file + * Default theme implementation to present the source of the feed. + * + * The contents are rendered above feed listings when browsing source feeds. + * For example, "example.com/aggregator/sources/1". + * + * Available variables: + * - source_icon: Feed icon linked to the source. Rendered through + * feed-icon.html.twig. + * - source_image: Image set by the feed source. + * - source_description: Description set by the feed source. + * - source_url: URL to the feed source. + * - last_checked: How long ago the feed was checked locally. + * + * @see template_preprocess() + * @see template_preprocess_aggregator_feed_source() + * + * @ingroup themeable + */ +#} +
+ {{ source_icon }} + {{ source_image }} +
+ {{ source_description }} +
+
+ {{ 'URL'|t }}: {{ source_url }} +
+
+ {{ 'Updated'|t }}: {{ last_checked }} +
+
diff --git a/core/modules/aggregator/templates/aggregator-feed-source.tpl.php b/core/modules/aggregator/templates/aggregator-feed-source.tpl.php deleted file mode 100644 index f9cfa55..0000000 --- a/core/modules/aggregator/templates/aggregator-feed-source.tpl.php +++ /dev/null @@ -1,36 +0,0 @@ - -
- - -
- -
-
- -
-
- -
-
diff --git a/core/modules/aggregator/templates/aggregator-item.html.twig b/core/modules/aggregator/templates/aggregator-item.html.twig new file mode 100644 index 0000000..49ba80f --- /dev/null +++ b/core/modules/aggregator/templates/aggregator-item.html.twig @@ -0,0 +1,44 @@ +{# +/** + * @file + * Default theme implementation to present a feed in an aggregator page. + * + * Available variables: + * - feed_url: URL to the originating feed item. + * - feed_title: Title of the feed item. + * - source_url: Link to the local source section. + * - source_title: Title of the remote source. + * - source_date: Date the feed was posted on the remote source. + * - content: Feed item content. + * - categories: Linked categories assigned to the feed. + * + * @see template_preprocess() + * @see template_preprocess_aggregator_item() + * + * @ingroup themeable + */ +#} +
+

+ {{ feed_title }} +

+ +
+ {% if source_url %} + {{ source_title }} - + {% endif %} + {{ source_date }} +
+ + {% if content %} +
+ {{ content }} +
+ {% endif %} + + {% if categories %} +
+ {{ 'Categories'|t }}: {{ categories|join(', ') }} +
+ {% endif %} +
diff --git a/core/modules/aggregator/templates/aggregator-item.tpl.php b/core/modules/aggregator/templates/aggregator-item.tpl.php deleted file mode 100644 index 74b2284..0000000 --- a/core/modules/aggregator/templates/aggregator-item.tpl.php +++ /dev/null @@ -1,47 +0,0 @@ - -
-

- -

- -
- - - - - -
- - -
- -
- - - -
- : -
- - -
diff --git a/core/modules/aggregator/templates/aggregator-summary-items.html.twig b/core/modules/aggregator/templates/aggregator-summary-items.html.twig new file mode 100644 index 0000000..5376fda --- /dev/null +++ b/core/modules/aggregator/templates/aggregator-summary-items.html.twig @@ -0,0 +1,24 @@ +{# +/** + * @file + * Default theme implementation to present feeds as list items. + * + * Each iteration generates a single feed source or category. + * + * Available variables: + * - title: Title of the feed or category. + * - summary_list: Unordered list of linked feed items generated through + * theme_item_list(). + * - source_url: URL to the local source or category. + * + * @see template_preprocess() + * @see template_preprocess_aggregator_summary_items() + * + * @ingroup themeable + */ +#} +

{{ title }}

+{{ summary_list }} + diff --git a/core/modules/aggregator/templates/aggregator-summary-items.tpl.php b/core/modules/aggregator/templates/aggregator-summary-items.tpl.php deleted file mode 100644 index 8f19fe1..0000000 --- a/core/modules/aggregator/templates/aggregator-summary-items.tpl.php +++ /dev/null @@ -1,24 +0,0 @@ - -

- - diff --git a/core/modules/aggregator/templates/aggregator-wrapper.tpl.php b/core/modules/aggregator/templates/aggregator-wrapper.tpl.php deleted file mode 100644 index 0e97ba4..0000000 --- a/core/modules/aggregator/templates/aggregator-wrapper.tpl.php +++ /dev/null @@ -1,20 +0,0 @@ - -
- - -