Skip to content

Commit

Permalink
v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRowey committed Dec 23, 2021
1 parent b7a85dc commit b585800
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 150 deletions.
2 changes: 0 additions & 2 deletions express.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ process.env.OAUTH_CLIENT_ID = process.env.OAUTH_CLIENT_ID || '12345';
process.env.OAUTH_CLIENT_SECRET = process.env.OAUTH_CLIENT_SECRET || '12345';
process.env.HOST = process.env.HOST || 'http://localhost';
process.env.SESSION_SECRET_KEY = process.env.SESSION_SECRET_KEY || '12345';
process.env.TWITCH_CLIENT_ID = process.env.TWITCH_CLIENT_ID || '12345';
process.env.TWITCH_LIVESTREAM_URL = process.env.TWITCH_LIVESTREAM_URL || 'https://api.twitch.tv/kraken/streams/?game=Supreme%20Commander:%20Forged%20Alliance';

//Execute middleware before each request...
app.use(middleware.initLocals);
Expand Down
10 changes: 0 additions & 10 deletions grunt/concat.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@ module.exports = {
'public/js/browse_clans.min.js': [
'node_modules/awesomplete/awesomplete.js',
'public/js/app/browse_clans.js'
],
'public/js/world-map-dependencies.min.js': [
'public/armchart_4.1.12/armcharts4/core.js',
'public/armchart_4.1.12/armcharts4//maps.js',
'public/armchart_4.1.12/armcharts4-geodata/worldLow.js',
'public/armchart_4.1.12/armcharts4-geodata/continentsLow.js',
'public/armchart_4.1.12/armcharts4/themes/animated.js',
],
'public/js/world-map.min.js': [
'public/js/app/world-map.js'
]
}
}
Expand Down
2 changes: 0 additions & 2 deletions grunt/uglify.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ module.exports = {
'public/js/account.min.js': 'public/js/account.min.js',
'public/js/blog.min.js': 'public/js/blog.min.js',
'public/js/counter.min.js': 'public/js/counter.min.js',
'public/js/world-map.min.js': 'public/js/world-map.min.js',
'public/js/world-map-dependencies.min.js': 'public/js/world-map-dependencies.min.js',
'public/js/report.min.js': 'public/js/report.min.js'
}
}
Expand Down
21 changes: 0 additions & 21 deletions public/armchart_4.1.12/armcharts4-geodata/continentsLow.js

This file was deleted.

21 changes: 0 additions & 21 deletions public/armchart_4.1.12/armcharts4-geodata/worldLow.js

This file was deleted.

20 changes: 0 additions & 20 deletions public/armchart_4.1.12/armcharts4/core.js

This file was deleted.

21 changes: 0 additions & 21 deletions public/armchart_4.1.12/armcharts4/maps.js

This file was deleted.

21 changes: 0 additions & 21 deletions public/armchart_4.1.12/armcharts4/themes/animated.js

This file was deleted.

31 changes: 3 additions & 28 deletions routes/views/index.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,11 @@
exports = module.exports = function(req, res) {

let locals = res.locals;
let fs = require('fs');


// locals.section is used to set the currently selected
// item in the header navigation.
locals.section = 'home';

fs.readFile('members/top5.json', 'utf8', function (err, data) {
if (data) {
locals.topPlayers = JSON.parse(data);
} else {
locals.topPlayers = {};
}

let flash = {};

if (req.query.flash) {
let buff = Buffer.from(req.query.flash, 'base64');
let text = buff.toString('ascii');

try {
flash = JSON.parse(text);
} catch(e) {
console.error("Parsing error while trying to decode a flash error: " + text);
console.error(e);
flash = [{msg: "Unknown error"}];
}
}

// Render the view
res.render('index', {flash: flash, refreshCountersSeconds: parseInt(process.env.PLAYER_COUNT_UPDATE_INTERVAL)});
});
res.render('index');


};
13 changes: 9 additions & 4 deletions templates/layouts/default.pug
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
doctype html
html
html(lang='en')
//- HTML HEADER
head
meta(charset="utf-8")
Expand Down Expand Up @@ -39,9 +39,9 @@ html
.top-navigation-wrapper
nav.top-navigation
ul.top-navigation
li: a(href="https://forum.faforever.com/") Forums
li: a(href="https://wiki.faforever.com/") Wiki
li: a(href="https://unitdb.faforever.com/") Unit Database
li: a(href="https://forum.faforever.com") Forums
li: a(href="https://wiki.faforever.com") Wiki
li: a(href="https://unitdb.faforever.com") Unit Database
li: a(href="/livestream") Live Streams
li: a(href="https://discord.gg/hgvj6Af") Discord
i.icon.fab.fa-discord
Expand All @@ -51,6 +51,8 @@ html
i.fab.fa-twitch
li: a.icon(href="https://www.facebook.com/ForgedAllianceForever")
i.fab.fa-facebook-f
li: a.icon(href="https://twitter.com/FAFOfficial_")
i.fab.fa-twitter
li: a.icon(href="https://github.com/FAForever/")
i.fab.fa-github
li
Expand Down Expand Up @@ -155,6 +157,9 @@ html
li
a(href="https://www.facebook.com/ForgedAllianceForever" title="Follow Forged Alliance Forever on Facebook" target="_blank")
i.fab.fa-facebook-f
li
a(href="https://twitter.com/FAFOfficial_" title="Follow Forged Alliance Forever on Twitter" target="_blank")
i.fab.fa-twitter
li
a(href="https://www.youtube.com/c/ForgedAllianceForever" title="Follow Forged Alliance Forever on YouTube" target="_blank")
i.fab.fa-youtube
Expand Down

0 comments on commit b585800

Please sign in to comment.