Skip to content

Commit

Permalink
Added the social media buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamCarroll committed May 17, 2017
1 parent ebb9b48 commit 7f21c25
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 2 deletions.
6 changes: 6 additions & 0 deletions _includes/share.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<ul class="share-buttons">{% assign share_title = page.title | uri_escape %}{% assign share_link = page.url | absolute_url | cgi_escape %}
<li><a href="https://www.facebook.com/sharer/sharer.php?u={{ share_link }}&t={{ share_title }}" title="Share on Facebook" target="_blank"><img alt="Share on Facebook" src="/assets/Facebook.svg"></a></li>
<li><a href="https://twitter.com/intent/tweet?source={{ share_link }}&text={{ share_title }}:%20{{ share_link }}&via=vocabhunterapp" target="_blank" title="Tweet"><img alt="Tweet" src="/assets/Twitter.svg"></a></li>
<li><a href="https://plus.google.com/share?url={{ share_link }}" target="_blank" title="Share on Google+"><img alt="Share on Google+" src="/assets/Google+.svg"></a></li>
<li><a href="http://www.reddit.com/submit?url={{ share_link }}&title={{ share_title }}" target="_blank" title="Submit to Reddit"><img alt="Submit to Reddit" src="/assets/Reddit.svg"></a></li>
</ul>
1 change: 1 addition & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<header class="post-header">
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
{% include share.html %}
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %}{% assign author = site.authors[page.author] %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name"><a href="{{ author.web }}">{{ author.display_name }}</a></span></span>{% endif %}</p>
</header>

Expand Down
24 changes: 24 additions & 0 deletions _sass/_share.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ul.share-buttons{
list-style: none;
padding: 0;
float: right;
}

ul.share-buttons li{
display: inline;
}

ul.share-buttons .sr-only {
position: absolute;
clip: rect(1px 1px 1px 1px);
clip: rect(1px, 1px, 1px, 1px);
padding: 0;
border: 0;
height: 1px;
width: 1px;
overflow: hidden;
}

ul.share-buttons img{
width: 25px;
}
11 changes: 10 additions & 1 deletion about.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ Like all good Open Source projects, VocabHunter builds on the software and work
* VocabHunter uses [FontAwesomeFX] to generate various icons from the [Font Awesome] set.
* Dependency Injection is handled with [Gluon Ignite] and [Guice]. You can find out all about this in the article [Dependency Injection in JavaFX][DependencyInjection].

Finally, some acknowledgements for this website:

* Output from the [Simple Sharing Buttons Generator] was adapted for the social network sharing buttons on this site.
* The icons for the sharing buttons come from the [Social Flat Rounded Rects] set by [Aha-Soft].

[Adam Carroll]:https://github.com/AdamCarroll/
[download]:/download
[Apache Licence, Version 2.0]:http://www.apache.org/licenses/LICENSE-2.0
Expand All @@ -55,4 +60,8 @@ Like all good Open Source projects, VocabHunter builds on the software and work
[Font Awesome]:https://fortawesome.github.io/Font-Awesome/
[FontAwesomeFX]:https://bitbucket.org/Jerady/fontawesomefx
[Gluon Ignite]:http://gluonhq.com/labs/ignite/
[Guice]:https://github.com/google/guice
[Guice]:https://github.com/google/guice

[Simple Sharing Buttons Generator]:https://simplesharingbuttons.com/
[Social Flat Rounded Rects]:https://www.iconfinder.com/iconsets/social-flat-rounded-rects
[Aha-Soft]:http://www.aha-soft.com/
1 change: 1 addition & 0 deletions assets/Facebook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/Google+.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/Reddit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/Twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ $on-laptop: 800px;
@import
"base",
"layout",
"syntax-highlighting"
"syntax-highlighting",
"share"
;

0 comments on commit 7f21c25

Please sign in to comment.