Selective dye adsorption and metal ion detection using multifunctional silsesquioxane-based tetraphenylethene-linked nanoporous polymers