wmlunits: SEO-friendly page titles, and extra root element classes
This commit is contained in:
parent
416e3b5479
commit
d0c43b89c4
2 changed files with 6 additions and 5 deletions
|
@ -11,7 +11,7 @@ pics_location = "../../pics"
|
|||
html_header = '''
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html class="no-js wmlunits" lang="en">
|
||||
<html class="no-js wmlunits %(classes)s" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
|
@ -23,7 +23,7 @@ html_header = '''
|
|||
<link rel="stylesheet" type="text/css" href="http://wesmere.localhost/wesmere/css/wmlunits-1.1.0.css" />
|
||||
<script src="https://www.wesnoth.org/wesmere/js/modernizr.js"></script>
|
||||
<script type="text/javascript" src="%(path)s/menu.js"></script>
|
||||
<title>%(title)s</title>
|
||||
<title>%(title)s - Wesnoth Units Database</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -730,7 +730,7 @@ class HTMLOutput:
|
|||
|
||||
def write_units_tree(self, grouper, title, add_parents):
|
||||
self.output.write(html_header % {"path": "../../",
|
||||
"title": title})
|
||||
"title": title, "classes": "wmlunits-tree"})
|
||||
|
||||
n = self.analyze_units(grouper, add_parents)
|
||||
self.write_navbar("units_tree")
|
||||
|
@ -781,7 +781,7 @@ class HTMLOutput:
|
|||
|
||||
self.output = output
|
||||
write(html_header % {"path": "../../",
|
||||
"title": display_name})
|
||||
"title": display_name, "classes": "wmlunits-unit"})
|
||||
self.write_navbar("unit_report")
|
||||
|
||||
self.output.write("<div class=\"main\">")
|
||||
|
|
|
@ -54,8 +54,9 @@ def main(folder):
|
|||
def w(x): out.write(x + "\n")
|
||||
|
||||
path = ""
|
||||
title = "Wesnoth Unit Database Overview"
|
||||
title = "Database Build Report"
|
||||
generation_note = "generated on " + time.ctime()
|
||||
classes = "wmlunits-report"
|
||||
|
||||
w(html_output.html_header % locals())
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue