Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed search bar on 404 page #1452

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions src/app/not-found/not-found.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,3 @@
font-size: 22px;
letter-spacing: 10px;
}

#search-bar {
position: absolute;
left: 27%;
}

@media screen and (min-width: 1920px) {
#search-bar{
left: 28%;
}
}

@media screen and (max-width: 991px) {
#search-bar{
left: 20%;
}
}

@media screen and (max-width: 767px) {
#search-bar{
left: 6%;
}
}

@media screen and (max-width: 479px) {
#search-bar{
left: 5%;
}
}

@media screen and (max-width: 359px) {
#search-bar{
left: 4%;
}
}
4 changes: 0 additions & 4 deletions src/app/not-found/not-found.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ <h2 class="yacy">
<h1>{{errorNumber}}</h1>
<h2>{{errorMsg}}</h2>
</div>

<div id="search-bar">
<app-search-bar></app-search-bar>
</div>
11 changes: 0 additions & 11 deletions src/app/not-found/not-found.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import { CommonModule } from '@angular/common';
import { HttpModule, JsonpModule } from '@angular/http';
import { StoreModule } from '@ngrx/store';
import { reducer } from '../reducers/index';
import { SearchBarComponent } from '../search-bar/search-bar.component';
import { FormsModule } from '@angular/forms';
import { AutoCompleteComponent } from '../auto-complete/auto-complete.component';
import { SpeechService } from '../services/speech.service';
import { AutocompleteService } from '../services/autocomplete.service';
import { ThemeService } from '../services/theme.service';

Expand All @@ -29,11 +27,9 @@ describe('NotFoundComponent', () => {
],
declarations: [
NotFoundComponent,
SearchBarComponent,
AutoCompleteComponent
],
providers: [
SpeechService,
AutocompleteService,
ThemeService
]
Expand All @@ -57,11 +53,4 @@ describe('NotFoundComponent', () => {
expect(image).toBeTruthy();
expect(image.alt).toBe('YaCy');
});

it('should have an app-search-bar element', () => {
let compiled = fixture.debugElement.nativeElement;

expect(compiled.querySelector('app-search-bar')).toBeTruthy();
});

});
22 changes: 0 additions & 22 deletions src/app/not-found/not-found.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component, OnInit } from '@angular/core';
import {Router, ActivatedRoute} from '@angular/router';
import { ThemeService } from '../services/theme.service';

@Component({
Expand All @@ -8,36 +7,15 @@ import { ThemeService } from '../services/theme.service';
styleUrls: ['./not-found.component.css']
})
export class NotFoundComponent implements OnInit {
searchdata = {
query : '',
verify: false,
nav: 'filetype,protocol,hosts,authors,collections,namespace,topics,date',
startRecord: 0,
indexof: 'off',
meanCount: '5',
resource: 'global',
prefermaskfilter: '',
maximumRecords: 10,
timezoneOffset: 0,
};

errorNumber: any;
errorMsg: any;

constructor(
private route: ActivatedRoute,
private router: Router,
public themeService: ThemeService
) { }

ngOnInit() {
this.searchdata.timezoneOffset = new Date().getTimezoneOffset();
this.errorNumber = '404';
this.errorMsg = 'Page not found';
}

submit() {
this.router.navigate(['/search', this.searchdata]);
}

}