Valorant-inspired React Website
Tags: react, webdesign, webdev, codenewbie
Published: 2021-04-09 13:36:23

### <center>React Valorant Website Tutorial</center>

------------

#### <center>Browse our [Teachable](http://anobject.teachable.com "Teachable") courses.</center>

------------

![valorant website splash](https://user-images.githubusercontent.com/58220766/113495749-6b04ae80-94c1-11eb-9e63-39bc6cd8576b.png)

### We'll build this webpage in 5 main sections.

1. **Section 1** - our product logo and an image gallery
2. **Section 2** - information about our product
3. **Section 3** - accolades about our product
4. **Section 4** - opportunities to buy our product
5. **Section 5** - contact information for our business

#### We'll create a Home.js component to hold all of this code.

------------

### Section 1.

#### All we're going to do here is create containers for our product logo & button, and image gallery.

We'll deal with the details of the image gallery implementation later.

For now we position our logo and button on the page and place our image gallery behind everything.

<br />

```
<div className="section1">
    <div className="container">
        <img src="./images/reyna.png" alt="" className="splash_img" />
        <img src="./images/val-logo.png" alt="" className="splash_logo" />
        <div className="sign_up">
            <a href="https://localhost" target="_blank" rel="noreferrer">Sign Up</a>
        </div>
    </div>

    <div ref={galleryRef} className="gallery">
        {
            loaded ?
                <Deck gallery={gallery} /> : null
        }
    </div>
</div>
```

This is our result:

<br />

![section 1](https://user-images.githubusercontent.com/58220766/108641781-296af780-746f-11eb-9880-4d47afe1e488.png)

<br />

------------

### Section 2.

#### For this section we'll create a container for a grid of items.

Our grid will be 2x4 and centered in the screen.

Each item of the grid will be a '**Point**' component (a "point" about our product)

Our '**Point**' component will consist of an icon, name, and brief description.

<br />

```
function Point(props) {
    return (
        <div className="point">
            <div className="point_icon">
                <img src={props.img} alt=""/>
            </div>
            <div className="point_title">
                <div className="point_name">In the Crosses</div>
                <div className="point_description">Rewards accuracy and skill</div>
            </div>
        </div>
    )
}
```

<br />

![point](https://user-images.githubusercontent.com/58220766/108641792-3687e680-746f-11eb-8985-5677127d4c4f.png)

<br />

Our **Section 2** code is very simple.

<br />

```
<div className="section2">
    <div className="marketing_points">
        <Point img="./images/icons/val-symbol.png" />
        <Point img="./images/icons/bladestorm.png" />
        <Point img="./images/icons/dimensional-drift.png" />
        <Point img="./images/icons/empress.png" />
        <Point img="./images/icons/shock-bolt.png" />
        <Point img="./images/icons/turret.png" />
    </div>
</div>
```

This is our result:

<br />

![section 2](https://user-images.githubusercontent.com/58220766/108641793-3687e680-746f-11eb-92bb-8537a3d9eb23.png)

<br />

------------

### Section 3.

#### A simple flexbox of items.

```
<div className="section3">
    <div className="accolades">
        <div className="accolade">
            <i className="fas fa-award"></i>
        </div>
        <div className="accolade">
            <i className="fas fa-flag"></i>
        </div>
        <div className="accolade">
            <i className="fas fa-gamepad"></i>
        </div>
    </div>
</div>
```

This is our result:

<br />

![section 3](https://user-images.githubusercontent.com/58220766/108641794-37207d00-746f-11eb-9341-ba471b50a731.png)

<br />

------------

### Section 4.

#### For this section we'll create a container for a flexbox of items.

Each item of the flexbox will be a '**Package**' component.

Our '**Package**' component will consist of background image, title, description, price, purchase button, and feature list.

For now, we'll just use dummy information.

<br />

```
<div className="package" style={{ backgroundColor: props.color }}>
    <img src={props.image} alt="" className="package_image" />

    <div className="package_information">
        <div className="package_head">
            <div className="package_name">{props.name}</div>
            <div className="package_description">{props.description}</div>
        </div>
        <div className="package_body">
            <div className="package_price">{`$${props.price}`}</div>
            <div className="package_purchase">
                <a href="https://localhost" target="_blank" rel="noreferrer">Select</a>
            </div>
        </div>
        <div className="package_foot">
            Includes all base features:
            <ul>
                <li>Feature 1</li>
                <li>Feature 2</li>
                <li>Feature 3</li>
                <li>Feature 4</li>
            </ul>
        </div>
    </div>
</div>
```

<br />

![package](https://user-images.githubusercontent.com/58220766/108641791-3687e680-746f-11eb-8c48-4029e203bf4e.png)

<br />

Our **Section 4** code is very simple.

<br />

```
<div className="section4">
    <div className="packages_container">
        <Package color="#2db634" img="./images/viper.png" />
        <Package color="#fb6c32" img="./images/phoenix.png" />
        <Package color="#3694f5" img="./images/jett.png" />
    </div>
</div>
```

This is our result:

<br />

![section 4](https://user-images.githubusercontent.com/58220766/108641795-37207d00-746f-11eb-9f63-4dee9e86ebb1.png)

<br />

------------

### Section 5.

#### For this section we'll have a series of unordered lists.

This is just basic contact information organized into lists positioned horizontally. Nothing special here.

<br />

```
<div className="section5">
    <section className="contact_section" >
        <ul>
            <li>Affiliates</li>
            <li>Careers</li>
            <li>Privacy</li>
        </ul>
    </section>
    <section className="contact_section" >
        <ul>
            <li>Telephone <i className="fas fa-phone-square-alt"></i> </li>
            <li>Email <i className="fas fa-envelope-square"></i> </li>
        </ul>
    </section>
    <section className="contact_section" >
        <ul>
            <li>Instagram <i className="fab fa-instagram-square"></i> </li>
            <li>Twitter <i className="fab fa-twitter-square"></i> </li>
            <li>Facebook <i className="fab fa-facebook-square"></i> </li>
        </ul>
    </section>
</div>
```

This is our result:

<br />

![section 5](https://user-images.githubusercontent.com/58220766/108641796-37b91380-746f-11eb-8245-ca2fc13d4dba.png)

<br />

------------

### Let's get our image gallery up and running.

#### We created this component in a separate tutorial.

You can find it [here](https://dev.to/anobjectisa/react-js-slideshow-responsive-autoplay-with-manual-navigation-buttons-2a49 "here").

We're simply going to import and modify it to fit our project.

We don't need the left and right navigation buttons for this gallery so we can strip those out.

Then we just modify some color schemes and we're good to go.

```
<div ref={galleryRef} className="gallery">
    {
        loaded ?
            <Deck gallery={gallery} /> : null
    }
</div>
```

<br />

![gallery](https://user-images.githubusercontent.com/58220766/108641787-312a9c00-746f-11eb-892f-089b04a1a147.gif)

<br />

------------

### Let's implement a navigation bar.

#### We created this component in a separate tutorial.

You can find it [here](https://dev.to/anobjectisa/react-navigation-bar-tutorial-slide-d1d "here").

We're simply going to import and modify it to fit our project.

All we really need to do is change the color scheme and icon being used.

This is our result:

<br />

![nav bar](https://user-images.githubusercontent.com/58220766/108641788-3556b980-746f-11eb-9cd6-3f3a44e4822b.gif)

<br />

------------

### There is much more nuance to this project.

You can view our video tutorial down below.

You can get the source files [here](https://github.com/an-object-is-a/react-webpage-03 "here").

All contact image icons we're gathered from [Font Awesome](https://fontawesome.com/ "Font Awesome").

------------

#### <center>If you want a more in-depth guide, check out my full video tutorial on YouTube, **[An Object Is A](https://www.youtube.com/c/anobjectisa "An Object Is A")**.</center>


### <center>React Valorant Website Tutorial</center>

{% youtube cAC4s5GuUb8 %}