GithubHelp home page GithubHelp logo

byron2016 / 022_wd_react_lp_000 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.25 MB

React Project Tutorial: Build a Responsive Portfolio Website w/ Advanced Animations (2022)

HTML 0.80% Shell 7.57% CSS 29.85% JavaScript 61.77%

022_wd_react_lp_000's Introduction

MyLogo
 

022_wd_react_lp_000

 

Table of contents

Project Description

022_wd_react_lp_000 is a practice to build a Responsive Portfolio Website with Advanced Animations (2022) React, HTLM, CSS, bootstrap 5 following Youtube webdecoded's tutorial React Project Tutorial: Build a Responsive Portfolio Website w/ Advanced Animations (2022) and the other help that you can find into Reference section.

⏪(Back to top)  

Technologies used

React HTML5 SASS CSS3 JavaScript Vite

⏪(Back to top)

References

⏪(Back to top)

Steps

  • Install and Setup Vite React Bootstrap 5 and Bootstrap Icons

    • Create Vite Project For React

        npm create vite@latest
    • Define a Project name

        ? Project name: » vite-project
    • Select react.

        ? Select a framework: » - Use arrow-keys. Return to submit.
            Vanilla
            Vue
        >   React
            Preact
            Lit
            Svelte
            Others
    • Select react js with typescript.

        ? Select a variant: » - Use arrow-keys. Return to submit.
        >   JavaScript
            TypeScript
            JavaScript + SWC
            TypeScript + SWC
    • Move to project directory and install dependencies.

        cd react-project
        npm install
        npm run dev
    • Install Bootstrap 5 in react

        npm install react-bootstrap bootstrap
    • After install add a bootstrap 5 element in app.jsx.

      • Add a new file components/NavBar.jsx
      • Copy NavBar example
      • Add NavBar component to app.jsx
      import "bootstrap/dist/css/bootstrap.min.css";
      import BasicExample from "./components/NavBar";
      
      function App() {
        return (
          <div className="App">
            <BasicExample />
          </div>
        );
      }
      
      export default App;
      • Add a new file components/Pills.jsx
      • Copy Pills example
      • Add Pills component to app.jsx
      import "bootstrap/dist/css/bootstrap.min.css";
      import PillsExample from "./components/Pills";
      
      function App() {
        return (
          <div className="App">
            <PillsExample />
          </div>
        );
      }
      
      export default App;
    • Install React Bootstrap Icons

        npm i react-bootstrap-icons
    • Install react-multi-carousel

        npm i react-multi-carousel

    ⏪(Back to top)

  • Adding Custom Environment Variables

    • Create React App

      • Available with [email protected] and higher.
      • By default you will have NODEENV defined for you, and any other environment variables starting with REACT_APP.
      • Do not store any secrets (such as private API keys) in your React app!. Environment variables are embedded into the build, meaning anyone can view them by inspecting your app's files.
    • Vite

      • Note that Vite doesn't load .env files by default as the files to load can only be determined after evaluating the Vite config Using Environment Variables in Config

      • Using Environment Variables in Config

        • Modify file vite.config.js

          import "bootstrap/dist/css/bootstrap.min.css";
          import BasicExample from "./components/NavBar";
          
          function App() {
            return (
              <div className="App">
                <BasicExample />
              </div>
            );
          }
          
          export default App;
        • Add these variables to a new .env or .env.local file

          REACT_APP_MAILCHIMP_URL = "https://gmail.xxxx.com/subscribe/post";
          REACT_APP_MAILCHIMP_U = "xxxxxxxxxxxxxxxxx";
          REACT_APP_MAILCHIMP_ID = "YYYYYYYYYYYY";
        • Add a new component component/Test.js file

          export const Test = () => {
            console.log(import.meta.env.VITE_SOME_KEY); // 123
            console.log(process.env.REACT_APP_MAILCHIMP_URL);
          
            const a_var = `${process.env.REACT_APP_MAILCHIMP_URL}`;
            console.log(a_var);
          
            return (
              <div>
                <small><b>{process.env.NODE_ENV}</b></small>
                <br>
                <small><b>{process.env.REACT_APP_MAILCHIMP_URL}</b></small>
              </div>
            );
          };
        • Add Test component to App.jsx

    ⏪(Back to top)

  • For contact form.

    • Create a Contact.jsx file component

      • Add a new file components/Contact.jsx
    • Install npm dependecies

        npm i express cors nodemailer
    • Create a Server.js file to send servers

      • Add a new file /server.js
      • Configure gmail user and password
        • In google apps' icon select acconts
        • Select security
        • Less secure app access
        • d
    • Install npm react-mailchimp-subscribe

        npm i react-mailchimp-subscribe
    • MailChimp

      • Create a new account
      • Copy Signup form URL Audience/Signup forms/Form builder/Signup form URL

    ⏪(Back to top)

  • Add Animation.css

    • Install npm dependecies

        npm install animate.css --save
    • React on Screen

        npm install react-on-screen

    ⏪(Back to top)

022_wd_react_lp_000's People

Contributors

byron2016 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.