neocities/views/tutorial/html/1.erb
2015-10-14 11:25:56 -07:00

44 lines
1.5 KiB
Text

<div class="comic" style="height: 967px; background-image: url(/img/tutorial/ch1pg1.png); background-size: 839px;">
<div class="dialogue" style="left: 270px; top:374px;">
Oh, a new student!
</div>
<div class="dialogue" style="left: 570px; top:374px;">
Ahem, please come in!
</div>
<div class="dialogue" style="left: 50px; top:630px;">
I'm Penelope, and I'll be your teacher.
</div>
<div class="dialogue" style="left: 330px; top:630px;">
What's your name?
</div>
<div style="position: absolute; left: 460px; top:840px;">
<input id="nameInput" type="text" placeholder="First Name" style="position: relative">
<button id="checkButton" class="btn btn-active">Submit</button>
</div>
</div>
<div class="comic" style="height: 300px; background-image: url(/img/tutorial/ch1pg1_2.png);background-size: 839px;">
<div class="dialogue" style="left: 200px; top:30px;">
Welcome, [NAME]! You're about to embark on a very exciting challenge: creating your first website!
</div>
<div class="dialogue" style="left: 640px; top:20px;">
You've already made the first important step of starting this lesson, so here's a badge for your profile.
</div>
</div>
<a href="./2">Next >></a>
<script>
$('#checkButton').on('click', function(button) {
checkHomework($('#nameInput').val())
})
function checkHomework(name) {
if(name == '' || name == undefined)
alert("I need to know your name!")
else {
sessionStorage.setItem('name', name)
window.location.href = '/tutorial/html/2'
}
}
</script>