| {# Block partial: note (standalone or inline-parts) #} |
| {% if block.data.inline and block.data.parts %} |
| <div class="{{ block.css_class | default('hb-note') }}"> |
| {% for part in block.data.parts %} |
| {% if part.style == 'red_bold' %} |
| <strong class="hb-note-keyword">{{ part.text | e }}</strong> |
| {% elif part.style == 'bold' %} |
| <strong>{{ part.text | e }}</strong> |
| {% elif part.style == 'italic' %} |
| <em>{{ part.text | e }}</em> |
| {% else %} |
| {{ part.text | e }} |
| {% endif %} |
| {% endfor %} |
| </div> |
| {% else %} |
| <div class="{{ block.css_class | default('hb-note') }}"> |
| {% set text = block.data.text | default('') %} |
| {# Highlight NOTE / ONLY IF keywords in bold + red; rest stays bold via CSS #} |
| {% if text.upper().startswith('NOTE:') %} |
| <span class="hb-note-keyword">NOTE:</span> {{ text[5:] | e }} |
| {% elif text.upper().startswith('NOTE ') %} |
| <span class="hb-note-keyword">NOTE</span> {{ text[4:] | e }} |
| {% elif text.upper().startswith('NOTE') %} |
| <span class="hb-note-keyword">NOTE</span>{{ text[4:] | e }} |
| {% elif text.upper().startswith('ONLY IF:') %} |
| <span class="hb-note-keyword">ONLY IF:</span> {{ text[8:] | e }} |
| {% elif text.upper().startswith('ONLY IF') %} |
| <span class="hb-note-keyword">ONLY IF</span> {{ text[7:] | e }} |
| {% else %} |
| {{ text | e }} |
| {% endif %} |
| </div> |
| {% endif %} |