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";
\ No newline at end of file @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
<?php <?php
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.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.h" => "What is MetaGer?", "faq.2.h" => "Which search engines are meta-crawled by 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.2.b" => "You can find a list at our \"customize\" menu on the MetaGer homepage.",
"faq.2.h" => "Which search engines are meta-crawled by MetaGer?", "faq.3.h" => "Why does MetaGer has no button \"search using all search engines\"?",
"faq.2.b" => "You can find a list at our \"customize\" menu on the MetaGer homepage.", "faq.3.b" => "The reason is, that the requirements of a search are are often not suitable for this. For a search for scientific results for example it makes no sense to search with a product search engine.",
"faq.3.h" => "Why does MetaGer has no button \"search using all search engines\"?", "faq.4.h" => "Why don't you metacrawl search engine XY anymore?",
"faq.3.b" => "The reason is, that the requirements of a search are are often not suitable for this. For a search for scientific results for example it makes no sense to search with a product search engine.", "faq.4.b" => "If we do not query a search engine which we did query before, then this has technical or \"political\" reasons.",
"faq.4.h" => "Why don't you metacrawl search engine XY anymore?", "faq.5.h" => "One search engine does not answer anymore",
"faq.4.b" => "If we do not query a search engine which we did query before, then this has technical or \"political\" reasons.", "faq.5.b" => "If you observe this it is probably a technical fault. Please email us in that case: <a href=\"mailto:office@suma-ev.de\">office@suma-ev.de</a>",
"faq.5.h" => "One search engine does not answer anymore", "faq.6.h" => "Inappropriate Content",
"faq.5.b" => "If you observe this it is probably a technical fault. Please email us in that case: <a href=\"mailto:office@suma-ev.de\">office@suma-ev.de</a>", "faq.6.b.1" => "I found results with illegal content.",
"faq.6.h" => "Inappropriate Content", "faq.6.b.2" => "If some content (found by MetaGer) seems to be illegal, please email us to <a href=\"mailto:jugendschutz@metager.de\" target=\"_blank\" rel=\"noopener\">jugendschutz@metager.de</a>.",
"faq.6.b.1" => "I found results with illegal content.", "faq.7.h" => "Is it possible to integrate MetaGer into my own website?",
"faq.6.b.2" => "If some content (found by MetaGer) seems to be illegal, please email us to <a href=\"mailto:jugendschutz@metager.de\" target=\"_blank\" rel=\"noopener\">jugendschutz@metager.de</a>.", "faq.7.b" => "No problem! We have a <a href=\"/en/widget\" target=_blank>widget</a> that you can use free of charge.",
"faq.7.h" => "Is it possible to integrate MetaGer into my own website?", "faq.8.h" => "How can I register my homepage on MetaGer?",
"faq.7.b" => "No problem! We have a <a href=\"/en/widget\" target=_blank>widget</a> that you can use free of charge.", "faq.8.b" => "You can't. MetaGer is a metasearch engine. If you want to propagate your website, you have to register at all the other search engines for that purpose.",
"faq.8.h" => "How can I register my homepage on MetaGer?", "faq.9.h" => "How does the MetaGer ranking work?",
"faq.8.b" => "You can't. MetaGer is a metasearch engine. If you want to propagate your website, you have to register at all the other search engines for that purpose.", "faq.9.b" => "You can check <a href=\"https://gitlab.metager3.de/open-source/MetaGer\" target=_blank>our source code</a> to find out.",
"faq.9.h" => "How does the MetaGer ranking work?", "faq.10.h" => "I can't use MetaGer with my browser X and operating system Y. I need help!",
"faq.9.b" => "You can check <a href=\"https://gitlab.metager3.de/open-source/MetaGer\" target=_blank>our source code</a> to find out.",
"faq.10.h" => "I can't use MetaGer with my browser X and operating system Y. I need help!",
"faq.10.b" => "Please try first to install the newest available plugin. Just use the link below the searchfield, it has an automatic browserdetection. If it is still not working, please let us know: <a href=\"mailto:office@suma-ev.de\" target=\"_blank\" rel=\"noopener\">office@suma-ev.de</a>", "faq.10.b" => "Please try first to install the newest available plugin. Just use the link below the searchfield, it has an automatic browserdetection. If it is still not working, please let us know: <a href=\"mailto:office@suma-ev.de\" target=\"_blank\" rel=\"noopener\">office@suma-ev.de</a>",
"faq.11.h" => "Where did you get all these nice sayings?", "faq.11.h" => "Where did you get all these nice sayings?",
"faq.11.b" => "We find some in the web but we've got the most of them from Alexander Hammer. We don't provide them in english....", "faq.11.b" => "We find some in the web but we've got the most of them from Alexander Hammer. We don't provide them in english....",
"faq.12.h" => "How can I delete the search suggestions?", "faq.12.h" => "How can I delete the search suggestions?",
"faq.12.b" => "This is provided by your webbrowser. Try to customize the history settings.", "faq.12.b" => "This is provided by your webbrowser. Try to customize the history settings.",
"faq.13.h" => "What is about the privacy and how long / what do you store?", "faq.13.h" => "What is about the privacy and how long / what do you store?",
"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.15.h" => "How was MetaGer started, what is the story behind MetaGer?", "faq.13.b.4" => "Please use the Tor-network or the MetaGer Tor-branch for advanced anonymization. Please click \"Tools\" for further information.",
"faq.17.h" => "How to add MetaGer as a standard search engine (using the plugin)", "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.17.b.1" => "A short instruction how to add the metager plugin to your webbrowser (includes deinstallation if necessary):", "faq.15.h" => "How was MetaGer started, what is the story behind MetaGer?",
"faq.17.b.2" => "<b>For the Firefox webbrowser:</b>", "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.17.b.3" => "1. Please choose \"Edit/preferences\" from the menu and", "faq.16.h" => "Is it allowed to hyperlink MetaGer ?",
"faq.17.b.4" => "2. pick \"Search\".", "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.b.5" => "3. If there is an entry \"MetaGer\" in the below list then", "faq.17.h" => "How to add MetaGer as a standard search engine (using the plugin)",
"faq.17.b.6" => "4. select this entry and", "faq.17.b.1" => "A short instruction how to add the metager plugin to your webbrowser (includes deinstallation if necessary):",
"faq.17.b.7" => "5. click \"Remove\" on the right side below the list.", "faq.17.b.2" => "<b>For the Firefox webbrowser:</b>",
"faq.17.b.8" => "6. Open the MetaGer startpage (https://metager.de/en) and", "faq.17.b.3" => "1. Please choose \"Edit/preferences\" from the menu and",
"faq.17.b.9" => "7. click \"Add the MetaGer-Plugin\" below the searchfield. Please follow the given advices.", "faq.17.b.4" => "2. pick \"Search\".",
"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.5" => "3. If there is an entry \"MetaGer\" in the below list then",
"faq.17.b.6" => "4. select this entry and",
"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.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."
]; ];
...@@ -9,11 +9,32 @@ ...@@ -9,11 +9,32 @@
@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>
<div>{!! $mq['descr'] !!}</div> <details>
@if( isset($mq['gefVon']) ) <summary>
<div class="pull-right">{!! $mq['gefVon'] !!}</div> <div class="media">
@endif @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>
@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']) )
<div class="pull-right">{!! $mq['gefVon'] !!}</div>
@endif
</div> </div>
@endforeach @endforeach
</body> </body>
......
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