forked from totaljs/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc500ca
commit 8279a9e
Showing
12 changed files
with
72 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Mail settings | ||
mail.smtp : smtp.gmail.com | ||
mail.smtp.options : {"secure":true,"port":465,"user":"YOUR_EMAIL_GMAIL","password":"YOUR_PASSWORD_GMAIL","timeout":10000} | ||
mail.address.from : [email protected] | ||
mail.address.reply : [email protected] | ||
mail.address.bcc : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
exports.install = function(framework) { | ||
framework.route('/', view_homepage); | ||
framework.route('/mail/', redirect_mail); | ||
}; | ||
|
||
function view_homepage() { | ||
var self = this; | ||
self.view('homepage'); | ||
} | ||
|
||
function redirect_mail() { | ||
|
||
var self = this; | ||
|
||
// This function automatically reads view: email.html | ||
self.mail('[email protected]', 'Test e-mail', '~email', { name: 'MODEL NAME' }); | ||
self.redirect('/?success=1'); | ||
|
||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>@{model.name}</h1> | ||
<div>This is message.</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@{layout('')} | ||
|
||
@{if get.success} | ||
<div style="background-color:#E0E0E0;padding:10px">E-mail was sent.</div> | ||
<br /> | ||
@{endif} | ||
|
||
<a href="/mail/">Send e-mail</a> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var framework = require('total.js'); | ||
var http = require('http'); | ||
var debug = true; | ||
|
||
framework.run(http, debug); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
<h1>~ADMIN</h1> | ||
<h1>~ADMIN</h1> | ||
|
||
@{section footer} | ||
<br /> | ||
<div style="background-color:#E0E0E0;padding:10px">ADMINISTRATOR FOOTER</div> | ||
@{end} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters