You are here

uikit-article.html.twig in UIkit Components 8.3

Default theme implementation for a UIkit Article.

Available variables:

  • title: The title of the article.
  • meta: The metadata of the article.
  • lead: The leading paragraph of the article.
  • content: The content of the article.
  • attributes: HTML attributes to be applied to the article.

File

templates/components/uikit-article.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a UIkit Article.
  5. *
  6. * Available variables:
  7. * - title: The title of the article.
  8. * - meta: The metadata of the article.
  9. * - lead: The leading paragraph of the article.
  10. * - content: The content of the article.
  11. * - attributes: HTML attributes to be applied to the article.
  12. *
  13. * @see \Drupal\uikit_components\Element\UIkitArticle
  14. * @see template_preprocess_uikit_article()
  15. * @see https://getuikit.com/docs/article
  16. *
  17. * @ingroup uikit_components_theme_render
  18. */
  19. #}
  20. <article{{ attributes }}>
  21. {% if title %}
  22. <h1 class="uk-article-title">{{ title }}</h1>
  23. {% endif %}
  24. {% if meta %}
  25. <p class="uk-article-meta">{{ meta }}</p>
  26. {% endif %}
  27. {% if lead %}
  28. <p class="uk-text-lead">{{ lead }}</p>
  29. {% endif %}
  30. {% if content %}
  31. {{ content }}
  32. {% endif %}
  33. </article>

Related topics