Skip to content

Convert site to React #21

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Convert site to React #21

wants to merge 4 commits into from

Conversation

blowekamp
Copy link
Member

@blowekamp blowekamp commented Apr 28, 2025

Convert the static HTML site into a React-based site.

  • Add src/components/Navbar.js to create a new React component for the navigation bar.
  • Add src/components/Hero.js to create a new React component for the hero section.
  • Add src/components/Featurette.js to create a new React component for the featurettes.
  • Add src/components/Footer.js to create a new React component for the footer.
  • Add src/App.js to create a new React component for the main app, importing and using the Navbar, Hero, Featurette, and Footer components.
  • Add src/index.js to create a new React component for the entry point of the app, importing and using the App component and using ReactDOM to render the App component.
  • Add public/index.html to update the title to "SimpleITK - Home" and add a div with id "root" for rendering the React app.
  • Modify css/styles.css to update the styles to work with the new React components and remove any styles that are no longer needed.
  • Modify js/main.js to update the JavaScript to work with the new React components and remove any JavaScript that is no longer needed.
  • Delete index.html, about.html, and privacy_policy.html as they are no longer needed.

For more details, open the Copilot Workspace session.

Convert the static HTML site into a React-based site.

* Add `src/components/Navbar.js` to create a new React component for the navigation bar.
* Add `src/components/Hero.js` to create a new React component for the hero section.
* Add `src/components/Featurette.js` to create a new React component for the featurettes.
* Add `src/components/Footer.js` to create a new React component for the footer.
* Add `src/App.js` to create a new React component for the main app, importing and using the Navbar, Hero, Featurette, and Footer components.
* Add `src/index.js` to create a new React component for the entry point of the app, importing and using the App component and using ReactDOM to render the App component.
* Add `public/index.html` to update the title to "SimpleITK - Home" and add a div with id "root" for rendering the React app.
* Modify `css/styles.css` to update the styles to work with the new React components and remove any styles that are no longer needed.
* Modify `js/main.js` to update the JavaScript to work with the new React components and remove any JavaScript that is no longer needed.
* Delete `index.html`, `about.html`, and `privacy_policy.html` as they are no longer needed.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/SimpleITK/SimpleITK.github.io?shareId=XXXX-XXXX-XXXX-XXXX).
* **Dependencies**
  - Include React, ReactDOM, React Bootstrap, Bootstrap, FontAwesome, and React FontAwesome
* **DevDependencies**
  - Include React Scripts
* **Scripts**
  - Add scripts for starting, building, testing, and ejecting the React app
* **Browserslist**
  - Specify supported browsers for production and development
* **Routing**
  - Import `BrowserRouter`, `Route`, and `Switch` from `react-router-dom` in `src/App.js`
  - Add routes for the About and Privacy Policy pages in `src/App.js`

* **About Component**
  - Create `src/components/About.js` with content from the original `about.html`
  - Use Bootstrap classes for styling

* **Privacy Policy Component**
  - Create `src/components/PrivacyPolicy.js` with content from the original `privacy_policy.html`
  - Use Bootstrap classes for styling
* **Hero component**: Add featurettes array with imageSrc, description, and reverse properties. Update return statement to include featurettes mapping.
* **App.js**: Remove import and usage of Featurettes component. Update routing to include Hero component.
* **package.json**: Add react-router-dom dependency.
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.

1 participant