Commit 6ce35527 authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Die Ergebnisseite hat jetzt eine neue Suchleiste

parent fc9ef18f
......@@ -82,6 +82,15 @@ function getDocumentReadyForUse (fokus, custom = false) {
productWidget();
$('iframe:not(.resized)').iFrameResize();
$('iframe').addClass('resized');
addListeners();
}
function addListeners () {
$('#reset').attr('type', 'button').click(resetSearchbar);
}
function resetSearchbar () {
$('#eingabeTop').val('');
}
function pluginInfo () {
......@@ -570,7 +579,7 @@ function loadQuicktips (search, locale, sprueche) {
}
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
......@@ -588,7 +597,6 @@ function getQuicktips (search, locale, blacklist, loadedHandler) {
$.get(getString, function (data, status) {
if (status === 'success') {
var quicktips = $(data).children('feed').children('entry').map(function () {
console.log(this);
return quicktip = {
type: $(this).children('mg\\:type').text(),
title: $(this).children('title').text(),
......@@ -605,7 +613,6 @@ function getQuicktips (search, locale, blacklist, loadedHandler) {
}).toArray()
};
}).toArray();
console.log(quicktips);
loadedHandler(quicktips);
} else {
console.error('Loading quicktips failed with status ' + status);
......
......@@ -307,19 +307,33 @@ a {
padding: 5px 30px 0px 0px;
}
#header-searchbar {
flex-grow: 1;
}
.searchbar {
margin-top: 5px;
display: flex;
align-items: center;
border-left: #bbb solid 1px;
input {
.search-input {
order: 2;
border: none;
box-shadow: none !important;
border: white solid 1px;
font-size: 16px;
&:focus {
border: #bbb dotted 1px;
}
}
button {
.search-reset {
order: 1;
border: none;
background-color: transparent;
color: #444;
}
.search-submit {
order: 3;
color: #bbb;
font-size: 20px;
}
......@@ -347,7 +361,7 @@ a {
.title {
color: @result-title-color;
text-decoration: none;
font-size: 17px;
font-size: 18px;
font-weight: bold;
margin-bottom: 0;
white-space: nowrap;
......@@ -357,7 +371,7 @@ a {
text-overflow: ellipsis;
}
.link {
font-size: 15px;
font-size: 16px;
margin: 0;
line-height: 1.5;
&>div {
......@@ -388,7 +402,7 @@ a {
.description {
margin-bottom: 3px;
color: @result-description-color;
font-size: 15px;
font-size: 16px;
line-height: 1.3;
clear: both;
.date {
......@@ -648,6 +662,7 @@ a {
}
}
/*
* <div id="quicktips">
* <div class="quicktip" type="TYPE">
......@@ -678,8 +693,7 @@ a {
}
.quicktip-summary {
h1 {
font-size: 17px;
font-size: 15px;
font-size: 18px;
font-weight: bold;
}
p {
......@@ -691,16 +705,16 @@ a {
border-bottom: 1px solid #ddd;
h2 {
margin: 10px 0px;
font-size: 16px;
font-size: 17px;
font-weight: bold;
}
p {
display: none;
font-size: 14px;
font-size: 15px;
}
}
.gefVon {
font-size: 14px;
font-size: 15px;
}
&[type=spruch] {
border-left: 3px solid #070;
......
......@@ -4,4 +4,5 @@ return [
'opensearch' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen',
'startseite' => 'MetaGer-Startseite',
'impressum' => 'Impressum',
'search-placeholder' => 'Suchbegriff(e) eingeben',
];
......@@ -13,18 +13,23 @@
<nav class="navbar navbar-default navbar-fixed-top navbar-resultpage">
<div class="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>
<form method="{{ Request::method() }}" accept-charset="UTF-8" class="form search-bar-input" id="submitForm">
<div class="searchbar">
<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 />
<button type='submit' form="submitForm" id='search'><i class="fa fa-search" aria-hidden="true"></i></button>
</div>
@foreach( $metager->request->all() as $key => $value)
@if($key !== "eingabe" && $key !== "page" && $key !== "next")
<input type='hidden' name='{{ $key }}' value='{{ $value }}' form='submitForm' />
@endif
@endforeach
</form>
<div id="header-logo">
<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>
<div id="header-searchbar">
<form method="{{ Request::method() }}" accept-charset="UTF-8" class="form search-bar-input" id="submitForm">
<div class="searchbar">
<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 />
<button class="search-reset" type='reset' accesskey="r" form="submitForm" id='reset' value=""><i class="fa fa-times" aria-hidden="true"></i></button>
<button class="search-submit" type='submit' form="submitForm" id='search'><i class="fa fa-search" aria-hidden="true"></i></button>
</div>
@foreach( $metager->request->all() as $key => $value)
@if($key !== "eingabe" && $key !== "page" && $key !== "next")
<input type='hidden' name='{{ $key }}' value='{{ $value }}' form='submitForm' />
@endif
@endforeach
</form>
</div>
</div>
</div>
</nav>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment