-
Notifications
You must be signed in to change notification settings - Fork 2
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
Adding Custom Pages #100
Adding Custom Pages #100
Conversation
Signed-off-by: Nicholas Bucher <[email protected]>
Issues linked to changelog: |
Signed-off-by: Nicholas Bucher <[email protected]>
Signed-off-by: Nicholas Bucher <[email protected]>
Signed-off-by: Nicholas Bucher <[email protected]>
Signed-off-by: Nicholas Bucher <[email protected]>
Signed-off-by: Nicholas Bucher <[email protected]>
Signed-off-by: Nicholas Bucher <[email protected]>
Signed-off-by: Nicholas Bucher <[email protected]>
Signed-off-by: Nicholas Bucher <[email protected]>
Signed-off-by: Nicholas Bucher <[email protected]>
); | ||
useEventListener(window, "resize", () => { | ||
setWindowInnerWidth(window.innerWidth); | ||
setWindowInnerHeight(window.innerHeight); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this being exposed via a context on app level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! I brought this over from GME.
This PR adds the ability for users to add custom pages. They can do this by adding the page files to the public folder, and then describing their custom pages in an environment variable. These custom pages can be Markdown or HTML.
Here is what it looks like if the page is not found:
![Screenshot 2024-09-13 at 4 36 04 PM](https://private-user-images.githubusercontent.com/4720646/367441249-8a7d7487-91df-4917-9bba-72ce68a69b2e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzM0NzAsIm5iZiI6MTczODkzMzE3MCwicGF0aCI6Ii80NzIwNjQ2LzM2NzQ0MTI0OS04YTdkNzQ4Ny05MWRmLTQ5MTctOWJiYS03MmNlNjhhNjliMmUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTI1OTMwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTBiNzBkMTJiMWUzN2YzYzQ3NWU0ZjI5ODYzMDNlYjE1MWViYmFiOWFkMTI5MGQ3NmMxNjk1MWQxOTkyM2FiOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.pmwZ9IaEAY2XOJGTy7kFv-UR5_g0n9FdaaDWwGkzwHA)
Here is the
![Screenshot 2024-09-13 at 4 35 20 PM](https://private-user-images.githubusercontent.com/4720646/367440876-8b428106-5aa6-47be-98ae-b50d2de516a4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzM0NzAsIm5iZiI6MTczODkzMzE3MCwicGF0aCI6Ii80NzIwNjQ2LzM2NzQ0MDg3Ni04YjQyODEwNi01YWE2LTQ3YmUtOThhZS1iNTBkMmRlNTE2YTQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTI1OTMwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjI3NGQ4OThlNDM4ZGUyZWEzYzEzOTM5OTQ5Y2ZiMmY2NGIxZjVjNjQ0Mjk5NDJiMGM4YmM5OWNlNjNmMWI2NSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.6OWGMcAux9zyIxKVddCKZFLiCzkmjO8QKmk3lCmGyW0)
Markdown Example Page
.Here is the
![Screenshot 2024-09-13 at 4 24 03 PM](https://private-user-images.githubusercontent.com/4720646/367436373-fc212bed-d986-44a9-a2b8-2b466bd87588.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzM0NzAsIm5iZiI6MTczODkzMzE3MCwicGF0aCI6Ii80NzIwNjQ2LzM2NzQzNjM3My1mYzIxMmJlZC1kOTg2LTQ0YTktYTJiOC0yYjQ2NmJkODc1ODgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTI1OTMwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NGM5OTljNjVhYmY0ZjRkNDQ4NmU3YWNlZjFhMGRhNzYzMGZhNzQ5YjAwNjZmZmM4ZmJjMGNmYzRjN2VkMjlkMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.FXKvLRXx1jXB2lbgqpZh98ZLSXwMt0ohczi-l0VBzY4)
HTML Example Page
.After taking those screenshots, I noticed the "Navigation" text was slightly off so that is fixed now.
![Screenshot 2024-09-13 at 4 38 20 PM](https://private-user-images.githubusercontent.com/4720646/367441905-45aa9338-98fe-4427-8d9a-e068cad6a0f9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzM0NzAsIm5iZiI6MTczODkzMzE3MCwicGF0aCI6Ii80NzIwNjQ2LzM2NzQ0MTkwNS00NWFhOTMzOC05OGZlLTQ0MjctOGQ5YS1lMDY4Y2FkNmEwZjkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTI1OTMwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTU3ODVjMTk0OTIyMjdiZTBiOGJhYTY3NTg1NWM4ZjhhZThhOTk4N2FjYjJjZDI1ZTIzZDFkNDViYzdlMzAyMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.w6Kg_10GNBE8o8SLBSX4COD0zyZNVOmTByldJuleHuA)
BOT NOTES:
resolves https://github.com/solo-io/solo-projects/issues/6860