Skip to content

Commit 51c3c08

Browse files
committed
Added default author-profile to _includes
1 parent 7432a0c commit 51c3c08

1 file changed

Lines changed: 246 additions & 0 deletions

File tree

_includes/author-profile.html

Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
{% assign author = page.author | default: page.authors[0] | default: site.author %}
2+
{% assign author = site.data.authors[author] | default: author %}
3+
4+
<div itemscope itemtype="https://schema.org/Person" class="h-card">
5+
6+
{% if author.avatar %}
7+
<div class="author__avatar">
8+
<a href="{{ author.home | default: '/' | absolute_url }}">
9+
<img src="{{ author.avatar | relative_url }}" alt="{{ author.name }}" itemprop="image" class="u-photo">
10+
</a>
11+
</div>
12+
{% endif %}
13+
14+
<div class="author__content">
15+
<h3 class="author__name p-name" itemprop="name">
16+
<a class="u-url" rel="me" href="{{ author.home | default: '/' | absolute_url }}" itemprop="url">{{ author.name }}</a>
17+
</h3>
18+
{% if author.bio %}
19+
<div class="author__bio p-note" itemprop="description">
20+
{{ author.bio | markdownify }}
21+
</div>
22+
{% endif %}
23+
</div>
24+
25+
<div class="author__urls-wrapper">
26+
<button class="btn btn--inverse">{{ site.data.ui-text[site.locale].follow_label | remove: ":" | default: "Follow" }}</button>
27+
<ul class="author__urls social-icons">
28+
{% if author.location %}
29+
<li itemprop="homeLocation" itemscope itemtype="https://schema.org/Place">
30+
<i class="fas fa-fw fa-map-marker-alt" aria-hidden="true"></i> <span itemprop="name" class="p-locality">{{ author.location }}</span>
31+
</li>
32+
{% endif %}
33+
34+
{% if author.links %}
35+
{% for link in author.links %}
36+
{% if link.label and link.url %}
37+
<li><a href="{{ link.url }}" rel="nofollow noopener noreferrer me"{% if link.url contains 'http' %} itemprop="sameAs"{% endif %}><i class="{{ link.icon | default: 'fas fa-link' }}" aria-hidden="true"></i><span class="label">{{ link.label }}</span></a></li>
38+
{% endif %}
39+
{% endfor %}
40+
{% endif %}
41+
42+
{% if author.uri %}
43+
<li>
44+
<a href="{{ author.uri }}" itemprop="url" rel="me">
45+
<i class="fas fa-fw fa-link" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].website_label | default: "Website" }}</span>
46+
</a>
47+
</li>
48+
{% endif %}
49+
50+
{% if author.email %}
51+
<li>
52+
<a href="mailto:{{ author.email }}" rel="me" class="u-email">
53+
<meta itemprop="email" content="{{ author.email }}" />
54+
<i class="fas fa-fw fa-envelope-square" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].email_label | default: "Email" }}</span>
55+
</a>
56+
</li>
57+
{% endif %}
58+
59+
{% if author.keybase %}
60+
<li>
61+
<a href="https://keybase.io/{{ author.keybase }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
62+
<i class="fab fa-fw fa-keybase" aria-hidden="true"></i><span class="label">Keybase</span>
63+
</a>
64+
</li>
65+
{% endif %}
66+
67+
{% if author.twitter %}
68+
<li>
69+
<a href="https://twitter.com/{{ author.twitter }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
70+
<i class="fab fa-fw fa-twitter-square" aria-hidden="true"></i><span class="label">Twitter</span>
71+
</a>
72+
</li>
73+
{% endif %}
74+
75+
{% if author.facebook %}
76+
<li>
77+
<a href="https://www.facebook.com/{{ author.facebook }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
78+
<i class="fab fa-fw fa-facebook-square" aria-hidden="true"></i><span class="label">Facebook</span>
79+
</a>
80+
</li>
81+
{% endif %}
82+
83+
{% if author.linkedin %}
84+
<li>
85+
<a href="https://www.linkedin.com/in/{{ author.linkedin }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
86+
<i class="fab fa-fw fa-linkedin" aria-hidden="true"></i><span class="label">LinkedIn</span>
87+
</a>
88+
</li>
89+
{% endif %}
90+
91+
{% if author.xing %}
92+
<li>
93+
<a href="https://www.xing.com/profile/{{ author.xing }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
94+
<i class="fab fa-fw fa-xing-square" aria-hidden="true"></i><span class="label">XING</span>
95+
</a>
96+
</li>
97+
{% endif %}
98+
99+
{% if author.instagram %}
100+
<li>
101+
<a href="https://instagram.com/{{ author.instagram }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
102+
<i class="fab fa-fw fa-instagram" aria-hidden="true"></i><span class="label">Instagram</span>
103+
</a>
104+
</li>
105+
{% endif %}
106+
107+
{% if author.tumblr %}
108+
<li>
109+
<a href="https://{{ author.tumblr }}.tumblr.com" itemprop="sameAs" rel="nofollow noopener noreferrer me">
110+
<i class="fab fa-fw fa-tumblr-square" aria-hidden="true"></i><span class="label">Tumblr</span>
111+
</a>
112+
</li>
113+
{% endif %}
114+
115+
{% if author.bitbucket %}
116+
<li>
117+
<a href="https://bitbucket.org/{{ author.bitbucket }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
118+
<i class="fab fa-fw fa-bitbucket" aria-hidden="true"></i><span class="label">Bitbucket</span>
119+
</a>
120+
</li>
121+
{% endif %}
122+
123+
{% if author.github %}
124+
<li>
125+
<a href="https://github.com/{{ author.github }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
126+
<i class="fab fa-fw fa-github" aria-hidden="true"></i><span class="label">GitHub</span>
127+
</a>
128+
</li>
129+
{% endif %}
130+
131+
{% if author.gitlab %}
132+
<li>
133+
<a href="https://gitlab.com/{{ author.gitlab }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
134+
<i class="fab fa-fw fa-gitlab" aria-hidden="true"></i><span class="label">GitLab</span>
135+
</a>
136+
</li>
137+
{% endif %}
138+
139+
{% if author.stackoverflow %}
140+
<li>
141+
<a href="https://stackoverflow.com/users/{{ author.stackoverflow }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
142+
<i class="fab fa-fw fa-stack-overflow" aria-hidden="true"></i><span class="label">Stack Overflow</span>
143+
</a>
144+
</li>
145+
{% endif %}
146+
147+
{% if author.lastfm %}
148+
<li>
149+
<a href="https://last.fm/user/{{ author.lastfm }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
150+
<i class="fab fa-fw fa-lastfm-square" aria-hidden="true"></i><span class="label">Last.fm</span>
151+
</a>
152+
</li>
153+
{% endif %}
154+
155+
{% if author.dribbble %}
156+
<li>
157+
<a href="https://dribbble.com/{{ author.dribbble }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
158+
<i class="fab fa-fw fa-dribbble" aria-hidden="true"></i><span class="label">Dribbble</span>
159+
</a>
160+
</li>
161+
{% endif %}
162+
163+
{% if author.pinterest %}
164+
<li>
165+
<a href="https://www.pinterest.com/{{ author.pinterest }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
166+
<i class="fab fa-fw fa-pinterest" aria-hidden="true"></i><span class="label">Pinterest</span>
167+
</a>
168+
</li>
169+
{% endif %}
170+
171+
{% if author.foursquare %}
172+
<li>
173+
<a href="https://foursquare.com/{{ author.foursquare }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
174+
<i class="fab fa-fw fa-foursquare" aria-hidden="true"></i><span class="label">Foursquare</span>
175+
</a>
176+
</li>
177+
{% endif %}
178+
179+
{% if author.steam %}
180+
<li>
181+
<a href="https://steamcommunity.com/id/{{ author.steam }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
182+
<i class="fab fa-fw fa-steam" aria-hidden="true"></i><span class="label">Steam</span>
183+
</a>
184+
</li>
185+
{% endif %}
186+
187+
{% if author.youtube %}
188+
{% if author.youtube contains "://" %}
189+
<li>
190+
<a href="{{ author.youtube }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
191+
<i class="fab fa-fw fa-youtube" aria-hidden="true"></i><span class="label">YouTube</span>
192+
</a>
193+
</li>
194+
{% elsif author.youtube %}
195+
<li>
196+
<a href="https://www.youtube.com/user/{{ author.youtube }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
197+
<i class="fab fa-fw fa-youtube" aria-hidden="true"></i><span class="label">YouTube</span>
198+
</a>
199+
</li>
200+
{% endif %}
201+
{% endif %}
202+
203+
{% if author.soundcloud %}
204+
<li>
205+
<a href="https://soundcloud.com/{{ author.soundcloud }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
206+
<i class="fab fa-fw fa-soundcloud" aria-hidden="true"></i><span class="label">SoundCloud</span>
207+
</a>
208+
</li>
209+
{% endif %}
210+
211+
{% if author.weibo %}
212+
<li>
213+
<a href="https://www.weibo.com/{{ author.weibo }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
214+
<i class="fab fa-fw fa-weibo" aria-hidden="true"></i><span class="label">Weibo</span>
215+
</a>
216+
</li>
217+
{% endif %}
218+
219+
{% if author.flickr %}
220+
<li>
221+
<a href="https://www.flickr.com/{{ author.flickr }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
222+
<i class="fab fa-fw fa-flickr" aria-hidden="true"></i><span class="label">Flickr</span>
223+
</a>
224+
</li>
225+
{% endif %}
226+
227+
{% if author.codepen %}
228+
<li>
229+
<a href="https://codepen.io/{{ author.codepen }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
230+
<i class="fab fa-fw fa-codepen" aria-hidden="true"></i><span class="label">CodePen</span>
231+
</a>
232+
</li>
233+
{% endif %}
234+
235+
{% if author.vine %}
236+
<li>
237+
<a href="https://vine.co/u/{{ author.vine }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
238+
<i class="fab fa-fw fa-vine" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].email_label | default: "Email" }}</span>
239+
</a>
240+
</li>
241+
{% endif %}
242+
243+
{% include author-profile-custom-links.html %}
244+
</ul>
245+
</div>
246+
</div>

0 commit comments

Comments
 (0)