Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images #42

Open
wants to merge 196 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
0673577
[imad-console] Updates ui/index.html
Isaac6171 Sep 17, 2016
63ea682
[imad-console] Updates ui/style.css
Isaac6171 Sep 17, 2016
5e4da99
[imad-console] Updates server.js
Isaac6171 Sep 18, 2016
e4acdfe
Create article-one.html
Isaac6171 Sep 19, 2016
b206517
Add files via upload
Isaac6171 Sep 19, 2016
0ad2026
[imad-console] Updates ui/article-one.html
Isaac6171 Sep 19, 2016
971ac83
[imad-console] Updates ui/article-one.html
Isaac6171 Sep 19, 2016
8cc030c
[imad-console] Updates ui/article-one.html
Isaac6171 Sep 19, 2016
dbf341a
[imad-console] Updates server.js
Isaac6171 Sep 19, 2016
fe9c682
[imad-console] Updates ui/article-one.html
Isaac6171 Sep 19, 2016
85c3c49
[imad-console] Updates ui/article-one.html
Isaac6171 Sep 19, 2016
3e71848
[imad-console] Updates ui/article-one.html
Isaac6171 Sep 19, 2016
52210c6
Create article-two.html
Isaac6171 Sep 19, 2016
7547fea
Create article-three.html
Isaac6171 Sep 19, 2016
d2d8dec
[imad-console] Updates server.js
Isaac6171 Sep 19, 2016
2922141
[imad-console] Updates ui/article-one.html
Isaac6171 Sep 19, 2016
f53c289
[imad-console] Updates ui/article-one.html
Isaac6171 Sep 19, 2016
d6ae47e
[imad-console] Updates ui/article-one.html
Isaac6171 Sep 19, 2016
6548ac4
[imad-console] Updates ui/article-one.html
Isaac6171 Sep 19, 2016
ce2b361
[imad-console] Updates ui/article-three.html
Isaac6171 Sep 19, 2016
60e2f17
[imad-console] Updates ui/style.css
Isaac6171 Sep 19, 2016
b7dff00
[imad-console] Updates ui/article-two.html
Isaac6171 Sep 19, 2016
074c925
[imad-console] Updates ui/article-three.html
Isaac6171 Sep 19, 2016
6b2a80a
[imad-console] Updates ui/article-two.html
Isaac6171 Sep 19, 2016
3916e9f
[imad-console] Updates server.js
Isaac6171 Sep 19, 2016
ddcb2d1
[imad-console] Updates server.js
Isaac6171 Sep 19, 2016
abdb7a0
Delete article-one.html
Isaac6171 Sep 19, 2016
6f117d8
Delete article-three.html
Isaac6171 Sep 19, 2016
e7a679e
Delete article-two.html
Isaac6171 Sep 19, 2016
a96ad1d
[imad-console] Updates server.js
Isaac6171 Sep 20, 2016
593b973
[imad-console] Updates ui/style.css
Isaac6171 Sep 21, 2016
7d58526
[imad-console] Updates server.js
Isaac6171 Sep 21, 2016
4d7d640
[imad-console] Updates server.js
Isaac6171 Sep 21, 2016
f688687
[imad-console] Updates server.js
Isaac6171 Sep 21, 2016
3f11ed8
[imad-console] Updates server.js
Isaac6171 Sep 23, 2016
d8c50ea
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
27ef0bc
[imad-console] Updates ui/main.js
Isaac6171 Sep 23, 2016
bc7f27c
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
de1c022
[imad-console] Updates ui/main.js
Isaac6171 Sep 23, 2016
1f4069f
[imad-console] Updates server.js
Isaac6171 Sep 23, 2016
cab97a0
[imad-console] Updates ui/main.js
Isaac6171 Sep 23, 2016
58f57e2
[imad-console] Updates ui/main.js
Isaac6171 Sep 23, 2016
6e53020
[imad-console] Updates ui/main.js
Isaac6171 Sep 23, 2016
a926009
[imad-console] Updates ui/main.js
Isaac6171 Sep 23, 2016
5484ce3
Add files via upload
Isaac6171 Sep 23, 2016
11aff84
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
41d69f2
[imad-console] Updates ui/style.css
Isaac6171 Sep 23, 2016
aded447
[imad-console] Updates ui/style.css
Isaac6171 Sep 23, 2016
ae9124c
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
8396fa5
[imad-console] Updates ui/style.css
Isaac6171 Sep 23, 2016
cc80e44
[imad-console] Updates ui/style.css
Isaac6171 Sep 23, 2016
d06a847
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
611054b
[imad-console] Updates ui/style.css
Isaac6171 Sep 23, 2016
1bd7c6b
[imad-console] Updates ui/style.css
Isaac6171 Sep 23, 2016
406e01c
[imad-console] Updates ui/style.css
Isaac6171 Sep 23, 2016
d67c226
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
deffa5d
[imad-console] Updates ui/style.css
Isaac6171 Sep 23, 2016
bd52d4d
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
6561a20
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
ad96cef
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
03204f9
[imad-console] Updates ui/main.js
Isaac6171 Sep 23, 2016
203c8a1
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
ed397a2
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
de2cc4b
[imad-console] Updates ui/style.css
Isaac6171 Sep 23, 2016
4912e9a
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
176565d
[imad-console] Updates server.js
Isaac6171 Sep 23, 2016
0ff3b94
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
3b3c86f
[imad-console] Updates ui/index.html
Isaac6171 Sep 23, 2016
f12eae6
[imad-console] Updates ui/index.html
Isaac6171 Sep 24, 2016
c001ba5
[imad-console] Updates ui/main.js
Isaac6171 Sep 24, 2016
74ec8b8
[imad-console] Updates ui/main.js
Isaac6171 Sep 24, 2016
3a871e5
[imad-console] Updates ui/main.js
Isaac6171 Sep 24, 2016
488382d
[imad-console] Updates ui/index.html
Isaac6171 Sep 24, 2016
81dffb3
[imad-console] Updates ui/index.html
Isaac6171 Sep 24, 2016
1da5444
[imad-console] Updates ui/index.html
Isaac6171 Sep 24, 2016
12fdbce
[imad-console] Updates ui/main.js
Isaac6171 Sep 24, 2016
76743df
[imad-console] Updates ui/index.html
Isaac6171 Sep 24, 2016
b79ae54
[imad-console] Updates ui/index.html
Isaac6171 Sep 24, 2016
7ea9fca
[imad-console] Updates ui/main.js
Isaac6171 Sep 24, 2016
d828db7
[imad-console] Updates ui/main.js
Isaac6171 Sep 24, 2016
8bd7d16
[imad-console] Updates server.js
Isaac6171 Sep 25, 2016
5580157
[imad-console] Updates server.js
Isaac6171 Sep 25, 2016
8a51131
[imad-console] Updates ui/index.html
Isaac6171 Sep 25, 2016
4de531f
[imad-console] Updates server.js
Isaac6171 Sep 25, 2016
b3c161c
[imad-console] Updates ui/index.html
Isaac6171 Sep 25, 2016
7d8af9e
[imad-console] Updates ui/index.html
Isaac6171 Sep 25, 2016
98d4c1d
[imad-console] Updates ui/main.js
Isaac6171 Sep 25, 2016
e0a552c
[imad-console] Updates ui/main.js
Isaac6171 Sep 25, 2016
f71c4de
[imad-console] Updates server.js
Isaac6171 Sep 25, 2016
7217194
[imad-console] Updates server.js
Isaac6171 Sep 25, 2016
3744739
[imad-console] Updates server.js
Isaac6171 Sep 25, 2016
badfa0f
[imad-console] Updates server.js
Isaac6171 Sep 25, 2016
a49269f
[imad-console] Updates server.js
Isaac6171 Sep 25, 2016
f49216a
[imad-console] Updates server.js
Isaac6171 Sep 26, 2016
a252f6e
[imad-console] Updates server.js
Isaac6171 Sep 26, 2016
c284627
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
3263830
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
9507773
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
d3bf99d
[imad-console] Updates ui/main.js
Isaac6171 Sep 26, 2016
ccee19e
[imad-console] Updates ui/main.js
Isaac6171 Sep 26, 2016
6317bdd
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
bde33c3
[imad-console] Updates server.js
Isaac6171 Sep 26, 2016
469a7c5
[imad-console] Updates server.js
Isaac6171 Sep 26, 2016
86ce54c
[imad-console] Updates server.js
Isaac6171 Sep 26, 2016
551a161
[imad-console] Updates server.js
Isaac6171 Sep 26, 2016
f9e2faa
[imad-console] Updates ui/main.js
Isaac6171 Sep 26, 2016
7adb73d
[imad-console] Updates ui/main.js
Isaac6171 Sep 26, 2016
2545a95
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
78c4ff2
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
7f552b9
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
306e516
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
15f025b
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
2ad9407
[imad-console] Updates ui/main.js
Isaac6171 Sep 26, 2016
16f8502
[imad-console] Updates ui/main.js
Isaac6171 Sep 26, 2016
3f4d75b
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
d92d496
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
9bb331d
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
2e62e7b
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
2663bd0
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
d1a3973
[imad-console] Updates ui/main.js
Isaac6171 Sep 26, 2016
441a332
[imad-console] Updates ui/main.js
Isaac6171 Sep 26, 2016
8d08e84
[imad-console] Updates ui/main.js
Isaac6171 Sep 26, 2016
8db4ccb
[imad-console] Updates ui/style.css
Isaac6171 Sep 26, 2016
94cc060
[imad-console] Updates ui/style.css
Isaac6171 Sep 26, 2016
77f3287
[imad-console] Updates ui/index.html
Isaac6171 Sep 26, 2016
54c9f97
[imad-console] Updates ui/style.css
Isaac6171 Sep 26, 2016
4c8e905
[imad-console] Updates ui/index.html
Isaac6171 Sep 28, 2016
5f70812
[imad-console] Updates server.js
Isaac6171 Sep 28, 2016
a0652d4
[imad-console] Updates server.js
Isaac6171 Sep 28, 2016
8f00a53
[imad-console] Updates ui/style.css
Isaac6171 Sep 28, 2016
a0b39c8
[imad-console] Updates ui/style.css
Isaac6171 Sep 28, 2016
2c635ab
[imad-console] Updates ui/style.css
Isaac6171 Sep 28, 2016
f8a6aa1
[imad-console] Updates server.js
Isaac6171 Sep 28, 2016
29003f9
[imad-console] Updates server.js
Isaac6171 Sep 28, 2016
eb194d2
[imad-console] Updates ui/main.js
Isaac6171 Sep 28, 2016
3675502
[imad-console] Updates server.js
Isaac6171 Sep 28, 2016
9f329ec
[imad-console] Updates ui/main.js
Isaac6171 Sep 28, 2016
1605b98
[imad-console] Updates ui/main.js
Isaac6171 Sep 28, 2016
2f24bbe
[imad-console] Updates ui/main.js
Isaac6171 Sep 28, 2016
a250dec
[imad-console] Updates ui/main.js
Isaac6171 Sep 29, 2016
448c227
[imad-console] Updates server.js
Isaac6171 Sep 29, 2016
b66ca67
[imad-console] Updates ui/main.js
Isaac6171 Sep 29, 2016
2e83ff9
[imad-console] Updates ui/style.css
Isaac6171 Sep 29, 2016
36c1ecf
[imad-console] Updates server.js
Isaac6171 Sep 29, 2016
97cadf9
[imad-console] Updates server.js
Isaac6171 Sep 29, 2016
4a002c0
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
f136da9
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
e5a0af7
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
9be4372
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
5ae4923
[imad-console] Updates ui/index.html
Isaac6171 Oct 1, 2016
b9be6e8
Create Bio.html
Isaac6171 Oct 1, 2016
4d75847
[imad-console] Updates server.js
Isaac6171 Oct 1, 2016
2589878
Rename Bio.html to bio.html
Isaac6171 Oct 1, 2016
84764bf
[imad-console] Updates server.js
Isaac6171 Oct 1, 2016
a902338
[imad-console] Updates ui/Bio.html
Isaac6171 Oct 1, 2016
1ee633e
Rename bio.html to bio2.html
Isaac6171 Oct 1, 2016
bbaabae
Delete bio2.html
Isaac6171 Oct 1, 2016
9cb0143
[imad-console] Updates server.js
Isaac6171 Oct 1, 2016
9820ede
[imad-console] Updates ui/bio.html
Isaac6171 Oct 1, 2016
c5e73bd
[imad-console] Updates ui/index.html
Isaac6171 Oct 1, 2016
089e49e
[imad-console] Updates ui/index.html
Isaac6171 Oct 1, 2016
b609454
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
ef57c75
[imad-console] Updates ui/index.html
Isaac6171 Oct 1, 2016
fab7791
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
62a7ec8
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
30d67dc
[imad-console] Updates ui/index.html
Isaac6171 Oct 1, 2016
28f5ede
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
3d28cb7
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
173ac07
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
d3a3d2c
[imad-console] Updates ui/index.html
Isaac6171 Oct 1, 2016
7a14b25
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
1ff1a3c
[imad-console] Updates ui/index.html
Isaac6171 Oct 1, 2016
2488377
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
83c8580
[imad-console] Updates ui/index.html
Isaac6171 Oct 1, 2016
05f29d0
[imad-console] Updates ui/index.html
Isaac6171 Oct 1, 2016
e9b9c1a
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
a9554df
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
321a06a
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
6710eb2
[imad-console] Updates ui/style.css
Isaac6171 Oct 1, 2016
4b5d67e
[imad-console] Updates ui/index.html
Isaac6171 Oct 1, 2016
8aeb57f
[imad-console] Updates ui/style.css
Isaac6171 Oct 2, 2016
48d901a
[imad-console] Updates ui/style.css
Isaac6171 Oct 2, 2016
878f945
[imad-console] Updates ui/index.html
Isaac6171 Oct 2, 2016
3dc0cfd
[imad-console] Updates ui/bio.html
Isaac6171 Oct 2, 2016
96ea715
[imad-console] Updates ui/index.html
Isaac6171 Oct 2, 2016
95f5108
[imad-console] Updates ui/bio.html
Isaac6171 Oct 2, 2016
e53178e
[imad-console] Updates ui/bio.html
Isaac6171 Oct 2, 2016
af183d4
[imad-console] Updates ui/bio.html
Isaac6171 Oct 2, 2016
a06748b
[imad-console] Updates ui/index.html
Isaac6171 Oct 2, 2016
5e678b4
Update index.html
Isaac6171 Oct 25, 2016
fa9149d
Update style.css
Isaac6171 Oct 25, 2016
401bbeb
Delete C.V-01.png
Isaac6171 Oct 25, 2016
470a2e8
[imad-console] Updates ui/index.html
Isaac6171 Oct 25, 2016
f01f71a
[imad-console] Updates ui/index.html
Isaac6171 Oct 25, 2016
db9a106
Delete photo_opt.jpg
Isaac6171 Oct 25, 2016
ff32143
Add files via upload
Isaac6171 Oct 25, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 147 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,162 @@ var path = require('path');

