This commit is contained in:
Zachary Carter 2012-12-12 11:21:45 -08:00
Родитель 5839bc3878
Коммит 7ae1ae2ebe
9 изменённых файлов: 100 добавлений и 11 удалений

Просмотреть файл

@ -8,6 +8,7 @@ const http = require('http');
const express = require('express');
const nunjucks = require('nunjucks');
const config = require('../etc/config');
const db = require('../lib/db.js');
var views = require('../lib/views.js');
@ -32,7 +33,9 @@ views.setup(app);
app.use(express.static(static_root));
app.use('/downloads', express.static(download_root));
var bindTo = config.process.static;
server.listen(bindTo.port, bindTo.host, function() {
console.log("running on http://" + server.address().address + ":" + server.address().port);
db.connect(config.db, function (err) {
var bindTo = config.process.static;
server.listen(bindTo.port, bindTo.host, function() {
console.log("running on http://" + server.address().address + ":" + server.address().port);
});
});

Просмотреть файл

@ -13,6 +13,20 @@ module.exports = {
});
return this;
},
storeAlphaEmail: function(email, cb) {
db.get('alpha_users', function (err, doc, meta) {
if (!doc) doc = {emails: []};
if (doc.emails.indexOf(email) < 0) {
doc.emails.push(email);
}
db.set('alpha_users', doc, meta, function(err) {
cb(err);
});
});
return this;
},
stageAccount: function(data, cb) {
var account = {
pass: data.pass,

Просмотреть файл

@ -9,6 +9,18 @@ module.exports = {
}, 0);
return this;
},
storeAlphaEmail: function(email, cb) {
if (!db.alpha_users) db.alpha_users = {emails: []};
if (db.alpha_users.emails.indexOf(email) < 0) {
db.alpha_users.emails.push(email);
}
setTimeout(function() {
cb(null);
}, 0);
return this;
},
stageAccount: function(data, cb) {
var account = {
pass: data.pass,

Просмотреть файл

@ -20,8 +20,13 @@ function setup(app) {
});
app.post('/join_alpha', function(req, res) {
console.log('got new alpha user email:', req.params.email);
res.redirect('/download');
if (req.body.email) {
db.storeAlphaEmail(req.body.email, function(err) {
res.render('joined.html');
});
} else {
res.redirect('/');
}
});
app.get('/download', function(req, res) {

Просмотреть файл

@ -18,17 +18,33 @@
width: 18em;
}
.gombot a,
.gombot a:link,
.gombot a:visited {
color: #2983c8;
}
.gombot a:hover,
.gombot a:active {
color: #20679e;
}
.gombot h2 img {
vertical-align: middle;
}
.gombot h2.main {
font-size: 3em;
padding-top: 50px;
padding-bottom: 18px;
}
.splash h1 {
font-size: 63px;
letter-spacing: -4px;
line-height: 100%;
}
.splash h2 {
.gombot .splash h2 {
font-size: 40px;
letter-spacing: -1px;
line-height: 150%;
@ -109,3 +125,13 @@
display: block;
padding-top: 15px;
}
.gombot .blurb {
width: 50%;
padding: 10px;
}
#client-logos img {
vertical-align: middle;
}

Двоичные данные
public/img/android-logo.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.8 KiB

Двоичные данные
public/img/ios-logo.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 8.5 KiB

После

Ширина:  |  Высота:  |  Размер: 5.0 KiB

Просмотреть файл

@ -5,15 +5,16 @@
Gombot is an app that securely remembers your passwords and lets you <strong>sign in to your favorite websites with just one click</strong>.
<p>
Gombot even helps you take your passwords with you; it will be available on Mozilla Firefox, Google Chrome and Apple iPhone/iPod Touch.
<div>
<img src="/img/ff-logo.png" />
<img src="/img/chrome-logo.png" />
<img src="/img/ios-logo.png" />
<div id="client-logos">
<img src="/img/ff-logo.png" />
<img src="/img/chrome-logo.png" />
<img src="/img/android-logo.png" />
<img src="/img/ios-logo.png" />
</div>
</section>
<section class="split">
<p>
<strong>Now there's no need to remember so many passwords anymore</strong>. Just type in a single master password and Gombot does the rest for you. For even greater security, Gombot can PIN protect your stored password before signing you in to a site. That's extra important when you want that extra layer of safety for your personal data when using email, Facebook or online banking.
<strong>Now there's no need to remember so many passwords anymore</strong>. Just type in a single master password and Gombot does the rest for you. For even greater security, Gombot can PIN protect your stored password before signing you in to a site. That's extra important when you want that extra layer of safety for your personal data when using email, Facebook or online shopping sites.
<p>
Gombot is made by Mozilla, the global non-profit organization that answers to no one but you.
</section>

28
views/joined.html Normal file
Просмотреть файл

@ -0,0 +1,28 @@
{% extends "layout.html" %}
{% block page_title %}You're on the list{% endblock %}
{% block content %}
<div id="main-content">
<div class="row">
<h2 class="main"><img src="/img/gombot-logo-92x92.png" /> You're on the list</h2>
<div class="blurb">
<p>
We'll send out an email to let you know when Gombot is ready to download and test. Thanks so much for signing up.
</p>
<p>
In the meantime, here's how to get in touch:
</p>
<p>
twitter: <a href="http://twitter.com/mozlabs">@mozlabs</a> and
<a href="http://twitter.com/mozillapersona">@mozillapersona</a> <br/>
IRC: #gombot
</p>
</div>
</div>
</div>
{% endblock %}