Skip to content
Snippets Groups Projects
Commit 58131053 authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Die Ergebnisseite hat jetzt eine neue Suchleiste

parent fe459959
No related branches found
No related tags found
1 merge request!1365Resolve "Filter Options for MetaGer"
...@@ -82,6 +82,15 @@ function getDocumentReadyForUse (fokus, custom = false) { ...@@ -82,6 +82,15 @@ function getDocumentReadyForUse (fokus, custom = false) {
productWidget(); productWidget();
$('iframe:not(.resized)').iFrameResize(); $('iframe:not(.resized)').iFrameResize();
$('iframe').addClass('resized'); $('iframe').addClass('resized');
addListeners();
}
function addListeners () {
$('#reset').attr('type', 'button').click(resetSearchbar);
}
function resetSearchbar () {
$('#eingabeTop').val('');
} }
function pluginInfo () { function pluginInfo () {
...@@ -570,7 +579,7 @@ function loadQuicktips (search, locale, sprueche) { ...@@ -570,7 +579,7 @@ function loadQuicktips (search, locale, sprueche) {
} }
const QUICKTIP_SERVER = 'https://quicktips.metager3.de'; const QUICKTIP_SERVER = 'https://quicktips.metager3.de';
//const QUICKTIP_SERVER = 'http://localhost:63825'; // const QUICKTIP_SERVER = 'http://localhost:63825'
/** /**
* Requests quicktips from the quicktip server and passes them to the loadedHandler * Requests quicktips from the quicktip server and passes them to the loadedHandler
...@@ -588,7 +597,6 @@ function getQuicktips (search, locale, blacklist, loadedHandler) { ...@@ -588,7 +597,6 @@ function getQuicktips (search, locale, blacklist, loadedHandler) {
$.get(getString, function (data, status) { $.get(getString, function (data, status) {
if (status === 'success') { if (status === 'success') {
var quicktips = $(data).children('feed').children('entry').map(function () { var quicktips = $(data).children('feed').children('entry').map(function () {
console.log(this);
return quicktip = { return quicktip = {
type: $(this).children('mg\\:type').text(), type: $(this).children('mg\\:type').text(),
title: $(this).children('title').text(), title: $(this).children('title').text(),
...@@ -605,7 +613,6 @@ function getQuicktips (search, locale, blacklist, loadedHandler) { ...@@ -605,7 +613,6 @@ function getQuicktips (search, locale, blacklist, loadedHandler) {
}).toArray() }).toArray()
}; };
}).toArray(); }).toArray();
console.log(quicktips);
loadedHandler(quicktips); loadedHandler(quicktips);
} else { } else {
console.error('Loading quicktips failed with status ' + status); console.error('Loading quicktips failed with status ' + status);
......
...@@ -307,19 +307,33 @@ a { ...@@ -307,19 +307,33 @@ a {
padding: 5px 30px 0px 0px; padding: 5px 30px 0px 0px;
} }
#header-searchbar {
flex-grow: 1;
}
.searchbar { .searchbar {
margin-top: 5px; margin-top: 5px;
display: flex; display: flex;
align-items: center;
border-left: #bbb solid 1px; border-left: #bbb solid 1px;
input { .search-input {
order: 2;
border: none; border: none;
box-shadow: none !important; box-shadow: none !important;
border: white solid 1px; border: white solid 1px;
font-size: 16px;
&:focus { &:focus {
border: #bbb dotted 1px; border: #bbb dotted 1px;
} }
} }
button { .search-reset {
order: 1;
border: none;
background-color: transparent;
color: #444;
}
.search-submit {
order: 3;
color: #bbb; color: #bbb;
font-size: 20px; font-size: 20px;
} }
...@@ -347,7 +361,7 @@ a { ...@@ -347,7 +361,7 @@ a {
.title { .title {
color: @result-title-color; color: @result-title-color;
text-decoration: none; text-decoration: none;
font-size: 17px; font-size: 18px;
font-weight: bold; font-weight: bold;
margin-bottom: 0; margin-bottom: 0;
white-space: nowrap; white-space: nowrap;
...@@ -357,7 +371,7 @@ a { ...@@ -357,7 +371,7 @@ a {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.link { .link {
font-size: 15px; font-size: 16px;
margin: 0; margin: 0;
line-height: 1.5; line-height: 1.5;
&>div { &>div {
...@@ -388,7 +402,7 @@ a { ...@@ -388,7 +402,7 @@ a {
.description { .description {
margin-bottom: 3px; margin-bottom: 3px;
color: @result-description-color; color: @result-description-color;
font-size: 15px; font-size: 16px;
line-height: 1.3; line-height: 1.3;
clear: both; clear: both;
.date { .date {
...@@ -648,6 +662,7 @@ a { ...@@ -648,6 +662,7 @@ a {
} }
} }
/* /*
* <div id="quicktips"> * <div id="quicktips">
* <div class="quicktip" type="TYPE"> * <div class="quicktip" type="TYPE">
...@@ -678,8 +693,7 @@ a { ...@@ -678,8 +693,7 @@ a {
} }
.quicktip-summary { .quicktip-summary {
h1 { h1 {
font-size: 17px; font-size: 18px;
font-size: 15px;
font-weight: bold; font-weight: bold;
} }
p { p {
...@@ -691,16 +705,16 @@ a { ...@@ -691,16 +705,16 @@ a {
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
h2 { h2 {
margin: 10px 0px; margin: 10px 0px;
font-size: 16px; font-size: 17px;
font-weight: bold; font-weight: bold;
} }
p { p {
display: none; display: none;
font-size: 14px; font-size: 15px;
} }
} }
.gefVon { .gefVon {
font-size: 14px; font-size: 15px;
} }
&[type=spruch] { &[type=spruch] {
border-left: 3px solid #070; border-left: 3px solid #070;
......
...@@ -4,4 +4,5 @@ return [ ...@@ -4,4 +4,5 @@ return [
'opensearch' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen', 'opensearch' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen',
'startseite' => 'MetaGer-Startseite', 'startseite' => 'MetaGer-Startseite',
'impressum' => 'Impressum', 'impressum' => 'Impressum',
'search-placeholder' => 'Suchbegriff(e) eingeben',
]; ];
...@@ -13,18 +13,23 @@ ...@@ -13,18 +13,23 @@
<nav class="navbar navbar-default navbar-fixed-top navbar-resultpage"> <nav class="navbar navbar-default navbar-fixed-top navbar-resultpage">
<div class="container"> <div class="container">
<div class="row" id="logo-searchbar-container"> <div class="row" id="logo-searchbar-container">
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}"><h1 class="mg-logo">M<span class="hidden-xs">eta</span>G<span class="hidden-xs">er</span></h1></a> <div id="header-logo">
<form method="{{ Request::method() }}" accept-charset="UTF-8" class="form search-bar-input" id="submitForm"> <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}"><h1 class="mg-logo">M<span class="hidden-xs">eta</span>G<span class="hidden-xs">er</span></h1></a>
<div class="searchbar"> </div>
<input autocomplete="off" class="form-control" form="submitForm" id="eingabeTop" name="eingabe" placeholder="Suchbegriffe erweitern/verändern, oder völlig neue Suche:" tabindex="1" type="text" value="{{ $eingabe }}" required /> <div id="header-searchbar">
<button type='submit' form="submitForm" id='search'><i class="fa fa-search" aria-hidden="true"></i></button> <form method="{{ Request::method() }}" accept-charset="UTF-8" class="form search-bar-input" id="submitForm">
</div> <div class="searchbar">
@foreach( $metager->request->all() as $key => $value) <input autocomplete="off" class="form-control search-input" form="submitForm" id="eingabeTop" name="eingabe" placeholder="{{ @trans('resultPage.search-placeholder') }}" tabindex="1" type="text" value="{{ $eingabe }}" required />
@if($key !== "eingabe" && $key !== "page" && $key !== "next") <button class="search-reset" type='reset' accesskey="r" form="submitForm" id='reset' value=""><i class="fa fa-times" aria-hidden="true"></i></button>
<input type='hidden' name='{{ $key }}' value='{{ $value }}' form='submitForm' /> <button class="search-submit" type='submit' form="submitForm" id='search'><i class="fa fa-search" aria-hidden="true"></i></button>
@endif </div>
@endforeach @foreach( $metager->request->all() as $key => $value)
</form> @if($key !== "eingabe" && $key !== "page" && $key !== "next")
<input type='hidden' name='{{ $key }}' value='{{ $value }}' form='submitForm' />
@endif
@endforeach
</form>
</div>
</div> </div>
</div> </div>
</nav> </nav>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment