mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
54 lines
1.8 KiB
Text
54 lines
1.8 KiB
Text
<div class="comic" style="height: 550px; background-image: url(/img/tutorial/ch1pg7.png); background-size: 515px;margin-top:7em">
|
|
<div class="dialogue" style="left: 0;top:-50px;">
|
|
Now maybe your website needs a list. Here's how an unordered list looks:
|
|
<div style="text-align: left; font-weight: bold">
|
|
<ul><br>
|
|
<li>websites</li>
|
|
<li>yarn</li>
|
|
<li>catnip</li><br>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="dialogue" style="left: 300px; top: -10px;">
|
|
First, add a list to your page, but replace my favorite activities with your own!
|
|
</div>
|
|
<div class="dialogue" style="left: 400px; top: 90px;">
|
|
Second, put an h2 header above the list with some kind of title, like "Interests."
|
|
</div>
|
|
</div>
|
|
|
|
<div class="welcome">
|
|
<h4>Lists</h4>
|
|
<p>You can make an ordered (numbered) list like so:</p>
|
|
<pre><code class="html"><%= erb :'tutorial/html/code_examples/7_1', layout: false %></code></pre>
|
|
</div>
|
|
|
|
<script>
|
|
function checkHomework() {
|
|
var html = editor.getValue()
|
|
|
|
if(!html.match(new XRegExp('<ul>.+</ul>', 'gis'))) {
|
|
notok("I don't see the <ul> and </ul> tag!")
|
|
return
|
|
}
|
|
|
|
var ul = preview().find('ul')
|
|
|
|
if(ul.find('li').length == 0) {
|
|
notok("Okay, I see the <strong>ul</strong>, but no <strong>li</strong>. Try adding a list item to it: <li>Yarn</li>")
|
|
return
|
|
}
|
|
|
|
var liText = ul.find('li').first().text()
|
|
|
|
if(liText == '') {
|
|
notok("I don't see any text in the <strong>li</strong>. Try using it like this: <strong><li>Yarn</li></strong>")
|
|
return
|
|
}
|
|
|
|
if(ul.find('li'))
|
|
|
|
sessionStorage.setItem('tutorialHtml', html)
|
|
ok('Awesome list!', '/tutorial/html/8')
|
|
}
|
|
</script>
|