Skip to content

Commit

Permalink
wmlunits: SEO-friendly page titles, and extra root element classes
Browse files Browse the repository at this point in the history
  • Loading branch information
irydacea committed Aug 6, 2017
1 parent 416e3b5 commit d0c43b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions data/tools/unit_tree/html_output.py
Expand Up @@ -11,7 +11,7 @@
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" />
Expand All @@ -23,7 +23,7 @@
<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>
Expand Down Expand Up @@ -730,7 +730,7 @@ def uval(name):

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")
Expand Down Expand Up @@ -781,7 +781,7 @@ def uval(name):

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\">")
Expand Down
3 changes: 2 additions & 1 deletion data/tools/unit_tree/overview.py
Expand Up @@ -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())

Expand Down

0 comments on commit d0c43b8

Please sign in to comment.