Merge pull request #3110 from troggy/logo-directive

Add logo directive
This commit is contained in:
Gustavo Maximiliano Cortez 2015-08-24 09:40:30 -03:00
commit 14c04a836a
6 changed files with 18 additions and 15 deletions

View file

@ -10,7 +10,7 @@
<div class="content p20b" ng-class="{'disclaimer':!index.hasProfile}"> <div class="content p20b" ng-class="{'disclaimer':!index.hasProfile}">
<h4 class="title m0" ng-show="!index.hasProfile"> <h4 class="title m0" ng-show="!index.hasProfile">
<span translate>Terms of Use</span> <span translate>Terms of Use</span>
<img class="right" src="img/logo.png" alt="Copay" width="40" height="18"> <logo class="right" width="40"></logo>
</h4> </h4>
<div class="p20h m10t"> <div class="p20h m10t">
<p class="enable_text_select text-light size-14 text-gray" translate> <p class="enable_text_select text-light size-14 text-gray" translate>

View file

@ -1,6 +1,6 @@
<nav class="sidebar left-off-canvas-menu" ng-controller="sidebarController as sidebar"> <nav class="sidebar left-off-canvas-menu" ng-controller="sidebarController as sidebar">
<header> <header>
<img src="img/logo-negative.svg" alt="Copay" width="80"> <logo negative="true" width="80"></logo>
<div ng-include="'views/includes/version.html'"></div> <div ng-include="'views/includes/version.html'"></div>
</header> </header>
<ul class="off-canvas-list"> <ul class="off-canvas-list">

View file

@ -6,7 +6,7 @@
<div class="content preferences p20v" ng-controller="preferencesAbout as about"> <div class="content preferences p20v" ng-controller="preferencesAbout as about">
<div class="text-center small-5 small-centered columns m20b" > <div class="text-center small-5 small-centered columns m20b" >
<img src="img/logo.png" alt="Copay"> <logo></logo>
</div> </div>
<h4 class="title m0" translate>Release Information</h4> <h4 class="title m0" translate>Release Information</h4>

View file

@ -1,6 +1,6 @@
<div class="row columns p20"> <div class="row columns p20">
<div class="text-center"> <div class="text-center">
<img src="img/logo.svg" alt="Copay" width="146" height="59"> <logo width="146"></logo>
<div class="text-white" ng-include="'views/includes/version.html'"></div> <div class="text-white" ng-include="'views/includes/version.html'"></div>
</div> </div>
<h1 translate class="text-center">Browser unsupported</h1> <h1 translate class="text-center">Browser unsupported</h1>

View file

@ -168,12 +168,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill, inpu
top: 0; top: 0;
} }
.logo-setup {
text-align: center;
margin: 0 0 0.1rem 0;
color: #8597A7;
}
.box-setup-footer { .box-setup-footer {
overflow: hidden; overflow: hidden;
margin-top: 1rem; margin-top: 1rem;
@ -522,11 +516,6 @@ ul.pagination li.current a {
background: #1ABC9C; background: #1ABC9C;
} }
.logo {
background: transparent url('../img/logo-negative-beta.svg') no-repeat;
background-size: 130px 51px;
}
input { input {
border-radius: 2px; border-radius: 2px;
background: #EDEDED; background: #EDEDED;

View file

@ -302,4 +302,18 @@ angular.module('copayApp.directives')
replace: true, replace: true,
templateUrl: 'views/includes/menu-toggle.html' templateUrl: 'views/includes/menu-toggle.html'
} }
})
.directive('logo', function() {
return {
restrict: 'E',
scope: {
width: "@",
negative: "="
},
controller: function($scope) {
$scope.logo_url = $scope.negative ? 'img/logo-negative.png' : 'img/logo.png';
},
replace: true,
template: '<img ng-src="{{ logo_url }}" alt="Copay">'
}
}); });