var app = express();
app.use(morgan('combined'));
var articles ={
'article-one':{
title:"Article one | Isaac Philip",
heading:"Article one",
date: "Sep 19, 2016",
content:`<p>
This is the content for my first article.This is the content for my first article. This is the content for my first article.
This is the content for my first article. This is the content for my first article. This is the content for my first article.
This is the content for my first article. This is the content for my first article. This is the content for my first article.
This is the content for my first article.


</p>
<p>
This is the content for my first article.This is the content for my first article. This is the content for my first article.
This is the content for my first article. This is the content for my first article. This is the content for my first article.
This is the content for my first article. This is the content for my first article. This is the content for my first article.
This is the content for my first article.


</p>`
},
'article-two':{
title:"Article Two | Isaac Philip",
heading:"Article Two",
date: "Sep 19, 2016",
content:`<p>
This is the content for my first article.This is the content for my first article. This is the content for my first article.
This is the content for my first article. This is the content for my first article. This is the content for my first article.
This is the content for my first article. This is the content for my first article. This is the content for my first article.
This is the content for my first article.


</p>
<p>
This is the content for my first article.This is the content for my first article. This is the content for my first article.
This is the content for my first article. This is the content for my first article. This is the content for my first article.
This is the content for my first article. This is the content for my first article. This is the content for my first article.
This is the content for my first article.


</p>`
},
'article-three':{
title:"Article Three | Isaac Philip",
heading:"Article Three",
date: "Sep 19, 2016",
content:`<p>
This is the content for my first article.This is the content for my first article. This is the content for my first article.
This is the content for my first article. This is the content for my first article. This is the content for my first article.
This is the content for my first article. This is the content for my first article. This is the content for my first article.
This is the content for my first article.


</p>
<p>
This is the content for my first article.This is the content for my first article. This is the content for my first article.
This is the content for my first article. This is the content for my first article. This is the content for my first article.
This is the content for my first article. This is the content for my first article. This is the content for my first article.
This is the content for my first article.


</p>`
},
};
function createTemplate(data){
var title = data.title;
var heading = data.heading;
var date = data.date;
var content = data.content;
var htmlTemplate=
`<html>
<head>
<title>
${title}
</title>
<meta name="viewport" content="width=device-width, initial-scale=1">


<link href="/ui/style.css" rel="stylesheet" />

</head>
<body>
<div class="container">

<div>
<a href="/">Home</a>
</div>
<hr/>
<h3>
${heading}
</h3>
<div>
${date}
</div>
<div>
${content}
</div>
<div>
<input type="text" placeholder="Comment Here!" id ="comment"/>
<input type ="submit" value="Comment" id ="cmnt_btn"/>
<ul id="cmnt_list">

</ul>
</div>
</div>



</body>
</html>
`;
return htmlTemplate;
}

