From 432f8dc0fa9e9ecf3df073faa06a398553970e9a Mon Sep 17 00:00:00 2001 From: Leonardo Merlin Date: Thu, 20 Aug 2015 04:28:00 -0300 Subject: [PATCH] Add directive: social-share --- src/app/components/socialShare/socialShare.directive.js | 33 +++++++++++++++++++++++++++++++++ src/app/components/socialShare/socialShare.html | 43 +++++++++++++++++++++++++++++++++++++++++++ src/app/components/socialShare/socialShare.scss | 28 ++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+), 0 deletions(-) create mode 100644 src/app/components/socialShare/socialShare.directive.js create mode 100644 src/app/components/socialShare/socialShare.html create mode 100644 src/app/components/socialShare/socialShare.scss diff --git a/src/app/components/socialShare/socialShare.directive.js b/src/app/components/socialShare/socialShare.directive.js new file mode 100644 index 0000000..cfe2223 --- /dev/null +++ b/src/app/components/socialShare/socialShare.directive.js @@ -0,0 +1,33 @@ +(function() { + 'use strict'; + + angular + .module('dialoga') + .directive('socialShare', socialShare); + + /** @ngInject */ + function socialShare() { + var directive = { + restrict: 'E', + templateUrl: 'app/components/socialShare/socialShare.html', + scope: { + display: '=' + }, + controller: SocialShareController, + controllerAs: 'vm', + bindToController: true + }; + + return directive; + + /** @ngInject */ + function SocialShareController($log) { + $log.debug('SocialShareController'); + + var vm = this; + + vm.displayFull = (vm.display && vm.display === 'full'); + } + } + +})(); diff --git a/src/app/components/socialShare/socialShare.html b/src/app/components/socialShare/socialShare.html new file mode 100644 index 0000000..efe6c79 --- /dev/null +++ b/src/app/components/socialShare/socialShare.html @@ -0,0 +1,43 @@ +
+ + + +
+ + diff --git a/src/app/components/socialShare/socialShare.scss b/src/app/components/socialShare/socialShare.scss new file mode 100644 index 0000000..bbb0890 --- /dev/null +++ b/src/app/components/socialShare/socialShare.scss @@ -0,0 +1,28 @@ +.social-share { + ul { + display: inline-block; + vertical-align: middle; + list-style: none; + padding-left: 0; + } + + li{ + display: inline-block; + padding: 0 2px !important; + vertical-align: top; + } + + .social-share--description { + display: inline-block; + color: #000; + font-size: 12px; + font-weight: 300; + padding-right: 10px; + text-align: right; + vertical-align: middle; + } + + .icon { + display: block; + } +} -- libgit2 0.21.2