If you’re unfamiliar with Javascript and Discourse this won’t be easy, but here’s how I’d go about it:
There’s a plugin outlet called topic-title
that you can use to add content at the top of a topic. You can add the navigation from the d-navigation template there… but you’ll also need some custom JS to pass the right parameters in, because some aren’t readily available on the topic page by default.
Plugin outlets and templates are covered a bit here: Developer’s guide to Discourse Themes