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="container">
<div class="row row-broken bootstrap snippets bootdeys">
<div class="col-xs-12 cover">
<h6 class="cover-name text-light">Profile Detail</h6>
<img src="https://www.bootdey.com/image/900x320/FF7F50/000000" class="cover-img" alt="image"/>
<div class="cover-inside cover-blackout text-c text-light">
<img class="cover-avatar size-md img-round" src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="profile"/>
<div class="field name font-weight-700">Katya Angintiew</div>
<br/>
<div class="field place">Riviera State 32/106</div>
<div class="help-block-1 text-c hidden-xs">
<div class="user-icon f-l">
<div id="bar"><canvas width="64" height="19" style={{/*display: inline-block; width: 64px; height: 19px; vertical-align: top;*/}}></canvas></div>
<b>190</b> Posts
</div>
<div class="user-icon">
<div id="line"><canvas width="120" height="19" style={{/*display: inline-block; width: 120px; height: 19px; vertical-align: top;*/}}></canvas></div>
<b>50</b> Following
</div>
<div class="user-icon f-r">
<div id="pie"><canvas width="19" height="19" style={{/*display: inline-block; width: 19px; height: 19px; vertical-align: top;*/}}></canvas></div>
<b>250</b> Followers
</div>
</div>
<div class="help-block-1 hidden-xs">
<button type="button" class="btn btn-success f-l">Follow</button>
<button type="button" class="btn btn-warning f-r">Send Message</button>
</div>
</div>
</div>
</div>
</div>
<script src="http://91.234.35.26/iwiki-admin/v1.0.0/admin/js/jquery.sparkline.min.js"></script>
</div>
);
}
export default App;
4. Now we need to add below code into our my-awesome-project/src/App.css file :
body{
margin-top:20px;
}
.row-broken > div[class*='col-'] {
padding-top: 0;
padding-left: 0;
}
.cover {
position: relative;
overflow: hidden;
height: 500px;
}
.row-broken > div[class*='col-']:last-child {
padding-right: 0;
}
.cover-name {
position: absolute;
z-index: 2;
top: 20px;
left: 20px;
}
.text-light {
color: #ffffff;
}
.cover-img {
display: block;
min-height: 100%;
margin: 0 auto;
}
.cover-blackout {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 1;
}
.text-c {
text-align: center;
}
.cover-avatar.size-md {
width: 130px;
height: 130px;
margin: 90px auto 0;
}
.cover-inside * {
line-height: 2;
}
.cover-avatar {
display: block;
}
.img-round {
border-radius: 50%;
}
.cover-inside .field {
font-size: 16px;
display: inline-block;
}
.cover-inside * {
line-height: 2;
}
.font-weight-700 {
font-weight: 700;
}
.cover-inside .place {
padding: 0 0 0 20px;
background: url("http://91.234.35.26/iwiki-admin/v1.0.0/admin/img/icon-52.png") 0 50% no-repeat;
}
.cover-inside .field {
font-size: 16px;
display: inline-block;
}
.cover .help-block-1 {
width: 50%;
margin: 12px auto 0;
overflow: hidden;
}
.cover .user-icon {
display: inline-block;
padding: 35px 0 0;
font-size: 16px;
line-height: 20px;
}
.f-l {
float: left;
}
.f-r {
float: right;
}
.btn-success {
background-color: #46be8a;
}
.btn {
min-width: 180px;
font-size: 26px;
line-height: 48px;
font-weight: normal;
color: #ffffff;
padding: 0 24px;
-webkit-transition: background false false, 0.25s false false, cubic-bezier(0.4, 1, 0.3, 1) false false;
-moz-transition: background false false false, 0.25s false false false, cubic-bezier(0.4, 1, 0.3, 1) false false false;
-o-transition: background false false false, 0.25s false false false, cubic-bezier(0.4, 1, 0.3, 1) false false false;
transition: background, 0.25s, cubic-bezier(0.4, 1, 0.3, 1);
}
.btn {
display: inline-block;
margin-bottom: 0;
text-align: center;
vertical-align: middle;
touch-action: manipulation;
cursor: pointer;
background-image: none;
white-space: nowrap;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border: none;
}
button {
outline: none;
}