Function-oriented synthesis of two-dimensional (2D) covalent organic frameworks - from 3D solids to 2D sheets.