From 4d34514c830e11e1fb7a335ac8092aedcc7a489b Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Wed, 21 Sep 2016 03:52:08 +0530 Subject: [PATCH 01/28] [imad-console] Updates ui/index.html --- ui/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/index.html b/ui/index.html index 5a28644db4..849f0412fa 100644 --- a/ui/index.html +++ b/ui/index.html @@ -9,7 +9,7 @@
- Hi! I am your webapp. + Hi! I am your Saif, This is my first WebApp.
From f004f49fe91b46b7e5093c5ee900e166e34873c8 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Fri, 23 Sep 2016 23:40:35 +0530 Subject: [PATCH 02/28] [imad-console] Updates server.js --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 3d5cece3ab..65eb4ca0d1 100644 --- a/server.js +++ b/server.js @@ -1,4 +1,4 @@ -var express = require('express'); +var express = require('express'); //express is the keyword, to create a webserver so that we don't have to set listhn etc var morgan = require('morgan'); var path = require('path'); From 302fb2d77b56aecad45afc1fd87bf114c04bd283 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 00:00:42 +0530 Subject: [PATCH 03/28] [imad-console] Updates server.js --- server.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server.js b/server.js index 65eb4ca0d1..554f8055cf 100644 --- a/server.js +++ b/server.js @@ -8,6 +8,16 @@ app.use(morgan('combined')); app.get('/', function (req, res) { res.sendFile(path.join(__dirname, 'ui', 'index.html')); }); +app.get('/article-one',function(req,res){ + res.send('Article one is requested, your request will be served shortly'); + +}); +app.get('/article-two',function(req,res){ + res.send('Article two is requested, your request will be served shortly'); +}); +app.get('/article-three',function(req,res){ + res.send('Article three is requested, you request will be served shortly'); +}); app.get('/ui/style.css', function (req, res) { res.sendFile(path.join(__dirname, 'ui', 'style.css')); From 96ce0d2c4d0dce2f000d8ff153154ee997102dfb Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 00:17:04 +0530 Subject: [PATCH 04/28] Create article-one.html --- ui/article-one.html | 1 + 1 file changed, 1 insertion(+) create mode 100644 ui/article-one.html diff --git a/ui/article-one.html b/ui/article-one.html new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/ui/article-one.html @@ -0,0 +1 @@ + From 79c53b098a176810ad5ce841a19bb3f30b208da7 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 00:33:48 +0530 Subject: [PATCH 05/28] [imad-console] Updates server.js --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 554f8055cf..bfac59eadb 100644 --- a/server.js +++ b/server.js @@ -9,7 +9,7 @@ app.get('/', function (req, res) { res.sendFile(path.join(__dirname, 'ui', 'index.html')); }); app.get('/article-one',function(req,res){ - res.send('Article one is requested, your request will be served shortly'); + res.sendFile(path.join(__dirname, 'ui', 'article-one.html')); }); app.get('/article-two',function(req,res){ From a31ab19f5c931239a7c62d0c482d9ecaa10c2ea4 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 00:33:49 +0530 Subject: [PATCH 06/28] [imad-console] Updates ui/article-one.html --- ui/article-one.html | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/ui/article-one.html b/ui/article-one.html index 8b13789179..61db8df3ce 100644 --- a/ui/article-one.html +++ b/ui/article-one.html @@ -1 +1,34 @@ - + + + + Article One | Saif Shines + + + +
+ HOME +
+
+

+ Article ONe +

+
+ Sept 23, 2016 +
+
+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+
+ + + From ddd50102b908d23593cb93862b55d4e20af5e411 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 00:38:58 +0530 Subject: [PATCH 07/28] [imad-console] Updates ui/article-one.html --- ui/article-one.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/article-one.html b/ui/article-one.html index 61db8df3ce..e60df1bd79 100644 --- a/ui/article-one.html +++ b/ui/article-one.html @@ -3,6 +3,7 @@ Article One | Saif Shines +
From eb0ee05541a8ec348c494909e9379476025d0616 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 00:42:55 +0530 Subject: [PATCH 08/28] Create article-two.html --- ui/article-two.html | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 ui/article-two.html diff --git a/ui/article-two.html b/ui/article-two.html new file mode 100644 index 0000000000..a245d32425 --- /dev/null +++ b/ui/article-two.html @@ -0,0 +1,35 @@ + + + + Article Two | Saif Shines + + + + +
+ HOME +
+
+

+ Article Two +

