<commit_before>﻿import { Component, ElementRef, HostListener, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { NavigationService, NavItem } from './navigation.service';
import { BASE_URL } from './core/globals';
import { Http } from '@angular/http';

@Component({
    selector: 'f2kNavigation',
    templateUrl: './navigation.component.html',
    styleUrls: ['./navigation.component.css']
})

export class NavigationComponent implements OnInit {
    open: boolean;
    lastScrollTop: number;
    top: number;
    giveawayExists = false;
    navItems: NavItem[] = [
        new NavItem('Decklists', ['Hearthstone'/*, 'Gwent'*/]),
        new NavItem('Tier List', []),
        new NavItem('Articles', []),
        new NavItem('Giveaways', []),
        new NavItem('Team', []),
        // new NavItem('Sponsors', []),
        // new NavItem('Shop', [])
    ];

    @HostListener('window:scroll', ['$event']) scroll(event) {
        const st = window.pageYOffset || document.documentElement.scrollTop;
        if (st > this.lastScrollTop) {
            this.resetOpenItems();
            this.element.nativeElement.style.top = -this.getHeight() + 'px';
        } else {
            this.element.nativeElement.style.top = 0;
        }
        this.lastScrollTop = st;
    }

    constructor(private service: NavigationService,
                private route: ActivatedRoute,
                private router: Router,<commit_msg>bug fix<commit_after>﻿import { Component, ElementRef, HostListener, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { NavigationService, NavItem } from './navigation.service';
import { BASE_URL } from './core/globals';
import { Http } from '@angular/http';

@Component({
    selector: 'f2kNavigation',
    templateUrl: './navigation.component.html',
    styleUrls: ['./navigation.component.css']
})

export class NavigationComponent implements OnInit {
    open: boolean;
    lastScrollTop: number;
    top: number;
    giveawayExists = false;
    navItems: NavItem[] = [
        // new NavItem('Decklists', ['Hearthstone'/*, 'Gwent'*/]),
        new NavItem('Tier List', []),
        new NavItem('Articles', []),
        new NavItem('Giveaways', []),
        new NavItem('Team', []),
        // new NavItem('Sponsors', []),
        // new NavItem('Shop', [])
    ];

    @HostListener('window:scroll', ['$event']) scroll(event) {
        const st = window.pageYOffset || document.documentElement.scrollTop;
        if (st > this.lastScrollTop) {
            this.resetOpenItems();
            this.element.nativeElement.style.top = -this.getHeight() + 'px';
        } else {
            this.element.nativeElement.style.top = 0;
        }
        this.lastScrollTop = st;
    }

    constructor(private service: NavigationService,
                private route: ActivatedRoute,
                private router: Router,
{'fraction_non_alphanumeric': 0.1505962521294719, 'fraction_numerical': 0.001362862010221465, 'mean_word_length': 2.808041504539559, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4099641', 'n_tokens_mistral': 857, 'n_tokens_neox': 832, 'n_words': 184}