Commit d110a5c6 authored by Davide Aprea's avatar Davide Aprea
Browse files

removed rich + atom10 and marked rss20 + api as wip

parent c3e47396
......@@ -206,18 +206,7 @@ class MetaGer
->with('browser', (new Agent())->browser())
->with('fokus', $this->fokus);
break;
case 'rich':
return view('resultpages.metager3rich')
->with('results', $viewResults)
->with('eingabe', $this->eingabe)
->with('mobile', $this->mobile)
->with('warnings', $this->warnings)
->with('errors', $this->errors)
->with('apiAuthorized', $this->apiAuthorized)
->with('metager', $this)
->with('browser', (new Agent())->browser())
->with('fokus', $this->fokus);
break;
/* WIP
case 'rss20':
return view('resultpages.metager3resultsrss20')
->with('results', $viewResults)
......@@ -230,10 +219,7 @@ class MetaGer
case 'api':
return response()->view('resultpages.metager3resultsatom10', ['results' => $viewResults, 'eingabe' => $this->eingabe, 'metager' => $this, 'resultcount' => sizeof($viewResults), 'key' => $this->apiKey, 'apiAuthorized' => $this->apiAuthorized])->header('Content-Type', 'application/xml');
break;
case 'atom10':
return response()->view('resultpages.metager3resultsatom10', ['results' => $viewResults, 'eingabe' => $this->eingabe, 'metager' => $this, 'resultcount' => sizeof($viewResults), 'key' => $this->apiKey, 'apiAuthorized' => true])
->header('Content-Type', 'application/xml');
break;
*/
case 'result-count':
# Wir geben die Ergebniszahl und die benötigte Zeit zurück:
return sizeof($viewResults) . ";" . round((microtime(true) - $this->starttime), 2);
......@@ -1207,7 +1193,7 @@ class MetaGer
$this->out = $request->input('out', "html");
# Standard output format html
if ($this->out !== "html" && $this->out !== "json" && $this->out !== "results" && $this->out !== "results-with-style" && $this->out !== "result-count" && $this->out !== "rss20" && $this->out !== "atom10" && $this->out !== "rich" && $this->out !== "api") {
if ($this->out !== "html" && $this->out !== "json" && $this->out !== "results" && $this->out !== "results-with-style" && $this->out !== "result-count" /*WIP && $this->out !== "rss20" && $this->out !== "api"*/) {
$this->out = "html";
}
# Wir schalten den Cache aus, wenn die Ergebniszahl überprüft werden soll
......
@if(isset($result) && !$apiAuthorized)
<article class="search-result ad card elevation-1">
<div class="result-content">
<h1 class="result-title">{{ $result->titel }}</h1>
<h2 class="result-display-link"><a href="{{ $result->link }}">{{ $result->anzeigeLink }}</a></h2>
<p class="result-description">{{ $result->descr }}</p>
<p class="result-source">Werbung von {!! $result->gefVon !!}</p>
@if( isset($result->logo) )
<img class="result-thumbnail" src="{{ $metager->getImageProxyLink($result->logo) }}" alt="" />
@endif
</div>
<div class="result-action-area">
<a class="result-action primary" href="{{ $result->link }}">Öffnen</a>
<a class="result-action primary" target="_blank" href="{{ $result->link }}">Neuer Tab</a>
</div>
</article>
@endif
<article class="search-result card elevation-1">
<div class="result-content">
<h1 class="result-title">{{ $result->titel }}</h1>
<h2 class="result-display-link"><a href="{{ $result->link }}">{{ $result->anzeigeLink }}</a></h2>
<p class="result-description">{{ $result->descr }}</p>
<p class="result-source">gefunden von {!! $result->gefVon !!}</p>
@if( isset($result->logo) )
<img class="result-thumbnail" src="{{ $metager->getImageProxyLink($result->logo) }}" alt="" />
@endif
</div>
<div class="result-action-area">
<a class="result-action primary" href="{{ $result->link }}">Öffnen</a>
<a class="result-action primary" target="_blank" href="{{ $result->link }}">Neuer Tab</a>
<a class="result-action" target="_blank" href="{{ $result->proxyLink }}">Anonym Öffnen</a>
</div>
</article>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>{{ $eingabe }} - MetaGer</title>
<link @if(app('request')->input('theme', 'default')!=='default'&&app('request')->input('theme', 'default')!=='material')rel="alternate stylesheet" @else rel="stylesheet" @endif title="Material" href="{{ mix('/css/material-default.css') }}" />
<link @if(app('request')->input('theme', 'default')!=='material-inverse')rel="alternate stylesheet" @else rel="stylesheet" @endif title="Material-Invers" href="{{ mix('/css/material-inverse.css') }}" />
<link href="/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
<link href="/favicon.ico" rel="icon" type="image/x-icon" />
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport" />
<meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE" />
<link rel="search" type="application/opensearchdescription+xml" title="{!! trans('resultPage.opensearch') !!}" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('StartpageController@loadPlugin', ['params' => base64_encode(serialize(Request::all()))])) }}">
</head>
<body>
<header class="persistent-search">
<form class="search-card card elevation-2">
<a href="/" class="back">
<img src="/img/Logo-square-inverted.svg" alt="MetaGer" title="MetaGer, die sichere Suchmaschine" />
</a>
<input type="text" name="eingabe" placeholder="MetaGer-Suche" value="{{ $eingabe }}" class="query-input"/>
<button type="submit" class="search-button fa"></button>
@foreach( $metager->request->all() as $key => $value)
@if($key !== "eingabe" && $key !== "page" && $key !== "next")
<input type="hidden" name="{{ $key }}" value="{{ $value }}"/>
@endif
@endforeach
</form>
</header>
<details class="focus-card card elevation-1">
<summary class="focus-cell"><div class="focus-cell-label"><span class="icon fa" aria-hidden="true"></span> <b>Web</b></div></summary>
</details>
<main class="results-container">
@foreach($metager->getResults() as $result)
@if($result->number % 7 === 0 && !$apiAuthorized)
@include('layouts.rich.ad', ['result' => $metager->popAd()])
@endif
@include('layouts.rich.result', ['result' => $result])
@endforeach
</main>
@if($metager->getPage() === 1)
<nav class="pagenav-first">
<a class="pagenav-button-next card elevation-1" href="{{ $metager->nextSearchLink() }}"><span class="card-button-text">Weitersuchen</span><span class="icon-right"></span></a>
</nav>
@else
<nav class="pagenav-following">
<div>
<a class="pagenav-button-first card-inline elevation-1" href="javascript:history.back()"></a>
</div>
<div class="pagenav-current"><span class="pagenav-current-annotation">Seite </span>{{ $metager->getPage() }}</div>
<a class="pagenav-button-next card-inline elevation-1" href="{{ $metager->nextSearchLink() }}"><span class="card-button-text">Weitersuchen</span><span class="icon-right"></span></a>
</nav>
@endif
<footer class="footer-text">
<a href="https://metager.de/impressum" target="_blank">Impressum</a>
</footer>
</body>
</html>
Supports Markdown
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