Skip to content

Commit 2df2774

Browse files
committed
feat: links
1 parent f41c853 commit 2df2774

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

generate.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,12 @@ def generate_command_table():
107107

108108
out = (template
109109
.replace("{{CONTENT}}", content)
110-
.replace("{{NAV_MENU}}", generate_nav(md.toc_tokens))
110+
.replace("{{NAV_MENU}}", generate_nav(md.toc_tokens) + """
111+
<div id='nav-links'>
112+
<a href="https://github.com/p2sr/rules" target="_blank" class="fa-brands fa-github"></a>
113+
<a href="https://discord.com/invite/hRwE4Zr" target="_blank" class="fa-brands fa-discord"></a>
114+
</div>
115+
""")
111116
.replace("{{COMMAND_LIST}}", generate_command_table())
112117
)
113118

out/style.css

+15
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,21 @@ nav {
4242
overscroll-behavior: none;
4343
}
4444

45+
/* FIXME: Maybe push these links to the bottom of the screen if we have space on desktop? */
46+
#nav-links {
47+
position: relative;
48+
width: 100%;
49+
margin-top: 0.3em;
50+
text-align: center;
51+
font-size: 2em;
52+
}
53+
54+
#nav-links a {
55+
color: inherit;
56+
padding: 0.2em 0.5em;
57+
margin: auto;
58+
}
59+
4560
nav img {
4661
float: left;
4762
padding-right: 1em;

template.html

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<title>Portal 2 Rules</title>
88
<link rel="stylesheet" href="style.css" type="text/css">
9+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css" type="text/css">
910
<link rel="icon" type="image/png" href="https://avatars.githubusercontent.com/u/83299896" />
1011
</head>
1112

0 commit comments

Comments
 (0)