A 1D variational formulation for quasi-brittle fracture