Skip to content

Commit

Permalink
Added socialshare
Browse files Browse the repository at this point in the history
  • Loading branch information
pirhoo committed Sep 29, 2015
1 parent a9259f5 commit 0465b29
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"angular-ui-router": "~0.2.15",
"bootstrap": "~3.3.5",
"moment": "~2.10.6",
"angular": "~1.4.2"
"angular": "~1.4.2",
"angularjs-socialshare": "~0.1.13"
},
"devDependencies": {
"angular-mocks": "~1.4.2"
Expand Down
8 changes: 7 additions & 1 deletion src/app/index.module.coffee
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
angular.module 'morano2017', ['ngAnimate', 'ngTouch', 'ngSanitize', 'ui.router']
angular.module 'morano2017', [
'ngAnimate'
'ngTouch'
'ngSanitize'
'ui.router'
'720kb.socialshare'
]
4 changes: 2 additions & 2 deletions src/app/main/quote/quote.controller.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module 'morano2017'
.controller 'MainQuoteController', (sentence)->
.controller 'MainQuoteController', ($state, $stateParams, sentence)->
@sentence = sentence
null
@url = $state.href 'main.quote', $stateParams, absolute: yes
20 changes: 19 additions & 1 deletion src/app/main/quote/quote.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
<div class="main__quote text-center">
« {{ quote.sentence }} »
«&nbsp;{{ quote.sentence }}&nbsp;»
<p>
<button class="btn btn-primary btn-lg" ng-click="main.generate()">
Générez une autre phrase
</button>
<span class="btn-group">
<button socialshare
socialshare-text="{{ quote.sentence }}"
socialshare-url="{{ quote.url }}"
socialshare-provider="twitter"
class="btn btn-default btn-lg">
<i class="fa fa-fw fa-twitter"></i>
TW
</button>
<button socialshare
socialshare-text="{{ quote.sentence }}"
socialshare-url="{{ quote.url }}"
socialshare-provider="facebook"
class="btn btn-default btn-lg">
<i class="fa fa-fw fa-facebook"></i>
FB
</button>
</span>
</p>
</div>

0 comments on commit 0465b29

Please sign in to comment.