Define several XHTML document strings to be used in VerseMatch.
Unlike the original program written in Java, a large portion of the XHTML code is defined separately here to be used as format strings.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | #! /usr/bin/env python
"""Define several XHTML document strings to be used in VerseMatch.
Unlike the original program written in Java, a large portion of the
XHTML code is defined separately here to be used as format strings."""
################################################################################
__author__ = 'Stephen "Zero" Chappell <Noctis.Skytower@gmail.com>'
__date__ = '11 February 2010'
__version__ = '$Revision: 3 $'
################################################################################
TEMPLATE = '''\
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml11-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Name: Stephen Paul Chappell -->
<!-- Date: 4 February 2010 -->
<meta name="author" content="Stephen Paul Chappell" />
<meta name="classification" content="Verse Quiz Server" />
<meta name="description" content="This is a Java-to-Python port." />
<meta name="owner" content="Stephen Paul Chappell" />
<meta name="copyright" content="© 2010 Open Source" />
<meta name="generator" content="Python IDLE" />
<meta name="keywords" content="bible,verse,quiz,java,python,port" />
<meta http-equiv="Content-Type" content="text/html;charset=ASCII" />
{}
<title>Simple "Verse Quiz" Servlet</title>
</head>
<body>
<h1>Verse Quiz, by Stephen Paul Chappell</h1>
<hr />
<form id="GUI" name="GUI" method="POST">
| |
<input name="action" type="submit" value="Reset Session" />
| |
{}
</form>
</body>
</html>'''
################################################################################
REFRESH = '''\
<meta http-equiv="refresh" content="4;url=./?action=checkstatus" />
'''
################################################################################
GET_QUIZ = '''\
<hr />
<fieldset>
<legend>Quiz Selection</legend>
<h3>Choose one of the lists down below:</h3>
{}
<input name="action" type="submit" value="Choose Quiz" />
</fieldset>'''
################################################################################
GET_VERSE = '''\
<input name="action" type="submit" value="Go Back" />
| |
<hr />
<fieldset>
<legend>Verse Selection</legend>
<h3>Choose a verse from {}:</h3>
{}
</fieldset>'''
################################################################################
TEACH = '''\
<input name="action" type="submit" value="Go Back" />
| |
<hr />
{}
<fieldset>
<legend>Verse Entry Submission</legend>
<h3>When you are done:</h3>
<input name="action" type="submit" value="Check Your Answer" />
</fieldset>'''
################################################################################
VERSE = '''\
<fieldset>
<legend>{0}</legend>{1}
<textarea id="{2}" name="{2}" rows="5" cols="70">{3}</textarea>
</fieldset>'''
################################################################################
CHECK = '''\
<input name="action" type="submit" value="Reset Session" />
| |
<hr />
<fieldset>
<legend>Please Wait</legend>
<h3>{} verse{} been graded so far.</h3>
</fieldset>'''
|