Create home page component - Vanilla.js #89
Description
Create home page component - Vanilla
🚀 Goal
Create a home page component in Vanilla that serves as the landing page for our Decentralized Web App (DWA) starter, providing different views based on the user's connection status.
🤔 Background
We need to implement the home page for our Vanilla.js DWA starter, mirroring the functionality of the existing React implementation. This page should display a welcome message and a connect button when the user is not connected, and show a TodoList component (or placeholder) when connected.
This is part of our larger project to create a Vanilla.js DWA starter. See our main issue here for the full context and list of all related tasks.
Important: For reference, please see the DWA React Vite starter app. While the implementation details will differ for Vanilla, this example provides a good overview of the structure and functionalities of a DWA.
🔑 Tasks and Acceptance Criteria
- Create a
HomePage.vanilla
component - Implement conditional rendering based on the user's connection status:
- When not connected, display:
- A title "DWA Starter"
- An image (use the same workplace.svg or an equivalent)
- A button labeled "Connect to your DWA" that initiates the Web5 connection process
- A message below the button saying "Connect your DWA to get started"
- When connected, display:
- If a TodoList component exists, use it here
- If no TodoList component exists yet, create a simple placeholder component that says "Todo List Coming Soon!"
- When not connected, display:
- Ensure the component uses the Web5 connection status correctly
- Implement the connection functionality when the button is clicked
- Style the component using Tailwind CSS to match the existing design
- Ensure the layout is responsive and looks good on various screen sizes
🌟 Resources
- Web5 Documentation
- Vanilla JS Documentation
- Tailwind CSS Documentation
- DWA React Vite Starter App (for reference)
Getting Started
- Comment ".take" on this issue to get assigned
- Fork the repository and create a new branch for this task
- Follow the tasks outlined above
- Submit a pull request with your changes
- Respond to any feedback during the review process
Questions?
If you have any questions or need clarification, please comment on this issue or join our Discord community.
Happy coding! 🎉