false values honored for references
This commit is contained in:
parent
b7d0f50487
commit
a3cfd63839
|
@ -46,6 +46,10 @@ Here's the more verbose output:
|
|||
|
||||
{{% wcag include="2.1.1, 4.1.2" descriptions="true" %}}
|
||||
|
||||
{{% note %}}
|
||||
Both omitting the `descriptions` attribute and including it with a "false" value will omit descriptions. If it is included it _must_ have a value. A boolean attribute will break the output.
|
||||
{{% /note %}}
|
||||
|
||||
## Inclusive Design Principle references
|
||||
|
||||
Some inclusive design concepts are not reducible to success or fail criteria. This is why The Paciello Group wrote the [Inclusive Design Principles](http://inclusivedesignprinciples.org/). These can be listed by name.
|
||||
|
|
|
@ -786,14 +786,25 @@ I can reference the {{% pattern "Notes & warnings" %}} pattern here.
|
|||
</ul>
|
||||
|
||||
|
||||
<aside aria-label="note" class="note">
|
||||
<div>
|
||||
<svg class="sign" aria-hidden="true" viewBox="0 0 41.667306 41.66729" focusable="false">
|
||||
<use xlink:href="#info"></use>
|
||||
</svg>
|
||||
<p>Both omitting the <code>descriptions</code> attribute and including it with a “false” value will omit descriptions. If it is included it <em>must</em> have a value. A boolean attribute will break the output.</p>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
<h2 id="inclusive-design-principle-references">Inclusive Design Principle references</h2>
|
||||
|
||||
<p>Some inclusive design concepts are not reducible to success or fail criteria. This is why The Paciello Group wrote the <a href="http://inclusivedesignprinciples.org/">Inclusive Design Principles</a>. These can be listed by name.</p>
|
||||
|
||||
<p><pre class=""><code data-codeblock-shortcode>
|
||||
<pre class=""><code data-codeblock-shortcode>
|
||||
{{% principles include="Add value, Be consistent" descriptions="true" %}}
|
||||
</code></pre>
|
||||
</p>
|
||||
|
||||
|
||||
<p>Here’s the output with <code>descriptions="true"</code>:</p>
|
||||
|
||||
|
|
|
@ -1402,14 +1402,25 @@ I can reference the {{% pattern "Notes & warnings" %}} pattern here.
|
|||
</ul>
|
||||
|
||||
|
||||
<aside aria-label="note" class="note">
|
||||
<div>
|
||||
<svg class="sign" aria-hidden="true" viewBox="0 0 41.667306 41.66729" focusable="false">
|
||||
<use xlink:href="#info"></use>
|
||||
</svg>
|
||||
<p>Both omitting the <code>descriptions</code> attribute and including it with a “false” value will omit descriptions. If it is included it <em>must</em> have a value. A boolean attribute will break the output.</p>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
<h2 id="inclusive-design-principle-references">Inclusive Design Principle references</h2>
|
||||
|
||||
<p>Some inclusive design concepts are not reducible to success or fail criteria. This is why The Paciello Group wrote the <a href="http://inclusivedesignprinciples.org/">Inclusive Design Principles</a>. These can be listed by name.</p>
|
||||
|
||||
<p><pre class=""><code data-codeblock-shortcode>
|
||||
<pre class=""><code data-codeblock-shortcode>
|
||||
{{% principles include="Add value, Be consistent" descriptions="true" %}}
|
||||
</code></pre>
|
||||
</p>
|
||||
|
||||
|
||||
<p>Here’s the output with <code>descriptions="true"</code>:</p>
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,7 @@
|
|||
{{ $included := replace (.Get "include") ", " "," }}
|
||||
{{ $included := apply (split $included ",") "lower" "." }}
|
||||
{{ $descriptions := .Get "descriptions" }}
|
||||
<ul class="principles {{ if $descriptions }}with-desc{{ end }}">
|
||||
<ul class="principles {{ if and ($descriptions) (ne $descriptions "false") }}with-desc{{ end }}">
|
||||
{{ range $JSON.principles }}
|
||||
{{ if in $included (lower .title) }}
|
||||
<li>
|
||||
|
@ -15,7 +15,7 @@
|
|||
</a>:
|
||||
</strong>
|
||||
<em>{{ .strapline }}</em>
|
||||
{{ if $descriptions }}
|
||||
{{ if and ($descriptions) (ne $descriptions "false") }}
|
||||
<p>{{ .description }}</p>
|
||||
{{ end }}
|
||||
</li>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{{ $included := replace (.Get "include") ", " "," }}
|
||||
{{ $included := split $included "," }}
|
||||
{{ $descriptions := .Get "descriptions" }}
|
||||
<ul class="wcag {{ if $descriptions }}with-desc{{ end }}">
|
||||
<ul class="wcag {{ if and ($descriptions) (ne $descriptions "false") }}with-desc{{ end }}">
|
||||
{{ range $JSON }}
|
||||
{{ if in $included .ref_id }}
|
||||
<li>
|
||||
|
@ -12,7 +12,7 @@
|
|||
</svg>
|
||||
{{ .ref_id }} {{ .title }}</a> (level {{ .level }}){{ if $descriptions }}:{{ end }}
|
||||
</strong>
|
||||
{{ if $descriptions }}
|
||||
{{ if and ($descriptions) (ne $descriptions "false") }}
|
||||
{{ .description }}
|
||||
{{ if .special_cases }}
|
||||
<ul>
|
||||
|
|
Loading…
Reference in New Issue
Block a user