make html generated cleaner in view source
This commit is contained in:
parent
f9590eaf07
commit
6eec8b4228
|
@ -8,10 +8,10 @@ def JSONtoHTML():
|
|||
html = ''
|
||||
counter = 1
|
||||
for d in data:
|
||||
html += '<div class="container" data-name="%s" data-padma="%s">' % (d['name'], d['hid'],)
|
||||
html += '<div class="title"><span class="counter">%d></span> %s</div>' % (counter, d['title'],)
|
||||
html += '<div class="time">%s</div>' % (d['dt-time'],)
|
||||
html += "</div>"
|
||||
html += '<div class="container" data-name="%s" data-padma="%s">\n' % (d['name'], d['hid'],)
|
||||
html += ' <div class="title"><span class="counter">%d></span> %s</div>\n' % (counter, d['title'],)
|
||||
html += ' <div class="time">%s</div>\n' % (d['dt-time'],)
|
||||
html += "</div>\n\n"
|
||||
counter += 1
|
||||
indexFile = codecs.open("index.html", mode="w", encoding="utf-8")
|
||||
header = open("header.html").read()
|
||||
|
|
Loading…
Reference in New Issue
Block a user