This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# v2 #} | |
{% if pagination_list is defined %} | |
{% js %} | |
// AJAX REQUEST DATA | |
{% set current_url = craft.request.getRequestUri()|split(craft.request.getPath())[0]~craft.request.getPath() %} | |
{% set ajax_data = { | |
current_url: current_url, | |
pagination_list: pagination_list|hash, | |
pagination_parameters: pagination_parameters ?? null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- macro svg(path, attributes = null, alt = null) -%} | |
{# v1 #} | |
{# settings #} | |
{% set directory = 'svg' %} | |
{# logic #} | |
{% if path is defined and path is not empty %} | |
{% set svg = svg('@webroot/'~directory~'/'~path~'.svg', namespace=true) %} | |
{% if alt %} | |
{% set svg = svg|prepend('<title>'~alt~'</title>') %} | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# v6 #} | |
{# USAGE: | |
{% embed '_components/modal' with { | |
modalHandle: 'exampleHandle' | |
} %} | |
{% block modalContent %} | |
SOMETHING INSIDE | |
{% endblock %} | |
{% endembed %} | |
#} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[data-neo-b].blocktype{ | |
font-size: 1.1rem; | |
background-color: #03A9F4; | |
color: white; | |
padding-left: 3rem !important; | |
padding-right: 3rem !important; | |
} | |
.ni_block{ | |
border: 2px solid rgb(3 169 244 / 50%) !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form class="js-contact-form"> | |
<fieldset class="js-contact-form-fieldset"> | |
{{ csrfInput() }} | |
<div class="field"> | |
{{tag('label', { | |
for: 'form-email', | |
class: 'label', | |
text: 'Your Email'|t('contact-form'), | |
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# settings #} | |
{% set map = include('usa.svg') %} | |
{% set mapLinks = entry.mapLinks.all() %} | |
{# logic #} | |
{% set map = map|retconRemove('style') %} | |
{% set regionsUsed = [] %} | |
{% for link in mapLinks %} | |
{% if link.linkRegion is not empty and link.linkEntry.exists() and link.linkRegion not in regionsUsed %} | |
{% set regionsUsed = regionsUsed|merge([link.linkRegion]) %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ craft.navigation.nodes().ancestorOf( craft.navigation.nodes('test').all()|filter(x => x.element.id == id)|first.id ).ancestorDist(1).one().element.uri ?? null }}/{{slug}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- macro linkList(entries) -%} | |
{{entries | |
|map(singleElement => "<a href='#{singleElement.url}'>#{singleElement.title}</a>") | |
|join(', ') | |
|raw}} | |
{%- endmacro -%} |