+
+ Sept 23, 2016 +
+
+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+
+ + + From 922d6b5c2d234d3397e82eab34678ea32b441c36 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 00:44:53 +0530 Subject: [PATCH 09/28] Create article-three --- ui/article-three | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 ui/article-three diff --git a/ui/article-three b/ui/article-three new file mode 100644 index 0000000000..be67ea875e --- /dev/null +++ b/ui/article-three @@ -0,0 +1,35 @@ + + + + Article One | Saif Shines + + + + +
+ HOME +
+
+

+ Article Three +

+
+ Sept 23, 2016 +
+
+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+
+ + + From 224b6bfc877ef80a97a8b0a9d90e18d4df2ec3aa Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 00:45:42 +0530 Subject: [PATCH 10/28] Rename article-three to article-three.html --- ui/{article-three => article-three.html} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ui/{article-three => article-three.html} (100%) diff --git a/ui/article-three b/ui/article-three.html similarity index 100% rename from ui/article-three rename to ui/article-three.html From b4f4694eea28d8640bbf8caff3cc83bcbb49e5dc Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 00:51:01 +0530 Subject: [PATCH 11/28] [imad-console] Updates server.js --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index bfac59eadb..aac8677865 100644 --- a/server.js +++ b/server.js @@ -13,10 +13,10 @@ app.get('/article-one',function(req,res){ }); app.get('/article-two',function(req,res){ - res.send('Article two is requested, your request will be served shortly'); + res.sendFile(path.join(__dirname, 'ui', 'article-two.html')); }); app.get('/article-three',function(req,res){ - res.send('Article three is requested, you request will be served shortly'); + res.sendFile(path.join(__dirname, 'ui', 'article-three.html')); }); app.get('/ui/style.css', function (req, res) { From 0d84291658875f2e808fd97bcd1b1f8dbd9803a8 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 00:57:57 +0530 Subject: [PATCH 12/28] [imad-console] Updates ui/article-two.html --- ui/article-two.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ui/article-two.html b/ui/article-two.html index a245d32425..29d0135749 100644 --- a/ui/article-two.html +++ b/ui/article-two.html @@ -4,8 +4,18 @@ Article Two | Saif Shines + +
@@ -30,6 +40,6 @@

This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.

- +
From 81d3f76f82f50fe91fde6556d24a7c2d96f7e19e Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 01:01:07 +0530 Subject: [PATCH 13/28] [imad-console] Updates ui/article-two.html --- ui/article-two.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/article-two.html b/ui/article-two.html index 29d0135749..6134aebcb7 100644 --- a/ui/article-two.html +++ b/ui/article-two.html @@ -21,7 +21,7 @@

- Article Two + Article Two, PRIYAAAAAAAAAAAAAA !

Sept 23, 2016 From d355e93f1beba3dee00ff0b00c15988e649a5fd0 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 01:06:24 +0530 Subject: [PATCH 14/28] [imad-console] Updates ui/article-two.html --- ui/article-two.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/article-two.html b/ui/article-two.html index 6134aebcb7..c77a32a83f 100644 --- a/ui/article-two.html +++ b/ui/article-two.html @@ -10,6 +10,9 @@ margin: @ auto; color: grey; font-family:verdana; + padding-top:50px; + padding-left:20px; + padding-right:20px; } From 4631d37d531ae50394e9c9729ffd2c831a835de3 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 01:15:54 +0530 Subject: [PATCH 15/28] [imad-console] Updates ui/article-one.html --- ui/article-one.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ui/article-one.html b/ui/article-one.html index e60df1bd79..38ded6badf 100644 --- a/ui/article-one.html +++ b/ui/article-one.html @@ -4,8 +4,23 @@ Article One | Saif Shines + +
@@ -30,6 +45,6 @@

This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.

- +
From 0a29288f4e5ac7d628f8188e3577d7d8307599f3 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 01:15:55 +0530 Subject: [PATCH 16/28] [imad-console] Updates ui/article-three.html --- ui/article-three.html | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ui/article-three.html b/ui/article-three.html index be67ea875e..b826f8d605 100644 --- a/ui/article-three.html +++ b/ui/article-three.html @@ -4,8 +4,21 @@ Article One | Saif Shines + +
@@ -30,6 +43,6 @@

This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.

- + From ca50c8e41cda5fa59c4546f2ea7c143699600aa9 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 02:21:11 +0530 Subject: [PATCH 17/28] [imad-console] Updates server.js --- server.js | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index aac8677865..a7127b6c92 100644 --- a/server.js +++ b/server.js @@ -5,11 +5,71 @@ var path = require('path'); var app = express(); app.use(morgan('combined')); +var articleOne ={ + title:'Article One|Saif Shines', + heading:'Article One', + date:'Sept 23 2016', + content: ` +
+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+

+ This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. +

+
+ ` + +}; + +function createTemple(data){ + var title = data.title; + var heading = data.heading; + var date = data.date; + var content = data.content; +var htmlTemplate = ` + + + + ${title} + + + + + +
+
+ HOME +
+
+

+ ${heading} +

+
+ ${date} +
+
+ ${content} +
+
+ + +'; + ` return htmlTemplate; +} + + app.get('/', function (req, res) { res.sendFile(path.join(__dirname, 'ui', 'index.html')); }); app.get('/article-one',function(req,res){ - res.sendFile(path.join(__dirname, 'ui', 'article-one.html')); + res.send(createTemplate(articleOne)); }); app.get('/article-two',function(req,res){ From 761b3ec32800231dea882d416c47013abc68a583 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 02:21:11 +0530 Subject: [PATCH 18/28] [imad-console] Updates ui/article-three.html --- ui/article-three.html | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/ui/article-three.html b/ui/article-three.html index b826f8d605..d6dcb5f425 100644 --- a/ui/article-three.html +++ b/ui/article-three.html @@ -4,18 +4,7 @@ Article One | Saif Shines - +
From 2b2b822cbe3fbaf2dfe36f55f851a63c090a6db6 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 02:21:12 +0530 Subject: [PATCH 19/28] [imad-console] Updates ui/style.css --- ui/style.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ui/style.css b/ui/style.css index 71a5f6acc1..ab9af67f28 100644 --- a/ui/style.css +++ b/ui/style.css @@ -19,4 +19,14 @@ body { .img-medium { height: 200px; } +.container +{ + max-width : 800px; + margin: @ auto; + color: grey; + font-family:verdana; + padding-top:50px; + padding-left:20px; + padding-right:20px; +} From 51d90be336a4e3d9967378c51772da8b684d488b Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 02:21:29 +0530 Subject: [PATCH 20/28] [imad-console] Updates ui/article-one.html --- ui/article-one.html | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/ui/article-one.html b/ui/article-one.html index 38ded6badf..74e7e9c1da 100644 --- a/ui/article-one.html +++ b/ui/article-one.html @@ -4,21 +4,8 @@ Article One | Saif Shines - - + +
From a930550764c21dfa98c0cbc83f1027af3490917b Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 24 Sep 2016 02:21:29 +0530 Subject: [PATCH 21/28] [imad-console] Updates ui/article-two.html --- ui/article-two.html | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/ui/article-two.html b/ui/article-two.html index c77a32a83f..e7b50b51e8 100644 --- a/ui/article-two.html +++ b/ui/article-two.html @@ -4,18 +4,8 @@ Article Two | Saif Shines - + +
From cb9cbfb8f7a04d6372b55f6704f2fcc7903241a3 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sun, 25 Sep 2016 09:44:26 +0530 Subject: [PATCH 22/28] [imad-console] Updates server.js --- server.js | 218 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 124 insertions(+), 94 deletions(-) diff --git a/server.js b/server.js index a7127b6c92..0155b24fcc 100644 --- a/server.js +++ b/server.js @@ -1,94 +1,124 @@ -var express = require('express'); //express is the keyword, to create a webserver so that we don't have to set listhn etc -var morgan = require('morgan'); -var path = require('path'); - -var app = express(); -app.use(morgan('combined')); - -var articleOne ={ - title:'Article One|Saif Shines', - heading:'Article One', - date:'Sept 23 2016', - content: ` -
-

- This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. -

-

- This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. -

-

- This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. -

-

- This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss.This is my first Para,boss. -

-
- ` - -}; - -function createTemple(data){ - var title = data.title; - var heading = data.heading; - var date = data.date; - var content = data.content; -var htmlTemplate = ` - - - - ${title} - - - - - -
-
- HOME -
-
-

- ${heading} -

-
- ${date} -
-
- ${content} -
-
- - -'; - ` return htmlTemplate; -} - - -app.get('/', function (req, res) { - res.sendFile(path.join(__dirname, 'ui', 'index.html')); -}); -app.get('/article-one',function(req,res){ - res.send(createTemplate(articleOne)); - -}); -app.get('/article-two',function(req,res){ - res.sendFile(path.join(__dirname, 'ui', 'article-two.html')); -}); -app.get('/article-three',function(req,res){ - res.sendFile(path.join(__dirname, 'ui', 'article-three.html')); -}); - -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')); -}); - - -var port = 8080; // Use 8080 for local development because you might already have apache running on 80 -app.listen(8080, function () { - console.log(`IMAD course app listening on port ${port}!`); -}); +var express = require('express'); +var morgan = require('morgan'); +var path = require('path'); + +var app = express(); +app.use(morgan('combined')); + + +var articles = { + 'article-one': { + title: 'Article One | Tanmai Gopal', + heading: 'Article One', + date: 'Sep 5, 2016', + content: ` +

