Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added FontAwesome and "Follow Me" post footer section. #15

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,15 @@ baseurl: /
domain_name: 'http://yourblog-domain.com'

# Details for the RSS feed generator
url: 'blog url'
author: 'Your Name'
url: 'blog url'
author: 'Your Name'
author-image: '/assets/images/profile.png'
author-image-alt: 'Author profile picture'

# Social Media
facebook: YourUsername
twitter: YourUsername
linkedin: YourUsername
stackoverflow: 12345678
github: YourUsername

19 changes: 19 additions & 0 deletions _includes/follow.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<section class="follow">
<h4>Follow me</h4>
{% if site.facebook %}
<a onClick="ga('send', 'event', 'Social Follow', 'Follow on Facebook');" class="facebook_follow" title="Follow on Facebook" href="http://www.facebook.com/{{ site.facebook }}" target="_blank"><i class="fa fa-2x fa-facebook"></i></a>
{% endif %}
{% if site.twitter %}
<a onClick="ga('send', 'event', 'Social Follow', 'Follow on Twitter');" class="twitter_follow" title="Follow on Twitter" href="https://twitter.com/{{ site.twitter }}" target="_blank"><i class="fa fa-2x fa-twitter"></i></a>
{% endif %}
{% if site.linkedin %}
<a onClick="ga('send', 'event', 'Social Follow', 'Follow on LinkedIn');" class="linkedin_follow" title="Follow on LinkedIn" href="http://www.linkedin.com/in/{{ site.linkedin }}" target="_blank"><i class="fa fa-2x fa-linkedin"></i></a>
{% endif %}
{% if site.stackoverflow %}
<a onClick="ga('send', 'event', 'Social Follow', 'Follow on StackOverflow');" class="stackoverflow_follow" title="Follow on StackOverflow" href="https://stackoverflow.com/users/{{ site.stackoverflow }}" target="_blank"><i class="fa fa-2x fa-stack-overflow"></i></a>
{% endif %}
{% if site.github %}
<a onClick="ga('send', 'event', 'Social Follow', 'Follow on GitHub');" class="github_follow" title="Follow on GitHub" href="https://github.com/{{ site.github }}" target="_blank"><i class="fa fa-2x fa-github"></i></a>
{% endif %}
</section>

2 changes: 2 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<!-- Customisation -->
<link rel="stylesheet" type="text/css" href="/assets/css/main.css" />

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

</head>
<body class="{% if page.post_class %}{{page.post_class}}{% else %}home-template{% endif %}">

Expand Down
5 changes: 4 additions & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h5>Archive</h5>
<!-- If we want to display author's name and bio -->
{% if site.author %}
<figure class="author-image">
<a class="img" href="{{ site.baseurl }}" style="background-image: url(/assets/images/profile.png)">
<a class="img" href="{{ site.baseurl }}" style="background-image: url({{ site.author-image }})">
<span class="hidden">{{site.author}}'s Picture</span></a>
</figure>
<section class="author">
Expand All @@ -79,6 +79,9 @@ <h4> {{ site.author }} </h4>

<!-- Share links section -->
{% include share.html %}

<!-- Follow me section -->
{% include follow.html %}

<!-- Disqus comments -->
{% if page.disqus %}
Expand Down
46 changes: 46 additions & 0 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,49 @@
@import
"syntax"
;

.follow a {
display:block;
height:36px;
width:36px;
text-align:center;
line-height:38px;
float:left;
color:#fff;
border-radius:50%;
padding: 5px;
margin: 5px;
}

.follow a.facebook_follow {
background-color: #5676A4;
}

.follow a.twitter_follow {
background-color: #53B6D8;
}

.follow a.linkedin_follow {
background-color: #65A9D0;
}

.follow a.google_follow {
background-color: #3682C3;
}

.follow a.rss_follow {
background-color: #E99C60;
}

.follow a.stackoverflow_follow {
background-color: #FF9900;
}

.follow a.github_follow {
background-color: #000;
}

.follow a:hover {
color: #50585D;
}

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h2 class="post-title"><a href="{{ post.url }}">{{ post.title }}</a></h2>
</section>
<footer class="post-meta">
{% if site.author %}
<img class="author-thumb" src="/assets/images/profile.png" alt="Author's profile picture" nopin="nopin" />
<img class="author-thumb" src="{{ site.author-image }}" alt="{{ site.author-image-alt }}" nopin="nopin" />
{{ site.author }}
{% endif %}
{% if post.categories.size > 0 %}
Expand Down