Last active
August 29, 2015 14:23
-
-
Save SvitlanaShepitsena/24e382a1eb8bf4cc745b to your computer and use it in GitHub Desktop.
mdMedia for different screen sizes template 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================== | |
js | |
====================== | |
$scope.logout = function () { | |
AuthenticationServ.logout(); | |
$state.go('app.home'); | |
}; | |
$scope.$watch(function () { | |
return $mdMedia('gt-md'); | |
}, function (size) { | |
$scope.gtMd = size; | |
}); | |
$scope.$watch(function () { | |
return $mdMedia('gt-sm'); | |
}, function (size) { | |
$scope.gtSm = size; | |
}); | |
$scope.$watch(function () { | |
return $mdMedia('sm'); | |
}, function (size) { | |
$scope.sm = size; | |
}); | |
============================== | |
jade | |
============= | |
div(ng-class="{'sv':gtMd}" id='authBtn') | |
div(layout='row' layout-align="center center" ) | |
div(ng-if='!user') | |
div(ng-if="isIe") | |
button.tc-black(lx-ripple='' | |
ng-class="{'btn--xl btn--icon':sm, 'btn--l btn--fab mr+':gtSm}", | |
ui-sref='app.svet-login' | |
class='fab__primary btn btn--white tc-black' ) | |
i.mdi.mdi-account | |
i.mdi.mdi-login | |
div(ng-if="!isIe") | |
.fab.l(ng-class='{ie:isIe && !sm}') | |
button.tc-black(lx-ripple='' | |
ng-class="{'btn--xl btn--icon':sm, 'btn--l btn--fab mr+':gtSm}", | |
ui-sref='app.svet-login' | |
class='fab__primary btn btn--white tc-black' ) | |
i.mdi.mdi-account | |
i.mdi.mdi-login | |
.fab__actions(ng-class="{'fab__actions--left':!isIe&>Sm,'fab__actions--down':sm } " ) | |
button.btn.btn--fab.btn--m.tc-red-500.btn--white(lx-ripple | |
ui-sref='app.svet-login' | |
ng-class="{'btn--l':sm, 'btn--m':gtSm}") | |
span.fs-caption Svet | |
button.btn.btn--m.btn-blue.btn--fab.tc-blue-800.btn--white(lx-ripple ng-click='loginProvider("facebook")') | |
i.mdi.mdi-facebook | |
button.btn.btn--m.btn--fab.tc-red-900.btn--white(lx-ripple ng-click='loginProvider("google")') | |
i.mdi.mdi-google-plus | |
div(layout='row' ng-if='!!user' layout-align="center center") | |
//span.fs-body-2.mr.tc-grey-700(style='font-weight:600') {{user.userName|uppercase}} | |
sv-user-dropdown-menu(ng-if="!user.isManager()" logout='logout()') | |
sv-manager-dropdown(ng-if="user.isManager()" logout='logout()') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment