Commit b159a27d authored by Phil Höfer's avatar Phil Höfer
Browse files

Merge branch 'development' into 310-ergebnisseiten-styles-in-less-code-ubernehmen

parents 8c159032 d4e3c5e6
...@@ -85,8 +85,44 @@ class MetaGerSearch extends Controller ...@@ -85,8 +85,44 @@ class MetaGerSearch extends Controller
fclose($file); fclose($file);
} }
# Wikipedia Quicktip
$quicktips = []; $quicktips = [];
# Das Wetter
try {
if (App::isLocale('en')) {
$url = "http://api.openweathermap.org/data/2.5/weather?type=like&units=metric&lang=en&q=" . urlencode($q) . "&APPID=" . getenv("openweathermap");
} else {
$url = "http://api.openweathermap.org/data/2.5/weather?type=like&units=metric&lang=de&q=" . urlencode($q) . "&APPID=" . getenv("openweathermap");
}
$result = json_decode($this->get($url), true);
$weather = [];
$weather["title"] = "Wetter in " . $result["name"];
$weather["URL"] = "http://openweathermap.org/city/" . $result["id"];
$descr = '<b class="detail-short">' . $result["main"]["temp"] . " °C, " . $result["weather"][0]["description"] . "</b>";
$details = '<table class="table table-condensed"><tr><td>Temperatur</td><td>' . $result["main"]["temp_min"] . " bis " . $result["main"]["temp_max"] . " °C</td></tr>";
$details .= "<tr><td>Druck</td><td>" . $result["main"]["pressure"] . " hPa</td></tr>";
$details .= "<tr><td>Luftfeuchtigkeit</td><td>" . $result["main"]["humidity"] . " %</td></tr>";
$details .= "<tr><td>Wind</td><td>" . $result["wind"]["speed"] . " m/s, " . $result["wind"]["deg"] . "°</td></tr>";
$details .= "<tr><td>Bewölkung</td><td>" . $result["clouds"]["all"] . " %</td></tr>";
if (isset($result->rain)) {
$details .= " | Regen letzte drei Stunden: " . $result["rain"]["3h"] . " h";
}
$details .= "</table>";
$weather["descr"] = $descr;
$weather["details"] = $details;
$weather["gefVon"] = "von <a href = \"https://openweathermap.org\" target=\"_blank\" rel=\"noopener\">Openweathermap</a>";
$requestData = [];
$requestData["url"] = "http://openweathermap.org/img/w/";
$weather["image"] = action('Pictureproxy@get', $requestData) . $result["weather"][0]["icon"] . ".png";
$weather["image-alt"] = $result["weather"][0]["main"];
$mquicktips[] = $weather;
} catch (\ErrorException $e) {
}
# Wikipedia Quicktip
if (App::isLocale('en')) { if (App::isLocale('en')) {
$url = "https://en.wikipedia.org/w/api.php?action=opensearch&search=" . urlencode($q) . "&limit=1&namespace=0&format=json"; $url = "https://en.wikipedia.org/w/api.php?action=opensearch&search=" . urlencode($q) . "&limit=1&namespace=0&format=json";
} else { } else {
......
...@@ -7635,6 +7635,22 @@ footer a { ...@@ -7635,6 +7635,22 @@ footer a {
.product img { .product img {
max-width: 100px; max-width: 100px;
} }
.qtheader {
font-size: 16px;
margin: 0px;
font-weight: bold;
}
.info-details-available {
cursor: pointer;
}
.detail-short {
font-weight: bold;
font-size: 18px;
line-height: 60px;
}
.qt-icon {
height: 60px;
}
/*input[type=text]:focus, textarea:focus, input[type=email]:focus, input[type=tel]:focus { /*input[type=text]:focus, textarea:focus, input[type=email]:focus, input[type=tel]:focus {
outline-color: rgb(255, 128, 0); outline-color: rgb(255, 128, 0);
-webkit-box-shadow: 0px 0px 2px 2px rgba(255, 128, 0, 1); -webkit-box-shadow: 0px 0px 2px 2px rgba(255, 128, 0, 1);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
@import "./static-pages.less"; @import "./static-pages.less";
@import "./result-page.less"; @import "./result-page.less";
@import "./quicktips.less";
\ No newline at end of file
.qtheader {
font-size: 16px;
margin: 0px;
font-weight: bold;
}
.info-details-available {
cursor: pointer;
}
.detail-short {
font-weight: bold;
font-size: 18px;
line-height: 60px;
}
.qt-icon {
height: 60px;
}
\ No newline at end of file
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
return [ return [
"achtung" => "Warning! Structure and functionality of our website are subject to constant development and changes. We try to update our help pages as quickly as possible, but can not prevent temporary mistakes.", "achtung" => "Warning! Structure and functionality of our website are subject to constant development and changes. We try to update our help pages as quickly as possible, but can not prevent temporary mistakes.",
"title" => "MetaGer - FAQ", "title" => "MetaGer - FAQ",
"faq.1.h" => "What is MetaGer?", "faq.1.h" => "What is MetaGer?",
"faq.1.b" => "MetaGer is primarily a <a href=\"https://en.wikipedia.org/wiki/Metasearch_engine\" target=\"_blank\" rel=\"noopener\">meta search engine</a>. Besides that MetaGer maintains a number of specialized crawlers and indexers of its own.", "faq.1.b" => "MetaGer is primarily a <a href=\"https://en.wikipedia.org/wiki/Metasearch_engine\" target=\"_blank\" rel=\"noopener\">meta search engine</a>. Besides that MetaGer maintains a number of specialized crawlers and indexers of its own.",
"faq.2.h" => "Which search engines are meta-crawled by MetaGer?", "faq.2.h" => "Which search engines are meta-crawled by MetaGer?",
...@@ -34,7 +32,12 @@ return [ ...@@ -34,7 +32,12 @@ return [
"faq.13.b.1" => "The protection of private data is our general principle. Everything we do is subordinated to this principle. Therefore we do not work with Cookies, Session IDs or anything else. More exact information: <a href=\"/datenschutz/\" target=\"_blank\" rel=\"noopener\">https://metager.de/datenschutz/</a>", "faq.13.b.1" => "The protection of private data is our general principle. Everything we do is subordinated to this principle. Therefore we do not work with Cookies, Session IDs or anything else. More exact information: <a href=\"/datenschutz/\" target=\"_blank\" rel=\"noopener\">https://metager.de/datenschutz/</a>",
"faq.13.b.2" => "Besides: we do not store and we do not even know your IP-address. We use serversided anonymization for the communication with the prompted search services. We think that searchengines work well without storing IP-addresses. What do we do additionally?", "faq.13.b.2" => "Besides: we do not store and we do not even know your IP-address. We use serversided anonymization for the communication with the prompted search services. We think that searchengines work well without storing IP-addresses. What do we do additionally?",
"faq.13.b.3" => "You may wish to hide your IP-address generally. We provide a free proxyservice. Click \"tools\" for more exact information: ", "faq.13.b.3" => "You may wish to hide your IP-address generally. We provide a free proxyservice. Click \"tools\" for more exact information: ",
"faq.13.b.4" => "Please use the Tor-network or the MetaGer Tor-branch for advanced anonymization. Please click \"Tools\" for further information.",
"faq.13.b.5" => "Needless to say: we use the https protocoll at any time. All your queries are safe between your personal computer and the MetaGer servers.",
"faq.15.h" => "How was MetaGer started, what is the story behind MetaGer?", "faq.15.h" => "How was MetaGer started, what is the story behind MetaGer?",
"faq.15.b" => "It was started in 1996. Take a look at the historically documented origin story here: <a href=\"http://blog.suma-ev.de/node/207\" target=\"_blank\" rel=\"noopener\">http://blog.suma-ev.de/node/207</a>.",
"faq.16.h" => "Is it allowed to hyperlink MetaGer ?",
"faq.16.b" => "Yes, sure. You can do this as you like. This refers to all pages of our site. But: we would like it more if you would use our widget (for the improvement of your own website). See \\\"Tools\"\\.",
"faq.17.h" => "How to add MetaGer as a standard search engine (using the plugin)", "faq.17.h" => "How to add MetaGer as a standard search engine (using the plugin)",
"faq.17.b.1" => "A short instruction how to add the metager plugin to your webbrowser (includes deinstallation if necessary):", "faq.17.b.1" => "A short instruction how to add the metager plugin to your webbrowser (includes deinstallation if necessary):",
"faq.17.b.2" => "<b>For the Firefox webbrowser:</b>", "faq.17.b.2" => "<b>For the Firefox webbrowser:</b>",
...@@ -45,5 +48,5 @@ return [ ...@@ -45,5 +48,5 @@ return [
"faq.17.b.7" => "5. click \"Remove\" on the right side below the list.", "faq.17.b.7" => "5. click \"Remove\" on the right side below the list.",
"faq.17.b.8" => "6. Open the MetaGer startpage (https://metager.de/en) and", "faq.17.b.8" => "6. Open the MetaGer startpage (https://metager.de/en) and",
"faq.17.b.9" => "7. click \"Add the MetaGer-Plugin\" below the searchfield. Please follow the given advices.", "faq.17.b.9" => "7. click \"Add the MetaGer-Plugin\" below the searchfield. Please follow the given advices.",
"faq.17.b.10" => "Of course, you can use MetaGer without that plugin at any time. Just type \"metager.de\" into your browsers address bar.", "faq.17.b.10" => "Of course, you can use MetaGer without that plugin at any time. Just type \"metager.de\" into your browsers address bar."
]; ];
...@@ -9,8 +9,29 @@ ...@@ -9,8 +9,29 @@
@endif @endif
@foreach( $mqs as $mq) @foreach( $mqs as $mq)
<div class="quicktip"> <div class="quicktip">
<b class="qtheader"><a href="{{ $mq['URL'] }}" target="_blank" rel="noopener">{{ $mq['title'] }}</a></b><br> <h2 class="qtheader"><a href="{{ $mq['URL'] }}" target="_blank" rel="noopener">{{ $mq['title'] }}</a></h2>
<details>
<summary>
<div class="media">
@if( isset($mq['image']) && isset($mq['image-alt'] ))
<div class="media-left">
<img class="qt-icon" src="{!! $mq['image'] !!}" alt="{!! $mq['image-alt'] !!}">
</div>
@endif
<div class="media-body">
<div>{!! $mq['descr'] !!}</div> <div>{!! $mq['descr'] !!}</div>
</div>
@if( isset($mq['details']) )
<div class="media-right">
<span class="glyphicon glyphicon-info-sign info-details-available" aria-hidden="true"></span>
</div>
@endif
</div>
</summary>
@if( isset($mq['details']) )
{!! $mq['details'] !!}
@endif
</details>
@if( isset($mq['gefVon']) ) @if( isset($mq['gefVon']) )
<div class="pull-right">{!! $mq['gefVon'] !!}</div> <div class="pull-right">{!! $mq['gefVon'] !!}</div>
@endif @endif
......
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