Commit f65936d3 authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Fixed layout of donation quicktip

Fixed passing of locale parameter
parent 7f9ad588
...@@ -14,9 +14,14 @@ $(document).ready(function () { ...@@ -14,9 +14,14 @@ $(document).ready(function () {
if (localStorage.hasOwnProperty('param_sprueche')) { if (localStorage.hasOwnProperty('param_sprueche')) {
sprueche = localStorage.getItem('param_sprueche') === 'on'; // check for sprueche local storage parameter sprueche = localStorage.getItem('param_sprueche') === 'on'; // check for sprueche local storage parameter
} }
loadQuicktips('test', 'de', sprueche); // load the quicktips var locale = readLocaleFromUrl('de');
loadQuicktips('test', locale, sprueche); // load the quicktips
}); });
function readLocaleFromUrl(defaultLocale) {
return location.pathname.substr(1, location.pathname.indexOf('/meta', 0) - 1) || 'de';
}
function getURLParameter(name) { function getURLParameter(name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null; return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null;
} }
...@@ -552,7 +557,7 @@ function loadQuicktips (search, locale, sprueche) { ...@@ -552,7 +557,7 @@ function loadQuicktips (search, locale, sprueche) {
getQuicktips(search, locale, blacklist, createQuicktips); getQuicktips(search, locale, blacklist, createQuicktips);
} }
const QUICKTIP_SERVER = 'http://localhost:63825'; const QUICKTIP_SERVER = 'http://quicktips.metager3.de:63825';
/** /**
* Requests quicktips from the quicktip server and passes them to the loadedHandler * Requests quicktips from the quicktip server and passes them to the loadedHandler
......
...@@ -687,8 +687,9 @@ a { ...@@ -687,8 +687,9 @@ a {
.quicktip-summary { .quicktip-summary {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
h1 { h1 {
margin-right: 15px; margin: 0px;
} }
p { p {
margin: 5px; margin: 5px;
......
Supports Markdown
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