Skip to content

Commit cb3fe21

Browse files
committed
Update example formatting.
1 parent 42772ce commit cb3fe21

File tree

1 file changed

+38
-16
lines changed

1 file changed

+38
-16
lines changed

index.html

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -147,18 +147,40 @@
147147
float: right;
148148
font: x-large Arial, sans-serif;
149149
color: gray;
150+
border: solid thin black;
151+
padding: 0.2em;
150152
}
151153
.example > pre.frame:before {
152154
content: "Frame";
153155
float: right;
154156
font: x-large Arial, sans-serif;
155157
color: gray;
158+
border: solid thin black;
159+
padding: 0.2em;
156160
}
157161
.example > pre.input:before {
158162
content: "Input";
159163
float: right;
160164
font: x-large Arial, sans-serif;
161165
color: gray;
166+
border: solid thin black;
167+
padding: 0.2em;
168+
}
169+
.example > pre.result:before {
170+
content: "Result";
171+
float: right;
172+
font: x-large Arial, sans-serif;
173+
color: gray;
174+
border: solid thin black;
175+
padding: 0.2em;
176+
}
177+
.example > pre.turtle:before {
178+
content: "Turtle";
179+
float: right;
180+
font: x-large Arial, sans-serif;
181+
color: gray;
182+
border: solid thin black;
183+
padding: 0.2em;
162184
}
163185
.algorithm ol {
164186
counter-reset: numsection;
@@ -219,7 +241,7 @@
219241
color: #202020;
220242
cursor: pointer;
221243
}
222-
.ds-selector-tabs pre, .ds-selector-tabs table {
244+
.ds-selector-tabs pre:not(.preserve), .ds-selector-tabs table:not(.preserve) {
223245
display: none;
224246
}
225247
.ds-selector-tabs pre.selected, .ds-selector-tabs table.selected {
@@ -445,13 +467,13 @@ <h2>Expansion</h2>
445467
<aside class="example ds-selector-tabs"
446468
title="JSON-LD document using only terms">
447469
<div class="selectors">
448-
<button class="selected" data-selects="original">Original</button>
449-
<button data-selects="expanded">Expanded</button>
470+
<button class="selected input" data-selects="compacted">Compacted (Input)</button>
471+
<button data-selects="expanded">Expanded (Result)</button>
450472
<button data-selects="statements">Statements</button>
451473
<button data-selects="turtle">Turtle</button>
452474
<a class="playground" target="_blank"></a>
453475
</div>
454-
<pre class="original selected" data-transform="updateExample">
476+
<pre class="compacted selected" data-transform="updateExample">
455477
<!--
456478
{
457479
"@context": {
@@ -467,8 +489,8 @@ <h2>Expansion</h2>
467489
}
468490
-->
469491
</pre>
470-
<pre class="expanded"
471-
data-result-for="JSON-LD document using only terms-original"
492+
<pre class="expanded result"
493+
data-result-for="JSON-LD document using only terms-compacted"
472494
data-transform="updateExample">
473495
<!--
474496
[{
@@ -513,7 +535,7 @@ <h2>Expansion</h2>
513535
<div class="selectors">
514536
<a class="playground" target="_blank"></a>
515537
</div>
516-
<pre class="original input selected nohighlight" data-transform="updateExample">
538+
<pre class="compacted input selected nohighlight" data-transform="updateExample">
517539
<!--
518540
{
519541
"@context": {
@@ -545,8 +567,8 @@ <h2>Expansion</h2>
545567
(<a data-link-for="JsonLdProcessor">expand()</a>)
546568
operation) against the above examples results in the following output:</p>
547569

548-
<pre class="example nohighlight" data-transform="updateExample"
549-
data-result-for="Sample JSON-LD document using an IRI instead of a term to express a property-original"
570+
<pre class="example result nohighlight" data-transform="updateExample"
571+
data-result-for="Sample JSON-LD document using an IRI instead of a term to express a property-compacted"
550572
title="Expanded JSON-LD document using an IRI">
551573
<!--
552574
[
@@ -600,7 +622,7 @@ <h2>Compaction</h2>
600622
<p>For example, assume the following expanded JSON-LD input document:</p>
601623

602624
<pre id="sample-document"
603-
class="example input nohighlight" data-transform="updateExample"
625+
class="example expanded input nohighlight" data-transform="updateExample"
604626
title="Expanded sample document">
605627
<!--
606628
[
@@ -652,7 +674,7 @@ <h2>Compaction</h2>
652674
data-compact
653675
target="_blank"></a>
654676
</div>
655-
<pre class="original selected nohighlight" data-transform="updateExample"
677+
<pre class="result compacted selected nohighlight" data-transform="updateExample"
656678
data-result-for="Expanded sample document"
657679
data-context="JSON-LD context"
658680
data-compact
@@ -704,7 +726,7 @@ <h2>Flattening</h2>
704726
<p>For example, assume the following JSON-LD input document:</p>
705727

706728
<pre id="json-ld-document-in-compact-form"
707-
class="example input nohighlight" data-transform="updateExample"
729+
class="example compacted input nohighlight" data-transform="updateExample"
708730
title="JSON-LD document in compact form">
709731
<!--
710732
{
@@ -734,7 +756,7 @@ <h2>Flattening</h2>
734756
data-flatten
735757
target="_blank"></a>
736758
</div>
737-
<pre class="original selected nohighlight" data-transform="updateExample"
759+
<pre class="original result selected nohighlight" data-transform="updateExample"
738760
data-result-for="JSON-LD document in compact form"
739761
data-flatten>
740762
<!--
@@ -779,7 +801,7 @@ <h2>Flattening</h2>
779801
data-flatten
780802
target="_blank"></a>
781803
</div>
782-
<pre class="original selected nohighlight" data-transform="updateExample"
804+
<pre class="result selected nohighlight" data-transform="updateExample"
783805
data-result-for="JSON-LD document in compact form"
784806
data-context="JSON-LD document in compact form"
785807
data-flatten
@@ -4966,7 +4988,7 @@ <h2>Data Round Tripping</h2>
49664988

49674989
<aside class="example changed" data-ignore
49684990
title="Canonicalized JSON literal">
4969-
<pre class="original" data-transform="updateExample">
4991+
<pre class="original input" data-transform="updateExample">
49704992
<!--
49714993
{
49724994
"@context": {
@@ -4990,7 +5012,7 @@ <h2>Data Round Tripping</h2>
49905012
eliminates the whitespace, uses a canonical number representation,
49915013
and reorders the object members lexicographically:</p>
49925014

4993-
<pre class="turtle"
5015+
<pre class="turtle result"
49945016
data-content-type="text/turtle"
49955017
data-result-for="Canonicalized JSON literal-original"
49965018
data-transform="updateExample"

0 commit comments

Comments
 (0)