diff --git a/README.md b/README.md index 122671a..7d55b9b 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,4 @@ #网页步骤 -1挑一个模板 -https://freehtml5.co/page/2/ - -2了解学习模板使用的JS框架 - -3修改模板的内容,裁剪不需要的功能 - -4增加工场的资料,修改代码满足工场的页面需求 - -5代码在github同步 - -6顾兆元负责提供内容 - -内容方面 - -1希望做一个大PPT样式的主页 - -2需要包括的内容有 工场团队介绍,工场项目介绍,工场人员,以及工场其余外部链接 - -技术层面 - -1现有的js框架多使用parallax.js或者stellar.js或者skrollr,因此找到的网页模板一般也是使用这两个 - -2github上parallax给的教程相当详细,可以帮助我们理解其实现过程 - -3仅需将已有的模板裁剪修改即可 - -4无需关心网站后端,后端部署非常简单,只需将我们的网页文件放到服务器的某个文件夹下即可,nginx会“自动(其实是我手动)”指定到那个目录,我们只需关心如何做好前端的网页 - -时间安排 - -1开学第一周末学会使用stellar.js实现一个小demo,理解模板的代码结构 - -2第二周进行大规模裁剪和修改,商定具体内容 - -3第三周测试上线 - +##TODO +- 添加项目和团队的图片,文字介绍 +- 增加网页消息的邮件通知 \ No newline at end of file diff --git a/index.js b/index.js index 62d8fb2..adc7386 100644 --- a/index.js +++ b/index.js @@ -9,35 +9,35 @@ app.use(express.static('homepage')); -app.post('/homepage',function (req, res) { +app.post('/',function (req, res) { console.log(req.body); - // create reusable transporter object using the default SMTP transport - var transporter = nodemailer.createTransport('smtps://tiankonggongchang%40gmail.com:tiankonggongchang1@smtp.gmail.com'); +// // create reusable transporter object using the default SMTP transport +// var transporter = nodemailer.createTransport('smtps://tiankonggongchang%40gmail.com:tiankonggongchang1@smtp.gmail.com'); +// +// //setup e-mail data with unicode symbols +// var mailOptions = { +// from: req.body.name + req.body.email, // sender address +// to: 'guzhaoyuan@126.com', // list of receivers +// subject: '[Homepage Message]', // Subject line +// text: req.body.message, // plaintext body +// }; +// +// // send mail with defined transport object +// transporter.sendMail(mailOptions, function(error, info){ +// if(error){ +// console.log(error); +// }else{ +// console.log('Message sent: ' + info.response); +// } +// }); -//setup e-mail data with unicode symbols - var mailOptions = { - from: req.body.name + req.body.email, // sender address - to: 'guzhaoyuan@126.com', // list of receivers - subject: '[Homepage Message]', // Subject line - text: req.body.message, // plaintext body - }; - -// send mail with defined transport object - transporter.sendMail(mailOptions, function(error, info){ - if(error){ - console.log(error); - }else{ - console.log('Message sent: ' + info.response); - } - }); - - //res.sendStatus(200); - res.redirect("/contact.html"); + res.sendStatus(200); + //res.redirect("/contact.html"); //res.end('{"success" : "Updated Successfully", "status" : 200}'); }) app.listen(3000, function () { - console.log('Example app listening on port 3000!'); + console.log('homepage listening on port 3000!'); });