1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
theorangeone.net-legacy/plugins/links.py

35 lines
1.2 KiB
Python

from collections import namedtuple
from config import social
ProjectLink = namedtuple("ProjectLink", ["name", "url", "image"])
def accounts():
links = {}
for key, (site, user, url, icon) in social['accounts'].items():
links[key] = {
'key': key,
'site': site,
'username': user,
'url': url.format(user),
'icon': icon
}
return links
def footer():
all_accounts = accounts()
return [all_accounts[account] for account in social['footer_accounts']]
def index_projects():
projects = [
ProjectLink("Student Robotics", "/robotics/", "https://c2.staticflickr.com/8/7711/17122633430_e1b599fe47.jpg"),
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"),
ProjectLink("Yoga-Pal", "/projects/yoga-pal/", "http://brain-images.cdn.dixons.com/8/1/10135218/l_10135218_002.jpg"),
ProjectLink("Wall of Sheep", "/wall-of-sheep/", "http://www.hackerstickers.com/uploaded/thumbnails/db_file_img_3582_475xauto.jpg")
]
return projects