Anatomy of a d9site custom block

When working with custom blocks on a d9 site there is a certain structure and layout.

This is an example of the custom_text block layout:

{%
  set classes = [
    'block',
    'block-' ~ configuration.provider|clean_class,
    'block--type-' ~ bundle|clean_class,
    'block--view-mode-' ~ view_mode|clean_class
  ]
%}
{{ attach_library('d9blocks_custom_text/d9blocks_custom_text') }}
<div{{ attributes.addClass(classes) }}>
  {% if label %}
    {{ title_prefix }}
<div class="title">
    <h2{{ title_attributes }}>{{ label }}</h2>
{# /title #}
</div>
{{ title_suffix }}
  {% endif %}
<div class="block-wrap">
{% block content %}
<div{{ content_attributes.addClass('content', 'body-copy') }}>
{{ content.field_block_body.0 }}
{{ content.field_block_text.0 }}
{# /content #}
</div>
{# /block-wrap #}
</div>
{% endblock %}
{# /block #}
</div>