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/_data/resources.json b/website/_data/resources.json new file mode 100644 index 00000000..56c36bb4 --- /dev/null +++ b/website/_data/resources.json @@ -0,0 +1,89 @@ +[ + { + "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": "ui", + "title": "UI Libraries", + "cover": "resource-ui.png", + "url": "https://amazon.com", + "pixelart": false, + "tags": [ + "ui" + ] + } +] \ 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. +
+