mirror of
https://github.com/kemko/liquid.git
synced 2026-01-04 17:25:41 +03:00
Begin work on input/output standardization
This commit is contained in:
@@ -64,7 +64,7 @@ li {
|
||||
/** Headings */
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 300;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/** Links */
|
||||
@@ -87,6 +87,7 @@ h1 {
|
||||
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
h3 {
|
||||
|
||||
@@ -1,23 +1,9 @@
|
||||
.content__item {
|
||||
margin-bottom: $spacing-unit * 2;
|
||||
|
||||
h3 {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.content__list {
|
||||
|
||||
h1 {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-top: $spacing-unit * 2;
|
||||
}
|
||||
.code--input {
|
||||
&:before {
|
||||
content: 'stuff'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title: Handles
|
||||
---
|
||||
|
||||
sss A handle is used to access the attributes of a Liquid object. By default, the handle is the object's title in lowercase with any spaces and special characters replaced by hyphens (-).
|
||||
A handle is used to access the attributes of a Liquid object. By default, the handle is the object's title in lowercase with any spaces and special characters replaced by hyphens (-).
|
||||
|
||||
For example, a page with the title "About Us" can be accessed in Liquid via its handle `about-us` as shown below:
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ title: Operators
|
||||
|
||||
Liquid includes many logical and comparison operators.
|
||||
|
||||
### Basic Operators
|
||||
## Basic Operators
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
@@ -63,7 +63,7 @@ You can use multiple operators in a tag:
|
||||
{% endraw %}{% endhighlight %}
|
||||
</div>
|
||||
|
||||
### contains
|
||||
## contains
|
||||
|
||||
`contains` checks for the presence of a substring inside a string.
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ The current user is
|
||||
|
||||
Arrays hold lists of variables of any type.
|
||||
|
||||
#### Accessing items in arrays
|
||||
### Accessing items in arrays
|
||||
|
||||
To access all of the items in an array, you can loop through each item in the array using a [for](/tags/#for) or [tablerow](/tags/#tablerow) tag.
|
||||
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
---
|
||||
title: Control Flow
|
||||
---
|
||||
|
||||
TAGS!
|
||||
|
||||
## case/when
|
||||
|
||||
<p>Creates a switch statement to compare a variable with different values. <code>case</code> initializes the switch statement, and <code>when</code> compares its values.</p>
|
||||
|
||||
<p class="input">Input</p>
|
||||
|
||||
<div>
|
||||
<p >Input</p>
|
||||
<div class="code--input">
|
||||
{% highlight html %}{% raw %}
|
||||
{% assign handle = 'cake' %}
|
||||
{% case handle %}
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
sss
|
||||
|
||||
{{ site.collections["tags"] }}
|
||||
|
||||
{% for doc in site.collections["tags"].docs %}
|
||||
|
||||
{% endfor %}
|
||||
@@ -7,7 +7,7 @@ Variable Tags are used to create new Liquid variables.
|
||||
|
||||
|
||||
|
||||
### assign
|
||||
## assign
|
||||
|
||||
<p>Creates a new variable.</p>
|
||||
|
||||
@@ -50,7 +50,7 @@ bar
|
||||
</div>
|
||||
|
||||
|
||||
### capture
|
||||
## capture
|
||||
|
||||
<p>Captures the string inside of the opening and closing tags and assigns it to a variable. Variables created through {% capture %} are strings.</p>
|
||||
|
||||
@@ -72,46 +72,7 @@ I am being captured.
|
||||
{% endraw %}{% endhighlight %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### increment
|
||||
## increment
|
||||
|
||||
Creates a new number variable, and increases its value by one every time it is called. The initial value is 0.
|
||||
|
||||
@@ -161,13 +122,7 @@ In the example below, a variable named "var" is created through <code>assign</co
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### decrement
|
||||
## decrement
|
||||
|
||||
Creates a new number variable, and decreases its value by one every time it is called. The initial value is -1.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user