Merge pull request #4 from verkaufer/profile_links_as_partial
Use a partial to render social profile links
This commit is contained in:
commit
a61b1473e3
@ -3,14 +3,6 @@ Name = ""
|
|||||||
# Supports markdown
|
# Supports markdown
|
||||||
About = ""
|
About = ""
|
||||||
|
|
||||||
# Add only the handle
|
|
||||||
Github = ""
|
|
||||||
Twitter = ""
|
|
||||||
|
|
||||||
# Add the absolute links
|
|
||||||
Goodreads = ""
|
|
||||||
Linkedin = ""
|
|
||||||
|
|
||||||
Email = ""
|
Email = ""
|
||||||
|
|
||||||
# Add the filename with file extension.
|
# Add the filename with file extension.
|
||||||
@ -18,3 +10,19 @@ Resume = ""
|
|||||||
|
|
||||||
# Sets the number of posts to display on the front page
|
# Sets the number of posts to display on the front page
|
||||||
PostLimit = 4
|
PostLimit = 4
|
||||||
|
|
||||||
|
[[profiles]]
|
||||||
|
name = "GitHub"
|
||||||
|
url = ""
|
||||||
|
|
||||||
|
[[profiles]]
|
||||||
|
name = "Twitter"
|
||||||
|
url = ""
|
||||||
|
|
||||||
|
[[profiles]]
|
||||||
|
name = "Goodreads"
|
||||||
|
url = ""
|
||||||
|
|
||||||
|
[[profiles]]
|
||||||
|
name = "LinkedIn"
|
||||||
|
url = ""
|
||||||
|
@ -9,31 +9,9 @@
|
|||||||
<h4>{{ .Site.Data.personalize.About| markdownify }}</h4>
|
<h4>{{ .Site.Data.personalize.About| markdownify }}</h4>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
{{ range .Site.Data.personalize.profiles }}
|
||||||
{{ if ne .Site.Data.personalize.Github "" }}
|
{{ partial "profile_link.html" . }}
|
||||||
<td><i class="fab fa-github" aria-hidden="true"></i></td>
|
|
||||||
<td> <a href="https://github.com/{{ .Site.Data.personalize.Github }}" target="_blank">GitHub</a></td>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
{{ if ne .Site.Data.personalize.Twitter "" }}
|
|
||||||
<td><i class="fab fa-twitter" aria-hidden="true"></i></td>
|
|
||||||
<td> <a href="https://twitter.com/{{ .Site.Data.personalize.Twitter }}" target="_blank">Twitter</a>
|
|
||||||
</td>
|
|
||||||
{{ end }}
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
{{ if ne .Site.Data.personalize.Goodreads "" }}
|
|
||||||
<td><i class="fab fa-goodreads" aria-hidden="true"></i></td>
|
|
||||||
<td> <a href="{{ .Site.Data.personalize.Goodreads }}" target="_blank">Goodreads</a></td>
|
|
||||||
{{ end }}
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
{{ if ne .Site.Data.personalize.Linkedin "" }}
|
|
||||||
<td><i class="fab fa-linkedin" aria-hidden="true"></i></td>
|
|
||||||
<td> <a href="{{ .Site.Data.personalize.Linkedin }}" target="_blank">LinkedIn</a></td>
|
|
||||||
{{ end }}
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
{{ if ne .Site.Data.personalize.Resume "" }}
|
{{ if ne .Site.Data.personalize.Resume "" }}
|
||||||
<td><i class="fas fa-file-alt" aria-hidden="true"></i></td>
|
<td><i class="fas fa-file-alt" aria-hidden="true"></i></td>
|
||||||
|
6
layouts/partials/profile_link.html
Normal file
6
layouts/partials/profile_link.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{{ if and (isset . "url") ( ne .url "") }}
|
||||||
|
<tr>
|
||||||
|
<td><i class="fab fa-{{ lower .name }}" aria-hidden="true"></i></td>
|
||||||
|
<td> <a href="{{ url }}" target="_blank">{{ .name }}</a></td>
|
||||||
|
</tr>
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue
Block a user