1. First, we need fresh reactjs setup, and for that, we need to run below commands into out terminal, and also we should have latest node version installed on our system:
npx create-react-app my-awesome-project
cd my-awesome-project
npm start
2. Now we need to run below commands into our project terminal to get bootstrap and related modules into our reactjs application:
npm install [email protected] --save
npm start //For start project again
3. Finally for the main output, we need to add below code into our my-awesome-project/src/App.js file or if you have fresh setup then you can replace my-awesome-project/src/App.js file code with below code:
import React from 'react';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
function App() {
return (
<div>
<div class="awesome-portfolio-area fix">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="section-heading">
<h2>CHECK OUR AWESOME <strong>PORTFOLIO</strong></h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin non odio id nibh ultrices blandit. Maecenas tincidunt, est sit amet pretium hendrerit, felis nibh bibendum arcu, nec tincidunt leo lorem ut lorem. Sed facilisis interdum faucibus. Cras tellus
leo, venenatis nec tortor in, porta maximus tellus. Etiam eget libero vestibulum</p>
</div>
</div>
</div>
</div>
<div class="container awesome-portfolio">
<div class="awesome-portfolio-menu">
<ul>
<li class="filter active" data-filter="all">All Items</li>
<li class="filter" data-filter=".design">Design</li>
<li class="filter" data-filter=".flat">Flat Design</li>
<li class="filter" data-filter=".illustration">illustration</li>
<li class="filter" data-filter=".branding">Branding</li>
</ul>
</div>
<div class="awesome-portfolio-content" id="MixItUp68DC04">
<div class="single-awesome-portfolio mix all flat illustration" style={{/*display: inline-block;*/}}>
<a href="#/">
<div class="awesome-img"><img src="https://www.bootdey.com/image/400x300/FF0000/000000" alt=""/></div>
<div class="awesome-info">
<h3>Portfolio Name</h3>
<p>Design</p>
</div>
</a>
</div>
<div class="single-awesome-portfolio mix all design branding" style={{/*display: inline-block;*/}}>
<a href="#/">
<div class="awesome-img"><img src="https://www.bootdey.com/image/400x300/1E90FF/000000" alt=""/></div>
<div class="awesome-info">
<h3>Portfolio Name</h3>
<p>Design</p>
</div>
</a>
</div>
<div class="single-awesome-portfolio mix all flat illustration" style={{/*display: inline-block;*/}}>
<a href="#/">
<div class="awesome-img"><img src="https://www.bootdey.com/image/400x300/" alt=""/></div>
<div class="awesome-info">
<h3>Portfolio Name</h3>
<p>Design</p>
</div>
</a>
</div>
<div class="single-awesome-portfolio mix all design branding" style={{/*display: inline-block;*/}}>
<a href="#/">
<div class="awesome-img"><img src="https://www.bootdey.com/image/400x300/FF8C00/000000" alt=""/></div>
<div class="awesome-info">
<h3>Portfolio Name</h3>
<p>Design</p>
</div>
</a>
</div>
<div class="single-awesome-portfolio mix all flat design illustration" style={{/*display: inline-block;*/}}>
<a href="#/">
<div class="awesome-img"><img src="https://www.bootdey.com/image/400x300/9932CC/000000" alt=""/></div>
<div class="awesome-info">
<h3>Portfolio Name</h3>
<p>Design</p>
</div>
</a>
</div>
<div class="single-awesome-portfolio mix all design branding " style={{/*display: inline-block;*/}}>
<a href="#/">
<div class="awesome-img"><img src="https://www.bootdey.com/image/400x300/008B8B/000000" alt=""/></div>
<div class="awesome-info">
<h3>Portfolio Name</h3>
<p>Design</p>
</div>
</a>
</div>
<div class="single-awesome-portfolio mix all design illustration" style={{/*display: inline-block;*/}}>
<a href="#/">
<div class="awesome-img"><img src="https://www.bootdey.com/image/400x300/" alt=""/></div>
<div class="awesome-info">
<h3>Portfolio Name</h3>
<p>Design</p>
</div>
</a>
</div>
<div class="single-awesome-portfolio mix all flat illustration branding" style={{/*display: inline-block;*/}}>
<a href="#/">
<div class="awesome-img"><img src="https://www.bootdey.com/image/400x300/6495ED/000000" alt=""/></div>
<div class="awesome-info">
<h3>Portfolio Name</h3>
<p>Design</p>
</div>
</a>
</div>
<div class="single-awesome-portfolio mix all design branding" style={{/*display: inline-block;*/}}>
<a href="#/">
<div class="awesome-img"><img src="https://www.bootdey.com/image/400x300/FF69B4/000000" alt=""/></div>
<div class="awesome-info">
<h3>Portfolio Name</h3>
<p>Design</p>
</div>
</a>
</div>
<div class="single-awesome-portfolio mix all flat illustration" style={{/*display: inline-block;*/}}>
<a href="#/">
<div class="awesome-img"><img src="https://www.bootdey.com/image/400x300/7B68EE/000000" alt=""/></div>
<div class="awesome-info">
<h3>Portfolio Name</h3>
<p>Design</p>
</div>
</a>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/jquery.mixitup/latest/jquery.mixitup.min.js"></script>
</div>
);
}
export default App;
4. Now we need to add below code into our my-awesome-project/src/App.css file :
.awesome-portfolio-area {
background: #f7f5f6 none repeat scroll 0 0;
overflow: hidden;
padding-top: 50px;
}
.section-heading{text-align:center}
.section-heading h2 {
color: #666;
font-size: 45px;
line-height: 45px;
margin-bottom: 20px;
}
.section-heading p{}
.awesome-portfolio{}
.single-awesome-portfolio {
width: 20%;
float: left;
overflow:hidden
}
.single-awesome-portfolio a {
position: relative;
display: block;
}
.awesome-img {
overflow: hidden;
position: relative;
transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1) 0s;
z-index: 2;
display:block
}
.awesome-img img{}
.awesome-info {
background-color: #282727;
height: 100%;
padding: 20px 30px 12px;
position: absolute;
top: 0;
width: 100%;
opacity:1;
display:block;
}
.awesome-info h3 {
color: #fff;
font-size: 16px;
margin-bottom: 3px;
}
.awesome-info p {
color: #aaa;
font-size: 12px;
}
.single-awesome-portfolio a:hover .awesome-img {transform: translateY(100%);}
.awesome-portfolio-menu {
margin-bottom: 40px;
margin-top: 20px;
}
.awesome-portfolio-menu ul{text-align:center}
.awesome-portfolio-menu ul li {
border: 1px solid #ececec;
color: #888888;
cursor: pointer;
display: inline-block;
font-size: 12px;
font-weight: 300;
margin: 0 4px;
padding: 8px 17px;
transition: all 0.3s ease 0s;
background: #fff;
}
.awesome-portfolio-menu ul li.active,.awesome-portfolio-menu ul li:hover{border-color: #2bcdc1;
color: #2bcdc1;}
.awesome-portfolio-content .mix{
display: none;
}
img {max-width:100%;height:auto}