2016-05-21 20:35:59 +01:00
|
|
|
from collections import namedtuple
|
2016-05-29 23:23:55 +01:00
|
|
|
from random import shuffle
|
2016-05-21 20:35:59 +01:00
|
|
|
|
2016-05-29 23:23:55 +01:00
|
|
|
ProjectLink = namedtuple("ProjectLink", ["name", "url", "image"])
|
2016-06-17 17:17:05 +01:00
|
|
|
Account = namedtuple("Account", ["name", "url", "icon", "username"])
|
2016-05-21 20:35:59 +01:00
|
|
|
|
|
|
|
|
2016-06-17 17:17:05 +01:00
|
|
|
def accounts():
|
|
|
|
links = {
|
|
|
|
"github": Account("GitHub", "https://github.com/RealOrangeOne/", "fa-github", "RealOrangeOne"),
|
|
|
|
"twitter": Account("Twitter", "https://twitter.com/RealOrangeOne", "fa-twitter", "@RealOrangeOne"),
|
|
|
|
"reddit": Account("Reddit", "https://reddit.com/user/RealOrangeOne", "fa-reddit", "/u/RealOrangeOne"),
|
|
|
|
"instagram": Account("Instagram", "https://instagram.com/RealOrangeOne", "fa-instagram", "RealOrangeOne"),
|
|
|
|
"youtube": Account("YouTube", "https://youtube.com/user/TheOrangeOneOfficial", "fa-youtube", "TheOrangeOneOfficial"),
|
|
|
|
"flickr": Account("Flickr", "https://flickr.com/photos/TheOrangeOne/", "fa-flickr", "TheOrangeOne"),
|
2016-06-18 11:40:48 +01:00
|
|
|
"bitbucket": Account("BitBucket", "https://bitbucket.org/TheOrangeOne", "fa-bitbucket", "TheOrangeOne"),
|
|
|
|
"trello": Account("Trello", "https://trello.com/TheOrangeOne", "fa-trello", "TheOrangeOne"),
|
|
|
|
"freenode": Account("Freenode", "https://webchat.freenode.net", "fa-rss", "TheOrangeOne"),
|
|
|
|
"atomio": Account("Atomio Slack", "https://atomio.slack.com", "fa-slack", "TheOrangeOne"),
|
|
|
|
"pcpartpicker": Account("PCPartPicker", "https://uk.pcpartpicker.com/user/theorangeone97", "fa-desktop", "TheOrangeOne97"),
|
|
|
|
"codepen": Account("CodePen", "https://codepen.io/TheOrangeOne", "fa-codepen", "TheOrangeOne"),
|
|
|
|
"npm": Account("npm", "https://www.npmjs.com/~TheOrangeOne", "fa-file-code-io", "TheOrangeOne")
|
2016-05-21 20:35:59 +01:00
|
|
|
}
|
2016-06-17 17:17:05 +01:00
|
|
|
return links
|
|
|
|
|
|
|
|
|
|
|
|
def footer():
|
|
|
|
footer_accounts = ["github", "twitter", "reddit", "instagram", "youtube", "flickr"]
|
|
|
|
all_accounts = accounts()
|
2016-08-25 21:52:29 +01:00
|
|
|
return [all_accounts[account] for account in footer_accounts]
|
2016-05-29 23:23:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
def index_projects():
|
|
|
|
projects = [
|
|
|
|
ProjectLink("Student Robotics", "/robotics/", "https://c2.staticflickr.com/8/7711/17122633430_e1b599fe47.jpg"),
|
2016-05-30 17:39:43 +01:00
|
|
|
ProjectLink("Dotfiles", "/projects/dotfiles/", "http://jleajones.com/assets/images/dotfiles.png"),
|
2016-06-18 12:29:43 +01:00
|
|
|
ProjectLink("Custom PC", "/setup/custom-pc/", "https://c2.staticflickr.com/8/7083/27071954860_f6096ccce6.jpg"),
|
|
|
|
ProjectLink("Yoga-Pal", "/projects/yoga-pal/", "http://brain-images.cdn.dixons.com/8/1/10135218/l_10135218_002.jpg"),
|
2016-07-05 22:19:52 +01:00
|
|
|
ProjectLink("React-Native Mock", "/projects/react-native-mock/", "http://i.imgur.com/ZB8O0DL.jpg"),
|
|
|
|
ProjectLink("Wall of Sheep", "/wall-of-sheep/", "http://www.hackerstickers.com/uploaded/thumbnails/db_file_img_3582_475xauto.jpg")
|
2016-05-29 23:23:55 +01:00
|
|
|
]
|
|
|
|
shuffle(projects)
|
|
|
|
return projects
|