fixes #546 config fixes data-mode detection

adds data-mode attribute for setting modes, and lazy loading on custom
themes.