|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/markrose/ |
Upload File : |
<html>
<meta http-equiv="content-type" content="text-html; charset=utf-8">
<head><title>Verdurian Flashcards</title></head>
<link rel="stylesheet" href="style.css" type="text/css" media="all" />
<body bgcolor="#F0F0F0">
<form action="" name="theform">
<style>
tt {
font-family: 'Verdurian';
font-size: 60px;
color:#E08000;
}
</style>
<script>
// This is a web page for displaying a set of flashcards.
// Copyright (C) 2000 by Mark Rosenfelder ([email protected])
// May be freely used and modified for non-commercial use (for commerical use, write me).
// Original page: http://www.zompist.com/flash.html
// Whether to label the cards or not
hidden = 0;
// Arrays listing the card text
cards = new Array( "U", "A", "O", "E", "I", "Y", "K", "Ř", "P", "C", "B", "G", "D", "S",
"Š", "Ž", "Č", "T", "Ď", "R", "H", "L", "M", "F", "N", "V", "Z"
);
lc = new Array("u", "a", "o", "e", "i", "y", "k", "ř", "p", "c", "b", "g", "d", "s",
"š", "ž", "č", "t", "ď", "r", "h", "l", "m", "f", "n", "v", "z"
);
nums = new Array( "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", ",", "?", "!" );
// The last card we were on
thiscard = 0;
// Glyph set
var gset = 0;
// How many cards the user is still working with
ncard = cards.length;
// A function to generate random integers from 0 to (howMany - 1)
function makeRand(howMany)
{
theResult = Math.floor((Math.random()*howMany)%howMany)
return theResult
}
// Display another card
function nextcard()
{
// Randomly choose a card. Don't choose the one we had.
var i = makeRand(ncard);
while (i == thiscard && ncard > 1)
i = makeRand(ncard);
// What exactly are we displaying?
thiscard = i;
var disp = "";
var cheat = "";
if (gset == 0) {
disp = cards[thiscard];
cheat = cards[thiscard];
} else if (gset == 1) {
disp = lc[thiscard];
cheat = lc[thiscard];
} else {
disp = nums[thiscard];
cheat = nums[thiscard];
}
// Display it
document.getElementById("card").innerHTML = disp;
// Label it, if the user's cheating.
if (!hidden)
theform.key.value = cheat;
else
theform.key.value = "";
}
// Turn labelling on or off.
function label()
{
var theform = document.theform;
if (hidden)
{
theform.back.value = "Don't label";
if (gset == 0)
theform.key.value = cards[thiscard];
else if (gset == 1)
theform.key.value = lc[thiscard];
else
theform.key.value = nums[thiscard];
hidden = 0;
}
else
{
theform.back.value = "Label";
theform.key.value = "";
hidden = 1;
}
}
var arial = true;
// Toggle the font
function togfont() {
var d = document.getElementById("card");
if (d != null) {
if (arial)
d.style.fontFamily = "Verdurian";
else
d.style.fontFamily = "Tëdene";
arial = !arial;
}
}
// Change sets
function newset() {
gset = document.getElementById("whichSet").selectedIndex;
if (gset < 2)
ncard = cards.length;
else
ncard = nums.length;
nextcard();
}
// Stop displaying the present card.
function forgetme()
{
// Remove element thiscard.
// We don't modify the array. Instead, we flip the current and last cards,
// then decrement the usable size of the array.
var temp = "";
if (ncard > 1)
{
lasti = ncard - 1;
if (gset == 0) {
temp = cards[thiscard];
cards[thiscard] = cards[lasti];
cards[lasti] = temp;
} else if (gset == 1) {
temp = lc[thiscard];
lc[thiscard] = lc[lasti];
lc[lasti] = temp;
} else {
temp = nums[thiscard];
nums[thiscard] = nums[lasti];
nums[lasti] = temp;
}
ncard = ncard - 1;
nextcard();
}
else
alert( "This is the last card!" );
}
// Forget what we forgot: start displaying all cards again.
function doall()
{
ncard = gset < 2 ? cards.length : nums.length;
alert( "All cards will be shown now." );
}
// Following is the html for the page itself.
</script>
<table width="100%"
border=0 cellspacing="0" cellpadding="0">
<tr bgcolor="#408040"><td><h2><span style="color:white;">Verdurian Flashcards</span></h2>
</td></tr></table>
<center>
<table border=1>
<tr bgcolor="white">
<td width="80" height="80">
<center><tt><div id="card">U</div></tt></center>
</td>
</tr>
</table>
<br><input type="text" size=10 name="key">
<p>
<input type="button" name="next" value="Next card" onclick="nextcard()">
<input type="button" name="forget" value="Forget" onclick="forgetme()">
<input type="button" name="reset" value="Reset" onclick="doall()">
<input type="button" name="back" value="Label" onclick="label()">
<input type="button" name="back" value="Font" onclick="togfont()">
<p>Which card set? <select id="whichSet" onclick="newset()">
<option value="1" selected="selected">UPPERCASE</option>
<option value="2">lowercase</option>
<option value="3">Numbers & Punctuation</option>
</select>
</center>
<table width="100%"
border=0 cellspacing="0" cellpadding="0">
<tr bgcolor="#408040"><td> <br> </td></tr></table>
<font color="#000000">
<h3>Instructions</h3>
As more and more of my grammars display the Verdurian alphabet, it’s time to learn it! This is a page for learning the letters and numbers. Javascript must be enabled.
<p>The basic idea is to go through the deck randomly (by pressing <b>Next card</b>), until
you can recognize all the glyphs. Click <b>Forget</b> once you are sure you know a card. Then it won't be displayed
as you go through the deck, leaving you to concentrate on the ones you don't know yet.
Press <b>Reset</b> to go back to displaying all cards.
<p>Press the <b>Label</b> button to display the name of each glyph. Leave it on while you're
first learning; when you start to know the glyphs, turn it on only when you're stumped.
<p><b>Font</b> will toggle between the Verdurian and Tëdene fonts.
</font>
<hr>
<center><a href="default.html"><img src="home.gif" alt="Back to Metaverse"></a></center>
</form>
</body>