mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
35 lines
873 B
Plaintext
35 lines
873 B
Plaintext
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Inline Snippets</title>
|
|
|
|
|
|
<body>
|
|
<div class="liquid" style="font-size: 56px;">
|
|
{% assign foo = true %}
|
|
{% assign link = "variable" %}
|
|
|
|
{% snippet main %}
|
|
{% assign foo = false %}
|
|
<p>Hi {{ arg | upcase }}!!!</p>
|
|
|
|
<p>This is an inline snippet</p>
|
|
|
|
<ul>
|
|
<li><a href="/wow-a-link">wow a {{ link }}</a></li>
|
|
<li>1 + 1 = {{ 1 | plus: 1 }}</li>
|
|
<li>{% if true %}Yes!{% endif %}</li>
|
|
<li>foo = {% if foo %}true{%else%}false{% endif %}</li>
|
|
<li>{{ missing_var | default: 'fallback' }}</li>
|
|
</ul>
|
|
{% endsnippet %}
|
|
|
|
{% render main, arg: 'lsf', ... %}
|
|
{{ foo }}
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|