refactor index template into partials.