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

Refresh 2019-updated #47

Open
wants to merge 18 commits into
base: refresh-2019
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 17 additions & 17 deletions projects/evaluate-news-nlp/src/server/index.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
var path = require('path')
const express = require('express')
const mockAPIResponse = require('./mockAPI.js')
path = require('path')
const express = require('express')
const mockAPIResponse = require('./mockAPI.js')

const app = express()
const app = express()

app.use(express.static('dist'))
app.use(express.static('dist'))

console.log(__dirname)
console.log(__dirname)

app.get('/', function (req, res) {
// res.sendFile('dist/index.html')
res.sendFile(path.resolve('src/client/views/index.html'))
})
app.get('/', function(req, res) {
// res.sendFile('dist/index.html')
res.sendFile(path.resolve('src/client/views/index.html'))
})

// designates what port the app will listen to for incoming requests
app.listen(8080, function () {
console.log('Example app listening on port 8080!')
})
// designates what port the app will listen to for incoming requests
app.listen(8080, function() {
console.log('Example app listening on port 8080!')
})

app.get('/test', function (req, res) {
res.send(mockAPIResponse)
})
app.get('/test', function(req, res) {
res.send(mockAPIResponse)
})
Binary file added projects/landing-page.zip
Binary file not shown.
32 changes: 27 additions & 5 deletions projects/landing-page/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
# Landing Page Project

A landing page project that involes using the `js/app.js` file to covert the static version of the landing page project to a more interactive one.

## Table of Contents

* [Instructions](#instructions)
* [Description](#Description)
* [Process](#Process)
* [Dependencies](#Dependencies)

## Description

The starter project has some HTML and CSS styling to display a static version of the Landing Page project. I converted this project from a static project to an interactive one. It required modifying the HTML and CSS files, but primarily the JavaScript file.

To get started, open `js/app.js` and view the app's functionality

For specific, detailed instructions linking to this project, look at the project instructions in the Udacity Classroom.

## Process

Firstly, I linked the `js/app.js` to the `index.html`.

I created a **fourth** content section in the `index.html`.

I created the helper functions to create the **list** for the nav-bar, then I created the **active class** scroll for the section and lastly for the helper function I created the **scrollTo** function for when you click a link.

Then I worked on the main functions. I used the main functions to basically call the helper functions that work the same.

## Instructions
Finally, I begin events by calling the main functions.

The starter project has some HTML and CSS styling to display a static version of the Landing Page project. You'll need to convert this project from a static project to an interactive one. This will require modifying the HTML and CSS files, but primarily the JavaScript file.
In summary, I built the menu bar, created a **scrollTo** link to the **sections** and lastly I created an **active class** scroll function.

To get started, open `js/app.js` and start building out the app's functionality
## Dependencies
I used a starter-code from *[refresh-2019](https://github.com/udacity/fend/tree/refresh-2019/projects/landing-page)*

For specific, detailed instructions, look at the project instructions in the Udacity Classroom.
Loading