Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Example Pages: Add source copy instructions and CodePen button to HTML source section #3041

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion content-templates/Example-Template.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,12 @@ <h2>Javascript and CSS Source Code</h2>

<section>
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/accordion/examples/accordion.html
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/alert/examples/alert.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/alertdialog/examples/alertdialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,14 @@ <h2 id="src_label">Javascript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex_alertdialog', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex_alertdialog', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/breadcrumb/examples/breadcrumb.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/button/examples/button.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'example', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'example', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/button/examples/button_idl.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'example', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'example', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/carousel/examples/carousel-1-prev-next.html
Original file line number Diff line number Diff line change
Expand Up @@ -524,13 +524,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/carousel/examples/carousel-2-tablist.html
Original file line number Diff line number Diff line change
Expand Up @@ -710,13 +710,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/checkbox/examples/checkbox-mixed.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/checkbox/examples/checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,15 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2>HTML Source Code</h2>
<h3 id="sc1_label">Simple Two-State Checkbox Example</h3>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div id="sc1_start_sep" role="separator" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of HTML for"></div>
<pre><code id="sc1"></code></pre>
<div id="sc1_end_sep" role="separator" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of HTML for"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,13 +531,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,13 +467,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/combobox/examples/combobox-datepicker.html
Original file line number Diff line number Diff line change
Expand Up @@ -710,13 +710,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/combobox/examples/combobox-select-only.html
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/combobox/examples/grid-combo.html
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/dialog-modal/examples/datepicker-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -644,13 +644,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'example', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'example', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/dialog-modal/examples/dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
5 changes: 3 additions & 2 deletions content/patterns/disclosure/examples/disclosure-faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,13 +366,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,13 +366,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,14 @@ <h2>JavaScript and CSS Source Code</h2>
</ul>
</section>

<section>
<section class="example-code">
<h2 id="sc1_label">HTML Source Code</h2>
<p id="sc1_description">To copy the following HTML code, please open it in CodePen.</p>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1"></code></pre>
<div role="separator" id="sc1_end_sep" aria-labelledby="sc1_end_sep sc1_label" aria-label="End of"></div>
<script>
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files');
sourceCode.add('sc1', 'ex1', 'ex_label', 'css_js_files', 'sc1_description');
sourceCode.make();
</script>
</section>
Expand Down
Loading
Loading