+ 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. 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. +

` + }, + 'article-two': { + title: 'Article Two | Tanmai Gopal', + heading: 'Article Two', + date: 'Sep 10, 2016', + content: ` +

+ This is the content for my second article. +

` + }, + 'article-three': { + title: 'Article Three | Tanmai Gopal', + heading: 'Article Three', + date: 'Sep 15, 2016', + content: ` +

+ This is the content for my third article. +

` + } +}; + +function createTemplate (data) { + var title = data.title; + var date = data.date; + var heading = data.heading; + var content = data.content; + + var htmlTemplate = ` + + + + ${title} + + + + + +
+
+ Home +
+
+

+ ${heading} +

+
+ ${date} +
+
+ ${content} +
+
+ + + `; + return htmlTemplate; +} + +app.get('/', function (req, res) { + res.sendFile(path.join(__dirname, 'ui', 'index.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) { // /submit-name?name=xxxx + // Get the name from the request + var name = req.query.name; + + names.push(name); + // JSON: Javascript Object Notation + res.send(JSON.stringify(names)); +}); + +app.get('/:articleName', function (req, res) { + // articleName == article-one + // articles[articleName] == {} content object for article one + 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/main.js', function (req, res) { + res.sendFile(path.join(__dirname, 'ui', 'main.js')); +}); + +app.get('/ui/madi.png', function (req, res) { + res.sendFile(path.join(__dirname, 'ui', 'madi.png')); +}); + +var port = 8080; // Use 8080 for local development because you might already have apache running on 80 +app.listen(8080, function () { + console.log(`IMAD course app listening on port ${port}!`); +}); From be037c249eebbcd8414f461b2fd4b0f791b03313 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sun, 25 Sep 2016 09:44:36 +0530 Subject: [PATCH 23/28] [imad-console] Updates ui/article-two.html --- ui/article-two.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/article-two.html b/ui/article-two.html index e7b50b51e8..67678d8ce5 100644 --- a/ui/article-two.html +++ b/ui/article-two.html @@ -14,7 +14,7 @@

- Article Two, PRIYAAAAAAAAAAAAAA ! + Article Two !

Sept 23, 2016 From 5ff426bf79524f8c66ab6c60e0b1323f193078d0 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sun, 25 Sep 2016 09:58:19 +0530 Subject: [PATCH 24/28] [imad-console] Updates server.js --- server.js | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/server.js b/server.js index 0155b24fcc..2eced7ff72 100644 --- a/server.js +++ b/server.js @@ -1,47 +1,59 @@ +// Calling the express Framework of JavaScript, which manages port, lisetening extra. var express = require('express'); +// This morgan is used to log, the request details. var morgan = require('morgan'); var path = require('path'); var app = express(); +//This tells express to log via morgan +//and morgan to log in the "combined" pre-defined format app.use(morgan('combined')); - +// This *articles* is key-format ! +// aritcles* holds three keys - `article-one`, `article-two`, `article-three` +// Each again has its own key-variables - `title`,`heading`,`date`,`content` var articles = { 'article-one': { - title: 'Article One | Tanmai Gopal', + title: 'Article One | Saif Shines', heading: 'Article One', - date: 'Sep 5, 2016', + date: 'Sep 20, 2016', content: `

