Skip to content

Commit 7adf994

Browse files
committed
data updated
1 parent 8b067d0 commit 7adf994

File tree

3 files changed

+146
-70
lines changed

3 files changed

+146
-70
lines changed

src/Components/Main.js

Lines changed: 22 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
import React from 'react';
3-
import {title} from './data';
3+
import {titleMetaData} from './data';
44

55
class Main extends React.Component {
66
constructor(props){
@@ -12,78 +12,33 @@ class Main extends React.Component {
1212
}
1313

1414
componentDidMount() {
15-
console.log(JSON.stringify(title));
15+
//console.log(JSON.stringify(titleMetaData));
1616
}
1717

1818
render() {
1919
return(
2020
<div className="main thememain-white">
21-
<div className="container content-main">
22-
<div className="row">
23-
<div className="col-12">
24-
<h3>An introduction : </h3>
25-
</div>
26-
</div>
27-
<div className="row">
28-
<div className="col-sm">
29-
<ul>
30-
<li><a href="#">Introduction Of ReactJs</a></li>
31-
<li><a href="#">Introduction Of ReactJs</a></li>
32-
<li><a href="#">Introduction Of ReactJs</a></li>
33-
<li><a href="#">Introduction Of ReactJs</a></li>
34-
</ul>
35-
</div>
36-
<div className="col-sm">
37-
<ul>
38-
<li><a href="#">Code Editors</a></li>
39-
<li><a href="#">Code Editors</a></li>
40-
<li><a href="#">Code Editors</a></li>
41-
<li><a href="#">Code Editors</a></li>
42-
</ul>
43-
</div>
44-
<div className="col-sm">
45-
<ul>
46-
<li><a href="#">Developer console</a></li>
47-
<li><a href="#">Developer console</a></li>
48-
<li><a href="#">Developer console</a></li>
49-
<li><a href="#">Developer console</a></li>
50-
</ul>
51-
</div>
52-
</div>
53-
54-
<div className="row">
55-
<div className="col-12">
56-
<h3>ReactJs Fundamentals : </h3>
57-
</div>
58-
</div>
59-
<div className="row">
60-
<div className="col-sm">
61-
<ul>
62-
<li><a href="#">Introduction Of ReactJs</a></li>
63-
<li><a href="#">Introduction Of ReactJs</a></li>
64-
<li><a href="#">Introduction Of ReactJs</a></li>
65-
<li><a href="#">Introduction Of ReactJs</a></li>
66-
</ul>
67-
</div>
68-
<div className="col-sm">
69-
<ul>
70-
<li><a href="#">Code Editors</a></li>
71-
<li><a href="#">Code Editors</a></li>
72-
<li><a href="#">Code Editors</a></li>
73-
<li><a href="#">Code Editors</a></li>
74-
</ul>
75-
</div>
76-
<div className="col-sm">
77-
<ul>
78-
<li><a href="#">Developer console</a></li>
79-
<li><a href="#">Developer console</a></li>
80-
<li><a href="#">Developer console</a></li>
81-
<li><a href="#">Developer console</a></li>
82-
</ul>
83-
</div>
84-
</div>
21+
{
22+
titleMetaData.map( (title) =>
23+
<div className="container content-main">
24+
<div className="row">
25+
<div className="col-12">
26+
<h3>{ title.labelTitle }</h3>
27+
</div>
28+
</div>
29+
<div className="row">
30+
<div className="col-sm">
31+
<ul>
32+
{title.topics.map((topics) =>
33+
<li><a href={topics.url}>{topics.title}</a></li>
34+
)}
35+
</ul>
36+
</div>
37+
</div>
38+
</div>
39+
)
40+
}
8541
</div>
86-
</div>
8742
);
8843
}
8944
}

src/Components/data.js

Lines changed: 121 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
export const title =
1+
/*export const title =
22
{
33
"Javascript": {
44
"introduction": {
5-
"javascript objects" : "javascript objects",
5+
"Javascript Objects" : "Javascript Objects",
66
"Prototypal inheritance":"Prototypal inheritance",
77
"Scoping and hosting":"Scoping and hosting",
88
"Closures":"Closures",
@@ -22,5 +22,123 @@ export const title =
2222
"Singleton":"Singleton"
2323
}
2424
}
25-
};
25+
}; */
2626

27+
export const titleMetaData =
28+
[
29+
{
30+
"labelTitle": "Introduction",
31+
"topics": [
32+
{
33+
"id": "javascript-objects",
34+
"title": "Javascript Objects",
35+
"url": "javascript-objects"
36+
},
37+
{
38+
"id": "prototypal-inheritance",
39+
"title": "Prototypal Inheritance",
40+
"url": "prototypal-inheritance"
41+
},
42+
{
43+
"id": "scoping-and-hosting",
44+
"title": "Scoping and hosting",
45+
"url": "scoping-and-hosting"
46+
},
47+
{
48+
"id": "javascript-objects",
49+
"title": "Javascript Objects",
50+
"url": "javascript-objects"
51+
},
52+
{
53+
"id": "prototypal-inheritance",
54+
"title": "Prototypal Inheritance",
55+
"url": "prototypal-inheritance"
56+
},
57+
{
58+
"id": "scoping-and-hosting",
59+
"title": "Scoping and hosting",
60+
"url": "scoping-and-hosting"
61+
},
62+
{
63+
"id": "javascript-objects",
64+
"title": "Javascript Objects",
65+
"url": "javascript-objects"
66+
},
67+
{
68+
"id": "prototypal-inheritance",
69+
"title": "Prototypal Inheritance",
70+
"url": "prototypal-inheritance"
71+
},
72+
{
73+
"id": "scoping-and-hosting",
74+
"title": "Scoping and hosting",
75+
"url": "scoping-and-hosting"
76+
},
77+
{
78+
"id": "javascript-objects",
79+
"title": "Javascript Objects",
80+
"url": "javascript-objects"
81+
},
82+
{
83+
"id": "prototypal-inheritance",
84+
"title": "Prototypal Inheritance",
85+
"url": "prototypal-inheritance"
86+
},
87+
{
88+
"id": "scoping-and-hosting",
89+
"title": "Scoping and hosting",
90+
"url": "scoping-and-hosting"
91+
}
92+
]
93+
},
94+
{
95+
"labelTitle": "Design Pattern",
96+
"topics": [
97+
{
98+
"id": "decorator",
99+
"title": "Decorator",
100+
"url": "decorator"
101+
},
102+
{
103+
"id": "factory",
104+
"title": "Factory",
105+
"url": "factory"
106+
},
107+
{
108+
"id": "singleton",
109+
"title": "Singleton",
110+
"url": "singleton"
111+
},
112+
{
113+
"id": "decorator",
114+
"title": "Decorator",
115+
"url": "decorator"
116+
},
117+
{
118+
"id": "factory",
119+
"title": "Factory",
120+
"url": "factory"
121+
},
122+
{
123+
"id": "singleton",
124+
"title": "Singleton",
125+
"url": "singleton"
126+
},
127+
{
128+
"id": "decorator",
129+
"title": "Decorator",
130+
"url": "decorator"
131+
},
132+
{
133+
"id": "factory",
134+
"title": "Factory",
135+
"url": "factory"
136+
},
137+
{
138+
"id": "singleton",
139+
"title": "Singleton",
140+
"url": "singleton"
141+
}
142+
]
143+
}
144+
];

src/style.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@
6363

6464
.content-main li{
6565
padding-bottom: 5px;
66+
padding-left: 15px;
67+
width:33%;
68+
display: inline-flex !important;
6669
}
6770

6871
.theme-text a{

0 commit comments

Comments
 (0)