diff --git a/generate.py b/generate.py index e22c5f3..cd7b838 100755 --- a/generate.py +++ b/generate.py @@ -46,8 +46,10 @@ def read_section(path): if row["Notes"] != "": out += "
" out += mdspan(row["Notes"], "notes") - out += '' + out += '\n' out += '' + else: + out = f"""
{out}
""" return out @@ -113,7 +115,7 @@ def generate_command_table(): if not ent_path.endswith(".md"): continue md_str += read_section(ent_path[:-3]) -md = markdown.Markdown(extensions=['toc']) +md = markdown.Markdown(extensions=['toc', 'md_in_html']) content = md.convert(md_str) with open("template.html", "r") as f: diff --git a/out/style.css b/out/style.css index 01cd641..b8dc609 100644 --- a/out/style.css +++ b/out/style.css @@ -17,6 +17,7 @@ body { font-family: 'Barlow Semi Condensed', sans-serif; font-size: 1.1em; + text-align: justify; } nav { @@ -78,6 +79,21 @@ nav a { display: block; } +.title { + display: block; + max-width: 600px; + margin-left: auto; + margin-right: auto; +} + +.content { + & p, & ul, & li, & h1, & h2, & h3, & h4, & h5, & h6 { + max-width: 600px; + margin-left: auto; + margin-right: auto; + } +} + main { padding: 0 20px; margin-top: calc(30px + 48px); /* Offset the main content to appear under the menu on mobile */ @@ -193,6 +209,11 @@ p, li { margin: 1em 0 1em 0; } +table.commands { + margin-left: auto; + margin-right: auto; +} + table.commands tbody { display: block; diff --git a/template.html b/template.html index 1728c97..c9959bd 100644 --- a/template.html +++ b/template.html @@ -17,7 +17,7 @@

Portal 2 Rules

{{NAV_MENU}}
-

Portal 2 Rules

+

Portal 2 Rules

{{CONTENT}}