Arquivos
CTAT/Examples/CTATButton.html
demisk f9b802879d Change id of Done button to the recommended value "done".
Fix hints in CTATGroupingComponent graph.
Add a tutored step for CTATTable example.
Update description for CTATTextField example.
Point to jquery library on our CDN in tutorial example.
2017-01-04 12:14:49 -05:00

107 linhas
3.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CTATButton Example</title>
<link rel="stylesheet" href="https://cdn.ctat.cs.cmu.edu/releases/latest/CTAT.min.css"/>
<link rel="stylesheet" href="css/ctat_example.css"/>
<script src="https://cdn.ctat.cs.cmu.edu/releases/latest/jquery.min.js"></script>
<!-- cdn.rawgit.com/CMUCTAT/CTAT/<tag>/Examples/ctat.min.js -->
<script src="https://cdn.ctat.cs.cmu.edu/releases/latest/ctat.min.js"></script>
<script src="https://cdn.ctat.cs.cmu.edu/releases/latest/ctatloader.js"></script>
<script>
function ctatOnload() {
initTutor({"question_file":'CTATButton.brd'});
};
</script>
<style type="text/css">
#button3 .CTAT-button {
background-color: transparent;
background-image: url("skindata/Default-Default.png");
background-repeat: no-repeat;
height:66px;
width:65px;
}
#button3 .CTAT-button--hover {
background-image: url("skindata/Default-Hover.png");
}
#button3 .CTAT-button--clicked {
background-image: url("skindata/Default-Click.png");
}
#button3 .CTAT-button:disabled {
background-image: url("skindata/Default-Disabled.png");
}
</style>
</head>
<body>
<div class="tutor_window">
<a href="http://ctat.pact.cs.cmu.edu/">
<img id="CTATBanner"
alt="CTAT: Cognitive Tutor Authoring Tools"
src="skindata/CTAT_Banner.svg">
</a>
<h1>CTATButton Example</h1>
<p>A simple button example.</p>
<div>
<div class="ctat_example">
Click this button:
<div id="button1" class="CTATButton">Click</div>
</div>
<div class="ctat_code">
<pre>&lt;div id="button1" class="CTATButton"&gt;Click&lt;/div&gt;</pre>
</div>
</div><hr/>
<div>
<div class="ctat_example">
Simple Image button:
<div id="button2" class="CTATButton"><img src="skindata/CTAT-icon.svg"></div>
</div>
<div class="ctat_code">
<pre>
&lt;div id="button2" class="CTATButton"&gt;
&lt;img src="skindata/CTAT-icon.svg"&gt;
&lt;/div&gt;</pre>
</div>
</div><hr/>
<div>
<div class="ctat_example">
Reactive Styled Image button:<br/>
<div id="button3" class="CTATButton"></div>
</div>
<div class="ctat_code">
Put in style tag in the head or in a referenced .css file:
<pre>
#button3>.CTAT-button {
background-color: transparent;
background-image: url("skindata/Default-Default.png");
background-repeat: no-repeat;
height:66px;
width:65px;
}
#button3>.CTAT-button--hover {
background-image: url("skindata/Default-Hover.png");
}
#button3>.CTAT-button--clicked {
background-image: url("skindata/Default-Click.png");
}
#button3>.CTAT-button:disabled {
background-image: url("skindata/Default-Disabled.png");
}
</pre>
In document body:
<pre>&lt;div id="button3" class="CTATButton"&gt;&lt;/div&gt;</pre>
</div>
</div>
<div id="hint-box" style="margin:3px;text-align:right;">
<div id="HintWindow" class="CTATHintWindow"></div>
<div style="float: right;">
<div id="hint-button" class="CTATHintButton"></div>
<div id="done" class="CTATDoneButton"></div>
</div>
</div>
</div>
</body>
</html>