neocities/views/tutorial/html/3.erb
2015-12-14 14:55:33 -08:00

47 lines
1.4 KiB
Text

<div class="comic" style="height: 500px; background-image: url(/img/tutorial/ch1pg3.png); background-size: 483px;">
<div class="dialogue" style="left: 50px; top: 20px;">
Great!
Check out your site at <a href="">victoria.neocities.org</a>.
You did it!
</div>
<div class="dialogue" style="left: 300px; top: 20px; width: 250px">
But... hm... it needs a little something more. Let's make your name a heading by putting a Heading Level 1 tag around it.
</div>
<div class="dialogue" style="left: 330px; top: 140px; width: 250px">
Change the text to this: <strong><span id="answer"></span></strong>
and click save.
</div>
</div>
<div class="welcome">
<h4>Heading Tags</h4>
<p>Here are all the heading tags, for all your needs—from the most important to the least!</p>
<pre>
<h1></h1>
<h2></h2>
<h3></h3>
<h4></h4>
<h5></h5>
<h6></h6>
</pre>
</div>
<script>
var answer = '<h1>'+sessionStorage.getItem('name')+"'s Website</h1>"
$('#answer').text(answer)
function checkHomework() {
var html = editor.getValue()
var match = '<html.+>.+<body>.+'+answer+'.+</body>.+</html>'
var re = new XRegExp(match, 'gis')
if(html.match(re) === null) {
notok("That's not right! Try again.")
} else {
sessionStorage.setItem('tutorialHtml', html)
ok('Great, you did it!', '/tutorial/html/4')
}
}
</script>