diff --git a/website/.config/collections/resourceTags.js b/website/.config/collections/resourceTags.js new file mode 100644 index 00000000..a7cd74cd --- /dev/null +++ b/website/.config/collections/resourceTags.js @@ -0,0 +1,19 @@ +'use strict'; + +const resources = require('../../_data/resources.json'); + +/** @param {import("@11ty/eleventy/src/TemplateCollection")} api */ +function resourceTags(api) { + let tags = []; + + resources.forEach((resource) => { + if(resource.tags) { + tags.push(...resource.tags); + } + }); + + tags = tags.filter((value, index) => tags.indexOf(value) === index).sort(); + return ['all'].concat(tags); +} + +module.exports = resourceTags; diff --git a/website/.config/eleventy.config.collections.js b/website/.config/eleventy.config.collections.js index 6479a337..f06c7e30 100644 --- a/website/.config/eleventy.config.collections.js +++ b/website/.config/eleventy.config.collections.js @@ -3,6 +3,7 @@ const blogPosts = require('./collections/blogPosts'); const blogTags = require('./collections/blogTags'); const gameTags = require('./collections/gameTags'); +const resourceTags = require('./collections/resourceTags'); /** @param {import("@11ty/eleventy").UserConfig} config */ @@ -10,4 +11,5 @@ module.exports = function (config) { config.addCollection('blogPosts', blogPosts); config.addCollection('blogTags', blogTags); config.addCollection('gameTags', gameTags); + config.addCollection('resourceTags', resourceTags); } diff --git a/website/_data/resources.json b/website/_data/resources.json new file mode 100644 index 00000000..ae5940c0 --- /dev/null +++ b/website/_data/resources.json @@ -0,0 +1,156 @@ +[ + { + "name": "b1", + "title": "Beginning C# Programming with MonoGame", + "author": "A.T. Chamillard", + "cover": "https://m.media-amazon.com/images/I/61LDsDJX8hL._SL1250_.jpg", + "url": "https://www.amazon.com/Beginning-Programming-MonoGame-T-Chamillard-ebook", + "pixelart": false, + "tags": [ + "books" + ] + }, + { + "name": "b2", + "title": "Introduction to Programming with C#, XNA and MonoGame", + "author": "Robert Cook", + "cover": "https://m.media-amazon.com/images/I/819kOLVdDuL._SL1500_.jpg", + "url": "https://www.amazon.com/Introduction-Programming-MonoGame-Cooks-Books-ebook", + "pixelart": false, + "tags": [ + "books" + ] + }, + { + "name": "b3", + "title": "Introduction to C# Cross-Development Programming by Creating 2D Games with Visual Studio 2022 and MonoGame (Japanese Edition)", + "author": "Yu Sasaki", + "cover": "https://m.media-amazon.com/images/I/616Dx92Vq6L._SL1413_.jpg", + "url": "https://www.amazon.com/Visual-MonoGame%E3%81%AE-2D%E3%82%B2%E3%83%BC%E3%83%A0%E4%BD%9C%E3%82%8A%E3%81%A7%E5%AD%A6%E3%81%B6-%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E5%85%A5%E9%96%80-Japanese", + "pixelart": false, + "tags": [ + "books" + ] + }, + { + "name": "b4", + "title": "Game Development with MonoGame", + "author": "Micheal Fleischauer", + "cover": "https://gamefromscratch.com/wp-content/uploads/2020/07/Book_Cover.png", + "url": "https://gamefromscratch.com/free-monogame-e-book-cross-platform-game-development-with-monogame/", + "pixelart": false, + "tags": [ + "books" + ] + }, + { + "name": "b5", + "title": "MonoGame Succinctly", + "author": "Jim Perry", + "cover": "https://gamefromscratch.com/wp-content/uploads/2020/07/Book_Cover.png", + "url": "https://freecomputerbooks.com/Monogame-Succinctly.html", + "pixelart": false, + "tags": [ + "books" + ] + }, + { + "name": "b6", + "title": "MonoGame Role-Playing Game Development Succinctly", + "author": "Jim Perry & Charles Humphrey", + "cover": "https://gamefromscratch.com/wp-content/uploads/2020/07/Book_Cover.png", + "url": "https://freecomputerbooks.com/Monogame-Role-Playing-Game-Development-Succinctly.html", + "pixelart": false, + "tags": [ + "books" + ] + }, + { + "name": "b7", + "title": "Game Development with Monogame: Build a 2D Game Using Your Own Reusable and Performant Game Engine", + "author": "Louis Salin & Rami Morrar", + "cover": "https://images.booksense.com/images/books/706/277/FC9781484277706.JPG", + "url": "https://freecomputerbooks.com/Monogame-Role-Playing-Game-Development-Succinctly.html", + "pixelart": false, + "tags": [ + "books" + ] + }, + { + "name": "e1", + "title": "FlatRedBall", + "author": "Victor Chelaru", + "cover": "https://flatredball.com/wp-content/uploads/2016/02/cropped-logo-1024-150x150.png", + "url": "https://flatredball.com/", + "pixelart": false, + "tags": [ + "engines" + ] + }, + { + "name": "l1", + "title": "MonoGame.Extended", + "author": "Craftworkgames and contributors", + "cover": "https://www.monogameextended.net/img/logo.png", + "url": "https://www.monogameextended.net/", + "pixelart": false, + "tags": [ + "libraries" + ] + }, + { + "name": "l2", + "title": "Gum", + "author": "Victor Chelaru", + "cover": "https://docs.flatredball.com/~gitbook/image?url=https%3A%2F%2F3900811371-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Forganizations%252F-M_fyYVTQKWSV65sXTSp%252Fsites%252Fsite_3hxze%252Flogo%252Fo54By5G58RWuAHsltTBS%252Fgum-logo-reverse-512.png%3Falt%3Dmedia%26token%3D54198098-3f7d-40ff-a442-1a28a2fbbca9&width=260&dpr=2&quality=100&sign=55148268&sv=2", + "url": "https://docs.flatredball.com/gum", + "pixelart": false, + "tags": [ + "libraries" + ] + }, + { + "name": "l3", + "title": "Myra", + "author": "Roman Shapiro", + "cover": "", + "url": "https://github.com/rds1983/Myra", + "pixelart": false, + "tags": [ + "libraries" + ] + }, + { + "name": "l4", + "title": "ImGui.NET", + "author": "ImGuiNET", + "cover": "", + "url": "https://github.com/ImGuiNET/ImGui.NET", + "pixelart": false, + "tags": [ + "libraries" + ] + }, + { + "name": "l5", + "title": "MonoGame.Aseprite", + "author": "Christopher Whitley (AristurtleDev)", + "cover": "https://monogameaseprite.net/images/logo.svg", + "url": "https://monogameaseprite.net/", + "pixelart": false, + "tags": [ + "libraries" + ] + }, + { + "name": "a1", + "title": "Kenny NL Assets", + "author": "Kenny NL", + "cover": "https://kenney.nl/data/img/logo@2.png", + "url": "https://kenney.nl/assets", + "pixelart": false, + "tags": [ + "assets" + ] + } +] \ No newline at end of file diff --git a/website/_data/site.json b/website/_data/site.json index f67fd4e9..8d97e729 100644 --- a/website/_data/site.json +++ b/website/_data/site.json @@ -35,6 +35,10 @@ "label": "Bounties", "url": "/bounties/" }, + { + "label": "Resources", + "url": "/resources/" + }, { "label": "Store", "url": "https://store.monogame.net" @@ -45,7 +49,8 @@ }, { "label": "Donate", - "url": "/donate/" + "url": "/donate/", + "type": "button" } ], "social": [ diff --git a/website/_includes/partials/_topnav.njk b/website/_includes/partials/_topnav.njk index 79e25c48..2a326789 100644 --- a/website/_includes/partials/_topnav.njk +++ b/website/_includes/partials/_topnav.njk @@ -17,12 +17,21 @@
+ {% for navlink in site.navigation %} + {% if navlink.type == "button" %} + + {{ navlink.label }} + + {% endif %} + {% endfor %} {% include 'partials/_themeToggle.njk' %} diff --git a/website/content/community.njk b/website/content/community.njk index b43d27b7..6f0c55bb 100644 --- a/website/content/community.njk +++ b/website/content/community.njk @@ -92,7 +92,7 @@ title: Community+ Here's a list of MonoGame resources that can help you on your journey. + If you have a resource you'd like to share, please + Email Us + +
+