Skip to content

Commit

Permalink
Add automatic source code example generation back to alert
Browse files Browse the repository at this point in the history
  • Loading branch information
Michiel Bijl committed Mar 16, 2017
1 parent 3591c38 commit ef34006
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
25 changes: 10 additions & 15 deletions examples/alert/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ <h1>Alert Example</h1>
</p>
<section>
<h2 id="ex_label">Example</h2>
<p>
This is just a test.
A typical alert is triggered by an event, such as an error, warning condition, or the arrival of information that is important in the context of the user's task.
</p>
<div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div>
<div id="ex1">
<p><button id="alert-trigger">Trigger Alert</button></p>

<p>
This is just a test.
A typical alert is triggered by an event, such as an error, warning condition, or the arrival of information that is important in the context of the user's task.
</p>
<button id="alert-trigger">Trigger Alert</button>

<div id="example" role="alert"></div>

Expand Down Expand Up @@ -117,16 +116,12 @@ <h2>Javascript and CSS Source Code</h2>
<section>
<h2 id="sc1_label">HTML Source Code</h2>
<div role="separator" id="sc1_start_sep" aria-labelledby="sc1_start_sep sc1_label" aria-label="Start of"></div>
<pre><code id="sc1">&lt;button id="alert-trigger"&gt;Trigger Alert&lt;/button&gt;

&lt;div id="example" role="alert"&gt;&lt;/div&gt;

&lt;!-- The following script element contains the content that will be inserted into the alert element. --&gt;
&lt;script type="text/template" id="alert-template"&gt;
&lt;p&gt;Hej, hello, ciao, こんにちは, 안녕&lt;/p&gt;
&lt;/script&gt;
</code></pre>
<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');
sourceCode.make();
</script>
</section>
</main>
<nav>
Expand Down
4 changes: 2 additions & 2 deletions examples/radio/radio-1/radio-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script src="../../js/highlight.pack.js"></script>
<script src="../../js/app.js"></script>

<link rel="stylesheet" href="../css/radio.css">
<link rel="stylesheet" href="css/radio.css">
<script src="js/radioGroup.js" type="text/javascript"></script>
<script src="js/radioButton.js" type="text/javascript"></script>

Expand Down Expand Up @@ -243,7 +243,7 @@ <h3 id="rps_label">ARIA Roles, Properties and States</h3>
<section>
<h2>Javascript and CSS Source Code</h2>
<ul>
<li>CSS: <a href="../css/radio.css" type="tex/css">radio.css</a></li>
<li>CSS: <a href="css/radio.css" type="tex/css">radio.css</a></li>
<li>Javascript: <a href="js/radioGroup.js" type="text/javascript">radioGroup.js</a></li>
<li>Javascript: <a href="js/radioButton.js" type="text/javascript">radioButton.js</a></li>
</ul>
Expand Down

1 comment on commit ef34006

@ZoeBijl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alert Example: Restore Auto HTML Source Generation for Issue #291

Please sign in to comment.