Project

General

Profile

1
import { Component, Directive, ElementRef, Renderer, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
2

    
3
//
4
/////////////////////////
5
// ** Example Directive
6
// Notice we don't touch the Element directly
7

    
8
@Directive({
9
  selector: '[xLarge]'
10
})
11
export class XLargeDirective {
12
  constructor(element: ElementRef, renderer: Renderer) {
13
    // ** IMPORTANT **
14
    // we must interact with the dom through -Renderer-
15
    // for webworker/server to see the changes
16
    renderer.setElementStyle(element.nativeElement, 'fontSize', 'x-large');
17
    // ^^
18
  }
19
}
20

    
21
@Component({
22
  changeDetection: ChangeDetectionStrategy.Default,
23
  encapsulation: ViewEncapsulation.Emulated,
24
  selector: 'app',
25
  styles: [`
26
  `],
27
  template: `
28
        <navbar></navbar>
29

    
30

    
31

    
32
          <div id="tm-main" class="tm-middle custom-main-content" uk-height-viewport="mode: expand">
33
             <div class="uk-container uk-container-center">
34
                <div class="uk-grid" uk-grid>
35
                   <div class="tm-main uk-width-small-1-1 uk-width-medium-1-1  uk-width-large-1-1 uk-row-first ">
36

    
37
                      <main>
38
                       <router-outlet></router-outlet>
39
                     </main>
40
                   </div>
41
                   <!-- Sidebar -->
42
                   <!--div id="tm-sidebar" class="tm-sidebar uk-width-medium-1-4 uk-hidden-small">
43
                      <div class="uk-child-width-1-1" uk-grid>
44
                              something in sidebar
45

    
46
                             <login></login>
47
                      </div>
48
                   </div-->
49
                   <!-- end of sidebar -->
50

    
51
                </div>
52
             </div>
53
          </div>
54
          <cookie-law position="bottom">
55
          OpenAIRE uses cookies in order to function properly.<br>
56
          Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing experience possible.
57
          By using the OpenAIRE portal you accept our use of cookies. <a href="//ec.europa.eu/ipg/basics/legal/cookies/index_en.htm" target="_blank"> Read more <i class="uk-icon-angle-double-right"></i></a>
58
          </cookie-law>
59
          <bottom></bottom>
60

    
61
`
62

    
63
})
64
export class AppComponent {
65
  title = 'ftw';
66
}
(2-2/3)