示例#1
0
 def writeFooter(self):
     self.write(u'\n</div>')
     self.write(u'\n')
     self.write(u'\n\t</div>')
     self.write(u'\n\t<div data-role="footer">	')
     self.write(u'\n\t\t<div data-role="navbar">')
     self.write(u'\n\t\t\t<ul>')
     self.write(
         u'\n\t\t\t\t<li><a href="%(book)s.%(chapter)s.html" data-icon="arrow-l">%(fullbook)s %(chapter)s</a></li>'
         % {
             "fullbook": books.fullName(self.previousChapter()[0]),
             "book": books.readerName(self.previousChapter()[0]),
             "chapter": str(self.previousChapter()[1])
         })
     self.write(
         u'\n\t\t\t\t<li><a href="index.html" data-icon="home">Books</a></li>'
     )
     self.write(
         u'\n\t\t\t\t<li><a href="%(book)s.%(chapter)s.html" data-icon="arrow-r">%(fullbook)s %(chapter)s</a></li>'
         % {
             "fullbook": books.fullName(self.nextChapter()[0]),
             "book": books.readerName(self.nextChapter()[0]),
             "chapter": str(self.nextChapter()[1])
         })
     self.write(u'\n\t\t\t</ul>')
     self.write(u'\n\t\t</div>')
     self.write(u'\n\t</div>')
     self.write(u'\n</div>')
     self.write(u'\n</body>')
     self.write(u'\n</html>')
示例#2
0
 def writeHeader(self, v=u''):
     self.write(
         u'<!--\nname: Open English Bible\ncontent: %(book)s %(chapter)s (OEB)\nauthor: Russell Allen\ndate:   4/6/2012 3:34:43 PM\n-->'
         % {
             "book": books.fullName(self.cb),
             "chapter": str(int(self.cc))
         })
     self.write(u'\n<!DOCTYPE html>')
     self.write(u'\n<html lang="en" dir="ltr">')
     self.write(u'\n<head>')
     self.write(u'\n\t<meta charset="utf-8" /> ')
     self.write(u'\n\t<title>%(book)s %(chapter)s (OEB)</title>' % {
         "book": books.fullName(self.cb),
         "chapter": str(int(self.cc))
     })
     self.write(
         u'\n\t<meta name="viewport" content="width=device-width, initial-scale=1" />'
     )
     self.write(u'\n\t<script src="../../../js/mobile.js"></script>')
     self.write(
         u'\n\t<link href="../../../css/mobile.css" rel="stylesheet" />')
     self.write(u'\n</head>')
     self.write(u'\n<body>')
     self.write(u'\n<div data-role="page">')
     self.write(u'\n\t<div data-role="header">')
     self.write(
         u'\n\t\t<a href="%(book)s.%(chapter)s.html" data-icon="arrow-l">%(fullbook)s %(chapter)s</a>'
         % {
             "fullbook": books.fullName(self.previousChapter()[0]),
             "book": books.readerName(self.previousChapter()[0]),
             "chapter": str(self.previousChapter()[1])
         })
     self.write(u'\n\t\t<h1>%(book)s %(chapter)s (OEB)</h1>' % {
         "book": books.fullName(self.cb),
         "chapter": str(int(self.cc))
     })
     self.write(
         u'\n\t\t<a href="%(book)s.%(chapter)s.html" data-icon="arrow-r">%(fullbook)s %(chapter)s</a>'
         % {
             "fullbook": books.fullName(self.nextChapter()[0]),
             "book": books.readerName(self.nextChapter()[0]),
             "chapter": str(self.nextChapter()[1])
         })
     self.write(u'\n\t</div>')
     self.write(u'\n\t<div data-role="content">')
     self.write(
         u'\n<div class="chapter OEB nt %(book)s_%(chapter)s" data-osis="%(book)s.%(chapter)s" lang="en" dir="ltr">'
         % {
             "book": books.readerName(self.cb),
             "chapter": str(int(self.cc))
         })
     self.write(u'\n<h2 class="chapter-num">' + v + u'</h2>\n<p>')
