Initial theme creation
This commit is contained in:
parent
bac11b9701
commit
530357999a
1
web/themes/custom/opdavies/css/tailwind.css
Normal file
1
web/themes/custom/opdavies/css/tailwind.css
Normal file
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,18 @@
|
||||||
|
{#
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Theme override to display a one-column layout.
|
||||||
|
*
|
||||||
|
* Available variables:
|
||||||
|
* - in_preview: Whether the plugin is being rendered in preview mode.
|
||||||
|
* - content: The content for this layout.
|
||||||
|
* - attributes: HTML attributes for the layout <div>.
|
||||||
|
*/
|
||||||
|
#}
|
||||||
|
{% if content %}
|
||||||
|
<div{{ attributes }}>
|
||||||
|
<div {{ region_attributes.content.addClass('space-y-10') }}>
|
||||||
|
{{ content.content }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
|
@ -2,3 +2,5 @@ name: opdavies
|
||||||
type: theme
|
type: theme
|
||||||
core_version_requirement: ^10
|
core_version_requirement: ^10
|
||||||
base theme: stable9
|
base theme: stable9
|
||||||
|
libraries:
|
||||||
|
- "opdavies/global-styling"
|
||||||
|
|
5
web/themes/custom/opdavies/opdavies.libraries.yml
Normal file
5
web/themes/custom/opdavies/opdavies.libraries.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
global-styling:
|
||||||
|
css:
|
||||||
|
base:
|
||||||
|
css/tailwind.css:
|
||||||
|
minified: true
|
39
web/themes/custom/opdavies/templates/block/block.html.twig
Normal file
39
web/themes/custom/opdavies/templates/block/block.html.twig
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{#
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Theme override to display a block.
|
||||||
|
*
|
||||||
|
* Available variables:
|
||||||
|
* - plugin_id: The ID of the block implementation.
|
||||||
|
* - label: The configured label of the block if visible.
|
||||||
|
* - configuration: A list of the block's configuration values.
|
||||||
|
* - label: The configured label for the block.
|
||||||
|
* - label_display: The display settings for the label.
|
||||||
|
* - provider: The module or other provider that provided this block plugin.
|
||||||
|
* - Block plugin specific settings will also be stored here.
|
||||||
|
* - in_preview: Whether the plugin is being rendered in preview mode.
|
||||||
|
* - content: The content of this block.
|
||||||
|
* - attributes: array of HTML attributes populated by modules, intended to
|
||||||
|
* be added to the main container tag of this template.
|
||||||
|
* - id: A valid HTML ID and guaranteed unique.
|
||||||
|
* - title_attributes: Same as attributes, except applied to the main title
|
||||||
|
* tag that appears in the template.
|
||||||
|
* - title_prefix: Additional output populated by modules, intended to be
|
||||||
|
* displayed in front of the main title tag that appears in the template.
|
||||||
|
* - title_suffix: Additional output populated by modules, intended to be
|
||||||
|
* displayed after the main title tag that appears in the template.
|
||||||
|
*
|
||||||
|
* @see template_preprocess_block()
|
||||||
|
*/
|
||||||
|
#}
|
||||||
|
<div{{ attributes }}>
|
||||||
|
{{ title_prefix }}
|
||||||
|
{% if label %}
|
||||||
|
<h2{{ title_attributes.addClass('text-xl font-bold') }}>{{ label }}</h2>
|
||||||
|
{% endif %}
|
||||||
|
{{ title_suffix }}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{{ content }}
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
|
@ -0,0 +1,19 @@
|
||||||
|
{#
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Theme override for page titles.
|
||||||
|
*
|
||||||
|
* Available variables:
|
||||||
|
* - title_attributes: HTML attributes for the page title element.
|
||||||
|
* - title_prefix: Additional output populated by modules, intended to be
|
||||||
|
* displayed in front of the main title tag that appears in the template.
|
||||||
|
* - title: The page title, for use in the actual content.
|
||||||
|
* - title_suffix: Additional output populated by modules, intended to be
|
||||||
|
* displayed after the main title tag that appears in the template.
|
||||||
|
*/
|
||||||
|
#}
|
||||||
|
{{ title_prefix }}
|
||||||
|
{% if title %}
|
||||||
|
<h1{{ title_attributes.addClass('mb-4 text-xl font-bold md:text-2xl') }}>{{ title }}</h1>
|
||||||
|
{% endif %}
|
||||||
|
{{ title_suffix }}
|
|
@ -0,0 +1,62 @@
|
||||||
|
{#
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Theme override for a field.
|
||||||
|
*
|
||||||
|
* To override output, copy the "field.html.twig" from the templates directory
|
||||||
|
* to your theme's directory and customize it, just like customizing other
|
||||||
|
* Drupal templates such as page.html.twig or node.html.twig.
|
||||||
|
*
|
||||||
|
* Instead of overriding the theming for all fields, you can also just override
|
||||||
|
* theming for a subset of fields using
|
||||||
|
* @link themeable Theme hook suggestions. @endlink For example,
|
||||||
|
* here are some theme hook suggestions that can be used for a field_foo field
|
||||||
|
* on an article node type:
|
||||||
|
* - field--node--field-foo--article.html.twig
|
||||||
|
* - field--node--field-foo.html.twig
|
||||||
|
* - field--node--article.html.twig
|
||||||
|
* - field--field-foo.html.twig
|
||||||
|
* - field--text-with-summary.html.twig
|
||||||
|
* - field.html.twig
|
||||||
|
*
|
||||||
|
* Available variables:
|
||||||
|
* - attributes: HTML attributes for the containing element.
|
||||||
|
* - label_hidden: Whether to show the field label or not.
|
||||||
|
* - title_attributes: HTML attributes for the title.
|
||||||
|
* - label: The label for the field.
|
||||||
|
* - multiple: TRUE if a field can contain multiple items.
|
||||||
|
* - items: List of all the field items. Each item contains:
|
||||||
|
* - attributes: List of HTML attributes for each item.
|
||||||
|
* - content: The field item's content.
|
||||||
|
* - entity_type: The entity type to which the field belongs.
|
||||||
|
* - field_name: The name of the field.
|
||||||
|
* - field_type: The type of the field.
|
||||||
|
* - label_display: The display settings for the label.
|
||||||
|
*
|
||||||
|
* @see template_preprocess_field()
|
||||||
|
*/
|
||||||
|
#}
|
||||||
|
{%
|
||||||
|
set title_classes = [
|
||||||
|
label_display == 'visually_hidden' ? 'visually-hidden',
|
||||||
|
]
|
||||||
|
%}
|
||||||
|
|
||||||
|
{%
|
||||||
|
set button_classes = [
|
||||||
|
'inline-flex gap-2 justify-center items-center py-3 px-6 w-full text-base font-medium text-white no-underline rounded-md duration-200 ease-in-out md:w-auto hover:bg-white focus:bg-white border-[2px] border-blue-primary bg-blue-primary transition-color dark:hover:border-white hover:text-blue-primary focus:text-blue-primary',
|
||||||
|
]
|
||||||
|
%}
|
||||||
|
|
||||||
|
{% if label_hidden %}
|
||||||
|
{% for item in items %}
|
||||||
|
<div{{ attributes }}>{{ item.content|add_class(button_classes) }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<div{{ attributes }}>
|
||||||
|
<div{{ title_attributes.addClass(title_classes) }}>{{ label }}</div>
|
||||||
|
{% for item in items %}
|
||||||
|
<div{{ item.attributes }}>{{ item.content|add_class(button_classes) }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
|
@ -0,0 +1,77 @@
|
||||||
|
{#
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Theme override for a field.
|
||||||
|
*
|
||||||
|
* To override output, copy the "field.html.twig" from the templates directory
|
||||||
|
* to your theme's directory and customize it, just like customizing other
|
||||||
|
* Drupal templates such as page.html.twig or node.html.twig.
|
||||||
|
*
|
||||||
|
* Instead of overriding the theming for all fields, you can also just override
|
||||||
|
* theming for a subset of fields using
|
||||||
|
* @link themeable Theme hook suggestions. @endlink For example,
|
||||||
|
* here are some theme hook suggestions that can be used for a field_foo field
|
||||||
|
* on an article node type:
|
||||||
|
* - field--node--field-foo--article.html.twig
|
||||||
|
* - field--node--field-foo.html.twig
|
||||||
|
* - field--node--article.html.twig
|
||||||
|
* - field--field-foo.html.twig
|
||||||
|
* - field--text-with-summary.html.twig
|
||||||
|
* - field.html.twig
|
||||||
|
*
|
||||||
|
* Available variables:
|
||||||
|
* - attributes: HTML attributes for the containing element.
|
||||||
|
* - label_hidden: Whether to show the field label or not.
|
||||||
|
* - title_attributes: HTML attributes for the title.
|
||||||
|
* - label: The label for the field.
|
||||||
|
* - multiple: TRUE if a field can contain multiple items.
|
||||||
|
* - items: List of all the field items. Each item contains:
|
||||||
|
* - attributes: List of HTML attributes for each item.
|
||||||
|
* - content: The field item's content.
|
||||||
|
* - entity_type: The entity type to which the field belongs.
|
||||||
|
* - field_name: The name of the field.
|
||||||
|
* - field_type: The type of the field.
|
||||||
|
* - label_display: The display settings for the label.
|
||||||
|
*
|
||||||
|
* @see template_preprocess_field()
|
||||||
|
*/
|
||||||
|
#}
|
||||||
|
{%
|
||||||
|
set title_classes = [
|
||||||
|
label_display == 'visually_hidden' ? 'visually-hidden',
|
||||||
|
]
|
||||||
|
%}
|
||||||
|
|
||||||
|
{%
|
||||||
|
set prose_classes = [
|
||||||
|
"prose prose-p:text-black prose-a:font-light prose-a:text-blue-primary prose-p:text-lg prose-blockquote:border-blue-primary dark:marker:text-white prose-li:my-1 prose-li:text-lg prose-figcaption:text-white prose-li:text-black marker:text-black dark:prose-p:text-white dark:prose-invert dark:prose-a:text-blue-400 dark:prose-blockquote:border-blue-400 dark:prose-li:text-white hover:prose-a:no-underline prose-h2:text-xl prose-code:font-normal prose-h2:mb-4 prose-ul:my-3 dark:prose-hr:border-grey-400 prose-code:before:content-[''] prose-code:after:content-['']",
|
||||||
|
]
|
||||||
|
%}
|
||||||
|
<div class="{{ prose_classes|join(' ') }}">
|
||||||
|
{% if label_hidden %}
|
||||||
|
{% if multiple %}
|
||||||
|
<div{{ attributes }}>
|
||||||
|
{% for item in items %}
|
||||||
|
<div{{ item.attributes }}>{{ item.content }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
{% for item in items %}
|
||||||
|
<div{{ attributes }}>{{ item.content }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<div{{ attributes }}>
|
||||||
|
<div{{ title_attributes.addClass(title_classes) }}>{{ label }}</div>
|
||||||
|
{% if multiple %}
|
||||||
|
<div>
|
||||||
|
{% endif %}
|
||||||
|
{% for item in items %}
|
||||||
|
<div{{ item.attributes }}>{{ item.content }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% if multiple %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
83
web/themes/custom/opdavies/templates/layout/page.html.twig
Normal file
83
web/themes/custom/opdavies/templates/layout/page.html.twig
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
{#
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Theme override to display a single page.
|
||||||
|
*
|
||||||
|
* The doctype, html, head and body tags are not in this template. Instead they
|
||||||
|
* can be found in the html.html.twig template in this directory.
|
||||||
|
*
|
||||||
|
* Available variables:
|
||||||
|
*
|
||||||
|
* General utility variables:
|
||||||
|
* - base_path: The base URL path of the Drupal installation. Will usually be
|
||||||
|
* "/" unless you have installed Drupal in a sub-directory.
|
||||||
|
* - is_front: A flag indicating if the current page is the front page.
|
||||||
|
* - logged_in: A flag indicating if the user is registered and signed in.
|
||||||
|
* - is_admin: A flag indicating if the user has permission to access
|
||||||
|
* administration pages.
|
||||||
|
*
|
||||||
|
* Site identity:
|
||||||
|
* - front_page: The URL of the front page. Use this instead of base_path when
|
||||||
|
* linking to the front page. This includes the language domain or prefix.
|
||||||
|
*
|
||||||
|
* Page content (in order of occurrence in the default page.html.twig):
|
||||||
|
* - messages: Status and error messages. Should be displayed prominently.
|
||||||
|
* - node: Fully loaded node, if there is an automatically-loaded node
|
||||||
|
* associated with the page and the node ID is the second argument in the
|
||||||
|
* page's path (e.g. node/12345 and node/12345/revisions, but not
|
||||||
|
* comment/reply/12345).
|
||||||
|
*
|
||||||
|
* Regions:
|
||||||
|
* - page.header: Items for the header region.
|
||||||
|
* - page.primary_menu: Items for the primary menu region.
|
||||||
|
* - page.secondary_menu: Items for the secondary menu region.
|
||||||
|
* - page.highlighted: Items for the highlighted content region.
|
||||||
|
* - page.help: Dynamic help text, mostly for admin pages.
|
||||||
|
* - page.content: The main content of the current page.
|
||||||
|
* - page.sidebar_first: Items for the first sidebar.
|
||||||
|
* - page.sidebar_second: Items for the second sidebar.
|
||||||
|
* - page.footer: Items for the footer region.
|
||||||
|
* - page.breadcrumb: Items for the breadcrumb region.
|
||||||
|
*
|
||||||
|
* @see template_preprocess_page()
|
||||||
|
* @see html.html.twig
|
||||||
|
*/
|
||||||
|
#}
|
||||||
|
<div class="min-h-screen font-sans text-base font-light md:text-xl dark:text-white text-grey-900 selection:bg-blue-primary selection:text-white dark:bg-grey-900 dark:selection:bg-blue-primary dark:selection:text-white">
|
||||||
|
<div class="py-4 px-4 mx-auto max-w-xl">
|
||||||
|
<div class="py-10 px-6 mx-auto max-w-xl md:py-10">
|
||||||
|
<header class="flex flex-col justify-between items-center md:flex-row">
|
||||||
|
<div class="flex flex-col justify-between items-center md:flex-row">
|
||||||
|
<div>
|
||||||
|
<a href="/">
|
||||||
|
<svg aria-hidden="true" class="w-16 h-16 fill-current dark:text-blue-400 text-blue-primary md:w-18 md:h-18" viewBox="0 0 706 504" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M456.5 1.1c-12.3 1.5-31 5.5-44.1 9.4-12.7 3.9-63.6 24.6-64.1 26.2-.2.5 1.4 1.7 3.4 2.7 2.1 1 8.9 5.1 15.1 9.2l11.2 7.5 14.5-6c22.9-9.5 37.3-14 57.5-17.8 7.2-1.3 14.7-1.7 31-1.8 18.6 0 23.1.3 33 2.3 22 4.5 46.1 13.9 64.5 25.2 39.3 24.2 69.9 65.3 86.9 116.5 16.3 49.2 13 100.2-9.4 145.3-21.8 43.7-49.2 68.8-101.5 92.9-13.4 6.2-120.1 51.3-121.3 51.3-.5 0-15.7-35.1-33.7-78l-32.8-78 3.1-12.8c4.4-18 5.6-29.5 4.9-48.5-.6-16.8-2-25.7-6.3-38.7-12-35.8-40.8-69.2-74-85.6l-7.2-3.6-4.2-10c-2.4-5.6-3.9-10.3-3.4-10.7.5-.5 9.7-4.5 20.4-9s19.9-8.6 20.4-9.1c1.5-1.5-18.6-10.1-32.3-13.9l-6.8-1.9-20.6 8.7c-11.4 4.8-20.9 8.9-21.2 9.2-.2.3 2 6.3 5 13.3 3 7 5.5 12.8 5.5 12.9 0 .1-7.5.2-16.7.2-11.8.1-19.4.6-25.6 1.8-27.3 5.5-50.5 17.6-70.4 37-21.8 21.2-36.7 49-43 80.2-2.4 12.3-2.4 44 0 57.2 3.6 19.4 11.9 40.4 22.3 56 6.9 10.4 21.1 25.4 31.2 33 29.9 22.5 70.8 33.2 106.2 27.8 18.9-2.8 39.3-10.6 54.1-20.5 13.5-9.1 29.1-23.8 37.6-35.5 1.2-1.7 2.4-2.8 2.7-2.5.3.3 15.6 36.6 34.1 80.5 18.5 44 33.8 80.1 33.9 80.3.8.8 144.9-60.8 162.1-69.3 45.5-22.4 73.4-47.1 95.7-84.7 28-47.4 37.5-99.7 27.8-153.5-6.8-37.6-25-79-48.6-110.3-33.2-44.1-83-74.2-138.4-83.6-11.4-1.9-46.9-2.7-58.5-1.3zM259.2 141.4c42.4 10.9 77.8 50 84.8 93.8 1.6 9.9.8 34.5-1.4 44.8-5.2 24-15.5 43-32.6 60-20.7 20.6-42.8 31.3-67.7 32.7-26.9 1.5-53.2-6.2-74.3-21.7-29.4-21.7-46-56.2-46-95.7 0-45.4 27.2-89.6 66.1-107.2 8.2-3.7 21.7-7.9 29.4-9.1 10.4-1.6 30.8-.4 41.7 2.4z"></path>
|
||||||
|
<path d="M201 20.6c-83 11.2-157 71-186.5 150.8-22.3 60.3-18.3 134.9 10.2 192 21.5 43.1 59.6 81.6 102.1 103.4 21.1 10.9 46.3 19 71.2 22.9 16.2 2.5 53.1 2.5 68.5 0 25.9-4.2 45.2-10.5 69-22.2 14.4-7.1 39.7-23.2 41.8-26.7.8-1.2-.2-4.6-4.3-14.5-2.9-7-5.7-13.2-6.1-13.7-.5-.5-4.3 1.7-8.6 5.1C320 447.1 277.6 462 232 462c-59.8 0-115.2-26.3-154.8-73.5-32.2-38.3-48.8-88.7-46.9-142 2-53.7 22.1-99.6 60.7-138.5 28.1-28.3 63-47.2 102.9-55.7 11.9-2.6 14.1-2.8 38.6-2.8 28.3 0 39.4 1.3 59 7 27.9 8.1 58.5 26.1 80.9 47.6l10.9 10.5-14.3 6c-7.8 3.2-14.5 6.4-14.7 7-.2.7 16.5 41.3 37.1 90.4 20.7 49.1 37.6 90.1 37.6 91.1 0 3.4-7.1 24.2-11.6 33.8-2.4 5.1-6.6 13.1-9.4 17.7l-5 8.3 6.6 15.6c5.5 12.9 6.9 15.4 8 14.4 2.8-2.3 19.2-27.8 24.4-37.9l5.3-10.3 8.3 19.8c4.7 10.9 8.7 20.1 8.9 20.3.6.6 60.8-24.6 74.5-31.2 29.7-14.2 52.7-35.8 65.3-61.1 16.9-34 17.6-70.8 2.2-112-17-45.3-45.8-76.7-82.5-90-18.2-6.5-43.1-9.1-63.5-6.5-11.5 1.4-30 5.8-40.3 9.5l-7.3 2.6L402.3 91c-20.3-21.3-37.9-34.3-65.4-48.3-33.4-17.1-63.7-23.8-105.9-23.6-10.7.1-24.2.7-30 1.5zM504.5 122c9.2 2.5 22.1 8.3 29.2 13.1 6.9 4.7 18.7 16.3 24.3 23.9 15.1 20.6 26.3 49 29 74 2.3 20.7-3.1 43-14.5 60.5-8.7 13.3-27.6 29.5-44.5 38-6 3.1-47.3 20.6-47.5 20.2-1.1-1.6-87.5-208-87.3-208.3.2-.2 7.4-3.3 15.8-6.9 22.5-9.5 33.8-13 55-16.9 1.4-.2 9.3-.3 17.5-.1 11.5.2 16.9.8 23 2.5z"></path>
|
||||||
|
</svg>
|
||||||
|
<span class="sr-only">Oliver Davies</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{ page.highlighted }}
|
||||||
|
{{ page.help }}
|
||||||
|
|
||||||
|
<main role="main">
|
||||||
|
<a id="main-content" tabindex="-1"></a>{# link is in html.html.twig #}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ page.content }}
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
{{ page.primary_menu }}
|
||||||
|
|
||||||
|
{% if page.footer %}
|
||||||
|
<footer role="contentinfo">
|
||||||
|
{{ page.footer }}
|
||||||
|
</footer>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,94 @@
|
||||||
|
{#
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Theme override to display a node.
|
||||||
|
*
|
||||||
|
* Available variables:
|
||||||
|
* - node: The node entity with limited access to object properties and methods.
|
||||||
|
* Only method names starting with "get", "has", or "is" and a few common
|
||||||
|
* methods such as "id", "label", and "bundle" are available. For example:
|
||||||
|
* - node.getCreatedTime() will return the node creation timestamp.
|
||||||
|
* - node.hasField('field_example') returns TRUE if the node bundle includes
|
||||||
|
* field_example. (This does not indicate the presence of a value in this
|
||||||
|
* field.)
|
||||||
|
* - node.isPublished() will return whether the node is published or not.
|
||||||
|
* Calling other methods, such as node.delete(), will result in an exception.
|
||||||
|
* See \Drupal\node\Entity\Node for a full list of public properties and
|
||||||
|
* methods for the node object.
|
||||||
|
* - label: (optional) The title of the node.
|
||||||
|
* - content: All node items. Use {{ content }} to print them all,
|
||||||
|
* or print a subset such as {{ content.field_example }}. Use
|
||||||
|
* {{ content|without('field_example') }} to temporarily suppress the printing
|
||||||
|
* of a given child element.
|
||||||
|
* - author_picture: The node author user entity, rendered using the "compact"
|
||||||
|
* view mode.
|
||||||
|
* - metadata: Metadata for this node.
|
||||||
|
* - date: (optional) Themed creation date field.
|
||||||
|
* - author_name: (optional) Themed author name field.
|
||||||
|
* - url: Direct URL of the current node.
|
||||||
|
* - display_submitted: Whether submission information should be displayed.
|
||||||
|
* - attributes: HTML attributes for the containing element.
|
||||||
|
* The attributes.class element may contain one or more of the following
|
||||||
|
* classes:
|
||||||
|
* - node: The current template type (also known as a "theming hook").
|
||||||
|
* - node--type-[type]: The current node type. For example, if the node is an
|
||||||
|
* "Article" it would result in "node--type-article". Note that the machine
|
||||||
|
* name will often be in a short form of the human readable label.
|
||||||
|
* - node--view-mode-[view_mode]: The View Mode of the node; for example, a
|
||||||
|
* teaser would result in: "node--view-mode-teaser", and
|
||||||
|
* full: "node--view-mode-full".
|
||||||
|
* The following are controlled through the node publishing options.
|
||||||
|
* - node--promoted: Appears on nodes promoted to the front page.
|
||||||
|
* - node--sticky: Appears on nodes ordered above other non-sticky nodes in
|
||||||
|
* teaser listings.
|
||||||
|
* - node--unpublished: Appears on unpublished nodes visible only to site
|
||||||
|
* admins.
|
||||||
|
* - title_attributes: Same as attributes, except applied to the main title
|
||||||
|
* tag that appears in the template.
|
||||||
|
* - content_attributes: Same as attributes, except applied to the main
|
||||||
|
* content tag that appears in the template.
|
||||||
|
* - author_attributes: Same as attributes, except applied to the author of
|
||||||
|
* the node tag that appears in the template.
|
||||||
|
* - title_prefix: Additional output populated by modules, intended to be
|
||||||
|
* displayed in front of the main title tag that appears in the template.
|
||||||
|
* - title_suffix: Additional output populated by modules, intended to be
|
||||||
|
* displayed after the main title tag that appears in the template.
|
||||||
|
* - view_mode: View mode; for example, "teaser" or "full".
|
||||||
|
* - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'.
|
||||||
|
* - page: Flag for the full page state. Will be true if view_mode is 'full'.
|
||||||
|
* - readmore: Flag for more state. Will be true if the teaser content of the
|
||||||
|
* node cannot hold the main body content.
|
||||||
|
* - logged_in: Flag for authenticated user status. Will be true when the
|
||||||
|
* current user is a logged-in member.
|
||||||
|
* - is_admin: Flag for admin user status. Will be true when the current user
|
||||||
|
* is an administrator.
|
||||||
|
*
|
||||||
|
* @see template_preprocess_node()
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#}
|
||||||
|
<article{{ attributes }}>
|
||||||
|
|
||||||
|
{{ title_prefix }}
|
||||||
|
{% if label and not page %}
|
||||||
|
<h2{{ title_attributes }}>
|
||||||
|
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
|
||||||
|
</h2>
|
||||||
|
{% endif %}
|
||||||
|
{{ title_suffix }}
|
||||||
|
|
||||||
|
{% if display_submitted %}
|
||||||
|
<footer>
|
||||||
|
{{ author_picture }}
|
||||||
|
<div{{ author_attributes }}>
|
||||||
|
{% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
|
||||||
|
{{ metadata }}
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div{{ content_attributes.addClass('space-y-10') }}>
|
||||||
|
{{ content }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</article>
|
Loading…
Reference in a new issue