Skip to content

Commit a7cc216

Browse files
committed
Dev.to Blog added
1 parent 302f6a1 commit a7cc216

File tree

5 files changed

+168
-9
lines changed

5 files changed

+168
-9
lines changed

src/App.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
@font-face {
2+
font-family: 'Jungle_Roar';
3+
src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/127738/Jungle_Roar_Bold.ttf') format('truetype');
4+
}
5+
6+
h1, h2{
7+
font-family: 'Jungle_Roar';
8+
}
9+
110
.App {
211
text-align: center;
312
background-color: #edf9fe;

src/Name.js

Lines changed: 84 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
const greeting = {
22
title: "Your Name",
33
logo_name: "Name",
4+
email: "email id",
45
subTitle:
56
"I'm a student pursuing {Course} in {department} from {university}. I'm a passionate learner who's always willing to learn and work across technologies and domains. I love to explore new technologies and leverage. Apart from that I also love to guide and mentor newbies. I'm currently into Web Development and working on my MERN Website"
67
};
8+
9+
const BlogData = {
10+
// this show your dev.to blog in your Portfolio blog
11+
show_Blog: true, // if true it Show your DEV.to article in Blog Section, if false than Blog Section convert to skill Section.
12+
devto_username: "vimal"
13+
};
14+
15+
716
const socialMedia = [
817
// fontawesome is fontawesome Class Name of Icon
918
// Don't Forget to add "fa-3x" in fontawesome to increase Size of icons
@@ -68,7 +77,7 @@ const DevSkill = [
6877
},
6978
{
7079
icon: "node",
71-
fontawesome: "fab fa-node-js tool fa-3x"
80+
fontawesome: "fab fa-node tool fa-3x"
7281
},
7382
{
7483
icon: "sass",
@@ -87,8 +96,68 @@ const DevSkill = [
8796
fontawesome: "fab fa-npm tool fa-3x"
8897
},
8998
{
90-
icon: "github",
91-
fontawesome: "fab fa-github tool fa-3x"
99+
icon: "yarn",
100+
fontawesome: "fab fa-yarn tool fa-3x"
101+
},
102+
{
103+
icon: "aws",
104+
fontawesome: "fab fa-aws tool fa-3x"
105+
},
106+
{
107+
icon: "jenkins",
108+
fontawesome: "fab fa-jenkins tool fa-3x"
109+
},
110+
{
111+
icon: "ubuntu",
112+
fontawesome: "fab fa-ubuntu tool fa-3x"
113+
},
114+
{
115+
icon: "python",
116+
fontawesome: "fab fa-python tool fa-3x"
117+
},
118+
{
119+
icon: "wordpress",
120+
fontawesome: "fab fa-wordpress tool fa-3x"
121+
},
122+
{
123+
icon: "rust",
124+
fontawesome: "fab fa-rust tool fa-3x"
125+
},
126+
{
127+
icon: "redhat",
128+
fontawesome: "fab fa-redhat tool fa-3x"
129+
},
130+
{
131+
icon: "swift",
132+
fontawesome: "fab fa-swift tool fa-3x"
133+
},
134+
{
135+
icon: "php",
136+
fontawesome: "fab fa-php tool fa-3x"
137+
},
138+
{
139+
icon: "r-project",
140+
fontawesome: "fab fa-r-project tool fa-3x"
141+
},
142+
{
143+
icon: "laravel",
144+
fontawesome: "fab fa-laravel tool fa-3x"
145+
},
146+
{
147+
icon: "drupal",
148+
fontawesome: "fab fa-drupal tool fa-3x"
149+
},
150+
{
151+
icon: "docker",
152+
fontawesome: "fab fa-docker tool fa-3x"
153+
},
154+
{
155+
icon: "ios",
156+
fontawesome: "fab fa-app-store-ios tool fa-3x"
157+
},
158+
{
159+
icon: "android",
160+
fontawesome: "fab fa-android tool fa-3x"
92161
},
93162

94163
];
@@ -101,8 +170,16 @@ const DesignSkill = [
101170
fontawesome: "fab fa-figma tool fa-3x"
102171
},
103172
{
104-
icon: "figma",
105-
fontawesome: "fab fa-figma tool fa-3x"
173+
icon: "sketch",
174+
fontawesome: "fab fa-sketch tool fa-3x"
175+
},
176+
{
177+
icon: "unity",
178+
fontawesome: "fab fa-unity tool fa-3x"
179+
},
180+
{
181+
icon: "sketch",
182+
fontawesome: "fab fa-sketch tool fa-3x"
106183
}
107184

108185
];
@@ -199,7 +276,6 @@ const ContactBio =[
199276

200277
];
201278

202-
203279
export {
204280
greeting,
205281
socialMedia,
@@ -212,5 +288,6 @@ export {
212288
ProjectsBio,
213289
ContactBio,
214290
DevBio,
215-
DesignBio
291+
DesignBio,
292+
BlogData
216293
};

src/components/Blog.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import React, { Component } from 'react'
2+
import './card.css'
3+
import {BlogData} from '../Name'
4+
5+
class Blog extends Component {
6+
7+
constructor(props){
8+
super(props);
9+
this.state ={
10+
posts : [],
11+
isLoaded: false
12+
}
13+
}
14+
15+
componentDidMount() {
16+
const apiUrl = `https://dev.to/api/articles?username=${BlogData.devto_username}`;
17+
fetch(apiUrl)
18+
.then((response) => response.json())
19+
.then((data) => {
20+
console.log(data)
21+
this.setState({posts : data,
22+
isLoaded :true
23+
})
24+
});
25+
}
26+
27+
render() {
28+
var { isLoaded, posts } = this.state
29+
// console.log(projects)
30+
const projectlist = posts.map(
31+
post=> (
32+
<div className="card icon-box" key={post.id}>
33+
<img src={post.cover_image} alt="post" />
34+
<h3 className="black">{post.title}</h3>
35+
<p className="black">{post.description}</p>
36+
<div className="icons">
37+
<a target="blank" href={post.url}>Read More ....</a>
38+
</div>
39+
</div>
40+
41+
)
42+
)
43+
if(!isLoaded){
44+
return <h2>Blog Post is Loading........</h2>
45+
}
46+
else{
47+
return (
48+
<div>
49+
<h1>My Blog</h1>
50+
<div className="project">{projectlist}</div>
51+
</div>
52+
)
53+
}
54+
}
55+
}
56+
export default Blog;

src/components/Nav.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import React, { Component } from "react";
22
import { NavLink,Link } from 'react-router-dom';
3-
import { greeting } from '../Name'
3+
import { BlogData,greeting } from '../Name'
44
import './nav.css'
55

66
class Nav extends Component {
77
render() {
8+
let skill ="Skill";
9+
if(BlogData.show_Blog){
10+
skill= "Blog"
11+
}
812
return (
913
<div>
1014
<header className="header">
@@ -68,7 +72,7 @@ class Nav extends Component {
6872
onMouseEnter={(event) => onMouseEnter(event)}
6973
onMouseOut={(event) => onMouseOut(event)}
7074
>
71-
Skill
75+
{skill}
7276
</NavLink>
7377
</li>
7478
<li>

src/pages/Skills.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,20 @@ import Footer from '../components/Footer'
44
import DevTool from '../components/DevTool';
55
import Designtool from '../components/DesignTool'
66
import skills from '../assets/img/skill.svg'
7+
import Blog from "../components/Blog";
8+
import {BlogData} from "../Name";
79

810
class Skills extends Component {
911
render() {
12+
13+
let ShowBlog;
14+
if (BlogData.show_Blog) {
15+
ShowBlog = <Blog/>;
16+
} else {
17+
ShowBlog = ""
18+
}
19+
20+
1021
return (
1122
<div>
1223
<Nav/>
@@ -24,6 +35,8 @@ class Skills extends Component {
2435
</div>
2536
</div>
2637
<br/>
38+
{ShowBlog}
39+
<br/>
2740
<Footer/>
2841
</div>
2942
);

0 commit comments

Comments
 (0)