- 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. + 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. + 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. + 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.

` }, 'article-two': { - title: 'Article Two | Tanmai Gopal', + title: 'Article Two | Saif Shines', heading: 'Article Two', - date: 'Sep 10, 2016', + date: 'Sep 24, 2016', content: `

This is the content for my second article.

` }, 'article-three': { - title: 'Article Three | Tanmai Gopal', + title: 'Article Three | Saif Shines', heading: 'Article Three', - date: 'Sep 15, 2016', + date: 'Sep 29, 2016', content: `

This is the content for my third article.

` } }; - +// function createTemplate (data) { var title = data.title; var date = data.date; From b4a0b9bb3d8599166603e2633487e154ce9abf94 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sun, 25 Sep 2016 10:59:17 +0530 Subject: [PATCH 25/28] [imad-console] Updates ui/index.html --- ui/index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/index.html b/ui/index.html index 849f0412fa..b9796aab18 100644 --- a/ui/index.html +++ b/ui/index.html @@ -11,6 +11,10 @@
Hi! I am your Saif, This is my first WebApp.
+ From b75c282503e945e4b68edeb5ca5b40c4f164599c Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 29 Oct 2016 01:21:44 +0530 Subject: [PATCH 26/28] [imad-console] Updates server.js --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 2eced7ff72..cd7a9f049f 100644 --- a/server.js +++ b/server.js @@ -8,7 +8,7 @@ var app = express(); //This tells express to log via morgan //and morgan to log in the "combined" pre-defined format app.use(morgan('combined')); - +/* // This *articles* is key-format ! // aritcles* holds three keys - `article-one`, `article-two`, `article-three` // Each again has its own key-variables - `title`,`heading`,`date`,`content` @@ -90,7 +90,7 @@ function createTemplate (data) { `; return htmlTemplate; } - +*/ app.get('/', function (req, res) { res.sendFile(path.join(__dirname, 'ui', 'index.html')); }); From 41f31b6490fda3e7a7f3331f99072df6e78c8c20 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 29 Oct 2016 01:27:03 +0530 Subject: [PATCH 27/28] [imad-console] Updates ui/index.html --- ui/index.html | 53 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/ui/index.html b/ui/index.html index b9796aab18..0559747a9b 100644 --- a/ui/index.html +++ b/ui/index.html @@ -1,21 +1,34 @@ - - - - - - -
- -
-
-
- Hi! I am your Saif, This is my first WebApp. -
- - - + + + + +Hey look! + + + + + + + + + + + +
+

