A Lancashire man who posted support online for Adolf Hitler and the Nazis has been given a suspended sentence.