Move 'back to main page' function to custom HTML class

Signed-off-by: JWhy <jwhy@jwhy.de>