1
Fork 0

Add general accounts list

This commit is contained in:
Jake Howard 2016-06-17 17:17:05 +01:00
parent 409453bc9c
commit ca3420fbc5
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 22 additions and 11 deletions

View file

@ -9,7 +9,7 @@ The workflow that we needed to adopt to use react native is an odd one. To keep
After one of the developers wanted to know our workflow, with a couple of potential app projects on the horizon, I set about creating a talk for our (_usually_) bi-weekly dev meetings. With the aim of trying to get everyone up to speed all in 1 go.
The slides from my talk are available on my [GitHub]({{ SOCIAL.github.url }}/react-native-intro-dev-meeting) page, and whilst they are primarily relevant to our workflow, I hope they will be able to help anyone else looking to get started with React Native.
The slides from my talk are available on my [GitHub](https://github.com/RealOrangeOne/react-native-intro-dev-meeting) page, and whilst they are primarily relevant to our workflow, I hope they will be able to help anyone else looking to get started with React Native.
React Native is a tricky platform to get started on, but once you understand the _qwerks_, it truly is the future of cross-platform mobile development!

View file

@ -30,7 +30,7 @@ LINKS = (('Pelican', 'http://getpelican.com/'),
# Social widget
import links
SOCIAL = links.social()
FOOTER_LINKS = links.footer()
INDEX_PROJECTS = links.index_projects()
# Disable some pages

View file

@ -4,17 +4,28 @@ from random import shuffle
SocialLink = namedtuple("SocialLink", ["name", "url", "icon"])
ProjectLink = namedtuple("ProjectLink", ["name", "url", "image"])
Account = namedtuple("Account", ["name", "url", "icon", "username"])
def social():
return {
"github": SocialLink("GitHub", "https://github.com/RealOrangeOne", "fa-github"),
"twitter": SocialLink("Twitter", "https://twitter.com/RealOrangeOne", "fa-twitter"),
"reddit": SocialLink("Reddit", "https://reddit.com/user/RealOrangeOne", "fa-reddit"),
"instagram": SocialLink("Instagram", "https://instagram.com/RealOrangeOne", "fa-instagram"),
"youtube": SocialLink("YouTube", "https://youtube.com/user/TheOrangeOneOfficial", "fa-youtube"),
"flickr": SocialLink("Flickr", "https://www.flickr.com/photos/theorangeone/", "fa-flickr")
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"),
}
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
def index_projects():

View file

@ -3,7 +3,7 @@
<div class="row">
<div class="col-xs-12">
<p class="social">
{% for key, link in SOCIAL.items()|sort %}
{% for link in FOOTER_LINKS|sort %}
<a href="{{ link.url }}"><i class="fa {{ link.icon }}"></i></a>
{% endfor %}
</p>