Skip to content

Commit

Permalink
Merge pull request #478 from pokemontrades/435-tools-section
Browse files Browse the repository at this point in the history
435 tools section
  • Loading branch information
not-an-aardvark committed Dec 12, 2015
2 parents b519812 + 336437b commit 6abf259
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 2 deletions.
4 changes: 4 additions & 0 deletions api/controllers/HomeController.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ module.exports = {
res.view();
},

tools: function (req, res) {
res.view("../tools/tools.ejs");
},

version: function(req, res) {
res.ok(sails.config.version);
}
Expand Down
6 changes: 5 additions & 1 deletion assets/styles/importer.less
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ table h1, table h2, table h3 {
max-width:100px;
}

img {
max-width: 100%;
}

.input-group-addon {
padding: 0px 12px !important;
}
Expand Down Expand Up @@ -198,4 +202,4 @@ td h3 {

.plus-minus{
font-family: Courier;
}
}
Binary file added assets/tools/darkmode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tools/greasemonkey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/tools/tools.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<div class="container" ng-controller="adminCtrl">
<div class="main container clearfix">

<div class="content row">

<h2>Tools</h2>

<div class="col-md-12">
<h3>Subreddit Greasemonkey Script</h3>

<ul>
<li>Install <a href="https://addons.mozilla.org/en-GB/firefox/addon/greasemonkey/">Greasemonkey on firefox</a>,
<a href="https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en">Tampermonkey on Chrome</a>
or <a href="http://www.macupdate.com/app/mac/20718/greasekit">GreaseKit on Safari</a></li>
<li>Install the <a href="https://github.com/pokemontrades/scripts/raw/master/greasemonkey/flairhqLinks.user.js">Script</a></li>
</ul>

<img src="/tools/greasemonkey.png" />
</div>

<div class="col-md-12">
<h3>FlairHQ Dark Mode</h3>

<ul>
<li>Install <a href="https://userstyles.org/">Stylish in your browser</a></li>
<li>Install the <a href="https://userstyles.org/styles/115908/flairhq-night-mode">Dark mode theme</a></li>
</ul>

<img src="/tools/darkmode.png" />
</div>

</div>
</div>
</div>
2 changes: 2 additions & 0 deletions assets/views/home/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<% if (typeof user !== 'undefined') {%>
<ul class="nav navbar-nav">
<li><a href="/info">Information</a></li>
<li><a href="/tools">Tools</a></li>
<% if (user.isMod) {%>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Moderation<span class="caret"></span></a>
Expand Down Expand Up @@ -59,6 +60,7 @@
<% } else {%>
<ul class="nav navbar-nav">
<li><a href="/info">Information</a></li>
<li><a href="/tools">Tools</a></li>
<li><a href="/auth/reddit<%= typeof query !== 'undefined' && query.redirect ? '?redirect=' + encodeURIComponent(query.redirect) : '' %>"
>Login with Reddit</a>
</li>
Expand Down
11 changes: 11 additions & 0 deletions assets/views/home/info.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@

They aren't that scary. Honestly.
</p>

<h3>Donations</h3>
<p>
The site costs money to run, and because of this, we have opened up donations to allow people to help us fund it. If you wish to help, please do so.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="RN8UYDJQL2AQE">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</p>
</div>

</div>
Expand Down
3 changes: 2 additions & 1 deletion config/policies.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ module.exports.policies = {
index: user,
reference: anyone,
search: user,
info: anyone
info: anyone,
tools: anyone
},

ReferenceController: {
Expand Down
5 changes: 5 additions & 0 deletions config/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ module.exports.routes = {
action : 'info'
},

'/tools' : {
controller : 'home',
action : 'tools'
},

'/version' : {
controller : 'home',
action : 'version'
Expand Down

0 comments on commit 6abf259

Please sign in to comment.