refactors js articles html template