From e8bbcc29efa800d2ad11adc6bcac1924501fb5ec Mon Sep 17 00:00:00 2001 From: Roman Cervantes Date: Thu, 1 Nov 2018 18:43:31 -0700 Subject: [PATCH] Added more platforms --- package.json | 2 +- src/pages/Platforms/Platforms.vue | 63 ++++++++++++++- src/shared/platforms.js | 77 ++++++++++++++++++- static/img/platforms/n64.svg | 16 ++++ static/img/platforms/nes.svg | 27 +++++++ static/img/platforms/ps.svg | 11 +++ static/img/platforms/ps2.svg | 10 +++ static/img/platforms/ps3.svg | 8 ++ .../platforms/{playstation-4.svg => ps4.svg} | 0 static/img/platforms/smd.svg | 14 ++++ static/img/platforms/snes.svg | 4 + static/img/platforms/wii.svg | 4 + static/img/platforms/win.svg | 7 ++ yarn.lock | 4 + 14 files changed, 244 insertions(+), 3 deletions(-) create mode 100644 static/img/platforms/n64.svg create mode 100644 static/img/platforms/nes.svg create mode 100644 static/img/platforms/ps.svg create mode 100644 static/img/platforms/ps2.svg create mode 100644 static/img/platforms/ps3.svg rename static/img/platforms/{playstation-4.svg => ps4.svg} (100%) create mode 100644 static/img/platforms/smd.svg create mode 100644 static/img/platforms/snes.svg create mode 100644 static/img/platforms/wii.svg create mode 100644 static/img/platforms/win.svg diff --git a/package.json b/package.json index 37fc44ca..279f3f2d 100755 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "firebase": "^5.5.5", "firebase-admin": "^6.0.0", "firebase-functions": "^2.0.5", - "lodash": "^4.17.10", + "lodash": "^4.17.11", "moment": "^2.22.1", "node-sass": "^4.8.3", "sass-loader": "^7.0.1", diff --git a/src/pages/Platforms/Platforms.vue b/src/pages/Platforms/Platforms.vue index 5a23f4b6..3de51f13 100755 --- a/src/pages/Platforms/Platforms.vue +++ b/src/pages/Platforms/Platforms.vue @@ -2,10 +2,16 @@

Choose a platform

+ Sort: + + +
+
+

{{ ordinalSuffix(generation) }} generation

+ +
+ + + +
+
+
@@ -58,6 +113,7 @@ export default { } .platforms { + margin-top: $gp; display: grid; grid-template-columns: repeat(auto-fill, 140px); grid-gap: $gp; @@ -78,4 +134,9 @@ export default { } } + + .generations { + display: flex; + flex-direction: column-reverse; + } diff --git a/src/shared/platforms.js b/src/shared/platforms.js index 9d0337fd..8df4b8da 100755 --- a/src/shared/platforms.js +++ b/src/shared/platforms.js @@ -5,17 +5,92 @@ export default [ hex: '#ffffff', textHex: '#107c10', id: 49, + generation: 8, }, { name: 'Nintendo Switch', code: 'nintendo-switch', hex: '#e60012', id: 130, + generation: 8, + }, + { + name: 'NES', + code: 'nes', + hex: '#FFFFFF', + textHex: '#DD002A', + id: 18, + generation: 3, + }, + { + name: 'Wii', + code: 'wii', + hex: '#FFFFFF', + textHex: '#5ACDEA', + id: 5, + generation: 7, + }, + { + name: 'Nintendo 64', + code: 'n64', + hex: '#FFFFFF', + textHex: '#D20014', + id: 4, + generation: 5, + }, + { + name: 'Playstation', + code: 'ps', + hex: '#fff', + textHex: '#000', + id: 7, + generation: 5, + }, + { + name: 'Playstation 2', + code: 'ps2', + hex: '#fff', + textHex: '#000', + id: 8, + generation: 6, + }, + { + name: 'Playstation 3', + code: 'ps3', + hex: '#fff', + textHex: '#000', + id: 9, + generation: 7, }, { name: 'PlayStation 4', - code: 'playstation-4', + code: 'ps4', hex: '#2E6DB4', id: 48, + generation: 8, + }, + { + name: 'PC - Windows', + code: 'win', + hex: '#ffffff', + textHex: '#0076d6', + id: 6, + generation: 8, + }, + { + name: 'Super Nintendo', + code: 'snes', + hex: '#ffffff', + textHex: '#4f43ae', + id: 19, + generation: 4, + }, + { + name: 'Sega Mega Drive / Genesis', + code: 'smd', + hex: '#ffffff', + textHex: '#000000', + id: 29, + generation: 4, }, ]; diff --git a/static/img/platforms/n64.svg b/static/img/platforms/n64.svg new file mode 100644 index 00000000..2e7d3809 --- /dev/null +++ b/static/img/platforms/n64.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/static/img/platforms/nes.svg b/static/img/platforms/nes.svg new file mode 100644 index 00000000..afe47313 --- /dev/null +++ b/static/img/platforms/nes.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/img/platforms/ps.svg b/static/img/platforms/ps.svg new file mode 100644 index 00000000..5ba22095 --- /dev/null +++ b/static/img/platforms/ps.svg @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/static/img/platforms/ps2.svg b/static/img/platforms/ps2.svg new file mode 100644 index 00000000..a6fca72a --- /dev/null +++ b/static/img/platforms/ps2.svg @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/static/img/platforms/ps3.svg b/static/img/platforms/ps3.svg new file mode 100644 index 00000000..edf8c843 --- /dev/null +++ b/static/img/platforms/ps3.svg @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/static/img/platforms/playstation-4.svg b/static/img/platforms/ps4.svg similarity index 100% rename from static/img/platforms/playstation-4.svg rename to static/img/platforms/ps4.svg diff --git a/static/img/platforms/smd.svg b/static/img/platforms/smd.svg new file mode 100644 index 00000000..f9d0075a --- /dev/null +++ b/static/img/platforms/smd.svg @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/static/img/platforms/snes.svg b/static/img/platforms/snes.svg new file mode 100644 index 00000000..410e2cd6 --- /dev/null +++ b/static/img/platforms/snes.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/static/img/platforms/wii.svg b/static/img/platforms/wii.svg new file mode 100644 index 00000000..4ef12bd3 --- /dev/null +++ b/static/img/platforms/wii.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/static/img/platforms/win.svg b/static/img/platforms/win.svg new file mode 100644 index 00000000..3e9e7346 --- /dev/null +++ b/static/img/platforms/win.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 4e9c9707..cc87d754 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5789,6 +5789,10 @@ lodash@^4.0.0, lodash@^4.0.1, lodash@^4.17.0, lodash@^4.17.10, lodash@^4.17.2, l version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" +lodash@^4.17.11: + version "4.17.11" + resolved "https://infusionsoft.jfrog.io/infusionsoft/api/npm/npm/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + log-driver@1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"