示例#3
0
 def header(self):
     h = '\n<ul>'
     h = h + '\n<li class="label1">Old Testament</li>'
     h = h + '\n<li class="label2">The Law</li>'
     h = h + self.headerGroup(1, 5)
     h = h + '\n<li class="label2">Histories</li>'
     h = h + self.headerGroup(6, 17)
     h = h + '\n<li class="label2">Wisdom</li>'
     h = h + self.headerGroup(18, 22)
     h = h + '\n<li class="label2">Major Prophets</li>'
     h = h + self.headerGroup(23, 27)
     h = h + '\n<li class="label2">Minor Prophets</li>'
     h = h + self.headerGroup(28, 39)
     h = h + '\n<li class="label1">New Testament</li>'
     h = h + '\n<li class="label2">Gospels</li>'
     h = h + self.headerGroup(40, 43)
     h = h + '\n<li class="label2">History</li>'
     h = h + self.headerGroup(44, 44)
     h = h + '\n<li class="label2">Pauline Epistles</li>'
     h = h + self.headerGroup(45, 58)
     h = h + '\n<li class="label2">Other Epistles</li>'
     h = h + self.headerGroup(59, 65)
     h = h + '\n<li class="label2">Revelation</li>'
     h = h + self.headerGroup(66, 66)
     h = h + '\n</ul>'
     #h = h + '\n</tr><tr><td colspan = "2"><br><a href="{{{websiteURL}}}">{{{websiteName}}}</a></td></tr></table></div></div>'
     h = header_header.replace(r'{{{ book list }}}', h)
     h = h.replace(r'{{{ book name }}}', books.fullName(int(self.cb)))
     return h
示例#4
0
 def writeHeader(self, v=u''):
     self.write(u'<!--\nname: Open English Bible\ncontent: %(book)s %(chapter)s (OEB)\nauthor: Russell Allen\ndate:   4/6/2012 3:34:43 PM\n-->' % {"book": books.fullName(self.cb), "chapter": str(int(self.cc))})
     self.write(u'\n<!DOCTYPE html>')
     self.write(u'\n<html lang="en" dir="ltr">')
     self.write(u'\n<head>')
     self.write(u'\n\t<meta charset="utf-8" /> ')
     self.write(u'\n\t<title>%(book)s %(chapter)s (OEB)</title>' % {"book": books.fullName(self.cb), "chapter": str(int(self.cc))})
     self.write(u'\n\t<meta name="viewport" content="width=device-width, initial-scale=1" />')
     self.write(u'\n\t<script src="../../../js/mobile.js"></script>')
     self.write(u'\n\t<link href="../../../css/mobile.css" rel="stylesheet" />')
     self.write(u'\n</head>')
     self.write(u'\n<body>')
     self.write(u'\n<div data-role="page">')
     self.write(u'\n\t<div data-role="header">')
     self.write(u'\n\t\t<a href="%(book)s.%(chapter)s.html" data-icon="arrow-l">%(fullbook)s %(chapter)s</a>' % {"fullbook": books.fullName(self.previousChapter()[0]), "book": books.readerName(self.previousChapter()[0]), "chapter": str(self.previousChapter()[1])})
     self.write(u'\n\t\t<h1>%(book)s %(chapter)s (OEB)</h1>' % {"book": books.fullName(self.cb), "chapter": str(int(self.cc))})
     self.write(u'\n\t\t<a href="%(book)s.%(chapter)s.html" data-icon="arrow-r">%(fullbook)s %(chapter)s</a>' % {"fullbook": books.fullName(self.nextChapter()[0]), "book": books.readerName(self.nextChapter()[0]), "chapter": str(self.nextChapter()[1])})
     self.write(u'\n\t</div>')
     self.write(u'\n\t<div data-role="content">')
     self.write(u'\n<div class="chapter OEB nt %(book)s_%(chapter)s" data-osis="%(book)s.%(chapter)s" lang="en" dir="ltr">' % {"book": books.readerName(self.cb), "chapter": str(int(self.cc))})
     self.write(u'\n<h2 class="chapter-num">' + v + u'</h2>\n<p>')   
示例#5
0
 def writeFooter(self):
     self.write(u'\n</div>')   
     self.write(u'\n')   
     self.write(u'\n\t</div>')   
     self.write(u'\n\t<div data-role="footer">	')   
     self.write(u'\n\t\t<div data-role="navbar">')   
     self.write(u'\n\t\t\t<ul>')   
     self.write(u'\n\t\t\t\t<li><a href="%(book)s.%(chapter)s.html" data-icon="arrow-l">%(fullbook)s %(chapter)s</a></li>' % {"fullbook": books.fullName(self.previousChapter()[0]), "book": books.readerName(self.previousChapter()[0]), "chapter": str(self.previousChapter()[1])})
     self.write(u'\n\t\t\t\t<li><a href="index.html" data-icon="home">Books</a></li>')   
     self.write(u'\n\t\t\t\t<li><a href="%(book)s.%(chapter)s.html" data-icon="arrow-r">%(fullbook)s %(chapter)s</a></li>' % {"fullbook": books.fullName(self.nextChapter()[0]), "book": books.readerName(self.nextChapter()[0]), "chapter": str(self.nextChapter()[1])})
     self.write(u'\n\t\t\t</ul>')   
     self.write(u'\n\t\t</div>')   
     self.write(u'\n\t</div>')   
     self.write(u'\n</div>')   
     self.write(u'\n</body>')   
     self.write(u'\n</html>')