Move the navbar creation to a separate function.
Now the previous, next, chapterlist, and title information can be
provided as parameters and added to the navbar. The parameters
are still taking dummy information.