+Move the cursor around into the
image to see what the effect. +

+ +
+ + + From 585ed5ef9828dba231855f2b3a44ee042c6ee5e3 Mon Sep 17 00:00:00 2001 From: Shaik Saif Ali Date: Sat, 29 Oct 2016 01:30:29 +0530 Subject: [PATCH 28/28] Create jseyes.js --- ui/jseyes.js | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 ui/jseyes.js diff --git a/ui/jseyes.js b/ui/jseyes.js new file mode 100644 index 0000000000..2d644c92f6 --- /dev/null +++ b/ui/jseyes.js @@ -0,0 +1,137 @@ +/* jseyes.js + + +The classic Xeyes in JavaScript +(c) PROPIX Ltd, Written by Pintér Gábor +Székesfehérvár, Kriványi u. 15. +H-8000, HUNGARY +Tel: +36 30 3489752 +Fax: +36 22 304326 +Email: propix@freemail.hu +Web: http://www.propix.hu + +Revisions: + V1.0 10/14/2001 Original release + V1.1 02/20/2008: Updated by JavaScriptKit.com to work in the latest browsers (IE7, FF etc) + +Usage: + 1. Include this file from the head of your page + 2. Define parameters or accept the defaults + 3. Insert the image + +This script requires Internet Explorer 5+ or Nescape Navigator 6+! In other browsers it does nothing. + + + +1. Include jseyes.js from the head of your page +Insert the following line into the head of your page: + + + +2. Define parameters +You can accept the defaults or assign new values to these variables: + +jseyesimg="jseyes.gif" + The main image. Please do not edit. + +jseyeimg="jseyeblue.gif" + The image of the eye. Must be a 21x29 solid ellipse with transparent background. + + +4. Insert the image +Call jseyes() where you want to see the image: + + +Or call jseyes(x, y) to show the image at absolute position: + + + + +Example: http://www.propix.hu/www/jseyes/jseyes.html + +*/ + + + + +// Defaults +var jseyesimg="images/jseyes.gif"; +var jseyeimg="images/jseyeblue.gif"; +var jseyeslink="http://www.javascriptkit.com"; + + +// Internal +var jseyeso=null, jseye1=null, jseye2=null; +var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes + +// General utils + +// Find object by name or id +function jseyesobj(id) { + var i, x; + x= document[id]; + if (!x && document.getElementById) x= document.getElementById(id); + for (i=0; !x && i"+ + "
"+ + ""+ + "
"+ + "
"+ + ""+ + "
"+ + ""+ + "
"; + document.write(img); + jseyeso=jseyesobj('jseyeslayer'); + jseye1=jseyesobj('jseye1'); + jseye2=jseyesobj('jseye2'); + + document.onmousemove=jseyesmousemove; +} + + +// Mouse move events + +function jseyesmousemove(e) { + var mousex=(e)? e.pageX : event.clientX+standardbody.scrollLeft + var mousey=(e)? e.pageY : event.clientY+standardbody.scrollTop + jseyesmove(mousex, mousey); + //return(false); +}