Antimicrobial hydrogels with controllable mechanical properties for biomedical application