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=" uk-section  uk-margin-large-top tm-middle custom-main-content"   >
33
                <div uk-grid uk-grid>
34
                   <div class="tm-main uk-width-1-1@s uk-width-1-1@m  uk-width-1-1@l uk-row-first "-->
35
                   <div class="custom-main-content"   >
36
                      <main>
37
                       <router-outlet></router-outlet>
38
                     </main>
39
                    </div>
40
                   <!--/div>
41

    
42

    
43
                </div>
44
          </div-->
45
          <cookie-law *ngIf= "isClient" position="bottom">
46
              OpenAIRE uses cookies in order to function properly.<br>
47
              Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing experience possible.
48
              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 <span class="uk-icon">
49
              <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-right" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16"></polyline></svg>
50
              </span></a>
51
          </cookie-law>
52
           <bottom *ngIf= "isClient"></bottom>
53

    
54
`
55

    
56
})
57
export class AppComponent {
58
   isClient:boolean = false;
59

    
60
   ngOnInit() {
61
     if (typeof document !== 'undefined') {
62
       try{
63
         this.isClient = true;
64
       }catch (e) {
65
       }
66
     }
67
   }
68
}
(2-2/3)