Skip to content
This repository has been archived by the owner on May 12, 2019. It is now read-only.

Commit

Permalink
WIP – Changed into only one share button
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Feb 25, 2015
1 parent b9d6330 commit eab7a04
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 48 deletions.
2 changes: 1 addition & 1 deletion assets/css/uno.css

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions assets/js/src/__init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ $ ->

if Uno.is 'page', 'post'
$('.main').readingTime readingTimeTarget: '.post.reading-time > span'
if Uno.is 'device', 'desktop'
firstImage = ($('#post-image')[0] || $('article.post img')[0]).src
social = new Share '#social-buttons', image: firstImage
social.open()

$('#panic-button').click ->
s = document.createElement 'script'
Expand Down
5 changes: 2 additions & 3 deletions assets/js/uno.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions assets/scss/components/_post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,8 @@ section.post {

#post-title {
margin: 3rem 0 2.5rem;
&:hover {
color: $hover-color;
transition: all 400ms;
}
}
2 changes: 1 addition & 1 deletion assets/scss/components/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

.icon-search {
position: absolute;
top: 30.8rem;
top: 31.5rem;
left: 16.5rem;
color: $gray;
text-shadow: 1px 1px 0 $gray;
Expand Down
11 changes: 10 additions & 1 deletion assets/scss/modules/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
src: url("../fonts/foundation-icons/foundation-icons.eot");
src: url("../fonts/foundation-icons/foundation-icons.eot?#iefix") format("embedded-opentype"), url("../fonts/foundation-icons/foundation-icons.woff") format("woff"), url("../fonts/foundation-icons/foundation-icons.ttf") format("truetype"), url("../fonts/foundation-icons/foundation-icons.svg#fontcustom") format("svg");
}
.icon:before {
.icon:before,
.icon-reverse:after {
display: inline-block;
font-family: "foundation-icons";
font-style: normal;
Expand Down Expand Up @@ -714,6 +715,14 @@
.icon-social-twitter:before {
content: "\f1e4";
}
.icon-social-twitter-post:after {
content: "\f1e4";
display: inline-block;
vertical-align: middle;
height: 40px;
font-size: 26px;
margin-left: 9px;
}
.icon-social-vimeo:before {
content: "\f1e5";
}
Expand Down
12 changes: 0 additions & 12 deletions assets/scss/modules/_icons.scss

This file was deleted.

1 change: 0 additions & 1 deletion assets/scss/uno.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
@import 'modules/global.scss';
@import 'modules/fonts.scss';
@import 'modules/buttons.scss';
@import 'modules/icons.scss';
@import 'modules/forms.scss';
@import 'modules/effects.scss';

Expand Down
3 changes: 1 addition & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"pace": "*",
"parrot-module-device": "*",
"parrotjs": "*",
"reading-time": "*",
"share-button": "*"
"reading-time": "*"
},
"ignore": [
"**/.*",
Expand Down
3 changes: 1 addition & 2 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ src =
'assets/vendor/fastclick/lib/fastclick.js'
'assets/vendor/ghostHunter/jquery.ghostHunter.min.js'
'assets/vendor/pace/pace.min.js'
'assets/vendor/reading-time/build/readingTime.min.js'
'assets/vendor/share-button/build/share.min.js']
'assets/vendor/reading-time/build/readingTime.min.js']
css :
main : 'assets/css/uno.css'
vendor : ['assets/vendor/animate.css/animate.min.css']
Expand Down
12 changes: 1 addition & 11 deletions partials/meta.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,7 @@
<meta name="description" content="{{meta_description}}">
{{/if}}

<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{{meta_title}}">
{{#if meta_description}}
<meta name="twitter:description" content="{{meta_description}}">
{{/if}}

<meta property="og:type" content="article">
<meta property="og:title" content="{{meta_title}}">
{{#if meta_description}}
<meta property="og:description" content="{{meta_description}}">
{{/if}}
{{!-- Twitter & Facebook meta tag are inject in ghost_head --}}

<link rel="shortcut icon" href="/assets/img/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="/assets/img/apple-touch-icon-57x57.png">
Expand Down
13 changes: 3 additions & 10 deletions post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,12 @@
<span class="post reading-time"> – <span></span> read.</span>
</div>

{{#if image}}
<a href={{url}}><img id="post-image" src={{image}} alt="{{{title}}}">
<h1 id="post-title">{{{title}}}.</h1>
<a href="https://twitter.com/intent/tweet?url={{url absolute="true"}};text={{title}} » " alt="Tweet '{{title}}'" target="_blank">
<h1 class="icon-reverse icon-social-twitter-post" id="post-title">{{{title}}}.</h1>
{{#if image}}<img id="post-image" src={{image}} alt="{{{title}}}">{{/if}}
</a>
{{else}}
<a href={{url}}>
<h1 id="post-title">{{{title}}}.</h1>
</a>
{{/if}}

</header>

<section id="social-buttons"></section>
<section class="{{post_class}}">
{{content}}
</section>
Expand Down

0 comments on commit eab7a04

Please sign in to comment.