Commit 94206c10 authored by Dominik Hebeler's avatar Dominik Hebeler

Merge branch '880-remove-partners-from-startpage' into 'development'

Resolve "Remove Partners from startpage"

Closes #880

See merge request !1440
parents 71e9a166 d2d5f451
......@@ -3,11 +3,9 @@
namespace App\Http\Controllers;
use App;
use DB;
use Illuminate\Http\Request;
use Jenssegers\Agent\Agent;
use LaravelLocalization;
use Log;
use Response;
class StartpageController extends Controller
......@@ -44,15 +42,6 @@ class StartpageController extends Controller
$lang = 'all';
}
# Sponsorenlinks
$sponsors = [];
try {
$sponsors = DB::table('sponsorenlinks')->where('langcode', 'de')->orderByRaw('LENGTH(linktext)', 'ASC')->get();
DB::disconnect('mysql');
} catch (\Illuminate\Database\QueryException $e) {
Log::info($e);
}
return view('index')
->with('title', trans('titles.index'))
->with('homeIcon')
......@@ -63,7 +52,6 @@ class StartpageController extends Controller
->with('request', $request->input('request', 'GET'))
->with('option_values', $option_values)
->with('autocomplete', $autocomplete)
->with('sponsors', $sponsors)
->with('pluginmodal', $request->input('plugin-modal', 'off'));
}
......
const DEFAULT_FOCUS = 'web';
$(document).ready(function () {
// checkPlugin()
if (location.href.indexOf('#plugin-modal') > -1) {
$('#plugin-modal').modal('show');
}
$('#addFocusBtn').removeClass('hide');
$('button').popover();
loadLocalStorage();
setActionListeners();
loadSavedResults();
});
/**
* Loads the user theme and stored settings from local storage
*/
function loadLocalStorage() {
setSettings();
}
/**
* Sets all action listeners for this page
*/
function setActionListeners() {
$('button').on('shown.bs.popover', function () {
$('#color-chooser a').click(function () {
var theme = $(this).attr('data-rgba');
if (localStorage) {
localStorage.setItem('theme', theme);
location.href = '/';
}
});
});
$('#mobileFoki').change(function () {
var focus = $('#mobileFoki > option:selected').val();
if (focus == 'angepasst') {
window.location = './settings/';
} else {
window.location = './?focus=' + focus;
}
});
if ($('fieldset#foki.mobile').length) {
$('fieldset#foki.mobile label#anpassen-label').click(function () {
window.location = './settings/';
});
}
}
/**
* Loads stored settings from local storage
*/
function setSettings() {
if ($('fieldset#foki.mobile').length) {
$('fieldset.mobile input#bilder').val('angepasst');
$('fieldset.mobile input#bilder').prop('checked', true);
$('fieldset.mobile input#bilder').attr('id', 'angepasst');
$('fieldset.mobile label#bilder-label').attr('id', 'anpassen-label');
$('fieldset.mobile label#anpassen-label').attr('for', 'angepasst');
$('fieldset.mobile label#anpassen-label i.fa').attr('class', 'fa fa-cog');
$('fieldset.mobile label#anpassen-label span.content').html('angepasst');
}
}
// Polyfill for form attribute
(function ($) {
/**
* polyfill for html5 form attr
*/
// detect if browser supports this
var sampleElement = $('[form]').get(0);
var isIE11 = !(window.ActiveXObject) && 'ActiveXObject' in window;
if (sampleElement && window.HTMLFormElement && sampleElement.form instanceof HTMLFormElement && !isIE11) {
// browser supports it, no need to fix
return;
}
/**
* Append a field to a form
*
*/
$.fn.appendField = function (data) {
// for form only
if (!this.is('form')) return;
// wrap data
if (!$.isArray(data) && data.name && data.value) {
data = [data];
}
var $form = this;
// attach new params
$.each(data, function (i, item) {
$('<input/>').attr('type', 'hidden').attr('name', item.name).val(item.value).appendTo($form);
});
return $form;
};
/**
* Find all input fields with form attribute point to jQuery object
*
*/
$('form[id]').submit(function (e) {
var $form = $(this);
// serialize data
var data = $('[form=' + $form.attr('id') + ']').serializeArray();
// append data to form
$form.appendField(data);
}).each(function () {
var form = this,
$form = $(form),
$fields = $('[form=' + $form.attr('id') + ']');
$fields.filter('button, input').filter('[type=reset],[type=submit]').click(function () {
var type = this.type.toLowerCase();
if (type === 'reset') {
// reset form
form.reset();
// for elements outside form
$fields.each(function () {
this.value = this.defaultValue;
this.checked = this.defaultChecked;
}).filter('select').each(function () {
$(this).find('option').each(function () {
this.selected = this.defaultSelected;
});
});
} else if (type.match(/^submit|image$/i)) {
$(form).appendField({
name: this.name,
value: this.value
}).submit();
}
});
});
})(jQuery);
// Opera 8.0+
var isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
// Firefox 1.0+
var isFirefox = typeof InstallTrigger !== 'undefined';
// At least Safari 3+: "[object HTMLElementConstructor]"
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
// Internet Explorer 6-11
var isIE = /*@cc_on!@*/ false || !!document.documentMode;
// Edge 20+
var isEdge = !isIE && !!window.StyleMedia;
// Chrome 1+
var isChrome = !!window.chrome && !!window.chrome.webstore;
// Blink engine detection
var isBlink = (isChrome || isOpera) && !!window.CSS;
// Prüft, ob der URL-Parameter "usage" auf "once" gesetzt ist.
function loadSavedResults() {
var results = new Results();
if (results.length > 0) {
var html = $('\
<div class="focus">\
<input id="savedResults" class="focus-radio hide" name="focus" value="container" form="searchForm" type="radio" required="">\
<label id="saved-results-label" class="focus-label" for="savedResults">\
<i class="fas fa-save"></i>\
<span class="content">gespeicherte Ergebnisse</span>\
<span class="badge">' + results.length + '</span>\
</label>\
</div>\
');
$('#addFocusBtnDiv').before(html);
$('#foki input#savedResults').change(function () {
if ($(this).prop('checked')) $('#searchForm').submit();
});
}
}
\ No newline at end of file
......@@ -27,20 +27,14 @@ return [
'focus-creator.delete' => 'Eigene Suche löschen',
'focus-creator.focusname' => 'Suchname: ',
'slogan.title' => 'Besser&nbsp;suchen, schneller&nbsp;finden',
'slogan.1' => 'Datenschutz & Privatsphäre: Bei uns einfach und selbstverständlich.',
'slogan.2' => 'Wir arbeiten nicht gewinnorientiert, wir sind ein gemeinnütziger Verein: <a href="/beitritt">Werden Sie Mitglied</a> oder <a href="/spende">spenden Sie</a>!',
'slogan.3' => 'Mit MetaGer bewahren Sie einen neutralen Blick auf’s Web!',
'sponsors.head' => 'Partner',
'sponsors.woxikon' => 'SEO Agentur',
'sponsors.gutscheine' => 'STERN.de: Günstige Kredite im Kreditvergleich',
'sponsors.seo' => 'Weihnachtsfeier',
'about.title' => 'Über uns',
'about.1.1' => '<a href="/datenschutz">Datenschutz & Privatsphäre</a>: Bei uns einfach & selbstverständlich.',
'about.2.1' => 'Wir arbeiten nicht gewinnorientiert, wir sind ein <a href="/spende">gemeinnütziger Verein</a>: <a href="/beitritt">Werden Sie Mitglied!</a>',
'about.3.1' => 'Überzeugen Sie sich von unseren Datenschutz- und Privatsphärefeatures',
'about.1.1' => "Garantierte Privatsphäre",
'about.1.2' => 'Mit uns behalten Sie die volle Kontrolle über Ihre Daten.',
'about.2.1' => 'Gemeinnütziger Verein',
'about.2.2' => 'Wir als SUMA-EV sind unabhängig, weil wir keine kommerziellen Interessen verfolgen!',
'about.3.1' => 'Unterstützen & Spenden',
'about.3.2' => 'Mit Ihrer Spende unterstützen Sie die Arbeit des SUMA-EV und den Betrieb von MetaGer.',
'about.4.1' => 'Machen Sie mit!',
'about.4.2' => 'Stärken Sie uns, indem Sie Mitglied werden.',
'lang.tooltip' => 'Ergebnissprache wählen',
'key.placeholder' => 'Mitglieder-Key eingeben',
......
......@@ -27,20 +27,14 @@ return [
"focus-creator.delete" => "Delete search focus",
"focus-creator.focusname" => "Focus:",
'slogan.title' => 'MetaGer: Privacy protected Search and Find',
'slogan.1' => 'We provide privacy & data protection and we are a non profit NGO.',
'slogan.2' => '<a href="/beitritt">Become a member</a> oder <a href="/spende">donate</a>! Our source code is open: <a href="https://gitlab.metager3.de/open-source/MetaGer">gitlab.metager3.de</a>',
'slogan.3' => 'You keep a neutral view on the web by using MetaGer',
"sponsors.head" => "Partners",
'sponsors.woxikon' => 'Tagesgeld jetzt!',
'sponsors.gutscheine' => 'Aktuelle Gutscheine auf Gutschein-Magazin.de',
'sponsors.seo' => 'Suchmaschinenoptimierung',
"about.title" => "About Us",
"about.1.1" => "We provide <a href=\"/en/datenschutz\">privacy & data protection.</a>",
"about.2.1" => 'We are a <a href="/en/spende">non profit NGO</a>. Our source code is open:<a href="https://gitlab.metager3.de/open-source/MetaGer" target="_blank">gitlab.metager3.de</a>',
"about.3.1" => "Everyone might check our data protection & privacy features.",
'about.1.1' => "Guaranteed Privacy",
'about.1.2' => 'With us you have full control over your data.',
'about.2.1' => 'Nonprofit organization',
'about.2.2' => 'We as SUMA-EV are independent because we do not pursue commercial interests!',
'about.3.1' => 'Support & Donate',
'about.3.2' => 'With your donation you support the work of the SUMA-EV and the operation of MetaGer.',
'about.4.1' => 'Join in!',
'about.4.2' => 'Strengthen us by becoming a member.',
'lang.tooltip' => 'Language',
'key.placeholder' => 'Enter member key',
......
<?php
return [
"foki.web" => "Web",
"foki.bilder" => "Imágenes",
"foki.nachrichten" => "Informativos/Política",
"foki.wissenschaft" => "Ciencia",
"foki.produkte" => "Productos",
"foki.angepasst" => "ajustado",
"foki.maps" => "Maps.metager.de",
"design" => "Escoger un diseño personalizado",
"conveyor" => "Comprar en tiendas que apoyan MetaGer ",
"partnertitle" => "Apoyar MetaGer, sin costos para usted",
"plugin" => "Añadir MetaGer-Plugin",
"plugin-title" => "Añadir MetaGer a su navegador",
"sponsors.head" => "Esponsores",
"sponsors.woxikon" => "<a href=\"http://www.woxikon.de/\" class=\"mutelink\" target=\"_blank\" rel=\"noopener\">Buscar palabras & sinónimos</a>",
"sponsors.seo" => "<a href=\"http://www.gutschein-magazin.de/\" class=\"mutelink\" target=\"_blank\" rel=\"noopener\">Vales actuales de Gutschein-Magazin.de</a>",
"sponsors.gutscheine" => "<a href=\"https://www.finanzcheck.de/\" class=\"mutelink\" target=\"_blank\" rel=\"noopener\">Comparar créditos económicos en FINANZCHECK.de</a>",
"about.title" => "Sobre nosotros",
"about.1.1" => "<a href=\"/es/datenschutz\">Privacidad & protección de datos</a> son con nosotros simples & dado por sentado",
"about.2.1" => "No trabajamos orientado al lucro, somos una <a href=\"/es/spende\">asociación sin fines de lucro</a>",
"placeholder" => "MetaGer: Buscar & encontrar seguro",
"foki.web" => "Web",
"foki.bilder" => "Imágenes",
"foki.nachrichten" => "Informativos/Política",
"foki.wissenschaft" => "Ciencia",
"foki.produkte" => "Productos",
"foki.angepasst" => "ajustado",
"foki.maps" => "Maps.metager.de",
"design" => "Escoger un diseño personalizado",
"conveyor" => "Comprar en tiendas que apoyan MetaGer ",
"partnertitle" => "Apoyar MetaGer, sin costos para usted",
"plugin" => "Añadir MetaGer-Plugin",
"plugin-title" => "Añadir MetaGer a su navegador",
'about.1.1' => "Privacidad garantizada",
'about.1.2' => 'Con nosotros usted tiene control total sobre sus datos.',
'about.2.1' => 'Asociación sin ánimo de lucro',
'about.2.2' => '¡Nosotros como SUMA-EV somos independientes porque no perseguimos intereses comerciales!',
'about.3.1' => 'Apoyar y Donar',
'about.3.2' => 'Con su donación usted apoya el trabajo de SUMA-EV y el funcionamiento de MetaGer.',
'about.4.1' => '¡Únete!',
'about.4.2' => 'Fortalécenos haciéndote miembro.',
"placeholder" => "MetaGer: Buscar & encontrar seguro",
];
/* Startseite */
@main-content-width: 1000px;
@foki-edge-rounding: 7px;
#main-content {
flex-grow: 1;
display: flex;
flex-direction: column;
margin-top: 5vh;
@media(max-width: @main-content-width) {
width: 100%;
}
......@@ -27,7 +25,7 @@
position: absolute;
bottom: 0px;
right: 8px;
padding: 16px;
padding: 11px;
color: #777;
border: 0;
width: 30px;
......@@ -38,7 +36,7 @@
color: red;
background-color: #ccc;
}
@media(max-width: @screen-mobile) {
@media(max-width: 503px) {
display: flex;
}
}
......@@ -47,76 +45,45 @@
.startpage #main-content {
justify-content: center;
margin-top: 0;
@media(max-width: @screen-mobile){
justify-content: start;
margin-top: 20vh;
}
}
#additional-content {
flex-grow: 2;
padding-top: 50px;
display: flex;
@media(max-width: @screen-mobile) {
flex-direction: column;
position: absolute;
top: 100vh;
}
#about-us {
max-width: 500px;
margin-right: 50px;
@media(max-width: @screen-mobile) {
margin: 0px;
max-width: 100%;
.card-medium;
order: 2;
p {
text-align: justify;
margin-top: -25%;
#about-us {
font-size: 1.4em;
color: #777;
text-align: center;
display: grid;
grid-gap: 24px;
margin-top: 48px;
margin-bottom: 48px;
justify-content: center;
grid-template-columns: 240px;
position: absolute;
width: 100%;
top: 100vh;
left: 0;
@media(min-width: 504px){
margin-top: 0;
grid-template-columns: 240px 240px;
grid-gap: 24px;
top: inherit;
bottom: 100px;
}
}
h2 {
font-size: 1.3em;
}
p {
font-size: 1em;
}
}
#s {
@media(max-width: @screen-mobile) {
margin: 8px 0px;
.card-medium;
}
h2 {
font-size: 1.3em;
}
ul {
list-style-type: none;
padding: 0px;
text-align: left;
margin-bottom: 0;
li.sr {
a {
color: inherit;
display: flex;
justify-content: space-between;
font-size: 1em;
i {
margin-left: 10px;
@media(min-width: 1000px){
grid-template-columns: 240px 240px 240px 240px;
}
> a {
display: flex;
flex-direction: column;
cursor: pointer;
color: inherit;
> div.teaser {
@media(min-width: 504px){
visibility: hidden;
}
font-size: .7em;
}
&:hover > div.teaser {
visibility: inherit;
}
}
}
}
}
#spendenaufruf {
text-align: center;
a {
background-color: white;
display: inline-block;
width: 100%;
max-width: 770px;
margin-bottom: 10px;
}
}
\ No newline at end of file
......@@ -10,29 +10,29 @@
<div id="plugin-btn-div">
<a id="plugin-btn" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/plugin") }}" title="{{ trans('index.plugin-title') }}"><i class="fa fa-plug" aria-hidden="true"></i> {{ trans('index.plugin') }}</a>
</div>
<div id="about-us">
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "about") }}">
<i class="fas fa-user-secret"></i>
<span>@lang('index.about.1.1')</span>
<div class="teaser">@lang('index.about.1.2')</div>
</a>
<a href="https://suma-ev.de">
<i class="fas fa-heart"></i>
<span>@lang('index.about.2.1')</span>
<div class="teaser">@lang('index.about.2.2')</div>
</a>
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "spenden") }}">
<i class="fas fa-money-bill-wave"></i>
<span>@lang('index.about.3.1')</span>
<div class="teaser">@lang('index.about.3.2')</div>
</a>
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "beitritt") }}">
<i class="fas fa-user-friends"></i>
<span>@lang('index.about.4.1')</span>
<div class="teaser">@lang('index.about.4.2')</div>
</a>
</div>
<a id="scroll-helper" href="#about-us">
<i class="fas fa-angle-double-down"></i>
</a>
<script src="{{ mix('js/scriptStartPage.js') }}" defer></script>
@endsection
@section('additional-content')
<div id="about-us">
<div>
<h2>{!! trans('index.slogan.title') !!}</h2>
<p>{!! trans('index.slogan.1') !!}</p>
<p>{!! trans('index.slogan.2') !!}</p>
<p>{!! trans('index.slogan.3') !!}</p>
</div>
</div>
<div id="s">
<h2>{{ trans('index.sponsors.head') }}</h2>
<ul class="startpage">
@foreach($sponsors as $link)
<li class="sr">
<a href="{{ $link->link }}" target="_blank" rel="noopener"><p>{{ $link->linktext }}</p> <i class="fa fa-external-link-alt"></i></a>
</li>
@endforeach
</ul>
</div>
@endsection
......@@ -56,9 +56,6 @@
@endif
@yield('content')
</main>
<div id="additional-content">
@yield('additional-content')
</div>
</div>
@include('parts.sidebar', ['id' => 'staticPagesSideBar'])
@include('parts.sidebar-opener', ['class' => 'fixed'])
......
......@@ -5,8 +5,10 @@
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "impressum") }}">{{ trans('sidebar.nav8') }}</a>
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "datenschutz") }}">{{ trans('sidebar.nav3') }}</a>
</div>
@if($type !== 'startpage')
<div>
<span class="hidden-xs">{{ trans('footer.sumaev.1') }} <a href="{{ trans('footer.sumaev.link') }}">{{ trans('footer.sumaev.2') }}</a></span>
</div>
@endif
</footer>
@endif
......@@ -50,13 +50,6 @@ mix
],
"public/js/lib.js"
)
.babel(
[
"resources/js/scriptStartPage.js",
"resources/js/result-saver.js"
],
"public/js/scriptStartPage.js"
)
.babel(
[
"resources/js/scriptSettings.js"
......
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