Skip to content

Commit 1e160cb

Browse files
committed
Add desynced style and view changes from randomuser.me to repo
1 parent fa18278 commit 1e160cb

7 files changed

Lines changed: 53 additions & 17 deletions

File tree

public/css/base.css

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,18 @@ footer .block .builder {
13561356
color: #fff;
13571357
text-decoration: none;
13581358
}
1359+
.psalert {
1360+
-moz-box-sizing: border-box;
1361+
-webkit-box-sizing: border-box;
1362+
width: 100%;
1363+
min-height: 20px;
1364+
background: rgba(240, 82, 35, 0.9);
1365+
text-align: center;
1366+
padding: 20px 60px;
1367+
color: #fff;
1368+
font-weight: 300;
1369+
z-index: 50;
1370+
}
13591371
@media screen and (max-width: 750px) {
13601372
.frame {
13611373
margin-left: 20px;
@@ -1368,13 +1380,17 @@ a {
13681380
}
13691381

13701382
section.sponsor {
1383+
border: #CCC solid 1px;
1384+
box-shadow: 0px 0px 5px #CCC;
13711385
text-align: center;
13721386
margin-bottom: -90px;
13731387
margin-top: 30px;
1388+
padding-top: 10px;
1389+
padding-bottom: 10px;
13741390
}
13751391

13761392
section.sponsor h2 {
1377-
color: #CCC;
1393+
color: #555;
13781394
font-size: 10pt;
13791395
text-transform: uppercase;
13801396
}

routes/index.js

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,31 @@ router.get('/:page?', function(req, res, next) {
4343
router.post('/donate', function(req, res, next) {
4444
let data = JSON.parse(req.body.data);
4545

46-
stripe.charges.create({
47-
amount: data.token.price,
48-
currency: "usd",
49-
source: data.token.id, // obtained with Stripe.js
50-
description: `Donation from ${data.token.email}
51-
${data.comment}`
52-
}, function(err, charge) {
53-
if (err) return res.sendStatus(400);
54-
else res.sendStatus(200);
55-
});
46+
if (!badEmail(data.token.email)) {
47+
stripe.charges.create({
48+
amount: data.token.price,
49+
currency: "usd",
50+
source: data.token.id, // obtained with Stripe.js
51+
description: `Donation from ${data.token.email} - ${data.comment}`
52+
}, function(err, charge) {
53+
if (err) return res.sendStatus(400);
54+
else res.sendStatus(200);
55+
});
56+
} else {
57+
console.log(`Bad donation email: ${data.token.email} - ${data.comment}`);
58+
res.sendStatus(400);
59+
}
5660

61+
function badEmail(email) {
62+
let blacklist = [
63+
"angelic.com", "bayer.ca", "comic.com", "comsat.com", "email.com",
64+
"form.com", "hot.com", "just.com", "linux.org", "love.com",
65+
"magic.com", "mixmail.com", "post.com", "sua.com", "techie.com",
66+
"usa.com", "usa.net", "outlook.es"
67+
];
68+
69+
return blacklist.indexOf(email.match(/@(.*)/)[1]) !== -1;
70+
}
5771
});
5872

5973
router.all('/download/version.php', function(req, res, next) {

views/pages/copyright.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="frame">
1111
<section>
1212
<h2>Copyright Notice</h2>
13-
<p>All randomly generated photos were hand picked from the authorized section of <a href="http://uifaces.com">UI Faces</a>. Please visit <a href="http://uifaces.com/faq">UI Faces FAQ</a> for more information regarding how you can use these faces.</p>
13+
<p>All randomly generated photos were hand picked from the authorized section of <a href="http://uifaces.com">UI Faces</a>. Please visit <a href="https://web.archive.org/web/20160811185628/http://uifaces.com/faq">UI Faces FAQ</a> for more information regarding how you can use these faces.</p>
1414
</section>
1515
<section>
1616
<h2>Have Questions?</h2>

views/pages/documentation.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ https://randomuser.me/api/<span>?exc=login</span>
264264
<ul>
265265
<li><b>dl</b> - Download the results with the appropriate format extension.</li>
266266
<pre>
267-
https://randomuser.me/api/?results=25&nat=gb,us,es&fmt=csv&<span>dl</span>
267+
https://randomuser.me/api/?results=25&nat=gb,us,es&format=csv&<span>dl</span>
268268
</pre>
269269
<li><b>noinfo</b> - If you only want the data, and don't care for seed, results, page, and version data.</li>
270270
<pre>

views/pages/index.ejs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<header>
88
<h1>Random User Generator</h1>
9-
<p>A free, <a id="openSource" href="https://github.com/randomapi">open-source</a> API for generating random user data. Like Lorem Ipsum, but for people. </p>
9+
<p>A free, <a id="openSource" href="https://github.com/RandomAPI/Randomuser.me-Node">open-source</a> API for generating random user data. Like Lorem Ipsum, but for people. </p>
1010
<a href="https://twitter.com/randomapi" class="twitter"><img src="img/twitter.png">Follow us @randomapi</a>
1111
</header>
1212

@@ -49,7 +49,7 @@
4949
<section class="sponsor">
5050
<h2>Sponsored</h2>
5151
<h3>RandomAPI</h3>
52-
<p>Want to create your own customized data generator for your application?<br>Check out our other service RandomAPI!</p>
52+
<p>Want to create your own <b>customized</b> data generator for your application?<br>Check out our other service RandomAPI!</p>
5353
<button id="learnmore" class="button" onClick="window.open('https://randomapi.com');">Learn More</button>
5454
</section>
5555

@@ -125,7 +125,7 @@ $.ajax({
125125
</section>
126126
<section>
127127
<h2>Thank you for helping us help you help us all</h2>
128-
<p>Found a bug or have an idea?<br>Contribute to randomuser.me's database on our <a href="https://github.com/randomapi">Github Repo</a>.</p>
128+
<p>Found a bug or have an idea?<br>Contribute to randomuser.me's database on our <a href="https://github.com/RandomAPI/Randomuser.me-Node">Github Repo</a>.</p>
129129
<h2>Contact Us</h2>
130130
<p>If you have any questions/feedback or would like to get in touch with us, tweet us <a href="https://twitter.com/randomapi">@randomapi</a></p>
131131
</section>

views/pages/photoshop.ejs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

1010
<div class="frame">
1111

12+
<div class="psalert" style="
13+
margin-top: 10px;
14+
">We are aware of the PS extension not working for CC 2017<br><br>
15+
Sadly, we don't have as much free time to work on randomuser.me right now and don't have an ETA on when the next update will be out. If you would like to help fix the extension, we will gladly accept pull requests from our <a href="https://github.com/RandomAPI/Randomuser.me-Photoshop-Extension">Github repo</a>.<br><br>Thank you for your understanding
16+
</div>
17+
1218
<div class="panel">
1319
<iframe src="https://randomuser.me/extension/3.0.1/"></iframe>
1420
</div>

views/snippets/footer.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</div>
1414
<div class="block">
1515
<h3>Copyright Notice</h3>
16-
<p>All randomly generated photos were hand picked from the authorized section of <a href="http://uifaces.com">UI Faces</a>. Please visit <a href="http://uifaces.com/faq">UI Faces FAQ</a> for more information regarding how you can use these faces.<br><br>
16+
<p>All randomly generated photos were hand picked from the authorized section of <a href="http://uifaces.com">UI Faces</a>. Please visit <a href="https://web.archive.org/web/20160811185628/http://uifaces.com/faq">UI Faces FAQ</a> for more information regarding how you can use these faces.<br><br>
1717
<!-- Everyone says "Made with ♥ in blah" and it annoys me for some unknown reason so...take that
1818
Made with <span class="icon-heart-broken" title="hatred"></span> in North America.</p> -->
1919
</div>

0 commit comments

Comments
 (0)