index + javascript template