Commit 3822c73c authored by santiaago's avatar santiaago
Browse files

trying dynamic urls to share buttons ...

parent 8ce4a228
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ function EditorCtrl($scope, $location, $routeParams) {
	    $scope.editorTheme = 'frogideas';
	    $scope.editorColorNumber = '4';
	}
	$scope.absUrl = $location.absUrl();
    };
    init();

@@ -28,5 +29,6 @@ function EditorCtrl($scope, $location, $routeParams) {
		theme: $scope.editorTheme, 
		numcolors: $scope.editorColorNumber
	    });
	$scope.absUrl = $location.absUrl();
    };    
}
+3 −3
Original line number Diff line number Diff line
@@ -77,12 +77,12 @@
      <div class="row editor-row--pading">
	<div class="social">
	  <span class="twitter">
	    <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://tinygraphs.com" data-text="Check out tinygraphs, an avatar generator for your web app." data-via="santiago_arias" data-count="none" data-hashtags="tinygraphs">Tweet</a>
	    <a href="https://twitter.com/share" class="twitter-share-button" data-url="{{absUrl}}" data-text="Check out tinygraphs, an avatar generator for your web app." data-via="santiago_arias" data-count="none" data-hashtags="tinygraphs">Tweet</a>
	    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
	  </span>
	  <span class="google">
	    <!-- Place this tag where you want the share button to render. -->
	    <div class="g-plus" data-action="share" data-annotation="none" data-href="http://tinygraphs.com"></div>
	    <div class="g-plus" data-action="share" data-annotation="none" data-href="{{absUrl}}"></div>
	    <!-- Place this tag after the last share tag. -->
	    <script type="text/javascript">
	      (function() {
@@ -93,7 +93,7 @@
	    </script>
	  </span>
	  <span class="Facebook">
	    <div class="fb-share-button" data-href="http://tinygraphs.com" data-layout="button"></div>
	    <div class="fb-share-button" data-href="{{absUrl}}" data-layout="button"></div>
	  </span>
	</div>
      </div>