Almost sure central limit theorem for partial sums and maxima