mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 09:42:36 +02:00
Added syntax highlighting to dialog boxes, improved look of green box code samples
This commit is contained in:
parent
07bffc7d25
commit
837efa7094
7 changed files with 42 additions and 26 deletions
|
@ -68,6 +68,24 @@
|
||||||
left: 250px;
|
left: 250px;
|
||||||
top: 250px;
|
top: 250px;
|
||||||
}
|
}
|
||||||
|
pre, code {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
background: none;
|
||||||
|
color: #666;
|
||||||
|
border: none;
|
||||||
|
display: block;
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
padding-top: .1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.welcome {
|
||||||
|
pre, code {
|
||||||
|
background: #16414c;
|
||||||
|
font-size: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,11 +3,11 @@
|
||||||
Great work! Let's move on to writing your first tag.
|
Great work! Let's move on to writing your first tag.
|
||||||
<!-- Check out your site at <a href="">victoria.neocities.org</a>. -->
|
<!-- Check out your site at <a href="">victoria.neocities.org</a>. -->
|
||||||
</div>
|
</div>
|
||||||
<div class="dialogue" style="left: 300px; top: 25px; width: 250px">
|
<div class="dialogue" style="left: 300px; top: 0px; width: 250px">
|
||||||
Let's make your name a heading by putting the <strong>h1 tag</strong> around it. This helps to visually separate content on your site.
|
Let's make your name a heading by putting the <strong>h1 tag</strong> around it. This helps to visually separate content on your site.
|
||||||
</div>
|
</div>
|
||||||
<div class="dialogue" style="left: 330px; top: 120px; width: 250px">
|
<div class="dialogue" style="left: 330px; top: 100px; width: 250px">
|
||||||
Try using an h1 tag by changing the text to something like this:<strong><span id="answer"></span></strong>
|
Try using an h1 tag by changing the text to something like this: <pre><code class="html"><span id="answer"></span></code></pre>
|
||||||
and click save.
|
and click save.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('#answer').text('<h1>'+sessionStorage.getItem('name')+'\'s Web Site</h1>')
|
$('#answer').text('<h1>'+sessionStorage.getItem('name')+'\'s Website</h1>')
|
||||||
|
|
||||||
function checkHomework() {
|
function checkHomework() {
|
||||||
var html = editor.getValue()
|
var html = editor.getValue()
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="dialogue" style="left: 290px; top: -10px; width:190px">
|
<div class="dialogue" style="left: 290px; top: -10px; width:190px">
|
||||||
To make a paragraph, surround your text with the <strong><p></strong> tag. So it should look something like
|
To make a paragraph, surround your text with the <strong><p></strong> tag. So it should look something like
|
||||||
<strong><p>Welcome!</p></strong>
|
<pre><code class="html"><p>Welcome!</p></code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
<div class="dialogue" style="left:20px">
|
<div class="dialogue" style="left:20px">
|
||||||
You're writing HTML! You're doing it! Everything you need to know is just another tag!
|
You're writing HTML! You're doing it! Everything you need to know is just another tag!
|
||||||
</div>
|
</div>
|
||||||
<div class="dialogue" style="top: -20px; width: 320px">
|
<div class="dialogue" style="top: -30px; width: 320px">
|
||||||
<p>For example, a link to another site looks like this:</p>
|
<p>For example, a link to another site looks like this:</p>
|
||||||
|
|
||||||
<p><strong><a href="//neocities.org">Check out Neocities!</a></strong></p>
|
<p><pre><code class="html"><a href="//neocities.org">Check out Neocities!</a></code></pre></p>
|
||||||
|
|
||||||
<p>Add a link to your favorite site to<br> the end of the paragraph, right<br> before the </p> closing tag!</p>
|
<p>Add a link to your favorite site to<br> the end of the paragraph, right<br> before the </p> closing tag!</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,14 +13,11 @@
|
||||||
|
|
||||||
<div class="welcome">
|
<div class="welcome">
|
||||||
<h4>Nesting</h4>
|
<h4>Nesting</h4>
|
||||||
<p>
|
<p>Tags always need to be nested properly, like Russian dolls. So this is okay:</p>
|
||||||
Tags always need to be nested properly, like Russian dolls. So this is okay:
|
|
||||||
<pre><code class="html"><%= erb '<p>Welcome! <a href="//neocities.org">Link!</a></p>', layout: false %></code></pre>
|
<pre><code class="html"><%= erb '<p>Welcome! <a href="//neocities.org">Link!</a></p>', layout: false %></code></pre>
|
||||||
|
|
||||||
But this is not correct:
|
<p>But this is not correct:</p>
|
||||||
|
|
||||||
<pre><code class="html"><%= erb '<p>Welcome! <a href="//neocities.org">Link!</p></a>', layout: false %></code></pre>
|
<pre><code class="html"><%= erb '<p>Welcome! <a href="//neocities.org">Link!</p></a>', layout: false %></code></pre>
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
<div class="dialogue" style="top: 20px; left: 360px">
|
<div class="dialogue" style="top: 20px; left: 360px">
|
||||||
Your Neocities web directory already includes a portrait of me called <strong>cat.png</strong>.
|
Your Neocities web directory already includes a portrait of me called <strong>cat.png</strong>.
|
||||||
</div>
|
</div>
|
||||||
<div class="dialogue" style="top: 140px; left: 410px">
|
<div class="dialogue" style="top: 145px; left: 390px; width:200px">
|
||||||
Add it to your page like so: <strong><img src="/cat.png"></strong>
|
Add it to your page like so: <pre><code class="html"><img src="/cat.png"></code></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="dialogue" style="top: 230px; left: 420px">
|
<div class="dialogue" style="top: 230px; left: 420px">
|
||||||
That's it! No closing tag needed for images.
|
That's it! No closing tag needed for images.
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
<div class="comic" style="height: 550px; background-image: url(/img/tutorial/ch1pg7.png); background-size: 515px;margin-top:7em">
|
<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;">
|
<div class="dialogue" style="left: 0;top:-70px;">
|
||||||
Now maybe your website needs a list. Here's how an unordered list looks:
|
Now maybe your website needs a list. Here's how an unordered list looks:
|
||||||
<div style="text-align: left; font-weight: bold">
|
<pre style="text-align:left;"><code class="html"><ul>
|
||||||
<ul><br>
|
<li>websites</li>
|
||||||
<li>websites</li>
|
<li>yarn</li>
|
||||||
<li>yarn</li>
|
<li>catnip</li>
|
||||||
<li>catnip</li><br>
|
</ul>
|
||||||
</ul>
|
</code></pre>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="dialogue" style="left: 300px; top: -10px;">
|
<div class="dialogue" style="left: 300px; top: -10px;">
|
||||||
First, add a list to your page, but replace my favorite activities with your own!
|
First, add a list to your page, but replace my favorite activities with your own!
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
<div class="comic" style="height: 530px; background-image: url(/img/tutorial/ch1pg8.png); background-size: 489px; margin-top:1em">
|
<div class="comic" style="height: 530px; background-image: url(/img/tutorial/ch1pg8.png); background-size: 489px; margin-top:1em">
|
||||||
<div class="dialogue" style="top: 50px; left: 0; width: 380px">
|
<div class="dialogue" style="top: 25px; left: 0; width: 380px">
|
||||||
Now add a link to one of your list items. If nested properly, it should look similar to this:
|
Now add a link to one of your list items. If nested properly, it should look similar to this:
|
||||||
<br>
|
<br>
|
||||||
<div class="txt-Left">
|
<div class="txt-Left">
|
||||||
<strong><li><br> <a href="http://yarn.com">Yarn</a><br></li></strong>
|
<pre style="text-align:left;"><code class="html"><li>
|
||||||
|
<a href="http://yarn.com">Yarn</a>
|
||||||
|
</li></code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue