Skip to content
Browse files

Add back to top button (#101)

* Add back to top button

* Minor changes

* Add gitignore

* Hide button in printed documents

* Add missing local changes

* Align th text to the left again
  • Loading branch information...
mathiascode authored and bearbin committed Sep 5, 2019
1 parent 4822fa8 commit 9821968301c84480984244b6c882812167a987e8
Showing with 35 additions and 5 deletions.
  1. +8 −1
  2. +22 −2 {static/css → }/style.css
  3. +5 −2 template.html
@@ -19,6 +19,7 @@
def main():
# First off, load all of the data from disk into memory.
template = load_template()
css = load_css()
sections = load_sections()
# Run through the sections and linkify.
for s in sections:
@@ -37,7 +38,8 @@ def main():
head_title = title
# Write the actual content.
with open(os.path.join(output_directory, "index.html"), "w") as f:
@@ -50,6 +52,11 @@ def load_template():
# Read all of the data from the file and return it.
return string.Template(

def load_css():
with open(os.path.join(input_directory, "style.css"), "r") as css_file:
# Read all of the data from the file and return it.

def load_sections():
# First, define an empty dictionary to contain the section data.
# This dictionary will consist of keys of section names, with values of

Some generated files are not rendered by default. Learn more.

@@ -6,13 +6,16 @@
<meta name="description" content="This is the Cuberite User's Manual. It is intended as a guide on how to operate the basics of Cuberite, as well as an introduction to some advanced features.">
<link rel="canonical" href="">
<link rel="stylesheet" href="css/style.css">
<a class="return-link" href="">&lt;- Return to</a>
<a name="top" class="return-link" href="">&lt;- Return to</a>
<p>Updated on ${timestamp}, Commit: <a href="${commit_id}">${commit_id}</a></p>
<a class="top-button" href="#top">^</a>
<img class="hidden" src=";rec=1" alt=""/>

0 comments on commit 9821968

Please sign in to comment.
You can’t perform that action at this time.