Skip to content

Commit 3f60e2b

Browse files
committed
Add some CSS background text for frames and input.
Addresses #35.
1 parent 633ea3b commit 3f60e2b

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

index.html

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,20 @@
137137
color: #999;
138138
text-decoration: line-through;
139139
}
140+
div.example > pre.frame:before {
141+
content: "Frame";
142+
float: right;
143+
font: x-large Arial, sans-serif;
144+
color: gray;
145+
padding-top: -20px;
146+
}
147+
div.example > pre.input:before {
148+
content: "Input";
149+
float: right;
150+
font: x-large Arial, sans-serif;
151+
color: gray;
152+
padding-top: -20px;
153+
}
140154
.diff { font-weight:bold; color:#0a3; }
141155
.error a {
142156
color: #ff4500;
@@ -389,7 +403,7 @@ <h3>Framing</h3>
389403

390404
<p>For example, assume the following JSON-LD frame:</p>
391405
<pre id="sample-library-frame"
392-
class="example" data-transform="updateExample"
406+
class="example frame" data-transform="updateExample"
393407
data-content-type="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed"
394408
data-frame-for="Flattened library objects"
395409
title="Sample library frame">
@@ -416,7 +430,7 @@ <h3>Framing</h3>
416430

417431
<p>When using a flattened set of objects that match the frame components:</p>
418432
<pre id="flattened-library-objects"
419-
class="example" data-transform="updateExample"
433+
class="example input" data-transform="updateExample"
420434
title="Flattened library objects">
421435
<!--
422436
{
@@ -485,7 +499,7 @@ <h3>Framing</h3>
485499
<p>If <a>processing mode</a> is <code>json-ld-1.1</code>, or the <a>omit graph flag</a> is <code>true</code>,
486500
the top-level <code>@graph</code> <a>member</a> may be omitted.</p>
487501

488-
<pre class="example" data-transform="updateExample"
502+
<pre class="example frame" data-transform="updateExample"
489503
data-frame="Sample library frame"
490504
data-result-for="Flattened library objects"
491505
data-options="omitGraph=true"
@@ -537,7 +551,7 @@ <h3>Default content</h3>
537551
used in the output document. It's purpose is for frame matching and
538552
finding default values. Note the <em>description</em> value for <em>Library</em> in the following example.</p>
539553
<pre id="sample-library-frame-with-default-value"
540-
class="example nohighlight" data-transform="updateExample"
554+
class="example frame nohighlight" data-transform="updateExample"
541555
data-content-type="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed"
542556
data-frame-for="Flattened library objects"
543557
title="Sample library frame with @default value">
@@ -617,7 +631,7 @@ <h4>Object Embed Flag</h4>
617631
based on the default <code>@last</code> value of the <a>object embed flag</a>:</p>
618632

619633
<pre id="sample-library-frame-with-explicit-embed-set-to-last"
620-
class="example" data-transform="updateExample"
634+
class="example frame" data-transform="updateExample"
621635
data-content-type="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed"
622636
data-frame-for="Flattened library objects"
623637
title="Sample library frame with implicit @embed set to @last">
@@ -674,7 +688,7 @@ <h4>Object Embed Flag</h4>
674688
value of <code>@never</code>, the values for <em>Book</em> and <em>Chapter</em> will be excluded.</p>
675689

676690
<pre id="sample-library-frame-with-explicit-embed-set-to-never"
677-
class="example nohighlight" data-transform="updateExample"
691+
class="example frame nohighlight" data-transform="updateExample"
678692
data-content-type="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed"
679693
data-frame-for="Flattened library objects"
680694
title="Sample library frame with explicit @embed set to @never">
@@ -720,7 +734,7 @@ <h4>Object Embed Flag</h4>
720734
consider an alternate library example where books are doubly indexed.</p>
721735

722736
<pre id="flattened-library-objects-with-double-index"
723-
class="example" data-transform="updateExample"
737+
class="example input" data-transform="updateExample"
724738
title="Flattened library objects with double index">
725739
<!--
726740
{
@@ -793,7 +807,7 @@ <h4>Object Embed Flag</h4>
793807
both properties will include expanded values.</p>
794808

795809
<pre id="sample-library-frame-with-explicit-embed-set-to-always"
796-
class="example nohighlight" data-transform="updateExample"
810+
class="example frame nohighlight" data-transform="updateExample"
797811
data-content-type="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed"
798812
data-frame-for="Flattened library objects with double index"
799813
title="Sample library frame with explicit @embed set to @always">
@@ -870,7 +884,7 @@ <h4>Explicit inclusion flag</h4>
870884
some properties from the input, but omit others.</p>
871885

872886
<pre id="sample-library-frame-with-explicit-set-to-true"
873-
class="example nohighlight" data-transform="updateExample"
887+
class="example frame nohighlight" data-transform="updateExample"
874888
data-content-type="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed"
875889
data-frame-for="Flattened library objects"
876890
title="Sample library frame with @explicit set to true">
@@ -946,7 +960,7 @@ <h4>Omit default flag</h4>
946960
See <a href="#default-content" class="sectionRef"></a> for a further discussion.</p>
947961

948962
<pre id="sample-library-frame-with-default-value-and-omitDefault"
949-
class="example nohighlight" data-transform="updateExample"
963+
class="example frame nohighlight" data-transform="updateExample"
950964
data-content-type="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed"
951965
data-frame-for="Flattened library objects"
952966
title="Sample library frame with @default value and @omitDefault">
@@ -971,7 +985,7 @@ <h4>Omit default flag</h4>
971985
<p>The resulting output will exclude properties for Book which are not explicitly
972986
listed in the <a>frame object</a>:</p>
973987

974-
<aside class="example ds-selector-tabs"
988+
<aside class="example input ds-selector-tabs"
975989
title="Sample library output with @default value and @omitDefault">
976990
<div class="selectors">
977991
<a class="playground"
@@ -1041,7 +1055,7 @@ <h3>Reverse Framing</h3>
10411055
Library example can be inverted using the following frame:</p>
10421056

10431057
<pre id="inverted-library-frame"
1044-
class="example nohighlight" data-transform="updateExample"
1058+
class="example frame nohighlight" data-transform="updateExample"
10451059
data-content-type="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed"
10461060
data-frame-for="Flattened library objects"
10471061
title="Inverted library frame">
@@ -1129,7 +1143,7 @@ <h3>Framing Named Graphs</h3>
11291143
is split between the <a>default graph</a>, and a graph named <code>http://example.org/graphs/books</code>:</p>
11301144

11311145
<pre id="frame-with-named-graphs"
1132-
class="example nohighlight" data-transform="updateExample"
1146+
class="example frame nohighlight" data-transform="updateExample"
11331147
data-content-type="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed"
11341148
data-frame-for="Flattened Input with named graphs"
11351149
title="Frame with named graphs">
@@ -1148,7 +1162,7 @@ <h3>Framing Named Graphs</h3>
11481162
</pre>
11491163

11501164
<pre id="flattened-input-with-named-graphs"
1151-
class="example" data-transform="updateExample"
1165+
class="example input" data-transform="updateExample"
11521166
title="Flattened Input with named graphs">
11531167
<!--
11541168
[{

0 commit comments

Comments
 (0)