Anchor Links Broken on Links Page
|Assignee:||Pavan Rikhi||% Done:|
|Target version:||v0.7.0 - Misc Pages & UI|
- Migrate zencart database
- Remove path from anchor links in "Links" StaticPage.
- Run dev server
- Navigate to https://localhost:7000/links/
- Try clicking one of the anchor links at top of page content
The page reloads instead of scrolling down to the given element.
Maybe we could do one of these?
- Parse the content in the server when saving the content. Store the parse result in the DB and serve it to the client. Decode the parse tree and transform it into Elm HTML.
- Store & serve the content as text instead of the result of parsing. Parse the HTML on the client and convert it into Elm HTML.
If that doesn't fix anchor links in SPAs, we'd probably have to do some routing changes. E.g., parse & store the hash content(in the route?), fetch the page data. When the page is loaded, fire a port to scroll to the element with the given name.
That would also fix cross-page anchor links.