Commit 619e5401 authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Merge branch 'development' into 816-mobile-ansicht-optimieren

parents 1e3db193 68464a40
<?php
namespace App\Http\Controllers;
use File;
use Illuminate\Http\Request;
use PiwikTracker;
use Response;
class ImageController extends Controller
{
public function generateImage(Request $request)
{
/*
#Piwik Code
PiwikTracker::$URL = 'http://piwik.metager3.de';
$piwikTracker = new PiwikTracker($idSite = 1);
// Cookies ausschalten
$piwikTracker->disableCookieSupport();
$piwikTracker->deleteCookies();
$site = $request->input('site', '/');
// Sendet Tracker request per http
$piwikTracker->doTrackPageView($site);
*/
$path = public_path() . '/img/1px.png';
$fileType = File::type($path);
$response = Response::make(File::get($path), 200);
$response->header('Content-Type', $fileType);
return $response;
}
}
...@@ -256,7 +256,9 @@ class MetaGer ...@@ -256,7 +256,9 @@ class MetaGer
$this->results = $newResults; $this->results = $newResults;
#Adgoal Implementation #Adgoal Implementation
$this->results = $this->parseAdgoal($this->results); if (!$this->apiAuthorized) {
$this->results = $this->parseAdgoal($this->results);
}
# Human Verification # Human Verification
$this->results = $this->humanVerification($this->results); $this->results = $this->humanVerification($this->results);
...@@ -1371,12 +1373,10 @@ class MetaGer ...@@ -1371,12 +1373,10 @@ class MetaGer
IP-Adress older than one day stored on our servers. (Except the ones who got banned in that short period of course) ;-) IP-Adress older than one day stored on our servers. (Except the ones who got banned in that short period of course) ;-)
*/ */
$logEntry .= " ip=" . $this->request->ip(); $logEntry .= " ip=" . $this->request->ip();
$logEntry .= " pid=" . getmypid();
$logEntry .= " ref=" . $this->request->header('Referer'); $logEntry .= " ref=" . $this->request->header('Referer');
$logEntry .= " time=" . round((microtime(true) - $this->starttime), 2) . " serv=" . $this->fokus; $logEntry .= " time=" . round((microtime(true) - $this->starttime), 2) . " serv=" . $this->fokus;
$logEntry .= " interface=" . LaravelLocalization::getCurrentLocale(); $logEntry .= " interface=" . LaravelLocalization::getCurrentLocale();
$logEntry .= " sprachfilter=" . $this->lang; $logEntry .= " sprachfilter=" . $this->lang;
$logEntry .= " search=" . $this->eingabe;
# 2 Arten von Logs in einem wird die Anzahl der Abfragen an eine Suchmaschine gespeichert und in der anderen # 2 Arten von Logs in einem wird die Anzahl der Abfragen an eine Suchmaschine gespeichert und in der anderen
# die Anzahl, wie häufig diese Ergebnisse geliefert hat. # die Anzahl, wie häufig diese Ergebnisse geliefert hat.
......
{ {
"name": "laravel/laravel", "name": "laravel/laravel",
"description": "The Laravel Framework.", "description": "The Laravel Framework.",
"keywords": ["framework", "laravel"], "keywords": [
"framework",
"laravel"
],
"license": "MIT", "license": "MIT",
"type": "project", "type": "project",
"require": { "require": {
...@@ -13,7 +16,6 @@ ...@@ -13,7 +16,6 @@
"laravelcollective/html": "^5.2.0", "laravelcollective/html": "^5.2.0",
"mcamara/laravel-localization": "^1.1", "mcamara/laravel-localization": "^1.1",
"mews/captcha": "^2.2", "mews/captcha": "^2.2",
"piwik/piwik-php-tracker": "^1.0",
"predis/predis": "^1.1" "predis/predis": "^1.1"
}, },
"require-dev": { "require-dev": {
...@@ -40,8 +42,7 @@ ...@@ -40,8 +42,7 @@
}, },
"extra": { "extra": {
"laravel": { "laravel": {
"dont-discover": [ "dont-discover": []
]
} }
}, },
"scripts": { "scripts": {
...@@ -61,4 +62,4 @@ ...@@ -61,4 +62,4 @@
"sort-packages": true, "sort-packages": true,
"optimize-autoloader": true "optimize-autoloader": true
} }
} }
\ No newline at end of file
...@@ -4300,7 +4300,8 @@ ...@@ -4300,7 +4300,8 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.1.1", "version": "1.1.1",
...@@ -4375,6 +4376,7 @@ ...@@ -4375,6 +4376,7 @@
"version": "2.10.1", "version": "2.10.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"hoek": "2.x.x" "hoek": "2.x.x"
} }
...@@ -4544,6 +4546,7 @@ ...@@ -4544,6 +4546,7 @@
"version": "1.0.11", "version": "1.0.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
"inherits": "~2.0.0", "inherits": "~2.0.0",
...@@ -4611,7 +4614,8 @@ ...@@ -4611,7 +4614,8 @@
"graceful-fs": { "graceful-fs": {
"version": "4.1.11", "version": "4.1.11",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"har-schema": { "har-schema": {
"version": "1.0.5", "version": "1.0.5",
...@@ -4798,12 +4802,14 @@ ...@@ -4798,12 +4802,14 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"mkdirp": { "mkdirp": {
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -5093,6 +5099,7 @@ ...@@ -5093,6 +5099,7 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
......
...@@ -16,7 +16,7 @@ $(document).ready(function () { ...@@ -16,7 +16,7 @@ $(document).ready(function () {
var search = getMetaTag('q') || ''; var search = getMetaTag('q') || '';
var locale = getMetaTag('l') || 'de'; var locale = getMetaTag('l') || 'de';
// loadQuicktips(search, locale, sprueche) // load the quicktips // loadQuicktips(search, locale, sprueche) // load the quicktips
}); });
/* /*
...@@ -25,11 +25,11 @@ function readLocaleFromUrl (defaultLocale) { ...@@ -25,11 +25,11 @@ function readLocaleFromUrl (defaultLocale) {
} }
*/ */
function getURLParameter (name, defaultValue) { function getURLParameter(name, defaultValue) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || defaultValue; return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || defaultValue;
} }
function getMetaTag (name) { function getMetaTag(name) {
if (typeof $('meta[name="' + name + '"')[0] !== 'undefined') { if (typeof $('meta[name="' + name + '"')[0] !== 'undefined') {
return $('meta[name="' + name + '"')[0].content || null; return $('meta[name="' + name + '"')[0].content || null;
} else { } else {
...@@ -37,12 +37,12 @@ function getMetaTag (name) { ...@@ -37,12 +37,12 @@ function getMetaTag (name) {
} }
} }
function activateJSOnlyContent () { function activateJSOnlyContent() {
$('#searchplugin').removeClass('hide'); $('#searchplugin').removeClass('hide');
$('.js-only').removeClass('js-only'); $('.js-only').removeClass('js-only');
} }
function tabs () { function tabs() {
$('#foki > li.tab-selector > a').each(function () { $('#foki > li.tab-selector > a').each(function () {
if ($(this).attr('target') != '_blank') { if ($(this).attr('target') != '_blank') {
$(this).attr('href', '#' + $(this).attr('aria-controls')); $(this).attr('href', '#' + $(this).attr('aria-controls'));
...@@ -68,10 +68,9 @@ function tabs () { ...@@ -68,10 +68,9 @@ function tabs () {
$('#search-delete-btn').removeClass('hidden'); $('#search-delete-btn').removeClass('hidden');
} }
function getDocumentReadyForUse (fokus, custom) { function getDocumentReadyForUse(fokus, custom) {
if (typeof custom == 'undefined') custom = false; if (typeof custom == 'undefined') custom = false;
activateJSOnlyContent(); activateJSOnlyContent();
clickLog();
popovers(); popovers();
if (fokus === 'bilder') imageLoader(); if (fokus === 'bilder') imageLoader();
if (custom) initialLoadContent(fokus); if (custom) initialLoadContent(fokus);
...@@ -85,15 +84,15 @@ function getDocumentReadyForUse (fokus, custom) { ...@@ -85,15 +84,15 @@ function getDocumentReadyForUse (fokus, custom) {
addListeners(); addListeners();
} }
function addListeners () { function addListeners() {
$('#search-delete-btn').click(resetSearchbar); $('#search-delete-btn').click(resetSearchbar);
} }
function resetSearchbar () { function resetSearchbar() {
$('.search-input input').val('').focus(); $('.search-input input').val('').focus();
} }
function pluginInfo () { function pluginInfo() {
if (localStorage) { if (localStorage) {
if (localStorage.getItem('pluginInfo') == 'off') $('#searchplugin').css('display', 'none'); if (localStorage.getItem('pluginInfo') == 'off') $('#searchplugin').css('display', 'none');
$('#searchplugin').on('close.bs.alert', function () { $('#searchplugin').on('close.bs.alert', function () {
...@@ -106,7 +105,7 @@ function pluginInfo () { ...@@ -106,7 +105,7 @@ function pluginInfo () {
} }
} }
function theme () { function theme() {
if (localStorage) { if (localStorage) {
var theme = localStorage.getItem('theme'); var theme = localStorage.getItem('theme');
if (theme != null) { if (theme != null) {
...@@ -120,20 +119,7 @@ function theme () { ...@@ -120,20 +119,7 @@ function theme () {
} }
} }
function clickLog () { function botProtection() {
$('.result a.title, .result div.link-link a').off();
$('.result a.title, .result div.link-link a').click(function () {
$.get('/clickstats', {
i: $('meta[name=p]').attr('content'),
s: $(this).attr('data-hoster'),
q: $('meta[name=q]').attr('content'),
p: $(this).attr('data-count'),
url: $(this).attr('href')
});
});
}
function botProtection () {
$('.result').find('a').click(function () { $('.result').find('a').click(function () {
var link = $(this).attr('href'); var link = $(this).attr('href');
var newtab = false; var newtab = false;
...@@ -143,7 +129,7 @@ function botProtection () { ...@@ -143,7 +129,7 @@ function botProtection () {
$.ajax({ $.ajax({
url: '/img/cat.jpg', url: '/img/cat.jpg',
type: 'post', type: 'post',
data: { mm: $('meta[name=mm]').attr('content')}, data: { mm: $('meta[name=mm]').attr('content') },
timeout: 2000 timeout: 2000
}) })
.always(function () { .always(function () {
...@@ -157,7 +143,7 @@ function botProtection () { ...@@ -157,7 +143,7 @@ function botProtection () {
}); });
} }
function popovers () { function popovers() {
$('[data-toggle=popover]').each(function (e) { $('[data-toggle=popover]').each(function (e) {
$(this).popover({ $(this).popover({
// html : true, // html : true,
...@@ -167,14 +153,14 @@ function popovers () { ...@@ -167,14 +153,14 @@ function popovers () {
}); });
} }
function pagination () { function pagination() {
$('.pagination li:not(.active) > a').attr('href', '#'); $('.pagination li:not(.active) > a').attr('href', '#');
$('.pagination li.disabled > a').removeAttr('href'); $('.pagination li.disabled > a').removeAttr('href');
$('.pagination li:not(.active) > a').off(); $('.pagination li:not(.active) > a').off();
$('.pagination li:not(.active) > a').click(paginationHandler); $('.pagination li:not(.active) > a').click(paginationHandler);
} }
function paginationHandler () { function paginationHandler() {
var link = $(this).attr('data-href'); var link = $(this).attr('data-href');
if (link.length == 0) { if (link.length == 0) {
return; return;
...@@ -191,7 +177,7 @@ function paginationHandler () { ...@@ -191,7 +177,7 @@ function paginationHandler () {
}); });
} }
function imageLoader () { function imageLoader() {
if (typeof $('#container').masonry == 'undefined') { if (typeof $('#container').masonry == 'undefined') {
return; return;
} }
...@@ -206,7 +192,7 @@ function imageLoader () { ...@@ -206,7 +192,7 @@ function imageLoader () {
}); });
} }
function eliminateHost (host) { function eliminateHost(host) {
$('.result:not(.ad)').each(function (e) { $('.result:not(.ad)').each(function (e) {
var host2 = $(this).find('.link-link > a').attr('data-host'); var host2 = $(this).find('.link-link > a').attr('data-host');
if (host2.indexOf(host) === 0) { if (host2.indexOf(host) === 0) {
...@@ -215,7 +201,7 @@ function eliminateHost (host) { ...@@ -215,7 +201,7 @@ function eliminateHost (host) {
}); });
} }
function fokiChanger () { function fokiChanger() {
$('#fokiChanger ul > li').click(function () { $('#fokiChanger ul > li').click(function () {
document.location.href = $(this).attr('data-href'); document.location.href = $(this).attr('data-href');
}); });
...@@ -291,7 +277,7 @@ function fokiChanger () { ...@@ -291,7 +277,7 @@ function fokiChanger () {
/** /**
* Loads the content for a given fokus * Loads the content for a given fokus
*/ */
function initialLoadContent (fokus) { function initialLoadContent(fokus) {
var link = $('#' + fokus + 'TabSelector a').attr('data-href'); var link = $('#' + fokus + 'TabSelector a').attr('data-href');
$.get(link, function (data) { $.get(link, function (data) {
$('#' + fokus).html(data); $('#' + fokus).html(data);
......
...@@ -246,11 +246,11 @@ summary { ...@@ -246,11 +246,11 @@ summary {
.inlink { .inlink {
&:after { &:after {
display: inline-block; display: inline-block;
font: normal normal normal 14px/1 FontAwesome; font: normal normal normal 14px/1 'Font Awesome 5 Free';
font-size: inherit; font-size: inherit;
text-rendering: auto; text-rendering: auto;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
content: "\f08e"; content: "\f35d";
} }
} }
...@@ -258,11 +258,11 @@ summary { ...@@ -258,11 +258,11 @@ summary {
.outlink { .outlink {
&:after { &:after {
display: inline-block; display: inline-block;
font: normal normal normal 14px/1 FontAwesome; font: normal normal normal 14px/1 'Font Awesome 5 Free';
font-size: inherit; font-size: inherit;
text-rendering: auto; text-rendering: auto;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
content: "\f08e"; content: "\f35d";
} }
} }
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
p { p {
text-align: justify; text-align: justify;
font-style: italic; font-style: italic;
quotes: '„' ''; quotes: '„' '';
&:before { &:before {
content: open-quote; content: open-quote;
} }
......
...@@ -124,6 +124,9 @@ body { ...@@ -124,6 +124,9 @@ body {
.alert ul { .alert ul {
list-style-type: none; list-style-type: none;
padding-left: 49px; padding-left: 49px;
@media (max-width: @screen-xs-max) {
padding-left: 0px;
}
} }
.fa.fa-twitter { .fa.fa-twitter {
......
...@@ -7,10 +7,13 @@ ...@@ -7,10 +7,13 @@
.result { .result {
.card; .card;
margin: @resultpage-leftbox-min-dist-top-bottom 0px @resultpage-leftbox-min-dist-top-bottom 0px; margin: @resultpage-leftbox-min-dist-top-bottom 0px @resultpage-leftbox-min-dist-top-bottom 0px;
padding: 15px; padding: 8px 15px 5px 15px;
width: 100%; width: 100%;
.result-header { .result-header {
display: flex;
flex-wrap: wrap;
.result-headline { .result-headline {
width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.result-title { .result-title {
...@@ -43,26 +46,42 @@ ...@@ -43,26 +46,42 @@
white-space: nowrap; white-space: nowrap;
} }
} }
.result-link { .result-subheadline {
.overflow-ellipsis; width: 100%;
display: block; display: flex;
font-size: @result-font-small; .result-link {
width: fit-content; .overflow-ellipsis;
max-width: 100%; display: block;
&, font-size: @result-font-small;
&:active, width: fit-content;
&:hover, max-width: 100%;
&:focus, &,
&:visited { &:active,
font-size: @result-font-url; &:hover,
text-decoration: none; &:focus,
&:visited {
font-size: @result-font-url;
text-decoration: none;
}
span.advertisement-mark {
background-color: #0d9c0d;
color: white;
padding: 3px;
border-radius: 4px;
font-weight: bold;
font-size: 10px;
margin-right: 10px;
}
} }
span.advertisement-mark { span.partnershop-info {
background-color: #0d9c0d; background-color: white;
color: white; color: #333;
padding: 3px; text-shadow: none;
font-weight: inherit;