Commit 52b9e23a authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch '8-widget-generator' into 'master'

Die beiden Widget-Generatoren erzeugen Code für die Metager Widgets auch in der Englischen Version.

Wir muessen jedoch auf folgende Dinge achten:
1. Bin ich mir nicht sicher ob die Widgets spaeter auch mit der neuen Version der Seite auf Servern funktioniert, sollte aber gehen.
2. Den ganzen Code zu kopieren ist nervig. Daher wäre es gut fure Nuter die Javascript aktiviert haben noch einen Knopf zum alles kopieren hinzuzufuegen.
Ich habe das vorerst in ein anderes Ticket verlagert.

See merge request !91
parents 8c72dcb0 acda128b
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App;
class SitesearchController extends Controller
{
public function loadPage(Request $request)
{
return view('widget.sitesearch')
->with('title', trans('titles.sitesearch'))
->with('css', 'sitesearch.css')
->with('site', $request->input('site', ''))
->with('navbarFocus', 'dienste');
}
}
\ No newline at end of file
......@@ -90,10 +90,20 @@
Route::get('widget', function()
{
return view('widget')
return view('widget.widget')
->with('title', trans('titles.widget'))
->with('css', 'widget.css')
->with('navbarFocus', 'dienste');
});
Route::get('sitesearch', 'SitesearchController@loadPage');
Route::get('websearch', function()
{
return view('widget.websearch')
->with('title', trans('titles.websearch'))
->with('css', 'websearch.css')
->with('navbarFocus', 'dienste');
});
Route::get('settings', 'StartpageController@loadSettings');
......
button.metager-searchbutton {
height: 30px!important;
width: 100px!important;
border-left: 0px none;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border: 1px solid #CCC!important;
padding: 6px 12px!important;
margin:0px;
font-size: 14px;
font-weight: normal;
line-height: 1!important;
white-space: nowrap;
color: #555;
text-align: center;
background-color: #EEE!important;
}
main.mg-panel {
text-align: left;
}
code {
overflow-wrap: break-word;
word-wrap: break-word;
}
.metager-searchinput {
height: 30px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857;
color: #555;
background-color: #FFF;
background-image: none;
border: 1px solid #CCC;
border-right: 0px none;
border-radius: 4px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
margin:0px;
}
.metager-searchbutton {
height: 30px;
border-left: 0px none;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border: 1px solid #CCC;
padding: 6px 12px;
margin:0px;
font-size: 14px;
font-weight: normal;
line-height: 1;
white-space: nowrap;
color: #555;
text-align: center;
background-color: #EEE;
}
.metager-logo {
height: 30px;
float: left;
top:-2px;
margin-right: 3px;
}
\ No newline at end of file
main.mg-panel {
text-align: left;
}
code {
overflow-wrap: break-word;
word-wrap: break-word;
}
.metager-searchinput {
height: 30px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857;
color: #555;
background-color: #FFF;
background-image: none;
border: 1px solid #CCC;
border-right: 0px none;
border-radius: 4px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
margin:0px;
}
.metager-searchbutton {
height: 30px;
border-left: 0px none;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border: 1px solid #CCC;
padding: 6px 12px;
margin:0px;
font-size: 14px;
font-weight: normal;
line-height: 1;
white-space: nowrap;
color: #555;
text-align: center;
background-color: #EEE;
}
.metager-logo {
height: 30px;
float: left;
top:-2px;
margin-right: 3px;
}
\ No newline at end of file
<?php
return [
'head.1' => 'MetaGer Sitesearch-Widget',
'head.2' => 'Hier finden Sie ein Metager-Widget f&uuml;r Ihre Webseite.',
'head.3' => 'Website auf der gesucht werden soll',
'head.4' => 'Website eingeben...',
'head.5' => 'Generieren',
'generated.1' => 'Vorschau',
'generated.2' => 'Sicher suchen &amp; finden mit MetaGer',
'generated.3' => 'Suche mit MetaGer...',
'generated.4' => 'Suchen',
'generated.5' => 'Code',
'generated.6' => 'de',
];
\ No newline at end of file
......@@ -11,4 +11,6 @@ return [
'hilfe' => 'Hilfe - MetaGer',
'widget' => 'MetaGer Widget',
'settings' => 'Einstellungen',
'websearch' => 'Websuche-Widget - MetaGer',
'sitesearch' => 'Sitesearch-Widget - MetaGer',
];
\ No newline at end of file
<?php
return [
'head.1' => 'MetaGer Websuche-Widget',
'head.2' => 'Hier finden Sie ein Metager-Widget f&uuml;r Ihre Webseite.',
'head.3' => 'Vorschau',
'head.4' => 'Sicher suchen &amp; finden mit MetaGer',
'head.5' => 'Suche mit MetaGer...',
'head.6' => 'all',
'head.7' => 'Code',
'head.8' => 'Suchen',
];
\ No newline at end of file
<?php
return [
'head.1' => 'MetaGer Sitesearch-Widget',
'head.2' => 'Here you find a Metager-Widget for your website.',
'head.3' => 'Website to search on',
'head.4' => 'Enter website...',
'head.5' => 'Generate',
'generated.1' => 'Preview',
'generated.2' => 'Search &amp; and find safely with MetaGer',
'generated.3' => 'Search with MetaGer...',
'generated.4' => 'Search',
'generated.5' => 'Code',
'generated.6' => 'en',
];
\ No newline at end of file
......@@ -11,4 +11,6 @@ return [
'hilfe' => 'Help - MetaGer',
'widget' => 'MetaGer Widget',
'settings' => 'Settings',
'websearch' => 'Websearch-Widget - MetaGer',
'sitesearch' => 'Sitesearch-Widget - MetaGer',
];
<?php
return [
'head.1' => 'MetaGer Websearch-Widget',
'head.2' => 'Here you find a Metager-Widget for your website.',
'head.3' => 'Preview',
'head.4' => 'Search &amp; find safely with MetaGer',
'head.5' => 'Search with MetaGer...',
'head.6' => 'en',
'head.7' => 'Code',
'head.8' => 'Search',
];
\ No newline at end of file
@extends('layouts.subPages')
@section('title', $title )
@section('content')
<h1>{{ trans('sitesearch.head.1') }}</h1>
<p>{{ trans('sitesearch.head.2') }}</p>
<h2>{{ trans('sitesearch.head.3') }}</h2>
<form method="GET" action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/sitesearch/") }}" accept-charset="UTF-8">
<input class="metager-searchinput" name="site" placeholder="{{ trans('sitesearch.head.4') }}" required="" value="{{ $site }}"><button class="metager-searchbutton" type="submit">{{ trans('sitesearch.head.5') }}</button>
</form>
@if ($site !== '')
<h2>{{ trans('sitesearch.generated.1') }}</h2>
<form class="metager-searchform" action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}/meta/meta.ger3" method="GET">
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}">
<img class="metager-logo" title="{{ trans('sitesearch.generated.2') }}" alt="MetaGer" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN8AAABGAgMAAAAx/qk0AAAADFBMVEX/wmn/3KL/6Mj+/vtPnQnhAAAC10lEQVRIx+2XMa7TQBCG1zaJkYwUGp5E5RbR+AJI9g2gQLQ0vDpHsMUJKB49DRIKBRdAco6wN8AFB7CQkfzEZod/Zu3ENgSkbRBStnDkt/uNZ/6ZnX2r6KvyGFujyIdTkVG9F6g+q9YPfKL2fuA9VfmBd1XhB95Rl3EZl/Evxur62dm5gAg7uqSxA613pw2+JqI358CQCD2EqBneEzr1ohLg4WyfJKwMT+CGqonNP4NaxfwYwaOrm7+DGzo6mJ5AeLojcw6M2ctMwNU13jM+GYIXzxUHrtWawQc3TsdXUzAhCJqzQkFNnbjXc3AavljMPxJxNdTvtrOvY2UH2wBhwgrYxUzjfThdMn4L6Rv1c/BTF9AXRMbiVykeLUyIjWbMNN5C+oEvzMCXfURbknnS2QgSPrQfVUCRROzKFEzpqUlsTgipj6l9THb3bnODzxf5oC++nNKewdn5ltHGpCZnz3QIm7Xhc4WzUg4nLwwkpGO4e38K5pQc8g5gCn1Yp36sg9qy+50qLbzRydxRgDa2dVseYEHNQVGE/2Ic2CxBrh04CMOgAjG8ZTlQbZhqA5iKqNnQ4iAuD5itANYsHjLTSlFA1QGUUic9KX43ahPyIqNkvgsZLEcw/EhN5MBJDY9ggBVwx4ERQMmoVVxx0QRcFDkjEpnMt1iJ1bcqhzHi5GsH7rPfgW14lDOS3akROoIuuB9ETs6cli0HOdccmQMZ4u6BoEv8TEC7bDmtKiuOjEtmXQxgCDCXXVaJXA/Z919A0YCrc1UDtB+Qa95SGTcAqli7qwP7vugc7eBgLjnAVjCSxs5lE3Hy04hDc7CRNqBda+KUY5eRBegyr8SiUcvmE0t7YzkiSZ6SIqDv7AjX0q1rdr2ixT+biYBSiLW07Yz3A70eKs8W0l7xs9wc08wcD4qV62rq6r2U2eptcTlGL+O/HN4XFu8rkvelzPsa6H3x9L7q+l6ufwK7PWV5kEbECQAAAABJRU5ErkJggg=="></a>
<input class="metager-searchinput" name="eingabe" placeholder="{{ trans('sitesearch.generated.3') }}" required=""><button class="metager-searchbutton" type="submit">{{ trans('sitesearch.generated.4') }}</button>
<input type="hidden" name="lang" value="{{ trans('sitesearch.generated.6') }}">
<input type="hidden" name="encoding" value="utf8">
<input type="hidden" name="site" value="{{ $site }}">
</form>
<h2>{{ trans('sitesearch.generated.5') }}</h2>
<code>&lt;form class="metager-searchform" action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}/meta/meta.ger3" method="get" accept-charset="UTF-8" &gt;
&lt;style type="text/css" scoped&gt;
.metager-searchinput {
height: 30px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857;
color: #555;
background-color: #FFF;
background-image: none;
border: 1px solid #CCC;
border-right: 0px none;
border-radius: 4px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
margin:0px;
}
.metager-searchbutton {
height: 30px;
border-left: 0px none;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border: 1px solid #CCC;
padding: 6px 12px;
margin:0px;
font-size: 14px;
font-weight: normal;
line-height: 1;
white-space: nowrap;
color: #555;
text-align: center;
background-color: #EEE;
}
.metager-logo {
height: 30px;
float: left;
top:-2px;
margin-right: 3px;
}
&lt;/style&gt;
&lt;a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}"&gt;&lt;img class="metager-logo" title="{{ trans('sitesearch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x9L7q+l6ufwK7PWV5kEbECQAAAABJRU5ErkJggg=="&gt;&lt;/a&gt;&lt;input class="metager-searchinput" name="eingabe" placeholder="{{ trans('sitesearch.generated.3') }}" required&gt;&lt;/input&gt;&lt;button class="metager-searchbutton" type="submit"&gt;{{ trans('sitesearch.generated.4') }}&lt;/button&gt;&lt;input type="hidden" name="encoding" value="utf8"&gt;&lt;/input&gt;&lt;input type="hidden" name="site" value="{{ $site }}"&gt;&lt;/input&gt;&lt;input type="hidden" name="lang" value="{{ trans('sitesearch.generated.6') }}"&gt;&lt;/input&gt;&lt;input type="hidden" name="wdgt-version" value="1"&gt;&lt;/input&gt;&lt;/form&gt;
</code>
@endif
@endsection
\ No newline at end of file
@extends('layouts.subPages')
@section('title', $title )
@section('content')
<h1>{{ trans('websearch.head.1') }}</h1>
<p>{{ trans('websearch.head.2') }}</p>
<h2>{{ trans('websearch.head.3') }}</h2>
<form class="metager-searchform" action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}/meta/meta.ger3" method="GET" accept-charset="UTF-8" >
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}">
<img class="metager-logo" title="{{ trans('websearch.head.4') }}" alt="MetaGer" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN8AAABGAgMAAAAx/qk0AAAADFBMVEX/wmn/3KL/6Mj+/vtPnQnhAAAC10lEQVRIx+2XMa7TQBCG1zaJkYwUGp5E5RbR+AJI9g2gQLQ0vDpHsMUJKB49DRIKBRdAco6wN8AFB7CQkfzEZod/Zu3ENgSkbRBStnDkt/uNZ/6ZnX2r6KvyGFujyIdTkVG9F6g+q9YPfKL2fuA9VfmBd1XhB95Rl3EZl/Evxur62dm5gAg7uqSxA613pw2+JqI358CQCD2EqBneEzr1ohLg4WyfJKwMT+CGqonNP4NaxfwYwaOrm7+DGzo6mJ5AeLojcw6M2ctMwNU13jM+GYIXzxUHrtWawQc3TsdXUzAhCJqzQkFNnbjXc3AavljMPxJxNdTvtrOvY2UH2wBhwgrYxUzjfThdMn4L6Rv1c/BTF9AXRMbiVykeLUyIjWbMNN5C+oEvzMCXfURbknnS2QgSPrQfVUCRROzKFEzpqUlsTgipj6l9THb3bnODzxf5oC++nNKewdn5ltHGpCZnz3QIm7Xhc4WzUg4nLwwkpGO4e38K5pQc8g5gCn1Yp36sg9qy+50qLbzRydxRgDa2dVseYEHNQVGE/2Ic2CxBrh04CMOgAjG8ZTlQbZhqA5iKqNnQ4iAuD5itANYsHjLTSlFA1QGUUic9KX43ahPyIqNkvgsZLEcw/EhN5MBJDY9ggBVwx4ERQMmoVVxx0QRcFDkjEpnMt1iJ1bcqhzHi5GsH7rPfgW14lDOS3akROoIuuB9ETs6cli0HOdccmQMZ4u6BoEv8TEC7bDmtKiuOjEtmXQxgCDCXXVaJXA/Z919A0YCrc1UDtB+Qa95SGTcAqli7qwP7vugc7eBgLjnAVjCSxs5lE3Hy04hDc7CRNqBda+KUY5eRBegyr8SiUcvmE0t7YzkiSZ6SIqDv7AjX0q1rdr2ixT+biYBSiLW07Yz3A70eKs8W0l7xs9wc08wcD4qV62rq6r2U2eptcTlGL+O/HN4XFu8rkvelzPsa6H3x9L7q+l6ufwK7PWV5kEbECQAAAABJRU5ErkJggg=="></a><input class="metager-searchinput" name="eingabe" placeholder="{{ trans('websearch.head.5') }}" required=""><input type="hidden" name="lang" value="{{ trans('websearch.head.6') }}"><input type="hidden" name="encoding" value="utf8"><button class="metager-searchbutton" type="submit">{{ trans('websearch.head.8') }}</button>
</form>
<h2>{{ trans('websearch.head.7') }}</h2>
<code>&lt;form class="metager-searchform" action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}/meta/meta.ger3" method="get" accept-charset="UTF-8" &gt;
&lt;style type="text/css" scoped&gt;
.metager-searchinput {
height: 30px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857;
color: #555;
background-color: #FFF;
background-image: none;
border: 1px solid #CCC;
border-right: 0px none;
border-radius: 4px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
margin:0px;
}
.metager-searchbutton {
height: 30px;
border-left: 0px none;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border: 1px solid #CCC;
padding: 6px 12px;
margin:0px;
font-size: 14px;
font-weight: normal;
line-height: 1;
white-space: nowrap;
color: #555;
text-align: center;
background-color: #EEE;
}
.metager-logo {
height: 30px;
float: left;
top:-2px;
margin-right: 3px;
}
&lt;/style&gt;
&lt;a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}"&gt;&lt;img class="metager-logo" title="{{ trans('websearch.head.4') }}" alt="MetaGer" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN8AAABGAgMAAAAx/qk0AAAADFBMVEX/wmn/3KL/6Mj+/vtPnQnhAAAC10lEQVRIx+2XMa7TQBCG1zaJkYwUGp5E5RbR+AJI9g2gQLQ0vDpHsMUJKB49DRIKBRdAco6wN8AFB7CQkfzEZod/Zu3ENgSkbRBStnDkt/uNZ/6ZnX2r6KvyGFujyIdTkVG9F6g+q9YPfKL2fuA9VfmBd1XhB95Rl3EZl/Evxur62dm5gAg7uqSxA613pw2+JqI358CQCD2EqBneEzr1ohLg4WyfJKwMT+CGqonNP4NaxfwYwaOrm7+DGzo6mJ5AeLojcw6M2ctMwNU13jM+GYIXzxUHrtWawQc3TsdXUzAhCJqzQkFNnbjXc3AavljMPxJxNdTvtrOvY2UH2wBhwgrYxUzjfThdMn4L6Rv1c/BTF9AXRMbiVykeLUyIjWbMNN5C+oEvzMCXfURbknnS2QgSPrQfVUCRROzKFEzpqUlsTgipj6l9THb3bnODzxf5oC++nNKewdn5ltHGpCZnz3QIm7Xhc4WzUg4nLwwkpGO4e38K5pQc8g5gCn1Yp36sg9qy+50qLbzRydxRgDa2dVseYEHNQVGE/2Ic2CxBrh04CMOgAjG8ZTlQbZhqA5iKqNnQ4iAuD5itANYsHjLTSlFA1QGUUic9KX43ahPyIqNkvgsZLEcw/EhN5MBJDY9ggBVwx4ERQMmoVVxx0QRcFDkjEpnMt1iJ1bcqhzHi5GsH7rPfgW14lDOS3akROoIuuB9ETs6cli0HOdccmQMZ4u6BoEv8TEC7bDmtKiuOjEtmXQxgCDCXXVaJXA/Z919A0YCrc1UDtB+Qa95SGTcAqli7qwP7vugc7eBgLjnAVjCSxs5lE3Hy04hDc7CRNqBda+KUY5eRBegyr8SiUcvmE0t7YzkiSZ6SIqDv7AjX0q1rdr2ixT+biYBSiLW07Yz3A70eKs8W0l7xs9wc08wcD4qV62rq6r2U2eptcTlGL+O/HN4XFu8rkvelzPsa6H3x9L7q+l6ufwK7PWV5kEbECQAAAABJRU5ErkJggg=="&gt;&lt;/a&gt;&lt;input class="metager-searchinput" name="eingabe" placeholder="{{ trans('websearch.head.5') }}" required&gt;&lt;/input&gt;&lt;input type="hidden" name="encoding" value="utf8"&gt;&lt;button class="metager-searchbutton" type="submit"&gt;{{ trans('websearch.head.8') }}&lt;/button&gt;&lt;input type="hidden" name="wdgt-version" value="1"&gt;&lt;/input&gt;&lt;input type="hidden" name="lang" value="{{ trans('websearch.head.6') }}"&gt;&lt;/form&gt;
</code>
@endsection
\ No newline at end of file
@extends('layouts.subPages')
@section('title', $title )
@section('content')
<h1>{{ trans('widget.head') }}</h1>
<p>{{ trans('widget.body.1') }}</p>
<p id="widgetLinks" class="btn-group"><a class="btn btn-default" href="websearch/">{{ trans('widget.body.2') }}</a><a class="btn btn-default" href="sitesearch/">{{ trans('widget.body.3') }}</a></p>
<p>{{ trans('widget.body.4') }}</p>
@endsection
\ No newline at end of file
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