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
|
|
|
SocialLink = namedtuple("SocialLink", ["name", "url", "icon"])
|
|
|
|
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-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()
|
|
|
|
footer_links = []
|
|
|
|
for account in footer_accounts:
|
|
|
|
footer_links.append(all_accounts[account])
|
|
|
|
return footer_links
|
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"),
|
|
|
|
ProjectLink("Custom PC", "/setup/custom-pc/", "https://c2.staticflickr.com/8/7083/27071954860_f6096ccce6.jpg")
|
2016-05-29 23:23:55 +01:00
|
|
|
]
|
|
|
|
shuffle(projects)
|
|
|
|
return projects
|