move css and js code to resources. simplify highlight mechanism.