From 8afe06bb5804269920db9d5095af0250529030ac Mon Sep 17 00:00:00 2001 From: Kim Helgeson Date: Thu, 22 Aug 2019 14:23:01 -0500 Subject: [PATCH 1/4] Made First Change --- project/html/pages/index.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/html/pages/index.ejs b/project/html/pages/index.ejs index 7e8a0900..0904ca7f 100644 --- a/project/html/pages/index.ejs +++ b/project/html/pages/index.ejs @@ -9,7 +9,7 @@

Click on the button for a surprise.

From 9976573056c9e203b436d5dabdfa8bcfadacbbf9 Mon Sep 17 00:00:00 2001 From: Kim Helgeson Date: Tue, 27 Aug 2019 10:02:08 -0500 Subject: [PATCH 2/4] Add menu & weather api --- project/html/helpers/head.ejs | 2 ++ project/html/helpers/navbar.ejs | 5 +++++ project/html/pages/about.ejs | 24 ++++++++++++++++++++++++ project/html/pages/index.ejs | 4 +++- project/html/pages/index.ejs.html | 25 +++++++++++++++++++++++++ project/html/pages/projects.ejs | 24 ++++++++++++++++++++++++ project/js/main.js | 11 ++++++++++- project/start.js | 6 ++++++ 8 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 project/html/helpers/navbar.ejs create mode 100644 project/html/pages/about.ejs create mode 100644 project/html/pages/index.ejs.html create mode 100644 project/html/pages/projects.ejs diff --git a/project/html/helpers/head.ejs b/project/html/helpers/head.ejs index d40b02e2..f70f5ce2 100644 --- a/project/html/helpers/head.ejs +++ b/project/html/helpers/head.ejs @@ -22,6 +22,8 @@ + + diff --git a/project/html/helpers/navbar.ejs b/project/html/helpers/navbar.ejs new file mode 100644 index 00000000..6c44a832 --- /dev/null +++ b/project/html/helpers/navbar.ejs @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/project/html/pages/about.ejs b/project/html/pages/about.ejs new file mode 100644 index 00000000..ca42ecf3 --- /dev/null +++ b/project/html/pages/about.ejs @@ -0,0 +1,24 @@ + + + <% include ../helpers/head %> + <% include ../helpers/navbar %> + + + + + + + +

Click on the button for a surprise.

+ + + +
+ + + + \ No newline at end of file diff --git a/project/html/pages/index.ejs b/project/html/pages/index.ejs index 0904ca7f..c7917cba 100644 --- a/project/html/pages/index.ejs +++ b/project/html/pages/index.ejs @@ -9,8 +9,10 @@ +
+

Click on the button for a surprise.

diff --git a/project/html/pages/index.ejs.html b/project/html/pages/index.ejs.html new file mode 100644 index 00000000..c7917cba --- /dev/null +++ b/project/html/pages/index.ejs.html @@ -0,0 +1,25 @@ + + + <% include ../helpers/head %> + + + + + + +
+
+ +

Click on the button for a surprise.

+ + + +
+ + + + \ No newline at end of file diff --git a/project/html/pages/projects.ejs b/project/html/pages/projects.ejs new file mode 100644 index 00000000..7e810954 --- /dev/null +++ b/project/html/pages/projects.ejs @@ -0,0 +1,24 @@ + + + <% include ../helpers/head %> + <% include ../helpers/navbar %> + + + + + + + +

Click on the button for a surprise.

+ + + +
+ + + + \ No newline at end of file diff --git a/project/js/main.js b/project/js/main.js index c045cac2..6e51c873 100644 --- a/project/js/main.js +++ b/project/js/main.js @@ -5,5 +5,14 @@ function showPicture(){ $("p").html("High five! You're building your first web app!"); // jQuery can do a lot of crazy stuff, so make sure to Google around to find out more - + $(document).ready(function(){ + getWeather(); + }) +} +function getWeather() { + var url = "https://api.openweathermap.org/data.2.5/weather?q=Boston&APPID="+apiKey; + + $.ajax(url,{success: function(data){ + console.log(data); + }}) } \ No newline at end of file diff --git a/project/start.js b/project/start.js index bbe5c402..13912214 100644 --- a/project/start.js +++ b/project/start.js @@ -12,6 +12,12 @@ app.set('view engine', 'ejs'); app.get('/', function(request, response) { response.render('pages/index'); }); +app.get('/about', function(request, response) { + response.render('pages/about'); +}); +app.get('/projects', function(request, response) { + response.render('pages/projects'); +}); app.listen(app.get('port'), function() { console.log('Node app is running on port', app.get('port')); From 1de8aecfefe8c1c282f00af441c480d4b133591f Mon Sep 17 00:00:00 2001 From: Kim Helgeson Date: Tue, 27 Aug 2019 10:52:18 -0500 Subject: [PATCH 3/4] Add Menu --- project/html/pages/index.ejs | 3 ++- project/html/pages/index.ejs.html | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/project/html/pages/index.ejs b/project/html/pages/index.ejs index c7917cba..1e5e8630 100644 --- a/project/html/pages/index.ejs +++ b/project/html/pages/index.ejs @@ -1,6 +1,7 @@ <% include ../helpers/head %> + <% include ../helpers/navbar %> @@ -9,7 +10,7 @@
diff --git a/project/html/pages/index.ejs.html b/project/html/pages/index.ejs.html index c7917cba..1e5e8630 100644 --- a/project/html/pages/index.ejs.html +++ b/project/html/pages/index.ejs.html @@ -1,6 +1,7 @@ <% include ../helpers/head %> + <% include ../helpers/navbar %> @@ -9,7 +10,7 @@
From 0e1c0cb26ae2a3b764f90602d4a89366be70aa50 Mon Sep 17 00:00:00 2001 From: Kim Helgeson Date: Thu, 29 Aug 2019 13:23:14 -0500 Subject: [PATCH 4/4] Added API for weather --- project/favicon.ico | Bin 0 -> 1218 bytes project/html/pages/index.ejs | 9 ++------- project/images/favicon.ico | Bin 0 -> 1218 bytes project/js/main.js | 12 ++++++++---- 4 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 project/favicon.ico create mode 100644 project/images/favicon.ico diff --git a/project/favicon.ico b/project/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..1fcafa47ef2285b818b286538e8adfd7b6c63471 GIT binary patch literal 1218 zcmZQzU<5(|K?WeHz_5mefkBLcfk6X^1%Oxyh(Y2Y&;pb@!Uw@%0U+`HLhk=jJQ@b0 QX<#%Bkdp>r -

Markquart Motors Weather Web Application

+

Markquart Weather Web Application

+
-

Click on the button for a surprise.

- - - -
- \ No newline at end of file diff --git a/project/images/favicon.ico b/project/images/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..1fcafa47ef2285b818b286538e8adfd7b6c63471 GIT binary patch literal 1218 zcmZQzU<5(|K?WeHz_5mefkBLcfk6X^1%Oxyh(Y2Y&;pb@!Uw@%0U+`HLhk=jJQ@b0 QX<#%Bkdp>r