Creating a “look inside” preview of the ebook on the landing page

How can I create a “look inside” preview of the first few pages of the ebook? Some lead gen LPs use this method to increase conversion rates. I was wondering if there is a nice way of implementing the preview that it will look good both for mobile and desktop.
The question was brought up on the old forum back in 2014, and I guess that there are better solutions now than using a Slideshare preview or lightbox popup.