Rational synthesis, crystal structure, and sensing and adsorption properties of luminescent metal–organic frameworks