onomasticon.html.twig in Onomasticon 8
{#
if ($cursor != 'default') {
$cursor_class = ' onomasticon-cursor-' . $cursor;
}
#}
{{ attach_library('onomasticon/default') }}
{% set attributes = create_attribute() %}
{%
set classes = [
'onomasticon',
implement == 'extra_element' ? 'onomasticon-extra-element',
implement == 'extra_element' ? 'onomasticon-orientation-' ~ orientation,
cursor == default ? '' : 'onomasticon-cursor-' ~ cursor,
]
%}
{% if implement == 'extra_element' %}
<{{ tag }} {{ attributes.addClass(classes) }} tabindex="0" title="{{ needle }}">
<button disabled="disabled" class="onomasticon-term-description">{{ description }}{% if termlink %}<p><a href="{{ termpath }}" class="use-ajax" data-dialog-type="dialog" data-dialog-renderer="off_canvas" data-dialog-options="" title="{{ needle }}">read more</a></p>{% endif %}</button>
</{{ tag }}>
{% else %}
<{{ tag }} {{ attributes.addClass(classes) }} title="{{ description }}">{{ needle }}</{{ tag }}>
{% endif %}
File
templates/onomasticon.html.twig
View source
- {#
-
- if ($cursor != 'default') {
- $cursor_class = ' onomasticon-cursor-' . $cursor;
- }
-
- #}
-
- {{ attach_library('onomasticon/default') }}
-
- {% set attributes = create_attribute() %}
-
- {%
- set classes = [
- 'onomasticon',
- implement == 'extra_element' ? 'onomasticon-extra-element',
- implement == 'extra_element' ? 'onomasticon-orientation-' ~ orientation,
- cursor == default ? '' : 'onomasticon-cursor-' ~ cursor,
- ]
- %}
-
- {% if implement == 'extra_element' %}
- <{{ tag }} {{ attributes.addClass(classes) }} tabindex="0" title="{{ needle }}">
- <button disabled="disabled" class="onomasticon-term-description">{{ description }}{% if termlink %}<p><a href="{{ termpath }}" class="use-ajax" data-dialog-type="dialog" data-dialog-renderer="off_canvas" data-dialog-options="" title="{{ needle }}">read more</a></p>{% endif %}</button>
- </{{ tag }}>
- {% else %}
- <{{ tag }} {{ attributes.addClass(classes) }} title="{{ description }}">{{ needle }}</{{ tag }}>
- {% endif %}