Continuum theory of contractile fibres