added offline page logic and html