swipe gallery improvements

- use history api if available
- better place elements to avoid unwanted translations