add first version of completed js template with pagination