diff --git a/app/Http/Controllers/StartpageController.php b/app/Http/Controllers/StartpageController.php index 0d542d4383f3ec85235558f1079526019aaabda2..b144a13507e6512d5faa47a0adb7d1b85816331e 100644 --- a/app/Http/Controllers/StartpageController.php +++ b/app/Http/Controllers/StartpageController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use App\Http\Controllers\Controller; +use Illuminate\Http\Request; class StartpageController extends Controller { @@ -12,12 +13,35 @@ class StartpageController extends Controller * @param int $id * @return Response */ - public function loadStartPage($locale = "de") + /* public function loadStartPage($locale = "de") { \App::setLocale($locale); return view('index', [ 'title' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen', 'homeIcon']); + } */ + + public function loadStartPage(Request $request) + { + $focusPages = []; + foreach($request->all() as $key => $value) + { + if($value === 'on' && $key != 'param_sprueche' && $key != 'param_tab') + { + $focusPages[] = str_replace('param_', '', $key); + } + } + + return view('index') + ->with('title', trans('titles.index')) + ->with('homeIcon') + ->with('focus', $request->input('focus', 'web')) + ->with('lang', $request->input('param_lang', 'all')) + ->with('resultCount', $request->input('param_resultCount', '20')) + ->with('time', $request->input('param_time', '1000')) + ->with('sprueche', $request->input('param_sprueche', 'off')) + ->with('tab', $request->input('param_sprueche', 'off')) + ->with('focusPages', $focusPages); } public function loadPage($subpage) diff --git a/app/Http/routes.php b/app/Http/routes.php index 5c5dd08cc3d20ae4aad471a517e7e29eeec43d44..68ee0bb09d5a75e335ad2502b0e2dad4930c5e5a 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -14,12 +14,14 @@ Route::group(['prefix' => LaravelLocalization::setLocale()], function() { /** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/ - Route::get('/', function() + /* Route::get('/', function() { return view('index', [ 'title' => trans('titles.index'), 'homeIcon']); - }); + }); */ + + Route::get('/', 'StartpageController@loadStartPage'); Route::get('impressum', function() { @@ -84,7 +86,16 @@ ->with('title', trans('titles.widget')) ->with('css', 'widget.css'); }); + + Route::get('settings', function() + { + return view('settings') + ->with('title', 'Einstellungen') // TODO Titel übersetzen + ->with('css', 'settings.css') + ->with('js', ['settings.js']); + }); + Route::get('meta/meta.ger3', 'MetaGerSearch@search'); Route::get('qt', 'MetaGerSearch@quicktips'); diff --git a/bootstrap/app.php b/bootstrap/app.php old mode 100644 new mode 100755 diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php old mode 100644 new mode 100755 diff --git a/composer.lock b/composer.lock index 99bfbf1cc425a476c699a79f78358847c64829dc..7e53158a6d83da1206b6970c93e6fa53ade4aae4 100644 --- a/composer.lock +++ b/composer.lock @@ -587,16 +587,16 @@ }, { "name": "laravel/framework", - "version": "v5.2.35", + "version": "v5.2.36", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "d2b6b0fe32fab610d356c22e74a6ffd101b0f513" + "reference": "236d7c0c5b67a2348ac7831391031d93000de3ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/d2b6b0fe32fab610d356c22e74a6ffd101b0f513", - "reference": "d2b6b0fe32fab610d356c22e74a6ffd101b0f513", + "url": "https://api.github.com/repos/laravel/framework/zipball/236d7c0c5b67a2348ac7831391031d93000de3ab", + "reference": "236d7c0c5b67a2348ac7831391031d93000de3ab", "shasum": "" }, "require": { @@ -712,20 +712,20 @@ "framework", "laravel" ], - "time": "2016-05-30 17:42:01" + "time": "2016-06-06 15:18:48" }, { "name": "league/flysystem", - "version": "1.0.22", + "version": "1.0.24", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "bd73a91703969a2d20ab4bfbf971d6c2cbe36612" + "reference": "9aca859a303fdca30370f42b8c611d9cf0dedf4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/bd73a91703969a2d20ab4bfbf971d6c2cbe36612", - "reference": "bd73a91703969a2d20ab4bfbf971d6c2cbe36612", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9aca859a303fdca30370f42b8c611d9cf0dedf4b", + "reference": "9aca859a303fdca30370f42b8c611d9cf0dedf4b", "shasum": "" }, "require": { @@ -795,7 +795,7 @@ "sftp", "storage" ], - "time": "2016-04-28 06:53:12" + "time": "2016-06-03 19:11:39" }, { "name": "mcamara/laravel-localization", @@ -1381,16 +1381,16 @@ }, { "name": "symfony/console", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "34a214710e0714b6efcf40ba3cd1e31373a97820" + "reference": "382fc9ed852edabd6133e34f8549d7a7d99db115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/34a214710e0714b6efcf40ba3cd1e31373a97820", - "reference": "34a214710e0714b6efcf40ba3cd1e31373a97820", + "url": "https://api.github.com/repos/symfony/console/zipball/382fc9ed852edabd6133e34f8549d7a7d99db115", + "reference": "382fc9ed852edabd6133e34f8549d7a7d99db115", "shasum": "" }, "require": { @@ -1437,20 +1437,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-04-28 09:48:42" + "time": "2016-06-06 15:08:35" }, { "name": "symfony/debug", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "a06d10888a45afd97534506afb058ec38d9ba35b" + "reference": "e67e1552dd7313df1cf6535cb606751899e0e727" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/a06d10888a45afd97534506afb058ec38d9ba35b", - "reference": "a06d10888a45afd97534506afb058ec38d9ba35b", + "url": "https://api.github.com/repos/symfony/debug/zipball/e67e1552dd7313df1cf6535cb606751899e0e727", + "reference": "e67e1552dd7313df1cf6535cb606751899e0e727", "shasum": "" }, "require": { @@ -1494,7 +1494,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2016-03-30 10:41:14" + "time": "2016-06-06 15:08:35" }, { "name": "symfony/event-dispatcher", @@ -1558,16 +1558,16 @@ }, { "name": "symfony/finder", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "c54e407b35bc098916704e9fd090da21da4c4f52" + "reference": "39e5f3d533d07b5416b9d7aad53a27f939d4f811" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/c54e407b35bc098916704e9fd090da21da4c4f52", - "reference": "c54e407b35bc098916704e9fd090da21da4c4f52", + "url": "https://api.github.com/repos/symfony/finder/zipball/39e5f3d533d07b5416b9d7aad53a27f939d4f811", + "reference": "39e5f3d533d07b5416b9d7aad53a27f939d4f811", "shasum": "" }, "require": { @@ -1603,20 +1603,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-03-10 11:13:05" + "time": "2016-05-13 18:03:36" }, { "name": "symfony/http-foundation", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "18b24bc32d2495ae79d76e777368786a6536fe31" + "reference": "d268a643884f85e91d6ba11ca68de96833f3f6e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/18b24bc32d2495ae79d76e777368786a6536fe31", - "reference": "18b24bc32d2495ae79d76e777368786a6536fe31", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d268a643884f85e91d6ba11ca68de96833f3f6e5", + "reference": "d268a643884f85e91d6ba11ca68de96833f3f6e5", "shasum": "" }, "require": { @@ -1656,20 +1656,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2016-04-12 18:09:53" + "time": "2016-06-06 11:33:26" }, { "name": "symfony/http-kernel", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "6a5010978edf0a9646342232531e53bfc7abbcd3" + "reference": "97cc1c15e3406e7a2adf14ad6b0e41a04d4a6fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6a5010978edf0a9646342232531e53bfc7abbcd3", - "reference": "6a5010978edf0a9646342232531e53bfc7abbcd3", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/97cc1c15e3406e7a2adf14ad6b0e41a04d4a6fc4", + "reference": "97cc1c15e3406e7a2adf14ad6b0e41a04d4a6fc4", "shasum": "" }, "require": { @@ -1738,7 +1738,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2016-05-09 22:13:13" + "time": "2016-06-06 16:52:35" }, { "name": "symfony/polyfill-mbstring", @@ -1909,16 +1909,16 @@ }, { "name": "symfony/process", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "53f9407c0bb1c5a79127db8f7bfe12f0f6f3dcdb" + "reference": "bf6e2d1fa8b93fdd7cca6b684c0ea213cf0255dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/53f9407c0bb1c5a79127db8f7bfe12f0f6f3dcdb", - "reference": "53f9407c0bb1c5a79127db8f7bfe12f0f6f3dcdb", + "url": "https://api.github.com/repos/symfony/process/zipball/bf6e2d1fa8b93fdd7cca6b684c0ea213cf0255dd", + "reference": "bf6e2d1fa8b93fdd7cca6b684c0ea213cf0255dd", "shasum": "" }, "require": { @@ -1954,20 +1954,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-04-14 15:30:28" + "time": "2016-06-06 11:33:26" }, { "name": "symfony/routing", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "a6cd168310066176599442aa21f5da86c3f8e0b3" + "reference": "c780454838a1131adc756d737a4b4cc1d18f8c64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/a6cd168310066176599442aa21f5da86c3f8e0b3", - "reference": "a6cd168310066176599442aa21f5da86c3f8e0b3", + "url": "https://api.github.com/repos/symfony/routing/zipball/c780454838a1131adc756d737a4b4cc1d18f8c64", + "reference": "c780454838a1131adc756d737a4b4cc1d18f8c64", "shasum": "" }, "require": { @@ -2029,20 +2029,20 @@ "uri", "url" ], - "time": "2016-05-03 12:23:49" + "time": "2016-05-30 06:58:27" }, { "name": "symfony/translation", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "f7a07af51ea067745a521dab1e3152044a2fb1f2" + "reference": "2b0aacaa613c0ec1ad8046f972d8abdcb19c1db7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/f7a07af51ea067745a521dab1e3152044a2fb1f2", - "reference": "f7a07af51ea067745a521dab1e3152044a2fb1f2", + "url": "https://api.github.com/repos/symfony/translation/zipball/2b0aacaa613c0ec1ad8046f972d8abdcb19c1db7", + "reference": "2b0aacaa613c0ec1ad8046f972d8abdcb19c1db7", "shasum": "" }, "require": { @@ -2093,20 +2093,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2016-03-25 01:41:20" + "time": "2016-06-06 11:33:26" }, { "name": "symfony/var-dumper", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "0e918c269093ba4c77fca14e9424fa74ed16f1a6" + "reference": "d8bb851da153d97abe7c2b71a65dee19f324bcf7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0e918c269093ba4c77fca14e9424fa74ed16f1a6", - "reference": "0e918c269093ba4c77fca14e9424fa74ed16f1a6", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d8bb851da153d97abe7c2b71a65dee19f324bcf7", + "reference": "d8bb851da153d97abe7c2b71a65dee19f324bcf7", "shasum": "" }, "require": { @@ -2156,7 +2156,7 @@ "debug", "dump" ], - "time": "2016-04-25 11:17:47" + "time": "2016-05-24 10:03:10" }, { "name": "vlucas/phpdotenv", @@ -2422,39 +2422,136 @@ ], "time": "2016-05-22 21:52:33" }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27 11:43:31" + }, { "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + "reference": "45ada3e3fd09789fbfbd6d65b3f0901f0030dc61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/45ada3e3fd09789fbfbd6d65b3f0901f0030dc61", + "reference": "45ada3e3fd09789fbfbd6d65b3f0901f0030dc61", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.1.5", + "webmozart/assert": "^1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2016-06-06 06:44:13" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.1.8", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9891754231e55d42f0d16988ffb799af39f31a12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9891754231e55d42f0d16988ffb799af39f31a12", + "reference": "9891754231e55d42f0d16988ffb799af39f31a12", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "phpDocumentor": [ + "psr-4": { + "phpDocumentor\\Reflection\\": [ "src/" ] } @@ -2466,39 +2563,39 @@ "authors": [ { "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" + "email": "me@mikevanriel.com" } ], - "time": "2015-02-03 12:10:50" + "time": "2016-03-28 10:02:29" }, { "name": "phpspec/prophecy", - "version": "v1.6.0", + "version": "v1.6.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972" + "reference": "58a8137754bc24b25740d4281399a4a3596058e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972", - "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1", - "sebastian/recursion-context": "~1.0" + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0" }, "require-dev": { - "phpspec/phpspec": "~2.0" + "phpspec/phpspec": "^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { @@ -2531,7 +2628,7 @@ "spy", "stub" ], - "time": "2016-02-15 07:46:21" + "time": "2016-06-07 08:13:47" }, { "name": "phpunit/php-code-coverage", @@ -3327,16 +3424,16 @@ }, { "name": "symfony/css-selector", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "65e764f404685f2dc20c057e889b3ad04b2e2db0" + "reference": "e8a66c51bf65f188c02f8120c0748b2291d3a2d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/65e764f404685f2dc20c057e889b3ad04b2e2db0", - "reference": "65e764f404685f2dc20c057e889b3ad04b2e2db0", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/e8a66c51bf65f188c02f8120c0748b2291d3a2d0", + "reference": "e8a66c51bf65f188c02f8120c0748b2291d3a2d0", "shasum": "" }, "require": { @@ -3376,11 +3473,11 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2016-03-04 07:55:57" + "time": "2016-06-06 11:33:26" }, { "name": "symfony/dom-crawler", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", @@ -3482,6 +3579,55 @@ "description": "Symfony Yaml Component", "homepage": "https://symfony.com", "time": "2016-05-26 21:46:24" + }, + { + "name": "webmozart/assert", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2015-08-24 13:29:44" } ], "aliases": [], diff --git a/config/.gitignore b/config/.gitignore old mode 100644 new mode 100755 diff --git a/config/app.php b/config/app.php old mode 100644 new mode 100755 diff --git a/config/auth.php b/config/auth.php old mode 100644 new mode 100755 diff --git a/config/broadcasting.php b/config/broadcasting.php old mode 100644 new mode 100755 diff --git a/config/cache.php b/config/cache.php old mode 100644 new mode 100755 diff --git a/config/compile.php b/config/compile.php old mode 100644 new mode 100755 diff --git a/config/database.php b/config/database.php old mode 100644 new mode 100755 diff --git a/config/filesystems.php b/config/filesystems.php old mode 100644 new mode 100755 diff --git a/config/laravellocalization.php b/config/laravellocalization.php old mode 100644 new mode 100755 diff --git a/config/mail.php b/config/mail.php old mode 100644 new mode 100755 diff --git a/config/queue.php b/config/queue.php old mode 100644 new mode 100755 diff --git a/config/services.php b/config/services.php old mode 100644 new mode 100755 diff --git a/config/session.php b/config/session.php old mode 100644 new mode 100755 diff --git a/config/trustedproxy.php b/config/trustedproxy.php old mode 100644 new mode 100755 diff --git a/config/view.php b/config/view.php old mode 100644 new mode 100755 diff --git a/public/css/settings.css b/public/css/settings.css new file mode 100644 index 0000000000000000000000000000000000000000..2b4e899346a087b9a87afdb0929334aee43e16cc --- /dev/null +++ b/public/css/settings.css @@ -0,0 +1,44 @@ +*{ + +} + +label.select-label { + margin-bottom: 0; + margin-top: 10px; +} + +select.form-control { + width: 200px; + margin-top: 10px; +} + +div.checkbox a.glyphicon { + margin-left: 5px; + font-size: 12px; +} + +a:hover { + cursor: pointer; +} + +.btn-danger { + margin-top: 25px; +} + +input.btn.btn-primary { + margin-top: 25px; + margin-right: 10px; +} + +h3 { + font-size: 20px; +} + +.checkbox { + margin-top: 5px; + margin-bottom: 5px; +} + +#lead { + white-space: pre-wrap; +} \ No newline at end of file diff --git a/public/js/settings.js b/public/js/settings.js new file mode 100644 index 0000000000000000000000000000000000000000..10ab643fd7316fb590d7623bcf55006b81c7da0f --- /dev/null +++ b/public/js/settings.js @@ -0,0 +1,69 @@ +$(document).ready(function(){ + // Wenn LocalStorage verfügbar ist, geben wir die Möglichkeit die Einstellungen dort zu speichern + tickOptions(); + if(localStorage){ + $("#save").removeClass("hidden"); + if(localStorage.getItem("pers")) + $("#reset").removeClass("hidden"); + $("#save").click(function(){ + resetOptions(); + localStorage.setItem("pers", true); + $("input[type=checkbox]:checked, input[type=hidden]").each(function(el){ + localStorage.setItem($(this).attr("name"), $(this).val()); + }); + $("select").each(function(el){ + localStorage.setItem($(this).attr("name"), $(this).val()); + }); + document.location.href="../"; + }); + $("#reset").click(function(){ + resetOptions(); + document.location.href="../"; + }); + } + $(".checker").click(function(){ + var selector = "." + $(this).attr("data-type"); + if($(selector+" input:checked").length){ + $(selector+" input").prop("checked", false); + }else{ + $(selector+" input").prop("checked", true); + } + }); + $("#unten").click(function(){ + alert("Auf der folgenden Startseite sind Ihre Einstellungen nun einmalig gespeichert. Nach Ihrer ersten Suche sind diese wieder verloren. Wenn Sie diese speichern möchten, können Sie sich allerdings ein Lesezeichnen einrichten."); + }); +}); + +function tickOptions(){ + if(localStorage && localStorage.getItem("pers")){ + for(var i = 0; i < localStorage.length; i++){ + var key = localStorage.key(i); + var value = localStorage.getItem(key); + if(key.startsWith("param_")){ + if($("input[name=" + key + "]").length){ + $("input[name=" + key + "]").attr("checked", ""); + }else{ + $("select[name="+key+"] > option[value="+value+"]").attr("selected", true); + } + + } + } + }else{ + $("div.web input").attr("checked", true); + } +} + +function resetOptions(){ + localStorage.removeItem("pers"); + var keys = []; + for(var i = 0; i < localStorage.length; i++){ + var key = localStorage.key(i) + keys.push(key); + } + for(var i = 0; i < keys.length; i++){ + var key = keys[i]; + if(key.startsWith("param_" || key.startsWith("focus"))){ + localStorage.removeItem(key); + } + } +} \ No newline at end of file diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index 89d2474f278d57283621303ea2fd9275519362c9..c635d123d8c24350a4b1aeff612e63ffb126ff2c 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -25,42 +25,42 @@ </h1> <figure> <fieldset id="foki"> - <input id="web" type="radio" name="focus" value="web" form="searchForm" checked required=""> + <input id="web" type="radio" name="focus" value="web" form="searchForm" @if ($focus === 'web') checked @endif required=""> <label id="web-label" for="web"> <span class="glyphicon glyphicon-globe"> </span> <span class="content">Web </span> </label> - <input id="bilder" type="radio" name="focus" value="bilder" form="searchForm" required=""> + <input id="bilder" type="radio" name="focus" value="bilder" form="searchForm" @if ($focus === 'bilder') checked @endif required=""> <label id="bilder-label" for="bilder"> <span class="glyphicon glyphicon-picture"> </span> <span class="content">{{ trans('index.foki.bilder') }} </span> </label> - <input id="nachrichten" type="radio" name="focus" value="nachrichten" form="searchForm" required=""> + <input id="nachrichten" type="radio" name="focus" value="nachrichten" form="searchForm" @if ($focus === 'nachrichten') checked @endif required=""> <label id="nachrichten-label" for="nachrichten"> <span class="glyphicon glyphicon-bullhorn"> </span> <span class="content">{{ trans('index.foki.nachrichten') }} </span> </label> - <input id="wissenschaft" type="radio" name="focus" value="wissenschaft" form="searchForm" required=""> + <input id="wissenschaft" type="radio" name="focus" value="wissenschaft" form="searchForm" @if ($focus === 'wissenschaft') checked @endif required=""> <label id="wissenschaft-label" for="wissenschaft"> <span class="glyphicon glyphicon-file"> </span> <span class="content">{{ trans('index.foki.wissenschaft') }} </span> </label> - <input id="produkte" type="radio" name="focus" value="produktsuche" form="searchForm" required=""> + <input id="produkte" type="radio" name="focus" value="produktsuche" form="searchForm" @if ($focus === 'produkte') checked @endif required=""> <label id="produkte-label" for="produkte"> <span class="glyphicon glyphicon-shopping-cart"> </span> <span class="content">{{ trans('index.foki.produkte') }} </span> </label> - <input id="angepasst" type="radio" name="focus" value="angepasst" form="searchForm" required=""> + <input id="angepasst" type="radio" name="focus" value="angepasst" form="searchForm" @if ($focus === 'angepasst') checked @endif required=""> <label id="anpassen-label" for="angepasst"> <span class="glyphicon glyphicon-cog"> </span> @@ -94,7 +94,16 @@ </div> <input type="text" name="eingabe" required="" autofocus="" class="form-control" placeholder="MetaGer: Sicher suchen & finden, Privatsphäre schützen"> <input type="hidden" name="encoding" value="utf8"> - <input type="hidden" name="lang" value="all"> + @if ($focus === 'angepasst') <input type="hidden" name="lang" value={{ $lang }} > + <input type="hidden" name="resultCount" value={{ $resultCount }} > + <input type="hidden" name="time" value={{ $time }} > + <input type="hidden" name="sprueche" value={{ $sprueche }} > + <input type="hidden" name="tab" value={{ $tab }} > + @foreach ($focusPages as $fp) + <input type="hidden" name={{ $fp }} value="on"> + @endforeach + @else <input type="hidden" name="lang" value="all"> + @endif <div class="input-group-addon"> <button type="submit"> <span class="glyphicon glyphicon-search"> diff --git a/resources/views/settings.blade.php b/resources/views/settings.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..e97de00646dfd3932d95623f9372953b6de9e734 --- /dev/null +++ b/resources/views/settings.blade.php @@ -0,0 +1,251 @@ +@extends('layouts.subPages') + +@section('title', $title ) + +@section('content') +<form action="/" method="get"> + <h1>Einstellungen</h1> + <p id="lead">Hier können Sie Ihr MetaGer anpassen: Nach Anklicken Ihrer gewünschten Einstellungen müssen Sie <a href="#unten">unten auf dieser Seite</a> wählen, ob Sie die Einstellungen dauerhaft speichern, oder nur einmalig setzen wollen.</p> + <h2>Allgemein</h2> + <input type="hidden" name="focus" value="angepasst"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_sprueche">Sprüche ausblenden</label></div> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_tab">Links im gleichen Tab öffnen</label></div> + <label class="select-label">Sprache auswählen:</label> + <select class="form-control" name="param_lang"> + <option value="all">Alle Sprachen</option> + <option value="de">Deutsch</option></select> + <label class="select-label">Anzahl der Ergebnisse pro Seite:</label> + <select class="form-control" name="param_resultCount"> + <option value="10">10</option> + <option value="20" selected>20</option> + <option value="50">50</option> + <option value="100">100</option> + <option value="0">Alle</option></select> + <label class="select-label">Maximale Suchzeit:</label> + <select class="form-control" name="param_time"> + <option value="1000" selected>1 Sekunde (Standard)</option> + <option value="2000">2 Sekunden</option> + <option value="5000">5 Sekunden</option> + <option value="10000">10 Sekunden</option> + <option value="20000">20 Sekunden</option></select> + <h2>Suchmaschinen</h2> + <div class="headingGroup web"> + <h3>Web-Suche: + <small><a data-type="web" class="checker"> (alle an-/abwählen)</a></small></h3> + <div class="row"> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_fastbot">Fastbot</label><a class="glyphicon glyphicon-link" target="_blank" href="https://www.fastbot.de/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_wikipedia">Wikipedia</label><a class="glyphicon glyphicon-link" target="_blank" href="https://de.wikipedia.org/wiki/Wikipedia:Hauptseite"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_witch">Witch</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.witch.de/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_dmoz">Dmoz</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.dmoz.de/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_overture">Yahoo</label><a class="glyphicon glyphicon-link" target="_blank" href="https://de.yahoo.com/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_yacy">YaCy</label><a class="glyphicon glyphicon-link" target="_blank" href="http://yacy.de/de/index.html"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_nebel">Netluchs</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.netluchs.de/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_exalead">Exalead</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.exalead.com/search/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_BASE">BASE</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.base-search.net/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_yandex">Yandex</label><a class="glyphicon glyphicon-link" target="_blank" href="https://www.yandex.com/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_zeitde">Die ZEIT</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.zeit.de/index"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_onenewspage">OneNewspage</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.onenewspage.com/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_onenewspagevideo">OneNewspage (Video)</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.onenewspage.com/videos.htm"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_onenewspagegermany">OneNewspage (Deutschland)</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.newsdeutschland.com/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_onenewspagegermanyvideo">OneNewspage Video (Deutschland)</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.newsdeutschland.com/videos.htm"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_minism">Minisucher SUMA-Lab</label></div></div></div></div> + <div class="headingGroup nachrichten"> + <h3>Nachrichten: + <small><a data-type="nachrichten" class="checker"> (alle an-/abwählen)</a></small></h3> + <div class="row"> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_nebelfeed">Netluchs Twitter</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.netluchs.de/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_onenewspage">OneNewspage</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.onenewspage.com/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_onenewspagevideo">OneNewspage (Video)</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.onenewspage.com/videos.htm"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_onenewspagegermany">OneNewspage (Deutschland)</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.newsdeutschland.com/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_onenewspagegermanyvideo">OneNewspage Video (Deutschland)</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.newsdeutschland.com/videos.htm"></a></div></div></div></div> + <div class="headingGroup wissenschaft"> + <h3>Wissenschaft: + <small><a data-type="wissenschaft" class="checker"> (alle an-/abwählen)</a></small></h3> + <div class="row"> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_tuhh">TUBdok</label><a class="glyphicon glyphicon-link" target="_blank" href="https://tubdok.tub.tuhh.de/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_BASE">BASE</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.base-search.net/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_MetaGer-QIP">MetaGer-QIP</label></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_minism">Minisucher SUMA-Lab</label></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_pubmed">PubMed</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/"></a></div></div></div></div> + <div class="headingGroup produktsuche"> + <h3>Produktsuchen: + <small><a data-type="produktsuche" class="checker"> (alle an-/abwählen)</a></small></h3> + <div class="row"> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_ebay">Ebay</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.ebay.de/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_mg_produkt">MetaGer Produktsuche</label></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_mg_produkt2">MetaGer Produktsuche</label></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_ecoshopper">Ecoshopper</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.ecoshopper.de/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_similar_product">Ladenpreis</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.ladenpreis.net/"></a></div></div></div></div> + <div class="headingGroup others"> + <h3>Andere Suchmaschinen: + <small><a data-type="others" class="checker"> (alle an-/abwählen)</a></small></h3> + <div class="row"> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_allesklar">AllesKlar</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.allesklar.de/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_dmozint">dmoz international</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.dmoz.org/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_harvest">CampusSearch</label></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_wikis">Wikis</label></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_bing">Bing</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.bing.com/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_fportal">Forschung</label></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_suchticker">Suchticker</label></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_tauchen">OpenCrawl (Tauchen)</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.opencrawl.de/opencrawl/search.jsp?subcollection=tauchen&query=&hitsPerPage=10&hitsPerSite=1"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_regengergie">OpenCrawl (Regenerative Energien)</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.opencrawl.de/opencrawl/search.jsp?subcollection=ernenerg"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_astronomie">OpenCrawl (Astronomie)</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.opencrawl.de/opencrawl/search.jsp?subcollection=astronom"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_goyax">Börse & Finanzen (goyax)</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.goyax.de/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_stackexchange">Stackoverflow (Q&A)</label><a class="glyphicon glyphicon-link" target="_blank" href="https://stackoverflow.com/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_dart">DartEurope</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.dart-europe.eu/basic-search.php"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_beammachine">Beam Machine</label></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_onenewspageAll">OneNewspage (mit Archiv)</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.onenewspage.com/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_onenewspagegermanyAll">OneNewspage (Deutschland, mit Archiv)</label><a class="glyphicon glyphicon-link" target="_blank" href="http://www.newsdeutschland.com/"></a></div></div> + <div class="col-sm-6 col-md-4 col-lg-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="param_loklak">loklak</label><a class="glyphicon glyphicon-link" target="_blank" href="http://loklak.org/"></a></div></div></div></div> + <input id="unten" type="submit" class="btn btn-primary" value="Startseite für einmalige Nutzung generieren"> + <input type="button" class="btn btn-primary hidden" id="save" value="Einstellungen dauerhaft speichern"> + <input type="button" class="btn btn-danger hidden" id="reset" value="Einstellungen Zurücksetzen"></form> +@endsection \ No newline at end of file