leoncvlt / loconotion

📄 Python tool to turn Notion.so pages into lightweight, customizable static websites
838 stars 132 forks source link

Open collection items in a modal (popup) #28

Open preslavrachev opened 3 years ago

preslavrachev commented 3 years ago

I have collections of items coming from a database that I would like to present as-is. With the exported site, if a user clicks on a collection item, it goes to the item's dedicated page. This is functional, but not very user-friendly.

@leoncvlt What would be an easy way to handle this issue? I am eager to help with a PR, if you could give me a couple of hints.

leoncvlt commented 3 years ago

Hello, this might be fairly tricky to accomplish as with Notion being a react based app, the modals are conditionally rendered using javascript logic, thus resulting into it being unavailable the in the static scraped pages as we strip the original Notion js files.

Onw way to go about this would be to click the collection item on the automated browser to show the modal, grab the modal's content html code, and re-implement the modal logic in Loconotion (similarly to how we do it with the accordions).