From 093c6042f00bd4f9b9fcfa88a7d7295c0c17106a Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 27 May 2016 15:16:13 +0100 Subject: [PATCH] Start adding project articles --- content/projects/attack-on-blocks.md | 14 +++++++++++ pelicanconf.py | 32 ++++++++++++------------ requirements.txt | 1 + theme/templates/projects.html | 37 ++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 16 deletions(-) create mode 100644 content/projects/attack-on-blocks.md create mode 100644 theme/templates/projects.html diff --git a/content/projects/attack-on-blocks.md b/content/projects/attack-on-blocks.md new file mode 100644 index 0000000..5da2fe1 --- /dev/null +++ b/content/projects/attack-on-blocks.md @@ -0,0 +1,14 @@ +title: Attack on blocks game +template: projects +slug: attack-on-blocks +repo: https://github.com/RealOrangeOne/attack-on-blocks/ +download_link: https://github.com/RealOrangeOne/attack-on-blocks/archive/master.zip + +Attack on Blocks is a space invaders style game that I wrote for my IT coursework, for the games development unit. We were allowed to make any game that we wanted, provided it could be done within the time limits, be very easy to play, and easily run on the college computer (which were pretty terrible). I had never written a game before, so I knew this was going to be a challenge. + +I decided to write the game in Python, seeing as there were other people in the class that could help me bug report and test features, and because it was easy to run on the college computers. I used PyGame for the graphics library, even though I had never used it before, because it was really simple to use, and there was a lot of support and documentation online. + +## Easter Eggs +One of the key features of this take on space invaders (and unfortunately the thing I spent the most time on), is the easter eggs. There are a few dotted around the game, which make the game either much easier, or way more fun! At the moment, there are 3 main easter eggs, the first enabling the other 2. If you would like to know what they are, click the button below. If not, pay the game and try and find them, or search through the source to find them (it's not too hard through the source). + +As you will see (If and when you find the easter eggs), most of them are completely useless, and completely unrelated to the game or anything else. The main reason they were put in was because I'm friends with people that pester to the point it's just easier to give in. Hence there are some really very odd ones! diff --git a/pelicanconf.py b/pelicanconf.py index 15603dc..4947fd8 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -35,7 +35,8 @@ SOCIAL = social.generate() DEFAULT_PAGINATION = False DELETE_OUTPUT_DIRECTORY = True - +DEFAULT_DATE_FORMAT = '%c' +DEFAULT_DATE = "fs" PAGE_PATHS = ["pages"] PAGE_SAVE_AS = "{slug}/index.html" @@ -49,34 +50,33 @@ EXTRA_PATH_METADATA = { "assets/favicon.ico": {"path": "favicon.ico"} } -ARTICLE_PATHS = ["articles"] -ARTICLE_SAVE_AS = "blog/{slug}/index.html" -ARTICLE_URL = "/blog/{slug}/" +ARTICLE_SAVE_AS = "{category}/{slug}/index.html" +ARTICLE_URL = "{category}/{slug}/" TAG_URL = "blog/tag/{slug}/" TAG_SAVE_AS = "blog/tag/{slug}/index.html" -TAGS_URL = "blog/tags/" -TAGS_SAVE_AS = "blog/tags/index.html" +TAGS_URL = "tags/" +TAGS_SAVE_AS = "tags/index.html" -AUTHOR_URL = "/blog/author/{slug}/" -AUTHOR_SAVE_AS = "blog/author/{slug}/index.html" +AUTHOR_URL = "author/{slug}/" +AUTHOR_SAVE_AS = "author/{slug}/index.html" -AUTHORS_URL = "/blog/authors/" -AUTHORS_SAVE_AS = "blog/authors/index.html" +AUTHORS_URL = False +AUTHORS_SAVE_AS = False -ARCHIVES_URL = "blog/archive/" -ARCHIVES_SAVE_AS = "blog/archive/index.html" +ARCHIVES_URL = False +ARCHIVES_SAVE_AS = False -CATEGORY_SAVE_AS = False +CATEGORY_SAVE_AS = "{slug}/index.html" CATEGORIES_SAVE_AS = False +USE_FOLDER_AS_CATEGORY = True PLUGIN_PATHS = ["pelican_plugins"] -PLUGINS = ['sitemap'] +PLUGINS = ["sitemap", "filetime_from_git"] SITEMAP = { - 'format': 'xml' + "format": "xml" } - # Extra context diff --git a/requirements.txt b/requirements.txt index 0f1c962..6edd597 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ colorama==0.3.6 flake8==2.5.0 +gitpython==2.0.3 markdown==2.6.6 pelican==3.6.3 diff --git a/theme/templates/projects.html b/theme/templates/projects.html new file mode 100644 index 0000000..30ba848 --- /dev/null +++ b/theme/templates/projects.html @@ -0,0 +1,37 @@ +{% extends "base.html" %} + +{% block htmltitle %} + {{ article.title }} +{% endblock %} + +{% block content %} +
+
+
+
+

{{ article.title }}

+
+
+
+
+
+
+
+

+ Updated: {{ article.updated }} + Date: {{ article.date }} +

+ {{ article.content }} +
+
+
+
+ {% if article.download_link %} + Download {{ article.title }} + {% endif %} + {% if article.repo %} + View on Github + {% endif %} +
+
+{% endblock %}