Updating formatting for HTML output
Former-commit-id: 9f3bb3a0f42e0ab0b074e84f40044c07a4e0db91
This commit is contained in:
parent
f8dda8d21a
commit
23e6c21a7e
@ -161,12 +161,12 @@ def buildEmpty():
|
|||||||
def buildVocabDef(definition, index, query):
|
def buildVocabDef(definition, index, query):
|
||||||
reading = unicode()
|
reading = unicode()
|
||||||
if definition['reading']:
|
if definition['reading']:
|
||||||
reading = u'[{0}]'.format(definition['reading'])
|
reading = u'<span class = "reading">[{0}]<br/></span>'.format(definition['reading'])
|
||||||
|
|
||||||
rules = unicode()
|
rules = unicode()
|
||||||
if len(definition['rules']) > 0:
|
if len(definition['rules']) > 0:
|
||||||
rules = ' • '.join(definition['rules'])
|
rules = ' :: '.join(definition['rules'])
|
||||||
rules = '<span class = "rules"><{0}><br/></span>'.format(rules)
|
rules = '<span class = "rules">{0}<br/></span>'.format(rules)
|
||||||
|
|
||||||
links = '<a href = "copyVocabDef:{0}"><img src = "://img/img/icon_copy_definition.png" align = "right"/></a>'.format(index)
|
links = '<a href = "copyVocabDef:{0}"><img src = "://img/img/icon_copy_definition.png" align = "right"/></a>'.format(index)
|
||||||
if query is not None:
|
if query is not None:
|
||||||
@ -178,9 +178,9 @@ def buildVocabDef(definition, index, query):
|
|||||||
html = u"""
|
html = u"""
|
||||||
<span class = "links">{0}</span>
|
<span class = "links">{0}</span>
|
||||||
<span class = "expression">{1}<br/></span>
|
<span class = "expression">{1}<br/></span>
|
||||||
<span class = "reading">{2}<br/></span>
|
{2}
|
||||||
<span class = "glossary">{3}<br/></span>
|
<span class = "glossary">{3}<br/></span>
|
||||||
<span class = "rules">{4}</span>
|
{4}
|
||||||
<br clear = "all"/>""".format(links, definition['expression'], reading, definition['glossary'], rules)
|
<br clear = "all"/>""".format(links, definition['expression'], reading, definition['glossary'], rules)
|
||||||
|
|
||||||
return html
|
return html
|
||||||
@ -207,7 +207,7 @@ def buildKanjiDef(definition, index, query):
|
|||||||
<span class = "links">{0}</span>
|
<span class = "links">{0}</span>
|
||||||
<span class = "expression">{1}<br/></span>
|
<span class = "expression">{1}<br/></span>
|
||||||
<span class = "reading">[{2}]<br/></span>
|
<span class = "reading">[{2}]<br/></span>
|
||||||
<span class = "glossary">{3}</span>
|
<span class = "glossary">{3}<br/></span>
|
||||||
<br clear = "all"/>""".format(links, definition['character'], readings, definition['glossary'])
|
<br clear = "all"/>""".format(links, definition['character'], readings, definition['glossary'])
|
||||||
|
|
||||||
return html
|
return html
|
||||||
|
Loading…
Reference in New Issue
Block a user