app.get('/', function (req, res) {
res.sendFile(path.join(__dirname, 'ui', 'index.html'));
});
app.get('/bio.html',function(req, res){
res.sendFile(path.join(__dirname,'ui', 'bio.html'));
});

var counter = 0;
app.get('/counter',function(req,res){
counter = counter + 1;
res.send(counter.toString());
});
var names = [];
app.get('/submit-name', function(req,res){
var name = req.query.name;
names.push(name);
res.send(JSON.stringify(names));
}
);
var comments =[];
app.get('/art_cmnt',function(req,res){
var comment = req.query.comment;
comments.push(comment);
res.send(JSON.stringify(comments));

});
app.get('/:articleName',function(req,res){
var articleName = req.params.articleName;
res.send(createTemplate(articles[articleName]));
});

app.get('/ui/style.css', function (req, res) {
res.sendFile(path.join(__dirname, 'ui', 'style.css'));
});

app.get('/ui/madi.png', function (req, res) {
res.sendFile(path.join(__dirname, 'ui', 'madi.png'));
app.get('/ui/main.js', function (req, res) {
res.sendFile(path.join(__dirname, 'ui', 'main.js'));
});
app.get('/ui/photo_opt.jpg', function (req, res) {
res.sendFile(path.join(__dirname, 'ui', 'photo_opt.jpg'));
});



var port = 8080; // Use 8080 for local development because you might already have apache running on 80
Expand Down
Binary file added ui/C.V-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/IMG_20161010_202803.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/New_Logo_Gmail.svg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/Portfolio.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions ui/bio.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!doctype html>
<html>
<head>
<title>
Bio |Isaac Philip
</title>
<link href="/ui/style.css" rel="stylesheet" />
</head>
<body>
<div class="container">
<a href="/"><div class="nav1">Home</div></a>
<div class="center">
<img class="img-medium" id='madi' src="/ui/photo_opt.jpg" />
</div>
<hr/>
<h3>Bio</h3>
<div>
Name : Isaac Philip<br>
D.O.B: 06/11/1991<br>
Age : 24<br>
Sex : Male<br>
</div>
<hr/>
<h3>Education</h3>
<div>
College : St. Joseph college of communication<br>
University : M.G University<br>
Degree : B.A<br>
Stream : Multimedia<br>
</div>

<div id='main-text' class="center text-big bold">

</div>
<hr/>
<div class="footer">
<button id="counter">Like</button><br/>
Number of likes is <span id="count">0</span>!
<br/>
<input type="text" placeholder="name" id="name"/>
<input type="submit" value="Submit" id="submit_btn"/>
<ul id="namelist">

</ul>
</div>
</div>
<script type="text/javascript" src="/ui/main.js">
</script>
</body>
</html>
Binary file added ui/fb-art.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 38 additions & 15 deletions ui/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
<!doctype html>
<!doctype html>
<html>
<head>
<link href="/ui/style.css" rel="stylesheet" />
</head>
<body>
<div class="center">
<img src="/ui/madi.png" class="img-medium"/>
</div>
<br>
<div class="center text-big bold">
Hi! I am your webapp.
</div>
<script type="text/javascript" src="/ui/main.js">
</script>
</body>
<head>

<title>Portfolio</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link href="/ui/style.css" rel="stylesheet" />
</head>

<body>
<div class="main">
<div class="sub">
<h1 class="_folio _txt">My Portfolio</h1>
<div class="img_box">
<img class="pic" src="images/photo-01.png" width="200" height="200" />
</div>

<div class="ent">

<a href="portfolio.html"><div class="_ent">
Enter
</div></a>

</div>
<div class="footer">
<a href="../App/index.html"><img class= "in" src="images/linkedin.png" width="34" height="34" /></a>
<a href="../App/index.html"><img src="images/New_Logo_Gmail.svg.png" width="38" height="34" /></a>
<a href="../App/index.html"><img src="images/fb-art.png" width="34" height="34" /></a>
<span class="_ftxt">


</span>
</div>
</div>
</div>

</body>
</html>

Binary file added ui/linkedin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
89 changes: 88 additions & 1 deletion ui/main.js
Original file line number Diff line number Diff line change
@@ -1 +1,88 @@
console.log('Loaded!');

// Counter code
var button = document.getElementById('counter');

button.onclick = function(){
//create a request object
var request = new XMLHttpRequest();


//capture the response and store it in a variable
request.onreadystatechange = function(){

if(request.readyState === XMLHttpRequest.DONE){
//take some action
if(request.status === 200){
var counter = rerquest.responseText;
var span = document.getElementById('count');
span.innerHTML = counter.toString();

}
}
else( console.log("server Error"));
};
//make the request
request.open('GET','http://isaac6171.imad.hasura-app.io/counter' , true);
request.send(null);

//render the variable in the correct span
};
//submit

var submit = document.getElementById('submit_btn');
submit.onclick = function(){
var request = new XMLHttpRequest();


//capture the response and store it in a variable
request.onreadystatechange = function(){

if(request.readyState === XMLHttpRequest.DONE){
//take some action
if(request.status === 200){
var names = request.responseText;
names = JSON.parse(names);
var list = '';
for(var i=0;i<names.length;i++){
list += '<li>'+ names[i]+'</li>';
}
var ul = document.getElementById('namelist');
ul.innerHTML = list;




}
}
};
//make the request
var nameInput = document.getElementById('name');
var name = nameInput.value;
request.open('GET','http://isaac6171.imad.hasura-app.io/submit-name?name=' + name, true);
request.send(null);

};
//Comments
var comment = document.getElementById('cmnt_btn');
comment.onclick = function(){
var request = new XMLHttpRequest();
request.onreadystatechange = function(){
if(request.readystaechange === XMLHttpRequest.DONE){
if(request.status === 200){
var comments = request.responseText;
comments = JSON.parse(comments);
var list ='';
for(var i=0;i<comments.length;i++){
list += '<li>' + comments[i] +'</li>';
var ul = document.getElementById('cmnt_list');
ul.innerHTML = list;
}
}
}

};
var commentInput = document.getElementById('comment');
var comment = commentInput.value;
request.open('GET',"http://isaac6171.imad.hasura-app.io/art_cmnt?comment=" + comment, true);
request.send(null);
};
Binary file added ui/photo-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/search-icon-png-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading