I've moved this to a proper GitHub project at https://github.com/andrewfairlie/good-feedback
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
vcl 4.0; | |
backend default { | |
.host = "127.0.0.1"; # The domain or IP address of your ExpressionEngine Site | |
.port = "8080"; # The port of your EE site. In production, Varnish should be on port 80, so consider changing your Apache server to port 8080 | |
.probe = { | |
.url = "/"; | |
.timeout = 1000ms; | |
.interval = 1s; | |
.window = 10; |
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
{% if block|length>1 %} | |
{ | |
"role": "gallery", | |
"layout": "galleryLayout", | |
"behavior": { | |
"type": "parallax", | |
"factor": 0.8 | |
}, | |
"items": [ | |
{% for image in block %} |
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
{# Define our macro #} | |
{% macro card(title,content) %} | |
<div class="card"> | |
<h2>{{ title }}</h2> | |
{{ content }} | |
</div> | |
{% endmacro %} | |
{# Import the macro, here we use _self but usually it'll be a separate file #} | |
{% import _self as ui %} |
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
{# Define our macro #} | |
{% macro card(title,content,img,url) %} | |
{% if url %}<a href="{{ url }}">{% endif %} | |
<div class="card"> | |
{% if img %}<img src="{{ img }}">{% endif %} | |
<h2>{{ title }}</h2> | |
{{ content }} | |
</div> | |
{% if url %}</a>{% 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
{{ ui.card('Card Title','Hello World',null,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
{# Define our macro #} | |
{% macro card(attributes) %} | |
{% if attributes.url %}<a href="{{ attributes.url }}">{% endif %} | |
<div class="card"> | |
{% if attributes.img %}<img src="{{ attributes.img }}">{% endif %} | |
<h2>{{ attributes.title }}</h2> | |
{{ attributes.content }} | |
</div> | |
{% if attributes.url %}</a>{% 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
{# Define our macro #} | |
{% macro card(attributes) %} | |
{% set defaults = { | |
scheme: 'light', | |
size: 'standard' | |
} %} | |
{# Merge our two arrays together #} | |
{% set attributes = defaults|merge(attributes) %} | |
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
{% for randomFact in craft.entries.section('fact').order('RAND()').one() %} | |
{ | |
"speech": "{{ randomFact.fact }}", | |
"displayText": "{{ randomFact.fact }}" | |
} |
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
{% set randomFact = craft.entries.section('fact').order('RAND()').one() %} | |
{ | |
"fulfillmentText": "{{ randomFact.fact }}" | |
} |
OlderNewer