Skip to content

Commit

Permalink
remove socialnetworks data file, in preparation for remote_theme that…
Browse files Browse the repository at this point in the history
… doesn't support data folders; fixes daattali#614
  • Loading branch information
daattali committed Apr 24, 2020
1 parent 094bcb6 commit a207048
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 123 deletions.
8 changes: 4 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ round-avatar: true

# --- Footer options --- #

# Select your active Social Network links.
# Uncomment the links you want to show in the footer and add your information to each link.
# You can reorder the items to define the link order.
# Select the social network links that you want to show in the footer.
# Uncomment the links you want to show and add your information to each one.
# If you don't want to show a link to an RSS feed, set rss to "false".
social-network-links:
rss: true
email: "[email protected]"
facebook: deanattali
github: daattali
twitter: daattali
rss: true
# reddit: yourname
# linkedin: daattali
# xing: yourname
Expand Down
92 changes: 0 additions & 92 deletions _data/SocialNetworks.yml

This file was deleted.

33 changes: 6 additions & 27 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,7 @@
<div class="container beautiful-jekyll-footer">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center footer-links">
{%- for link in site.social-network-links -%}
{%- assign curkey = link[0] -%}
{%- assign element = site.data.SocialNetworks[curkey] -%}
{%- if curkey == 'rss' -%}
{%- capture url -%}{{ '/feed.xml' | relative_url }}{%- endcapture -%}
{%- else -%}
{%- assign value = site.social-network-links[curkey] -%}
{%- assign placeholder = "{value}" -%}
{%- capture url -%}{{ element.urlTemplate | replace: placeholder, value }}{%- endcapture -%}
{%- endif -%}
<li>
<a href="{{ url }}" title="{{ element.name }}">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="{{ element.icon }} fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">{{ element.name }}</span>
</a>
</li>
{%- endfor -%}
</ul>
{% include social-networks-links.html %}
<p class="copyright text-muted">
{% if site.author %}
{{ site.author }}
Expand All @@ -43,11 +22,11 @@
{% endif %}
{% endif%}
</p>
<!-- Please don't remove this, keep my open source work credited :) -->
<p class="theme-by text-muted">
Theme by
<a href="https://deanattali.com/beautiful-jekyll/">beautiful-jekyll</a>
</p>
<!-- Please don't remove this, keep my open source work credited :) -->
<p class="theme-by text-muted">
Theme by
<a href="https://deanattali.com/beautiful-jekyll/">beautiful-jekyll</a>
</p>
</div>
</div>
</div>
Expand Down
207 changes: 207 additions & 0 deletions _includes/social-networks-links.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
<ul class="list-inline text-center footer-links">

{%- if site.social-network-links.facebook -%}
<li>
<a href="{{ '/feed.xml' | relative_url }}" title="RSS">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fas fa-rss fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">RSS</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.facebook -%}
<li>
<a href="https://www.facebook.com/{{ site.social-network-links.facebook }}" title="Facebook">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-facebook fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Facebook</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.github -%}
<li>
<a href="https://github.com/{{ site.social-network-links.github }}" title="GitHub">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-github fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">GitHub</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.twitter -%}
<li>
<a href="https://twitter.com/{{ site.social-network-links.twitter }}" title="Twitter">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-twitter fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Twitter</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.reddit -%}
<li>
<a href="https://reddit.com/u/{{ site.social-network-links.reddit }}" title="Reddit">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-reddit fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Reddit</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.email -%}
<li>
<a href="mailto:{{ site.social-network-links.email }}" title="Email me">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fas fa-envelope fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Email me</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.linkedin -%}
<li>
<a href="https://linkedin.com/in/{{ site.social-network-links.linkedin }}" title="LinkedIn">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-linkedin fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">LinkedIn</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.xing -%}
<li>
<a href="https://www.xing.com/profile/{{ site.social-network-links.xing }}" title="Xing">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-xing fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Xing</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.stackoverflow -%}
<li>
<a href="https://stackoverflow.com/users/{{ site.social-network-links.stackoverflow }}" title="StackOverflow">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-stack-overflow fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">StackOverflow</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.snapchat -%}
<li>
<a href="https://www.snapchat.com/add/{{ site.social-network-links.snapchat }}" title="Snapchat">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-snapchat-ghost fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Snapchat</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.instagram -%}
<li>
<a href="https://www.instagram.com/{{ site.social-network-links.instagram }}" title="Instagram">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-instagram fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Instagram</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.youtube -%}
<li>
<a href="https://www.youtube.com/{{ site.social-network-links.youtube }}" title="YouTube">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-youtube fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">YouTube</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.spotify -%}
<li>
<a href="https://open.spotify.com/user/{{ site.social-network-links.spotify }}" title="Spotify">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-spotify fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Spotify</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.telephone -%}
<li>
<a href="tel:{{ site.social-network-links.telephone }}" title="Phone">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fas fa-phone fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Phone</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.steam -%}
<li>
<a href="https://steamcommunity.com/id/{{ site.social-network-links.steam }}" title="Steam">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-steam fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Steam</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.twitch -%}
<li>
<a href="https://www.twitch.tv/{{ site.social-network-links.twitch }}" title="Twitch">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-twitch fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Twitch</span>
</a>
</li>
{%- endif -%}

{%- if site.social-network-links.yelp -%}
<li>
<a href="https://{{ site.social-network-links.yelp }}.yelp.com" title="Yelp">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-yelp fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Yelp</span>
</a>
</li>
{%- endif -%}

</ul>

0 comments on commit a207048

Please sign in to comment.