Skip to content

Commit d6dbb7a

Browse files
committed
Footer with social icons
1 parent 48e9158 commit d6dbb7a

File tree

5 files changed

+26
-91
lines changed

5 files changed

+26
-91
lines changed

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ description: > # this means to ignore newlines until "baseurl:"
1414
Google search results) and in your feed.xml site description.
1515
baseurl: "/vim-ctrlspace-site" # the subpath of your site, e.g. /blog
1616
url: "http://yourdomain.com" # the base hostname & protocol for your site
17-
twitter_username: jekyllrb
18-
github_username: jekyll
17+
twitter_username: "VimCtrlSpace"
18+
github_username: "szw/vim-ctrlspace"
1919
excerpt_separator: "<!-- more -->"
2020

2121
# Build settings

_includes/footer.html

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,19 @@
11
<footer class="site-footer">
22

33
<div class="wrapper">
4-
5-
<h2 class="footer-heading">{{ site.title }}</h2>
6-
7-
<div class="footer-col-wrapper">
8-
<div class="footer-col footer-col-1">
9-
<ul class="contact-list">
10-
<li>{{ site.title }}</li>
11-
<li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
12-
</ul>
13-
</div>
14-
15-
<div class="footer-col footer-col-2">
16-
<ul class="social-media-list">
17-
{% if site.github_username %}
18-
<li>
19-
{% include icon-github.html username=site.github_username %}
20-
</li>
21-
{% endif %}
22-
23-
{% if site.twitter_username %}
24-
<li>
25-
{% include icon-twitter.html username=site.twitter_username %}
26-
</li>
27-
{% endif %}
28-
</ul>
29-
</div>
30-
31-
<div class="footer-col footer-col-3">
32-
<p>{{ site.description }}</p>
33-
</div>
34-
</div>
35-
4+
<ul class="social-media-list">
5+
{% if site.github_username %}
6+
<li class="social-media-list-item">
7+
<iframe src="https://ghbtns.com/github-btn.html?user=szw&repo=vim-ctrlspace&type=star&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe>
8+
</li>
9+
{% endif %}
10+
11+
{% if site.twitter_username %}
12+
<li class="social-media-list-item">
13+
{% include icon-twitter.html username=site.twitter_username %}
14+
</li>
15+
{% endif %}
16+
</ul>
3617
</div>
3718

3819
</footer>

_includes/icon-twitter.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<a href="https://twitter.com/{{ include.username }}"><span class="icon icon--twitter">{% include icon-twitter.svg %}</span><span class="username">{{ include.username }}</span></a>
1+
<a href="https://twitter.com/{{ include.username }}"><span class="icon icon--twitter">{% include icon-twitter.svg %}</span></a>

_layouts/default.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
</div>
1414
</div>
1515

16+
{% include footer.html %}
17+
1618
</body>
1719

1820
</html>

_sass/_layout.scss

Lines changed: 8 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -113,68 +113,20 @@
113113
padding: $spacing-unit 0;
114114
}
115115

116-
.footer-heading {
117-
font-size: 18px;
118-
margin-bottom: $spacing-unit / 2;
119-
}
120-
121-
.contact-list,
122116
.social-media-list {
123117
list-style: none;
124-
margin-left: 0;
125-
}
126-
127-
.footer-col-wrapper {
128-
font-size: 15px;
129-
color: $grey-color;
130-
margin-left: -$spacing-unit / 2;
131-
@extend %clearfix;
132-
}
133-
134-
.footer-col {
135-
float: left;
136-
margin-bottom: $spacing-unit / 2;
137-
padding-left: $spacing-unit / 2;
138-
}
139-
140-
.footer-col-1 {
141-
width: -webkit-calc(35% - (#{$spacing-unit} / 2));
142-
width: calc(35% - (#{$spacing-unit} / 2));
143-
}
144-
145-
.footer-col-2 {
146-
width: -webkit-calc(20% - (#{$spacing-unit} / 2));
147-
width: calc(20% - (#{$spacing-unit} / 2));
148-
}
149-
150-
.footer-col-3 {
151-
width: -webkit-calc(45% - (#{$spacing-unit} / 2));
152-
width: calc(45% - (#{$spacing-unit} / 2));
153-
}
154-
155-
@include media-query($on-laptop) {
156-
.footer-col-1,
157-
.footer-col-2 {
158-
width: -webkit-calc(50% - (#{$spacing-unit} / 2));
159-
width: calc(50% - (#{$spacing-unit} / 2));
160-
}
161-
162-
.footer-col-3 {
163-
width: -webkit-calc(100% - (#{$spacing-unit} / 2));
164-
width: calc(100% - (#{$spacing-unit} / 2));
165-
}
118+
margin: 0 auto;
119+
text-align: center;
166120
}
167121

168-
@include media-query($on-palm) {
169-
.footer-col {
170-
float: none;
171-
width: -webkit-calc(100% - (#{$spacing-unit} / 2));
172-
width: calc(100% - (#{$spacing-unit} / 2));
173-
}
122+
.social-media-list-item {
123+
display: inline-block;
124+
line-height: 1em;
125+
margin-right: 1em;
126+
max-width: 90px;
127+
vertical-align: middle;
174128
}
175129

176-
177-
178130
/**
179131
* Page content
180132
*/

0 commit comments

Comments
 (0)