diff --git a/.gitignore b/.gitignore index 31ef0b58ceb1b067d07a9830007a1008239b977f..a43552418fdae52a0a64d542f70739c8d9719e26 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ langfiles.zip /public/js/utility.js **/*.map +/.buildpath +/.project diff --git a/.settings/.gitignore b/.settings/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..f0f7c9f22d715ac10ca5a978ec67434a7183af5d --- /dev/null +++ b/.settings/.gitignore @@ -0,0 +1,2 @@ +/org.eclipse.core.resources.prefs +/org.eclipse.wst.validation.prefs diff --git a/app/Http/Controllers/MetaGerSearch.php b/app/Http/Controllers/MetaGerSearch.php index fa10a798568806bdf3aaf63fe0eb6f206bc75d49..df3a682e68532bada8d505ac3d0568685b749ab7 100644 --- a/app/Http/Controllers/MetaGerSearch.php +++ b/app/Http/Controllers/MetaGerSearch.php @@ -51,222 +51,6 @@ class MetaGerSearch extends Controller ->with('r', $redirect); } - public function quicktips(Request $request, MetaGer $metager) - { - $q = $request->input('q', ''); - $mquicktips = []; - $quicktips = []; - $spruch = ""; - - # DuckDuckGo-!bangs - try { - $placeholder = "0X0plchldr0X0"; - $searchWords = explode(" ", $q); - $dummyQuery = ""; - $realQuery = ""; - foreach ($searchWords as $index => $word) { - if ($word[0] === "!") { - $dummyQuery .= $word . " "; - } else { - $realQuery .= $word . " "; - } - } - $realQuery = rtrim($realQuery); - - if ($dummyQuery !== "") { - $dummyQuery .= $placeholder; - $url = "https://api.duckduckgo.com/?format=json&no_redirect=1&t=MetaGerDE&q=" . urlencode($dummyQuery); - - $result = json_decode($this->get($url), true); - - if (isset($result["Redirect"])) { - $bang = []; - $bang["title"] = trans('metaGerSearch.quicktips.bang.title'); - $bang["URL"] = str_replace($placeholder, urlencode(trim($realQuery)), $result["Redirect"]); - $bang["summary"] = '' . trans('metaGerSearch.quicktips.bang.buttonlabel') . " " . parse_url($bang["URL"], PHP_URL_HOST) . '…'; - $bang["gefVon"] = trans('metaGerSearch.quicktips.bang.from') . " DuckDuckGo"; - $mquicktips[] = $bang; - } - - } - } catch (\ErrorException $e) { - } - - if (APP::getLocale() === "de") { - # Spruch - $spruecheFile = storage_path() . "/app/public/sprueche.txt"; - if (file_exists($spruecheFile) && $request->has('sprueche')) { - $sprueche = file($spruecheFile); - $spruch = $sprueche[array_rand($sprueche)]; - } else { - $spruch = ""; - } - - # manuelle Quicktips: - $file = storage_path() . "/app/public/qtdata.csv"; - - if (file_exists($file) && $q !== '') { - $file = fopen($file, 'r'); - while (($line = fgetcsv($file)) !== false) { - $words = array_slice($line, 3); - $isIn = false; - foreach ($words as $word) { - $word = strtolower($word); - if (strpos($q, $word) !== false) { - $isIn = true; - break; - } - } - if ($isIn === true) { - $quicktip = array('QT_Type' => "MQT"); - $quicktip["URL"] = $line[0]; - $quicktip["title"] = $line[1]; - $quicktip["summary"] = $line[2]; - $mquicktips[] = $quicktip; - } - } - fclose($file); - } - - # Wetter - /* Derzeit Deaktiviert, da bei unseren Abfragezahlen nicht kostenlos */ - /* - try { - $url = "http://api.openweathermap.org/data/2.5/weather?type=accurate&units=metric&lang=" . APP::getLocale() . "&q=" . urlencode($q) . "&APPID=" . getenv("openweathermap"); - - $result = json_decode($this->get($url), true); - - $searchWords = explode(' ', $q); - $within = false; - foreach ($searchWords as $word) { - if (stripos($result["name"], $word) !== false) { - $within = true; - } - } - if ($within) { - $weather = []; - $weather["title"] = "Wetter in " . $result["name"]; - $weather["URL"] = "http://openweathermap.org/city/" . $result["id"]; - - $summary = '' . $result["main"]["temp"] . " °C, " . $result["weather"][0]["description"] . ""; - $details = '
Temperatur | ' . $result["main"]["temp_min"] . " bis " . $result["main"]["temp_max"] . " °C |
Druck | " . $result["main"]["pressure"] . " hPa |
Luftfeuchtigkeit | " . $result["main"]["humidity"] . " % |
Wind | " . $result["wind"]["speed"] . " m/s, " . $result["wind"]["deg"] . "° |
Bewölkung | " . $result["clouds"]["all"] . " % |
' . $decodedResponse[1][$i] . ' |
' + quicktip.summary + '
'); + mainElem.append(summaryElem); + quicktip.details.forEach(function (detail) { + var detailElem = $('' + detail.text + '
'); + mainElem.append(detailElem); + }); + } else { + mainElem = $('' + quicktip.summary + '
'); + } + var quicktipDiv = $('SUMMARY + *
DETAILSUMMARY
+ * GEFVON
+ *
+ */
+
+@keyframes quicktip-extender-turn {
+ from {
+ transform: rotate(0deg);
+ }
+ to {
+ transform: rotate(180deg);
+ }
+}
+
+#quicktips {
+ display: flex;
+ flex-direction: column;
+ details[open=""] .quicktip-extender {
+ animation-name: quicktip-extender-turn;
+ animation-fill-mode: forwards;
+ }
+ .quicktip {
+ margin: 10px 0px;
+ padding-left: 10px;
+ border-left: 3px solid #fb0;
+ details:not([open=""]) {
+ .quicktip-summary p {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+ .quicktip-summary {
+ h1 {
+ font-size: 16px;
+ font-weight: bold;
+ display: flex;
+ justify-content: space-between;
+ .quicktip-extender {
+ margin-left: 10px;
+ color: #777;
+ font-size: 20px;
+ }
+ }
+ }
+ .quicktip-detail {
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ h2 {
+ margin: 10px 0px;
+ font-size: 14px;
+ font-weight: bold;
+ }
+ p {
+ display: none;
+ font-size: 12px;
+ }
+ }
+ .gefVon {
+ float: right;
+ font-size: 14px;
+ }
+ &[type=spruch] {
+ border-left: 3px solid #070;
+ p {
+ color: #070;
+ .author {
+ color: #404040;
+ font-style: italic;
+ }
+ }
+ }
+ &[type=spendenaufruf] {
+ border-left: #ddd;
+ color: #ff8000;
+ .quicktip-summary {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ h1 {
+ margin: 0px;
+ }
+ p {
+ margin: 5px;
+ .spendenaufruf-btn {
+ color: white;
+ background-color: #ff8000;
+ font-size: 16px;
+ }
+ }
+ }
+ }
+ &[type=dictCC] {
+ .quicktip-summary {
+ p {
+ font-weight: bold;
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/resources/assets/less/metager/static-pages.less b/resources/assets/less/metager/static-pages.less
index 00ced814d2b502aa91edc9e9bf25eb2eb96cae5b..be6c1889a9f220034987d3a3cb146b3133bc2804 100644
--- a/resources/assets/less/metager/static-pages.less
+++ b/resources/assets/less/metager/static-pages.less
@@ -413,24 +413,6 @@ textarea#message {
margin-bottom: 5px;
}
-.quicktip {
- margin-bottom: 15px;
- padding: 10px;
- line-height: 1.2 !important;
- font-family: Georgia, "Times New Roman", Palatino, Times, serif;
- color: @quicktip-color;
- border-left: 3px solid @quicktip-border-left-color;
- font-size: 14px;
- h1 {
- font-size: 22px;
- margin-top: 0px;
- }
- &.aufruf {
- color: @quicktip-aufruf-color;
- border-left: 3px solid @quicktip-aufruf-border-left-color;
- }
-}
-
.wikiqtextract {
font-family: Georgia, "Times New Roman", Palatino, Times, serif;
}
diff --git a/resources/lang/de/settings.php b/resources/lang/de/settings.php
index 620046d3dbf0477a084456b1235303bde91fd410..467168e614b9b7bec2681e2761c400d92f4fc24d 100644
--- a/resources/lang/de/settings.php
+++ b/resources/lang/de/settings.php
@@ -7,9 +7,6 @@ return [
"quotes.label" => "Sprüche",
"quotes.on" => "anzeigen",
"quotes.off" => "nicht anzeigen",
- "maps.label" => "Maps",
- "maps.on" => "anzeigen",
- "maps.off" => "nicht anzeigen",
"tab.label" => "Ergebnisse öffnen:",
"tab.new" => "In einem neuen Tab",
"tab.same" => "Im gleichen Tab",
diff --git a/resources/lang/en/languages.php b/resources/lang/en/languages.php
index b1bee6bcab2fb30d643bbc83158af73ef7c7c339..583d8564aae88c1ce8f414c0be18ee27cb99b329 100644
--- a/resources/lang/en/languages.php
+++ b/resources/lang/en/languages.php
@@ -8,5 +8,8 @@ return [
"hinweis.1" => "Please click \"Submit data\" when finished. You don't have to translate all items.",
"hinweis.2" => "Hint: You won't see your translations until we checked and inserted it. Save your work by setting a bookmark.",
"hinweis.3" => "Note: We publish the hole content of your work on aPublication. This is subject to a AGPL-v3-License. You agree with clicking the \"Submit data\" button.",
- "email" => "Email address for possible inquiries (optional):"
+ "email" => "Email address for possible inquiries (optional):",
+ "synoptic" => [
+ "hinweis" => "Last modified:"
+ ]
];
\ No newline at end of file
diff --git a/resources/views/layouts/atom10ad.blade.php b/resources/views/layouts/atom10ad.blade.php
new file mode 100644
index 0000000000000000000000000000000000000000..064403d6f324657e8dd296e632f057de729784e3
--- /dev/null
+++ b/resources/views/layouts/atom10ad.blade.php
@@ -0,0 +1,8 @@
+@if(isset($ad))
+