USA:s expresident Donald Trump döms till 5.000 dollar i böter efter ett nedsättande inlägg om en domstolsanställd på sociala medier.