Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying out an iframe nav experiment, still a mess #9

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

epaulson
Copy link
Contributor

@epaulson epaulson commented May 2, 2023

OK, so this is still a mess and has some really messed up layout (the iframe height is totally wrong) but it kinda works - the nav bar is on the side and not rendered into every page but when you click on links, the javascript pulls out the data-href attribute and updates the body, and you get a new page with a complete url and the back button works.

Screen Shot 2023-05-02 at 5 02 56 PM

One bummer: the URL is kind of funky, and if you go to an element directly, you don't get the nav bar:

Screen Shot 2023-05-02 at 5 04 27 PM

Maybe we could try using in a client-side router? This is the first one I found after googling very fast, there are probably others: https://github.com/krasimir/navigo

(Their main selling point is "if you want a router but don't want a full framework")

@jbkoh
Copy link

jbkoh commented May 9, 2023

Our frontend engineer has looked into this and explored the proposed solution but found that it's not helping to reduce the file size enough. The engineer and another experienced person suggested that deploying a javascript app is a better practice and it's also very easy to deploy them these days.

They are gonna file a draft PR with suggestions and willing to work on repackaging unless static page is a necessary feature.

@rarshynnyk
Copy link

rarshynnyk commented May 10, 2023

@epaulson Here's a pull request where we attempted to use an iframe approach, but it appears that it did not have an impact on the size of the statically generated site. #11

@ektrah ektrah marked this pull request as draft May 12, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants