Skip to content

Commit

Permalink
fix code examples in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mkszepp committed Aug 4, 2023
1 parent ceb643d commit 2bec6f9
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions docs/app/templates/cookbook.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ route to the <em>posts</em> route. The reverse call indicates what should happen
<h3>2. Replace outlets in your templates</h3>

<p>Now we have defined our transitions, the next step is to replace Embers native <code>\{{outlet}}</code> in your
template files. You should replace it with the outlet component by Liquid Fire: <code>\{{#liquid-outlet}}</code>. It is
template files. You should replace it with the outlet component by Liquid Fire: <code>&lt;LiquidOutlet /&gt;</code>. It is
most likely that you will find this <code>\{{outlet}}</code> in your application template file. So now your
<em>app/templates/application.hbs</em> might look like this.</p>

Expand Down Expand Up @@ -56,7 +56,7 @@ place a new liquid outlet component, so the file looks like this.</p>
And click it. You will now see (another build-in) cross-fade transition!</p>

<p>Remember, you will have to include a
<code>\{{liquid-outlet}}</code> in any nested route's master template. Otherwise, there will be no transition visible.
<code>&lt;LiquidOutlet /&gt;</code> in any nested route's master template. Otherwise, there will be no transition visible.
This is how Ember works. A nested master template contains <code>\{{outlet}}</code> by default and you should overwrite
it with a <code>\{{liquid-outlet}}</code>. But that is easy, right?</p>
it with a <code>&lt;LiquidOutlet /&gt;</code>. But that is easy, right?</p>

6 changes: 3 additions & 3 deletions docs/app/templates/helpers-documentation/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<dt>
{{!-- template-lint-disable no-invalid-link-text --}}
<LinkTo @route="helpers-documentation.liquid-outlet">
\{{liquid-outlet}}
&lt;LiquidOutlet /&gt;
</LinkTo>
</dt>
<dd>
Expand All @@ -18,7 +18,7 @@
<dt>
{{!-- template-lint-disable no-invalid-link-text --}}
<LinkTo @route="helpers-documentation.liquid-bind">
\{{#liquid-bind}}
&lt;LiquidBind&gt; &lt;/LiquidBind&gt;
</LinkTo>
</dt>
<dd>
Expand All @@ -38,7 +38,7 @@
<dt>
{{!-- template-lint-disable no-invalid-link-text --}}
<LinkTo @route="helpers-documentation.liquid-spacer">
\{{#liquid-spacer}}
&lt;LiquidSpacer&gt; &lt;/LiquidSpacer&gt;
</LinkTo>
</dt>
<dd>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{{! template-lint-disable no-unbalanced-curlies }}

<h2>
\{{#liquid-bind}} with a block
&lt;LiquidBind /&gt; with a block
</h2>

<p>
If you pass a block to\{{#liquid-bind}}, each new version of your
If you pass a block to <code>&lt;LiquidBind /&gt;</code>, each new version of your
bound value will cause the block to render
</p>

Expand Down
8 changes: 4 additions & 4 deletions docs/app/templates/helpers-documentation/liquid-bind.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{!-- template-lint-disable no-unbalanced-curlies --}}

<h2>
\{{liquid-bind}}
&lt;LiquidBind /&gt;
</h2>

<p>
Expand All @@ -12,12 +12,12 @@ map to decide how to animate when the bound value changes.
<p>
Saying
<code>
\{{liquid-bind value=someValue}}
&lt;LiquidBind @value=\{{this.someValue}} /&gt;
</code>
is a drop-in
replacement for
<code>
\{{someValue}}
\{{this.someValue}}
</code>
, except this wraps the
content in markup so that it can be targeted for animation. See the
Expand All @@ -31,7 +31,7 @@ Options
<p>
There is also a block form of
<code>
\{{#liquid-bind}}
&lt;LiquidBind&gt; &lt;/LiquidBind&gt;
</code>
that
is
Expand Down
2 changes: 1 addition & 1 deletion docs/app/templates/helpers-documentation/liquid-if.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ normal

<p>
<code>
\{{#liquid-unless}}
&lt;LiquidUnless&gt; &lt;/LiquidUnless&gt;
</code>
is the complement to
<code>
Expand Down
4 changes: 2 additions & 2 deletions docs/app/templates/helpers-documentation/liquid-outlet.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{!-- template-lint-disable no-unbalanced-curlies --}}

<h2>
\{{liquid-outlet}}
&lt;LiquidOutlet /&gt;
</h2>

<p>
Expand Down Expand Up @@ -43,7 +43,7 @@
does,
including named outlets (like
<code>
\{{liquid-outlet inputOutletName="sidebar"}}
&lt;LiquidOutlet @inputOutletName="sidebar" /&gt;
</code>
).
</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/app/templates/helpers-documentation/liquid-spacer.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{! template-lint-disable no-unbalanced-curlies }}

<h2>
\{{#liquid-spacer}}
&lt;LiquidSpacer /&gt;
</h2>

<p>
<code>
\{{#liquid-spacer}}
&lt;LiquidSpacer /&gt;
</code>
is a component that animates its
own width and height to match the width and height of its
Expand Down
2 changes: 1 addition & 1 deletion docs/app/templates/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ template helpers, the transition map, and transitions.</p>
<h4>Template Helpers</h4>

<p>The library provides helpers
like <code>\{{liquid-outlet}}</code>, <code>\{{liquid-if}}</code>,
like <code>&lt;LiquidOutlet /&gt;</code>, <code>&lt;LiquidIf /&gt;</code>,
etc, that are nearly drop-in replacements for the equivalent normal
Ember helpers. The key difference is that they don't update instantly
when bound data changes. Instead they consult your application's
Expand Down
6 changes: 3 additions & 3 deletions docs/app/templates/transition-map/outlet-constraints.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
The following constraint applies to oulet names.
It will only work with
<code>
\{{liquid-outlet}}
&lt;LiquidOutlet /&gt;
</code>
because only
<code>
\{{liquid-outlet}}
&lt;LiquidOutlet /&gt;
</code>
has access to it's own name.
(The other helpers like
<code>
\{{liquid-if}}
&lt;LiquidIf /&gt;
</code>
) don't know anything about outlets.)
</p>
Expand Down
8 changes: 4 additions & 4 deletions docs/app/templates/transition-map/route-constraints.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<p>
The following three constraints apply to route names. They will only work with
<code>
\{{liquid-outlet}}
&lt;LiquidOutlet /&gt;
</code>
because only
<code>
\{{liquid-outlet}}
&lt;LiquidOutlet /&gt;
</code>
has visibility into routes. (The other helpers like
<code>
\{{liquid-if}}
&lt;LiquidIf /&gt;
</code>
) don't know anything about routes.)
</p>
Expand Down Expand Up @@ -55,7 +55,7 @@ those.
The next three constraint apply to routes' models. They too only
work with
<code>
\{{liquid-outlet}}
&lt;LiquidOutlet /&gt;
</code>
.
</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/app/templates/transition-map/value-constraints.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<ul>
<li>
<code>
\{{liquid-bind}}
&lt;LiquidBind /&gt;
</code>
match against its own bound contexts.
</li>
<li>
<code>
\{{liquid-if}}
&lt;LiquidIf /&gt;
</code>
matches against its predicate.
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/app/templates/transitions/defining.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ transition is done.</p>

<dd>The corresponding values that go with your old and new states
(this is the valued passed into a helper like
<code>\{{liquid-bind}}</code>).</dd>
<code>&lt;LiquidBind /&gt;</code>).</dd>

<dt><code>oldView, newView</code></dt>

Expand Down

0 comments on commit 2bec6f9

Please sign in to comment.