mirror of
				https://github.com/mmumshad/ansible-playable.git
				synced 2025-03-09 23:38:54 +00:00 
			
		
		
		
	Separate logo to a directive
This commit is contained in:
		
							parent
							
								
									06a261ed0c
								
							
						
					
					
						commit
						e983465aed
					
				
					 8 changed files with 46 additions and 3 deletions
				
			
		|  | @ -57,6 +57,7 @@ | |||
| @import 'designer/roles/roles.css'; | ||||
| @import 'designer/tasks/tasks.css'; | ||||
| @import 'directives/complexVar/complexVar.css'; | ||||
| @import 'logo/logo.css'; | ||||
| @import 'main/main.css'; | ||||
| @import 'project/project.css'; | ||||
| @import 'runs/runs.css'; | ||||
|  |  | |||
|  | @ -92,6 +92,7 @@ import json2yaml from './filters/json2yaml/json2yaml.filter'; | |||
| 
 | ||||
| import complexVar from './directives/complexVar/complexVar.directive'; | ||||
| import tasks from './designer/tasks/tasks.directive'; | ||||
| import logo from './logo/logo.directive'; | ||||
| 
 | ||||
| import editor from './services/editor/editor.service'; | ||||
| 
 | ||||
|  | @ -109,7 +110,7 @@ angular.module('app2App', [ngCookies, ngResource, ngSanitize, uiRouter, uiBootst | |||
|   // Filters
 | ||||
|   dictToKeyValueArray, dictToKeyValueArraySimple, keyValueArrayToDict, keyValueArrayToArray, addDotInKey, removeDotInKey, json2yaml, | ||||
|   // Directives
 | ||||
|   complexVar, tasks, treecontrol, 'btford.markdown', 'ngTagsInput', 'angular-loading-bar' | ||||
|   complexVar, tasks, treecontrol, 'btford.markdown', 'ngTagsInput', 'angular-loading-bar', logo | ||||
| 
 | ||||
| ]) | ||||
|   .config(routeConfig) | ||||
|  |  | |||
							
								
								
									
										8
									
								
								client/app/logo/logo.css
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								client/app/logo/logo.css
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| .rotated_a { | ||||
|   font-size: 90px; | ||||
|   -ms-transform: rotate(90deg); /* IE 9 */ | ||||
|   -webkit-transform: rotate(90deg); /* Chrome, Safari, Opera */ | ||||
|   transform: rotate(90deg); | ||||
|   display: inline-block; | ||||
|   padding-left: 10px; | ||||
| } | ||||
							
								
								
									
										12
									
								
								client/app/logo/logo.directive.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								client/app/logo/logo.directive.js
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | |||
| 'use strict'; | ||||
| const angular = require('angular'); | ||||
| 
 | ||||
| export default angular.module('webAppApp.logo', []) | ||||
|   .directive('logo', function() { | ||||
|     return { | ||||
|       template: require('./logo.html'), | ||||
|       restrict: 'EA', | ||||
|       link: function(scope, element, attrs) {} | ||||
|     }; | ||||
|   }) | ||||
|   .name; | ||||
							
								
								
									
										20
									
								
								client/app/logo/logo.directive.spec.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								client/app/logo/logo.directive.spec.js
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | |||
| 'use strict'; | ||||
| 
 | ||||
| describe('Directive: logo', function() { | ||||
|   // load the directive's module and view
 | ||||
|   beforeEach(module('webAppApp.logo')); | ||||
|   beforeEach(module('app/logo/logo.html')); | ||||
| 
 | ||||
|   var element, scope; | ||||
| 
 | ||||
|   beforeEach(inject(function($rootScope) { | ||||
|     scope = $rootScope.$new(); | ||||
|   })); | ||||
| 
 | ||||
|   it('should make hidden element visible', inject(function($compile) { | ||||
|     element = angular.element('<logo></logo>'); | ||||
|     element = $compile(element)(scope); | ||||
|     scope.$apply(); | ||||
|     expect(element.text()).to.equal('this is the logo directive'); | ||||
|   })); | ||||
| }); | ||||
							
								
								
									
										1
									
								
								client/app/logo/logo.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								client/app/logo/logo.html
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| <span style="color:#ffa800;font-size:50px; font-family: 'ExpletusSans-Regular'">play<div class="rotated_a">A</div> ble <span style="color: darkgrey; font-size: small"> {{ appVersion }}</span></span> | ||||
|  | @ -32,4 +32,3 @@ | |||
| body { | ||||
|   font-family: 'ExpletusSans-Regular'; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,6 +1,7 @@ | |||
| <header class="hero-unit" id="banner"> | ||||
|   <div class="container"> | ||||
|     <p style="color:#ffa800;font-size:50px; font-family: 'ExpletusSans-Regular'">play<span class="-rotate-90" style="font-size: 70px;">A</span>ble <span style="color: darkgrey; font-size: small"> {{ appVersion }}</span></p> | ||||
|     <!--<span style="color:#ffa800;font-size:50px; font-family: 'ExpletusSans-Regular'">play<div class="rotated_a">A</div> ble <span style="color: darkgrey; font-size: small"> {{ appVersion }}</span></span>--> | ||||
|     <logo></logo> | ||||
|     <p class="lead"><a style="color:#d9534f;" href="http://www.ansible.com" target="_blank">Ansible</a> Playbook generator and orchestrator</p> | ||||
|     <img src="assets/images/Button-1-play-icon.png" alt="I'm Playable"> | ||||
|   </div> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue