Writer HTML: create a sidebar with table of contents

I’m using Writer to generate a big HTML document from an ODT file with a table of contents at the top. As the document is quite big, a quick access to its headings would be helpful.

Like, put it on a sidebar like those old pages with iframes?

Or perhaps, tweaking the CSS applied to the #Table of Contents1 element to (pretentiously) create something like this:

Is there any way to achieve something similar? Thanks.

There’s certainly a way to do that, but seriously, don’t even try to do it with LibreOffice, it’s not meant for such advanced HTML design.