diff --git a/.gitignore b/.gitignore index 53d05fa2e228e01a74c7c4850feae609fb55f9f1..55a1eae6236460ecf592c3a01492f7588f7d8444 100644 --- a/.gitignore +++ b/.gitignore @@ -14,12 +14,12 @@ langfiles.zip /public/js/lib.js /public/js/scriptStartPage.js /public/js/scriptResultPage.js +/public/js/focus-creator.js /public/js/searchbar.js /public/js/utility.js /public/css/beitritt.css /public/css/themes/default.css /public/css/utility.css -/public/js/utility.js **/*.map /.buildpath diff --git a/public/js/focus-creator.js b/public/js/focus-creator.js deleted file mode 100644 index 30e8739c3e6a84246401b54dd569e2c499b2fc3e..0000000000000000000000000000000000000000 --- a/public/js/focus-creator.js +++ /dev/null @@ -1,359 +0,0 @@ -$(function () { - setFocusCreatorActionListeners(); - loadInitialCustomFocuses(); - loadInitialSelectedFocus(); - focusChanged(); -}); - -/** - * Sets all action listeners for this page - */ -function setFocusCreatorActionListeners () { - $('.focusCheckbox').click(checkboxCheckListener); - $('#addFocusBtn').click(() => showFocusCreateDialog('')); - $('#editFocusBtn').click(editCurrentFocus); - $('.save-focus-btn').click(saveFocus); - $('.delete-focus-btn').click(deleteFocus); - $('#focus-select').change(focusChanged); - // Save Focus on clicking enter while in the focus name input - $('#focus-name').keyup(function (event) { - if (event.keyCode == 13) { - saveFocus(); - } - }); - $('#create-focus-modal').on('shown.bs.modal', function () { - $('#focus-name').focus(); - }); -} -/** - * Loads all the custom focuses stored in local storage - */ -function loadInitialCustomFocuses () { - for (var key in localStorage) { - if (key.startsWith('focus_')) { - var focus = loadFocusById(key); - addFocus(focus.name); - } - } -} - -function loadInitialSelectedFocus () { - setFocus(getFocusInUrl()); -} - -/** - * Shows the focus create dialog - * If an id is given it will try to load a focus for the given id - */ -function showFocusCreateDialog (id) { - if (id === undefined) { - id = ''; - } - document.getElementById('original-id').value = id; - $('#create-focus-modal').modal('show'); - var storedFocus = loadFocusById(id); - var focus = {}; - // Try to load a focus for the given id - $('#focus-name').val(''); - uncheckAll(); - if (storedFocus !== null) { - try { - focus = JSON.parse(localStorage.getItem(id)); - $('#focus-name').val(focus.name); - for (var key in focus) { - if (key.startsWith('engine_')) { - $('.focusCheckbox[name=' + key + ']').prop('checked', true); - } - } - } catch (ex) { - console.error(ex); - } - } - toggleDeleteButton(); -} - -/** - * Shows the focus create dialog for a given id - */ -function showFocusEditDialog (id) { - showFocusCreateDialog(id); -} - -function getCurrentFocus () { - return $('#foki > div.active').attr('id'); -} - -/** - * Shows an edit dialog for the current selected focus - */ -function editCurrentFocus () { - var currentFocus = getCurrentFocus(); - if (currentFocus !== undefined) { - showFocusEditDialog(currentFocus); - } -} - -/** - * Shows/Hides the delete button if (no) checkboxes are selected - */ -function toggleDeleteButton () { - if (atLeastOneChecked()) { - $('.delete-focus-btn').show(); - } else { - $('.delete-focus-btn').hide(); - } -} - -/** - * Save the current Focus - * Listens for save button - */ -function saveFocus () { - /* Vorprüfungen */ - // Falls keine Suchmaschine ausgewählt wurde - if (!atLeastOneChecked()) { - switch (document.documentElement.lang) { - case 'en': - alert('Please select at least 1 search engine.'); - break; - case 'es': - alert('Por favor, seleccione al menos un motor de búsqueda.'); - break; - default: - alert('Bitte mindestens 1 Suchmaschine auswählen.'); - break; - } - return; - } - // Falls der Name zu kurz ist oder ungültige Zeichen enthält - var name = document.getElementById('focus-name').value; - if (!isValidName(name)) { - switch (document.documentElement.lang) { - case 'en': - alert('No characters other than a-z, A-Z, 0-9, ä, ö, ü, ß, -, _ allowed, at least 1 character'); - break; - case 'es': - alert('Por favor, introduzca un nombre válido'); - break; - default: - alert('Bitte gültigen Namen eingeben:\n* Keine Sonderzeichen\n* Mindestens 1 Buchstabe\n'); - break; - } - return; - } - // Liest die original-id des aktuellen fokus-dialogs (gesetzt wenn man einen Fokus bearbeitet) - var oldId = document.getElementById('original-id').value; - var id = getIdFromName(name); - var overwrite = true; - // Wenn bereits ein Fokus mit dem Namen existiert, man diesen aber nicht editiert sondern gerade einen Neuen erstellt - if (alreadyInUse(name) && oldId !== id) { - // Fragt den Nutzer ob er den Fokus überschreiben möchte - if (!confirm('Name bereits genutzt\nüberschreiben?')) { - // Falls nicht wird das Speichern abgebrochen - return; - } - // Ansonsten wird der andere Fokus gelöscht - deleteFocusById(id); - } - /* Fokus speichern */ - var focus = {}; - // Ausgewählte Suchmaschinen lesen und zu Fokus hinzufügen - $('input[type=checkbox]:checked').each(function (el) { - focus[$(this).attr('name')] = $(this).val(); - }); - - // Name setzen - focus['name'] = name; - // Alte Version des Fokus löschen (aus localStorage und von der Webseite, falls eine existiert) - if (oldId !== '') { - localStorage.removeItem(oldId); - removeFocusById(oldId); - } - // Neue Version des Fokus hinzufügen (zu localStorage und der Webseite) - localStorage.setItem(id, JSON.stringify(focus)); - addFocus(name); - setFocus(id); - // Fokus-Formular verbergen - $('#create-focus-modal').modal('hide'); -} - -/** - * Delete current Focus - * Listens for delete button - */ -function deleteFocusById (id) { - localStorage.removeItem(id); - removeFocusById(id); - $('#focus-select').change(); -} - -/** - * Delete current Focus - * Listens for delete button - */ -function deleteFocus () { - var oldId = document.getElementById('original-id').value; - deleteFocusById(oldId); - $('#create-focus-modal').modal('hide'); - $('#focus-select').change(); -} - -/** - * Is the name valid (in terms of characters)? - */ -function isValidName (name) { - // no Characters other then a-z, A-Z, 0-9, ä, ö, ü, ß, -, _ allowed - // at least 1 character - return /^[a-zA-Z0-9äöüß\-_ ]+$/.test(name); -} - -/** - * Is at least one focus selected? - */ -function atLeastOneChecked () { - return $('.focusCheckbox:checked').length > 0; -} - -/** - * Is there already a focus with this name? - */ -function alreadyInUse (name) { - return localStorage.hasOwnProperty(getIdFromName(name)); -} - -/** - * Adds an option to the focus selector - */ -function addFocus (name) { - var id = getIdFromName(name); - var customFocus = $('<div id="' + id + '"><a href="#" target="_self">' + name + '</a><a class="edit-focus" data-id="' + id + '" href="#"><i class="fa fa-wrench"></i></div>'); - $(customFocus).find('.edit-focus').click(function () { - showFocusEditDialog($(this).attr('data-id')); - }); - $('#foki .search-option-frame').before(customFocus); -} - -/** - * Remove the focuses html-elements - */ -function removeFocus (name) { - removeFocusById(getIdFromName(name)); -} - -/** - * Remove the focuses html-elements - */ -function removeFocusById (id) { - if (id == '') { - return; - } - $('#focus-select option[value="' + id + '"]').remove(); -} - -/** - * Turns a name into an id - * Converts special characters and spaces - */ -function getIdFromName (name) { - name = name.toLowerCase(); - name = name.split(' ').join('_'); - name = name.split('ä').join('ae'); - name = name.split('ö').join('oe'); - name = name.split('ü').join('ue'); - return 'focus_' + name; -} - -/** - * Loads the focus object for the given id from local storage - */ -function loadFocusById (id) { - return JSON.parse(localStorage.getItem(id)); -} - -/** - * Unchecks all focuses from the focus creator dialog - */ -function uncheckAll () { - $('.focusCheckbox').prop('checked', false); -} - -/** - * Sets the selected focus to default - */ -function setFocusToDefault () { - setFocus(DEFAULT_FOCUS); -} - -/** - * Sets the selected focus - * @param {String} focusID The id of the focus, without # - */ -function setFocus (focusID) { - $('#focus-select option[value="' + focusID + '"]').prop('selected', true); - $('#focus-select').change(); -} - -function focusChanged () { - var selectedFocus = getCurrentFocus(); - if (typeof(currentFocus) !== 'undefined') { - if (focusIsEditable(selectedFocus)) { - enableEditFocusBtn(); - } else { - disableEditFocusBtn(); - } - loadFocusForSearch(selectedFocus); - } -} - -function focusIsEditable (focus) { - if (focus.startsWith('focus_')) { - return true; - } else { - return false; - } -} - -function enableEditFocusBtn () { - $('#editFocusBtn').removeClass('disabled').click(editCurrentFocus); -} - -function disableEditFocusBtn () { - $('#editFocusBtn').addClass('disabled').off('click'); -} - -function loadFocusForSearch (focus) { - var focus = loadFocusById(focus); - - var url = '/meta/meta.ger3?eingabe=x&focus='; - - // clearCustomSearch() - for (var key in focus) { - if (key.startsWith('engine_') && focus[key] == 'on') { - addSumaToCustomSearch(key); - } - } -} - -function getFocusInUrl () { - var url = window.location; - var focReg = /focus=(focus_\w+)/.exec(url); - if (focReg && focReg[1]) { - return focReg[1]; - } -} - -function checkboxCheckListener (event) { - toggleDeleteButton(); - var elem = event.target; - if (elem.name) { - if (elem.checked) { - setCheckedForAllWithName(elem.name, true); - } else { - setCheckedForAllWithName(elem.name, false); - } - } -} - -function setCheckedForAllWithName (name, checked) { - $('.focusCheckbox[name=' + name + ']').prop('checked', checked); -} diff --git a/public/js/searchbar.js b/public/js/searchbar.js deleted file mode 100644 index 16e3a4dd26abe58fa2d8856193fe5bcac9657910..0000000000000000000000000000000000000000 --- a/public/js/searchbar.js +++ /dev/null @@ -1,39 +0,0 @@ -$(function () { - loadLocalStorage(); -}); - -/** - * Loads the user theme and stored settings from local storage - */ -function loadLocalStorage () { - if (localStorage) { - setSettings(); - } -} - -function setSettings () { - var acceptedParams = ['autocomplete', 'key', 'lang', 'newtab', 'sprueche']; - for (var key in localStorage) { - var value = localStorage.getItem(key); - var accepted = false; - for (var i in acceptedParams) { - if (key === 'param_' + acceptedParams[i]) { - accepted = true; - } - } - if (accepted) { - key = key.substring(6); - // Check for existing hidden fields for this key - var existing = $('.search-hidden input[name="' + key + '"]'); - if (existing.length === 0) { - // if none exist, create a new one - $('.search-hidden').append('<input type="hidden" name="' + key + '" value="' + value + '">'); - } - } - } - // Change the request method to the given parameter - var requestMethod = localStorage.getItem('request'); - if (requestMethod !== null && (requestMethod === 'GET' || requestMethod === 'POST')) { - $('#searchForm').attr('method', requestMethod); - } -} \ No newline at end of file diff --git a/resources/assets/js/result-saver.js b/resources/assets/js/result-saver.js index 444fb5dde8b0e210c222a7da5145b86a5efd7683..50706213d8f0945ac32dbf99b7721163360a4cdc 100644 --- a/resources/assets/js/result-saver.js +++ b/resources/assets/js/result-saver.js @@ -57,8 +57,8 @@ Results.prototype.sortResults = function () { break; case 'alphabetical': // by hostname this.results.sort(function (a, b) { - if (b.hostname > a.hostname) return -1; - if (b.hostname < a.hostname) return 1; + if (b.hosterName > a.hosterName) return -1; + if (b.hosterName < a.hosterName) return 1; return 0; }); break; @@ -78,7 +78,7 @@ Results.prototype.loadAllResults = function () { // Remove the prefix key = key.substr(this.prefix.length); // Create the result for this key by loading it from localstorage - var tmpResult = new Result(undefined, undefined, undefined, undefined, undefined, undefined, key); + var tmpResult = new Result(undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, key); // Add the result to the list of results this.results.push(tmpResult); } @@ -117,7 +117,7 @@ Results.prototype.updateResultPageInterface = function () { // If there is no savedFoki element yet, create it var tabPanel = $('\ <div id="savedFoki">\ - <h1>Gespeicherte Ergebnisse</h1>\ + <h1>' + t('result-saver.title') + '</h1>\ </div>\ '); $('#additions-container').append(tabPanel); @@ -141,19 +141,20 @@ Results.prototype.addToContainer = function (container) { var options = $('\ <div id="saver-options">\ <div class="saver-option saver-option-filter">\ - <input class="form-control" type="text" placeholder=" Filtern">\ + <input class="form-control" type="text" placeholder=" ' + t('result-saver.filter') + '">\ </div>\ <div class="saver-option saver-option-sort">\ <select class="form-control" style="font-family: FontAwesome, sans-serif;">\ - <option value="chronological" style="font-family: FontAwesome, sans-serif;"> Chronologisch</option>\ - <option value="rank" style="font-family: FontAwesome, sans-serif;"> MetaGer-Ranking</option>\ - <option value="alphabetical" style="font-family: FontAwesome, sans-serif;"> Alphabetisch (Hostname)</option>\ + <option value="chronological" style="font-family: FontAwesome, sans-serif;"> ' + t('result-saver.sort.chronological') + '</option>\ + <option value="rank" style="font-family: FontAwesome, sans-serif;"> ' + t('result-saver.sort.ranking') + '</option>\ + <option value="alphabetical" style="font-family: FontAwesome, sans-serif;"> ' + t('result-saver.sort.alphabetical') + '</option>\ </select>\ </div>\ <div class="saver-option saver-option-delete">\ <button class="btn btn-danger btn-md" id="saver-options-delete-btn">\ - <i class="fa fa-trash-o" aria-hidden="true"></i>\ - <span class="hidden-xs">Ergebnisse</span> löschen</button>\ + <i class="fa fa-trash-o" aria-hidden="true"></i>\ + ' + t('result-saver.deleteAll') + '\ + </button>\ </div>\ </div>\ '); @@ -217,13 +218,13 @@ Results.prototype.addToContainer = function (container) { * @param {int} rank The rank of this result * @param {int} hash The hash value for this result */ -function Result (title, link, anzeigeLink, description, anonym, index, hash) { +function Result (title, link, hosterName, hosterLink, anzeigeLink, description, anonym, index, hash) { // Set prefix for localstorage this.prefix = 'result_'; if (hash === null || hash === undefined) { // Calculate the hash value of this result - hash = MD5(title + link + anzeigeLink + description + anonym); + hash = MD5(title + link + hosterName + hosterLink + anzeigeLink + description + anonym); } this.hash = hash; @@ -233,16 +234,14 @@ function Result (title, link, anzeigeLink, description, anonym, index, hash) { // Save all important data this.title = title; this.link = link; + this.hosterName = hosterName; + this.hosterLink = hosterLink; this.anzeigeLink = anzeigeLink; this.description = description; this.anonym = anonym; this.index = index; this.rank = index; this.added = new Date().getTime(); - // read the hostname from the displayed link - // matches everything from after a 'www' to the locality ending ('de', 'com', etc.) - var matches = /(?:www\.)*((?:[\w\-]+\.)+\w{2,3})(?:$|[/?])/.exec(this.anzeigeLink); - this.hostname = matches[1]; // Save this result to localstorage this.save(); @@ -257,25 +256,24 @@ Result.prototype.load = function () { if (!localStorage) return false; // Try to load from local storage - var result = localStorage.getItem(this.prefix + this.hash); - if (result === null) return false; + var encoded = localStorage.getItem(this.prefix + this.hash); + if (encoded === null) return false; // Decode the base64 result into a normal string, then json - result = b64DecodeUnicode(result); - result = JSON.parse(result); + var decoded = b64DecodeUnicode(encoded); + var result = JSON.parse(decoded); // Load all important data this.title = result.title; this.link = result.link; this.anzeigeLink = result.anzeigeLink; - this.gefVon = result.gefVon; - this.hoster = result.hoster; + this.hosterName = result.hosterName; + this.hosterLink = result.hosterLink; this.anonym = result.anonym; this.description = result.description; this.added = result.added; this.index = -result.index; this.rank = result.rank; - this.hostname = result.hostname; return true; }; @@ -291,14 +289,13 @@ Result.prototype.save = function () { title: this.title, link: this.link, anzeigeLink: this.anzeigeLink, - gefVon: this.gefVon, - hoster: this.hoster, + hosterName: this.hosterName, + hosterLink: this.hosterLink, anonym: this.anonym, description: this.description, added: this.added, index: this.index, - rank: this.rank, - hostname: this.hostname + rank: this.rank }; // Encode the result object into a string, then into base64 @@ -356,31 +353,36 @@ Result.prototype.toHtml = function () { // Create the saved-result element var result = $('\ <div class="saved-result result" data-count="' + this.index + '">\ - <div class="saved-result-remover remover" title="Ergebnis aus dem Speicher löschen">\ + <div class="saved-result-remover remover" title="' + t('result-saver.delete') + '">\ <i class="fa fa-trash"></i>\ </div>\ <div class="saved-result-content">\ <div class="result-header">\ - <h2 class="result-title">\ - <a class="title" href="' + this.link + '" target="_blank" data-count="1" rel="noopener">\ - ' + this.title + '\ + <div class="result-headline">\ + <h2 class="result-title">\ + <a href="' + this.link + '" target="_blank" data-count="1" rel="noopener">\ + ' + this.title + '\ + </a>\ + </h2>\ + <a class="result-hoster" href="' + this.hosterLink + '" target="_blank" data-count="1" rel="noopener">\ + ' + this.hosterName + '\ </a>\ - <a class="result-link" href="' + this.link + '" target="_blank" data-hoster="' + this.hoster + '" rel="noopener">\ - ' + this.anzeigeLink + '\ - </a>\ - </h2>\ + </div>\ + <a class="result-link" href="' + this.link + '" target="_blank" rel="noopener">\ + ' + this.anzeigeLink + '\ + </a>\ <div class="result-body">\ <div class="description">' + this.description + '</div>\ </div>\ <div class="result-footer">\ <a class="result-open" href="' + this.link + '" target="_self" rel="noopener">\ - ÖFFNEN\ + ' + t('result-saver.save.this') + '\ </a>\ <a class="result-open" href="' + this.link + '" target="_blank" rel="noopener">\ - IN NEUEM TAB\ + ' + t('result-saver.save.newtab') + '\ </a>\ <a class="result-open-proxy" onmouseover="$(this).popover(\'show\');" onmouseout="$(this).popover(\'hide\');" data-toggle="popover" data-placement="auto right" data-container="body" data-content="Der Link wird anonymisiert geöffnet. Ihre Daten werden nicht zum Zielserver übertragen. Möglicherweise funktionieren manche Webseiten nicht wie gewohnt." href="' + this.anonym + '" target="_blank" rel="noopener" data-original-title="" title="">\ - ANONYM ÖFFNEN\ + ' + t('result-saver.save.anonymous') + '\ </a>\ </div>\ </div>\ @@ -405,12 +407,14 @@ function resultSaver (index) { // Read the necessary data from the result html var title = $('.result[data-count=' + index + '] .result-title a').html().trim(); var link = $('.result[data-count=' + index + '] .result-title a').attr('href').trim(); + var hosterName = $('.result[data-count=' + index + '] .result-hoster').html().trim(); + var hosterLink = $('.result[data-count=' + index + '] .result-hoster').attr('href').trim(); var anzeigeLink = $('.result[data-count=' + index + '] .result-link').html().trim(); var description = $('.result[data-count=' + index + '] .result-description').html().trim(); var anonym = $('.result[data-count=' + index + '] .result-open-proxy').attr('href').trim(); // Create the result object - var result = new Result(title, link, anzeigeLink, description, anonym, index, null); + var result = new Result(title, link, hosterName, hosterLink, anzeigeLink, description, anonym, index, null); // Add new result to results results.addResult(result); diff --git a/resources/assets/js/translations.js b/resources/assets/js/translations.js index 0b7c0ae0269b8ead556fce5f856d38a9591f9733..d0ca59cbcefc00be097dd56f8e3b9c44905014a6 100644 --- a/resources/assets/js/translations.js +++ b/resources/assets/js/translations.js @@ -1,29 +1,59 @@ +/** + * Ãœbersetzt den Key in die aktuelle Sprache. + * Die Sprache kann optional auch explizit angegeben werden. + * Verwendung: t('KEY') + */ + // Speichert die Ãœbersetzungen var translations = { - 'de': { - 'select-engine': 'Bitte mindestens 1 Suchmaschine auswählen.', - 'select-valid-name': 'Bitte gültigen Namen eingeben:\n* Keine Sonderzeichen\n* Mindestens 1 Buchstabe\n', - 'confirm-overwrite-name': 'Name bereits genutzt.\nÃœberschreiben?', - 'saved-settings': '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 Lesezeichen für die generierte Startseite einrichten.', - 'generated-plugin': 'Ihr Browserplugin mit den persönlichen Sucheinstellungen wurde generiert. Folgen Sie bitte der Anleitung auf der folgenden Seite um es zu installieren. Beachten Sie: Zuvor sollten Sie ein eventuell bereits installiertes MetaGer-Plugin entfernen.' - }, + 'de': { + 'select-engine': 'Bitte mindestens 1 Suchmaschine auswählen.', + 'select-valid-name': 'Bitte gültigen Namen eingeben:\n* Keine Sonderzeichen\n* Mindestens 1 Buchstabe\n', + 'confirm-overwrite-name': 'Name bereits genutzt.\nÃœberschreiben?', + 'saved-settings': '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 Lesezeichen für die generierte Startseite einrichten.', + 'generated-plugin': 'Ihr Browserplugin mit den persönlichen Sucheinstellungen wurde generiert. Folgen Sie bitte der Anleitung auf der folgenden Seite um es zu installieren. Beachten Sie: Zuvor sollten Sie ein eventuell bereits installiertes MetaGer-Plugin entfernen.', + 'result-saver.title': 'Gespeicherte Ergebnisse', + 'result-saver.filter': 'Filtern', + 'result-saver.sort.chronological': 'Chronologisch', + 'result-saver.sort.ranking': 'MetaGer-Ranking', + 'result-saver.sort.alphabetical': 'Alphabetisch (Hostname)', + 'result-saver.delete': 'Ergebnis aus dem Speicher löschen', + 'result-saver.deleteAll': '<span class="hidden-xs">Ergebnisse</span> löschen</button>', + 'result-saver.save.this': 'ÖFFNEN', + 'result-saver.save.newtab': 'IN NEUEM TAB', + 'result-saver.save.anonymous': 'ANONYM ÖFFNEN' + }, - 'en': { - 'select-engine' : 'Please select at least 1 search engine.', - 'select-valid-name': 'No characters other than a-z, A-Z, 0-9, ä, ö, ü, ß, -, _ allowed, at least 1 character', - 'confirm-overwrite-name': 'Name already in use.\nOverwrite?', - 'saved-settings': 'On the following startpage your settings are saved one-time. They will be lost after your first search. Though if you want to save them, you can create a bookmark for the generated startpage.', - 'generated-plugin': 'Your browser plugin with personal settings was generated. Please follow the instructions on the following page to install it. Notice that beforehand you might have to delete a former MetaGer plugin.' - }, + 'en': { + 'select-engine': 'Please select at least 1 search engine.', + 'select-valid-name': 'No characters other than a-z, A-Z, 0-9, ä, ö, ü, ß, -, _ allowed, at least 1 character', + 'confirm-overwrite-name': 'Name already in use.\nOverwrite?', + 'saved-settings': 'On the following startpage your settings are saved one-time. They will be lost after your first search. Though if you want to save them, you can create a bookmark for the generated startpage.', + 'generated-plugin': 'Your browser plugin with personal settings was generated. Please follow the instructions on the following page to install it. Notice that beforehand you might have to delete a former MetaGer plugin.', + 'result-saver.title': 'Saved Results', + 'result-saver.filter': 'Filter', + 'result-saver.sort.chronological': 'Chronological', + 'result-saver.sort.ranking': 'MetaGer-Ranking', + 'result-saver.sort.alphabetical': 'Alphabetical (Hostname)', + 'result-saver.delete': 'Delete saved Result', + 'result-saver.deleteAll': 'delete <span class="hidden-xs">results</span>', + 'result-saver.save.this': 'OPEN', + 'result-saver.save.newtab': 'IN NEW TAB', + 'result-saver.save.anonymous': 'OPEN ANONYMOUSLY' + }, - 'es': { - 'select-engine': 'Por favor, seleccione al menos un motor de búsqueda.', - 'select-valid-name': 'Por favor, introduzca un nombre válido constituido por letras y números.', - 'confirm-overwrite-name': 'Nombre ya ha sido elegido.\n¿Substituirlo?', - // 'saved-settings': '', - // 'generated-plugin': '' - } -} + 'es': { + 'select-engine': 'Por favor, seleccione al menos un motor de búsqueda.', + 'select-valid-name': 'Por favor, introduzca un nombre válido constituido por letras y números.', + 'confirm-overwrite-name': 'Nombre ya ha sido elegido.\n¿Substituirlo?', + // 'saved-settings': '', + // 'generated-plugin': '' + // 'result-saver.sort.chronological': 'Chronologisch', + // 'result-saver.sort.ranking': 'MetaGer-Ranking', + // 'result-saver.sort.alphabetical': 'Alphabetisch (Hostname)', + // 'result-saver.delete': 'Ergebnis aus dem Speicher löschen', + } +}; /** * Ãœbersetzt den gegebenen Schlüssel in der gegebenen Sprache @@ -31,13 +61,13 @@ var translations = { * @param {string} key Zu übersetzender Schlüssel * @param {string} lang Zu verwendende Sprache */ -function t(key, lang) { - if (arguments.length == 1) { - var lang = $('html').attr('lang'); - return translations[lang][key]; - } else if (arguments.length == 2 && translations[lang] && translations[lang][key]) { - return translations[lang][key]; - } else { - return translations.de[key]; - } -} \ No newline at end of file +function t (key, lang) { + if (arguments.length == 1) { + var lang = $('html').attr('lang'); + return translations[lang][key]; + } else if (arguments.length == 2 && translations[lang] && translations[lang][key]) { + return translations[lang][key]; + } else { + return translations.de[key]; + } +} diff --git a/resources/assets/less/metager/result-page.less b/resources/assets/less/metager/result-page.less index bc1ad6a089aec3dab84c166908a533ae4a26d2f0..4ed4d4a471c2deca5d0210e5c1a2f59406bd2b79 100644 --- a/resources/assets/less/metager/result-page.less +++ b/resources/assets/less/metager/result-page.less @@ -384,6 +384,9 @@ p.mg-logo { #results-container { max-width: @result-width; width: 100%; + .alert { + margin: 8px 0px; + } } #additions-container { padding-left: 50px; diff --git a/resources/assets/less/metager/result.less b/resources/assets/less/metager/result.less index 47c8634042af9da9fd3074347bb154cb89f0262b..6b76b4e665d980187b7ecbe0b0a4b139a4b7e1b0 100644 --- a/resources/assets/less/metager/result.less +++ b/resources/assets/less/metager/result.less @@ -30,6 +30,7 @@ } } .result-hoster { + font-size: @result-font-small; margin-left: 20px; color: #808080; white-space: nowrap; @@ -41,7 +42,8 @@ text-overflow: ellipsis; white-space: nowrap; font-size: @result-font-small; - width: auto; + width: fit-content; + max-width: 100%; &, &:active, &:hover, diff --git a/resources/assets/less/metager/searchbar.less b/resources/assets/less/metager/searchbar.less index 78fe580dea97a7a75a1dbf254f12a7225671fca9..5c3e873b01561c253fa8d4837c94d132ba636879 100644 --- a/resources/assets/less/metager/searchbar.less +++ b/resources/assets/less/metager/searchbar.less @@ -5,11 +5,11 @@ display: -ms-flexbox; display: flex; -webkit-box-align: stretch; - -ms-flex-align: stretch; - align-items: stretch; + -ms-flex-align: stretch; + align-items: stretch; -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; + -ms-flex-pack: center; + justify-content: center; font-size: 16px; background-color: transparent; color: #333; @@ -18,8 +18,8 @@ } .search-input-submit { -webkit-box-flex: 1; - -ms-flex-positive: 1; - flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; display: -webkit-box; display: -ms-flexbox; display: flex; @@ -30,14 +30,14 @@ } .search-input { -webkit-box-flex: 1; - -ms-flex-positive: 1; - flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; input { border: none; border-bottom: none; height: 40px; -webkit-box-shadow: none; - box-shadow: none; + box-shadow: none; &:focus { outline-color: rgb(255, 128, 0); -webkit-box-shadow: 0px 0px 2px 2px rgba(255, 128, 0, 1); @@ -65,8 +65,8 @@ @media (max-width: @screen-xs-max) { -webkit-box-orient: vertical; -webkit-box-direction: reverse; - -ms-flex-direction: column-reverse; - flex-direction: column-reverse; + -ms-flex-direction: column-reverse; + flex-direction: column-reverse; } } @@ -141,8 +141,8 @@ header { display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; position: fixed; z-index: 100; // Makes the header larger, so it correctly covers the non scrolling parts below width: @resultpage-leftbox-max-width + @resultpage-leftbox-big-screen-margin-left + 10; @@ -155,8 +155,8 @@ header { padding: @resultpage-leftbox-min-dist-top-bottom @resultpage-leftbox-min-dist-left-right 0px @resultpage-leftbox-min-dist-left-right; -webkit-box-pack: center; -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; + -ms-flex-align: center; + align-items: center; } #research-bar { width: 100%; @@ -169,13 +169,13 @@ header { display: -ms-flexbox; display: flex; -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; + -ms-flex-align: center; + align-items: center; -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; + -ms-flex-pack: center; + justify-content: center; -webkit-box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); - box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); + box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); @media (max-width: 799px) { margin: 0px @resultpage-leftbox-min-dist-left-right; } @@ -193,8 +193,8 @@ header:nth-child(1) { display: -ms-flexbox; display: flex; -webkit-box-pack: left; - -ms-flex-pack: left; - justify-content: left; + -ms-flex-pack: left; + justify-content: left; margin-left: @resultpage-leftbox-big-screen-margin-left; padding-top: 8px; width: @resultpage-leftbox-max-width; @@ -205,8 +205,8 @@ header:nth-child(1) { display: -ms-flexbox; display: flex; -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; + -ms-flex-pack: center; + justify-content: center; padding: @resultpage-leftbox-min-dist-top-bottom @resultpage-leftbox-min-dist-left-right 0px @resultpage-leftbox-min-dist-left-right; } #foki-box { @@ -218,7 +218,7 @@ header:nth-child(1) { background-color: white; border: 1px solid #ccc; -webkit-box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); - box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); + box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); overflow-x: visible; padding: 10px; @media (max-width: 700px) { @@ -274,16 +274,14 @@ header:nth-child(1) { right: 1px; } } - .search-option-frame { position: relative; } - } #research-bar-placeholder { padding: @resultpage-leftbox-min-dist-top-bottom 0px 0px 50px; width: 100%; - max-width: 700px; + max-width: 760px; height: 61px; } \ No newline at end of file diff --git a/resources/lang/de/fake-result.php b/resources/lang/de/fake-result.php new file mode 100644 index 0000000000000000000000000000000000000000..bd624e7c61ca005307e84e0cd46d97fb0587650b --- /dev/null +++ b/resources/lang/de/fake-result.php @@ -0,0 +1,16 @@ +<?php + +return [ + 'title' => 'Ergebnistitel', + 'hoster' => 'Gefunden von', + 'link' => 'Ergebnislink', + 'description' => 'Zusammenfassung der Ergebnisseite', + 'open.this' => 'Ergebnis in diesem Tab öffnen', + 'open.newtab' => 'Ergebnis in einem neuen Tab öffnen', + 'open.anonymous' => 'Ergebnis anonym (über den MetaGer-Proxy) öffnen', + 'options.more' => 'Zusätzliche optionen anzeigen', + 'options.save' => 'Ergebnis zum weiteren Filtern speichern', + 'options.domain' => 'Neue auf diese Domain beschränkte Suche starten', + 'options.subdomain' => 'Neue Suche ohne diese Subdomain starten', + 'options.blacklist' => 'Neue Suche ohne diese Domain starten', +]; diff --git a/resources/lang/de/footer.php b/resources/lang/de/footer.php new file mode 100644 index 0000000000000000000000000000000000000000..1b1a0833ca2b65eca0a814121b6638718d1384c8 --- /dev/null +++ b/resources/lang/de/footer.php @@ -0,0 +1,6 @@ +<?php + +return [ + 'sumaev.1' => 'MetaGer wird entwickelt und betrieben vom ', + 'sumaev.2' => 'SUMA-EV - Verein für freien Wissenszugang.' +]; diff --git a/resources/lang/de/sidebar.php b/resources/lang/de/sidebar.php new file mode 100644 index 0000000000000000000000000000000000000000..48d12a718060986b2a2b4865ca3822d208588464 --- /dev/null +++ b/resources/lang/de/sidebar.php @@ -0,0 +1,30 @@ +<?php + +return [ + 'nav1' => 'Suche', + 'nav2' => 'Spenden', + 'nav3' => 'Datenschutz', + 'nav4' => 'Forum', + 'nav5' => 'Kontakt', + 'nav6' => 'Team', + 'nav7' => 'Ãœber uns', + 'nav8' => 'Impressum', + 'nav9' => 'Hilfe', + 'nav10' => 'Widget', + 'nav11' => 'Assoziator', + 'nav13' => 'URL-Verkürzer', + 'nav14' => 'TOR-Hidden-Service', + 'nav15' => 'Dienste', + 'nav16' => 'Fördern', + 'nav17' => 'Einkaufen bei MetaGer-Fördershops', + 'nav18' => 'Kontakt', + 'nav19' => 'Sprache', + 'nav20' => 'Hilfe', + 'nav21' => 'FAQ', + 'nav22' => 'Zitatsuche', + 'nav23' => 'Aufnahmeantrag SUMA-EV', + 'nav24' => 'MetaGer Quellcode', + 'nav25' => 'MetaGer App', + 'nav26' => 'MetaGer-Fanshop', + 'navigationToggle' => 'Navigation anzeigen', +]; diff --git a/resources/lang/de/staticPages.php b/resources/lang/de/staticPages.php index 5481aac34f29e73a915685c7792a4c4bcef6de27..73069d5ac96f99c0946e37e106b22d34f1f5506d 100644 --- a/resources/lang/de/staticPages.php +++ b/resources/lang/de/staticPages.php @@ -2,35 +2,7 @@ return [ 'opensearch' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen', - - 'nav1' => 'Suche', - 'nav2' => 'Spenden', - 'nav3' => 'Datenschutz', - 'nav4' => 'Forum', - 'nav5' => 'Kontakt', - 'nav6' => 'Team', - 'nav7' => 'Ãœber uns', - 'nav8' => 'Impressum', - 'nav9' => 'Hilfe', - 'nav10' => 'Widget', - 'nav11' => 'Assoziator', - 'nav13' => 'URL-Verkürzer', - 'nav14' => 'TOR-Hidden-Service', - 'nav15' => 'Dienste', - 'nav16' => 'Fördern', - 'nav17' => 'Einkaufen bei MetaGer-Fördershops', - 'nav18' => 'Kontakt', - 'nav19' => 'Sprache', - 'nav20' => 'Hilfe', - 'nav21' => 'FAQ', - 'nav22' => 'Zitatsuche', - 'nav23' => 'Aufnahmeantrag SUMA-EV', - 'nav24' => 'MetaGer Quellcode', - 'nav25' => 'MetaGer App', - 'navigationToggle' => 'Navigation anzeigen', - - 'sumaev.1' => 'MetaGer wird entwickelt und betrieben vom ', - 'sumaev.2' => 'SUMA-EV - Verein für freien Wissenszugang.', + 'meta.Description' => 'Sicher suchen und finden unter Wahrung der Privatsphäre. Das digitale Wissen der Welt muss ohne Bevormundung durch Staaten oder Konzerne frei zugänglich sein und bleiben.', 'meta.Keywords' => 'Internetsuche, privatsphäre, privacy, Suchmaschine, Datenschutz, Anonproxy, anonym suchen, Bildersuche, Suchmaschine, anonym, MetaGer, metager, metager.de', 'meta.language' => 'de', diff --git a/resources/lang/de/zitatsuche.php b/resources/lang/de/zitatsuche.php index 6cc83a6a86248535b043ada04cf8380e0bc5fd5e..5f3890280fd1c35360379451392fea2a12f7d456 100644 --- a/resources/lang/de/zitatsuche.php +++ b/resources/lang/de/zitatsuche.php @@ -1,6 +1,8 @@ <?php return [ - 'head.1' => 'MetaGer - Zitatsuche', - 'p.1' => 'In dem unten stehenden Textfeld können Sie in unserer Datenbank nach Zitaten oder Autoren suchen.', + 'title' => 'MetaGer - Zitatsuche', + 'subtitle' => 'In dem unten stehenden Textfeld können Sie in unserer Datenbank nach Zitaten oder Autoren suchen.', + 'search-label' => 'Suchworte eingeben', + 'results-label' => 'Ergebnisse für die Suche', ]; diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index 07350606a49a31de71db92105ec53752f78f6475..eafc2bada0ec3a49703e9325c7c2338d58140cb3 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -11,7 +11,6 @@ @include('parts.searchbar', ['class' => 'startpage-searchbar']) <script type="text/javascript" src="{{ elixir('js/scriptStartPage.js') }}"></script> <script type="text/javascript" src="{{ elixir('js/searchbar.js') }}"></script> - <script src="{{ elixir('js/translations.js') }}"></script> @endsection @section('optionalContent') diff --git a/resources/views/parts/fake-result.blade.php b/resources/views/parts/fake-result.blade.php index cff45daf7705bdf88ca54fe60d1b2d17eb3e1b4a..2cbec8980cecb8f3a1c888fa70aabae0894104dc 100644 --- a/resources/views/parts/fake-result.blade.php +++ b/resources/views/parts/fake-result.blade.php @@ -1,31 +1,34 @@ <div class="result fake-result" data-count="1"> <div class="result-header"> - <h2 class="result-title"> - <a href="javascript:void(0);" data-tooltip="Ergebnistitel"> - Wikipedia – Die freie Enzyklopädie - </a> - </h2> - <a class="result-link" href="javascript:void(0);" data-tooltip="Ergebnislink"> + <div class="result-headline"> + <h2 class="result-title"> + <a href="javascript:void(0);" data-tooltip="{{ trans('fake-result.title') }}"> + Wikipedia – Die freie Enzyklopädie + </a> + </h2> + <a class="result-hoster" href="javascript:void(0);" data-tooltip="{{ trans('fake-result.link') }}">MetaGer</a> + </div> + <a class="result-link" href="javascript:void(0);" data-tooltip="{{ trans('fake-result.link') }}"> de.wikipedia.org </a> </div> <div class="result-body"> - <div class="result-description" data-tooltip="Zusammenfassung der Ergebnisseite"> + <div class="result-description" data-tooltip="{{ trans('fake-result.description') }}"> Wikipedia ist ein Projekt zum Aufbau einer Enzyklopädie aus freien Inhalten, zu denen du sehr gern beitragen kannst. Seit Mai 2001 sind 2.150.918 Artikel in ... </div> </div> <div class="result-footer"> - <a class="result-open" href="javascript:void(0);" data-tooltip="Ergebnis in diesem Tab öffnen"> + <a class="result-open" href="javascript:void(0);" data-tooltip="{{ trans('fake-result.open.this') }}"> ÖFFNEN </a> - <a class="result-open-newtab" href="javascript:void(0);" data-tooltip="Ergebnis in einem neuen Tab öffnen"> + <a class="result-open-newtab" href="javascript:void(0);" data-tooltip="{{ trans('fake-result.open.newtab') }}"> IN NEUEM TAB </a> - <a class="result-open-proxy" href="javascript:void(0);" data-tooltip="Ergebnis anonym (über den MetaGer-Proxy) öffnen"> + <a class="result-open-proxy" href="javascript:void(0);" data-tooltip="{{ trans('fake-result.open.anonymous') }}"> ANONYM ÖFFNEN </a> <div class="open-result-options"> - <label for="result-toggle-1" role="button" data-tooltip="Zusätzliche optionen anzeigen"> + <label for="result-toggle-1" role="button" data-tooltip="{{ trans('fake-result.options.more') }}"> MEHR </label> </div> @@ -35,22 +38,22 @@ <div class="options"> <ul class="option-list list-unstyled small"> <li class=""> - <a class="saver" href="javascript:setDummySearch('wikipedia site:de.wikipedia.org wurde zum weiteren Filtern gespeichert')" data-tooltip="Ergebnis zum weiteren Filtern speichern"> + <a class="saver" href="javascript:setDummySearch('wikipedia site:de.wikipedia.org wurde zum weiteren Filtern gespeichert')" data-tooltip="{{ trans('fake-result.options.save') }}"> <i class="fa fa-floppy-o"></i> Ergebnis in Tab speichern. </a> </li> <li> - <a href="javascript:setDummySearch('wikipedia site:de.wikipedia.org')" data-tooltip="Neue auf diese Domain beschränkte Suche starten"> + <a href="javascript:setDummySearch('wikipedia site:de.wikipedia.org')" data-tooltip="{{ trans('fake-result.options.domain') }}"> Auf dieser Domain neu suchen </a> </li> <li> - <a href="javascript:setDummySearch('wikipedia -site:de.wikipedia.org')" data-tooltip="Neue Suche ohne diese Subdomain starten"> + <a href="javascript:setDummySearch('wikipedia -site:de.wikipedia.org')" data-tooltip="{{ trans('fake-result.options.subdomain') }}"> de.wikipedia.org ausblenden </a> </li> <li> - <a href="javascript:setDummySearch('wikipedia -site:*.wikipedia.org')" data-tooltip="Neue Suche ohne diese Domain starten"> + <a href="javascript:setDummySearch('wikipedia -site:*.wikipedia.org')" data-tooltip="{{ trans('fake-result.options.blacklist') }}"> *.wikipedia.org ausblenden </a> </li> diff --git a/resources/views/parts/footer.blade.php b/resources/views/parts/footer.blade.php index f7d3d5bd5a54b887d54a171fb8069af0009221ed..b1e488662cd3bd915c3c4fb27970cc41336d5b1f 100644 --- a/resources/views/parts/footer.blade.php +++ b/resources/views/parts/footer.blade.php @@ -1,8 +1,8 @@ @if ($type === 'startpage' || $type === 'subpage' || $type === 'resultpage') <footer class="{{ $id }} noprint"> <div id="info"> - <span><a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "kontakt") }}">{{ trans('staticPages.nav5') }}</a> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "impressum") }}">{{ trans('staticPages.nav8') }}</a>@if(LaravelLocalization::getCurrentLocale() == "de") - <a href="https://shop.spreadshirt.de/metager/" rel="noopener" target="_blank">Fanshop</a>@endif</span> - <span class="hidden-xs">{{ trans('staticPages.sumaev.1') }}<a href="https://www.suma-ev.de/">{{ trans('staticPages.sumaev.2') }}</a></span> + <span><a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "kontakt") }}">{{ trans('sidebar.nav5') }}</a> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "impressum") }}">{{ trans('sidebar.nav8') }}</a>@if(LaravelLocalization::getCurrentLocale() == "de") - <a href="https://shop.spreadshirt.de/metager/" rel="noopener" target="_blank">{{ trans('sidebar.nav26') }}</a>@endif</span> + <span class="hidden-xs">{{ trans('footer.sumaev.1') }}<a href="https://www.suma-ev.de/">{{ trans('footer.sumaev.2') }}</a></span> </div> </footer> @endif \ No newline at end of file diff --git a/resources/views/parts/sidebar.blade.php b/resources/views/parts/sidebar.blade.php index 7df1a728d5f2fd6491d12572f848cd73cadd31d5..43fa112bc47969e09e234dcaff52e65d3ed30cd3 100644 --- a/resources/views/parts/sidebar.blade.php +++ b/resources/views/parts/sidebar.blade.php @@ -9,62 +9,62 @@ <li @if ( !isset($navbarFocus) || $navbarFocus === 'suche') class="active" @endif > <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}" tabindex="200" id="navigationSuche"> <i class="fa fa-search" aria-hidden="true"></i> - <span> {{ trans('staticPages.nav1') }}</span> + <span> {{ trans('sidebar.nav1') }}</span> </a> </li> <li @if (isset($navbarFocus) && $navbarFocus === 'dienste') class="metager-dropdown active" @else class="metager-dropdown" @endif > <input id="servicesToggle" class="sideBarCheckbox" type="checkbox"> <label for="servicesToggle" class="metager-dropdown-toggle" role="button" aria-haspopup="true" aria-expanded="false" tabindex="225"> <i class="fa fa-wrench" aria-hidden="true"></i> - <span> {{ trans('staticPages.nav15') }}</span> + <span> {{ trans('sidebar.nav15') }}</span> <span class="caret"></span> </label> <ul class="metager-dropdown-menu"> <li> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/widget/") }}" tabindex="226">{{ trans('staticPages.nav10') }}</a> + <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/widget/") }}" tabindex="226">{{ trans('sidebar.nav10') }}</a> </li> <li> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/zitat-suche/") }}" tabindex="227">{{ trans('staticPages.nav22') }}</a> + <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/zitat-suche/") }}" tabindex="227">{{ trans('sidebar.nav22') }}</a> </li> <li> - <a href="https://metager.de/klassik/asso/" tabindex="228">{{ trans('staticPages.nav11') }}</a> + <a href="https://metager.de/klassik/asso/" tabindex="228">{{ trans('sidebar.nav11') }}</a> </li> <li> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/app/") }}" tabindex="230">@lang('staticPages.nav25')</a> + <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/app/") }}" tabindex="230">@lang('sidebar.nav25')</a> </li> <li> - <a href="https://metager.to/" tabindex="231">{{ trans('staticPages.nav13') }}</a> + <a href="https://metager.to/" tabindex="231">{{ trans('sidebar.nav13') }}</a> </li> <li> <a href="https://maps.metager.de" target="_blank" tabindex="232">Maps.MetaGer.de</a> </li> <li> - <a href="https://gitlab.metager3.de/open-source/MetaGer" tabindex="233">{{ trans('staticPages.nav24') }}</a> + <a href="https://gitlab.metager3.de/open-source/MetaGer" tabindex="233">{{ trans('sidebar.nav24') }}</a> </li> <li> - <a href="http://forum.suma-ev.de/viewtopic.php?f=3&t=43" tabindex="234">{{ trans('staticPages.nav14') }}</a> + <a href="http://forum.suma-ev.de/viewtopic.php?f=3&t=43" tabindex="234">{{ trans('sidebar.nav14') }}</a> </li> </ul> </li> <li @if (isset($navbarFocus) && $navbarFocus === 'datenschutz') class="active" @endif > <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/datenschutz/") }}" id="navigationPrivacy" tabindex="215"> <i class="fa fa-user-secret" aria-hidden="true"></i> - <span> {{ trans('staticPages.nav3') }}</span> + <span> {{ trans('sidebar.nav3') }}</span> </a> </li> <li @if (isset($navbarFocus) && $navbarFocus === 'hilfe') class="metager-dropdown active" @else class="metager-dropdown" @endif > <input id="helpToggle" class="sideBarCheckbox" type="checkbox"> <label for="helpToggle" class="metager-dropdown-toggle" role="button" aria-haspopup="true" aria-expanded="false" id="navigationHilfe" tabindex="216"> <i class="fa fa-info-circle" aria-hidden="true"></i> - <span> {{ trans('staticPages.nav20') }}</span> + <span> {{ trans('sidebar.nav20') }}</span> <span class="caret"></span> </label> <ul class="metager-dropdown-menu"> <li> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/hilfe/") }}" tabindex="217">{{ trans('staticPages.nav20') }}</a> + <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/hilfe/") }}" tabindex="217">{{ trans('sidebar.nav20') }}</a> </li> <li> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/faq/") }}" tabindex="218">{{ trans('staticPages.nav21') }}</a> + <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/faq/") }}" tabindex="218">{{ trans('sidebar.nav21') }}</a> </li> </ul> </li> @@ -72,23 +72,23 @@ <input id="donationToggle" class="sideBarCheckbox" type="checkbox"> <label for="donationToggle" class="metager-dropdown-toggle" role="button" aria-expanded="false" tabindex="201"> <i class="fa fa-money" aria-hidden="true"></i> - <span> {{ trans('staticPages.nav16') }}</span> + <span> {{ trans('sidebar.nav16') }}</span> <span class="caret"></span> </label> <ul class="metager-dropdown-menu"> <li> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/spende/") }}" tabindex="202">{{ trans('staticPages.nav2') }}</a> + <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/spende/") }}" tabindex="202">{{ trans('sidebar.nav2') }}</a> </li> <li> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/beitritt/") }}" tabindex="203">{{ trans('staticPages.nav23') }}</a> + <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/beitritt/") }}" tabindex="203">{{ trans('sidebar.nav23') }}</a> </li> @if(LaravelLocalization::getCurrentLocale() == "de") <li> - <a href="https://shop.spreadshirt.de/metager/" rel="noopener" target="_blank">MetaGer-Fanshop</a> + <a href="https://shop.spreadshirt.de/metager/" rel="noopener" target="_blank">{{ trans('sidebar.nav26') }}</a> </li> @endif <li> - <a href="https://www.boost-project.com/de/shops?charity_id=1129&tag=bl" tabindex="204">{{ trans('staticPages.nav17') }}</a> + <a href="https://www.boost-project.com/de/shops?charity_id=1129&tag=bl" tabindex="204">{{ trans('sidebar.nav17') }}</a> </li> </ul> </li> @@ -96,24 +96,24 @@ <input id="contactToggle" class="sideBarCheckbox" type="checkbox"> <label for="contactToggle" class="metager-dropdown-toggle" role="button" aria-haspopup="true" aria-expanded="false" id="navigationKontakt" tabindex="219"> <i class="fa fa-comments-o" aria-hidden="true"></i> - <span> {{ trans('staticPages.nav18') }}</span> + <span> {{ trans('sidebar.nav18') }}</span> <span class="caret"></span> </label> <ul class="metager-dropdown-menu"> <li> - <a href="http://forum.suma-ev.de/" tabindex="220">{{ trans('staticPages.nav4') }}</a> + <a href="http://forum.suma-ev.de/" tabindex="220">{{ trans('sidebar.nav4') }}</a> </li> <li> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/kontakt/") }}" tabindex="221">{{ trans('staticPages.nav5') }}</a> + <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/kontakt/") }}" tabindex="221">{{ trans('sidebar.nav5') }}</a> </li> <li> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/team/") }}" tabindex="222">{{ trans('staticPages.nav6') }}</a> + <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/team/") }}" tabindex="222">{{ trans('sidebar.nav6') }}</a> </li> <li> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/about/") }}" tabindex="223">{{ trans('staticPages.nav7') }}</a> + <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/about/") }}" tabindex="223">{{ trans('sidebar.nav7') }}</a> </li> <li> - <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/impressum/") }}" tabindex="224">{{ trans('staticPages.nav8') }}</a> + <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/impressum/") }}" tabindex="224">{{ trans('sidebar.nav8') }}</a> </li> </ul> </li> @@ -121,7 +121,7 @@ <input id="languagesToggle" class="sideBarCheckbox" type="checkbox"> <label for="languagesToggle" class="metager-dropdown-toggle" role="button" aria-haspopup="true" aria-expanded="false" id="navigationSprache" tabindex="235"> <i class="fa fa-globe" aria-hidden="true"></i> - <span> {{ trans('staticPages.nav19') }} ({{ LaravelLocalization::getSupportedLocales()[LaravelLocalization::getCurrentLocale()]['native'] }})</span> + <span> {{ trans('sidebar.nav19') }} ({{ LaravelLocalization::getSupportedLocales()[LaravelLocalization::getCurrentLocale()]['native'] }})</span> <span class="caret"></span> </label> <ul class="metager-dropdown-menu"> diff --git a/resources/views/settings.blade.php b/resources/views/settings.blade.php index 92dcc3b594e7dd54e3600bd1439240d62f4959bd..4b0a6e62f30e143e94435b0a61ecd489323460cd 100644 --- a/resources/views/settings.blade.php +++ b/resources/views/settings.blade.php @@ -56,6 +56,5 @@ <input id="plugin" class="btn btn-primary" type="submit" value="{!! trans('settings.speichern.3') !!}"> </div> </form> - <script src="{{ elixir('js/translations.js') }}"></script> <script src="{{ elixir('js/settings.js') }}"></script> @endsection diff --git a/resources/views/zitatsuche.blade.php b/resources/views/zitatsuche.blade.php index 94c67bcbd8e3621423f82e128e7f8736939e198e..78e5d978bfb6841739138b6736d7acf094d719b1 100644 --- a/resources/views/zitatsuche.blade.php +++ b/resources/views/zitatsuche.blade.php @@ -3,12 +3,12 @@ @section('title', $title ) @section('content') - <h1 class="page-title">{{ trans('zitatsuche.head.1') }}</h1> + <h1 class="page-title">{{ trans('zitatsuche.title') }}</h1> <div class="card-light"> - <p>{{ trans('zitatsuche.p.1') }}</p> + <p>{{ trans('zitatsuche.subtitle') }}</p> <form id="searchForm" class="form-inline" accept-charset="UTF-8"> <div class="form-group"> - <label class="sr-only" for="q">Suchworte eingeben</label> + <label class="sr-only" for="q">{{ trans('zitatsuche.search-label') }}</label> <div class="input-group"> <input type="text" class="form-control" id="q" name="q" placeholder="Suchworte" value="{{ $q }}"> <div class="input-group-addon"><button type="submit"><i class="fa fa-search" aria-hidden="true"></i></button></div> @@ -16,16 +16,16 @@ </div> </form> @if($q !== "") - <hr /> - <h3>Ergebnisse für die Suche "{{$q}}":</h3> - @foreach($results as $author => $quotes) - <b><a href="{{ action('MetaGerSearch@search', ['eingabe' => $author, 'focus' => 'web', 'encoding' => 'utf8', 'lang' => 'all']) }}" target="_blank">{{$author}}</a>:</b> - <ul class="list-unstyled"> - @foreach($quotes as $quote) - <li><quote>"{{ $quote }}"</quote></li> + <hr /> + <h3>{{ trans('zitatsuche.results-label') }} "{{$q}}":</h3> + @foreach($results as $author => $quotes) + <b><a href="{{ action('MetaGerSearch@search', ['eingabe' => $author, 'focus' => 'web', 'encoding' => 'utf8', 'lang' => 'all']) }}" target="_blank">{{$author}}</a>:</b> + <ul class="list-unstyled"> + @foreach($quotes as $quote) + <li><quote>"{{ $quote }}"</quote></li> + @endforeach + </ul> @endforeach - </ul> - @endforeach @endif </div> @endsection diff --git a/webpack.mix.js b/webpack.mix.js index 101389bc29a68f055fba09e757b9f79593bfba8f..239afd2898f2c805a125a8e40f5d1d849d797ef4 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -11,16 +11,18 @@ let mix = require('laravel-mix'); | */ -mix.less('resources/assets/less/default.less', 'public/css/themes/default.css') +mix + .less('resources/assets/less/default.less', 'public/css/themes/default.css') .less('resources/assets/less/metager/beitritt.less', 'public/css/beitritt.css') .less('resources/assets/less/utility.less', 'public/css/utility.css') // js .scripts(['resources/assets/js/lib/jquery.js', 'resources/assets/js/lib/jquery-ui.min.js', 'resources/assets/js/lib/bootstrap.js', 'resources/assets/js/lib/lightslider.js', 'resources/assets/js/lib/masonry.js', 'resources/assets/js/lib/imagesloaded.js', 'resources/assets/js/lib/openpgp.min.js', 'resources/assets/js/lib/iframeResizer.min.js', - 'resources/assets/js/lib/md5.js'], 'public/js/lib.js') - .scripts(['resources/assets/js/scriptStartPage.js', 'resources/assets/js/result-saver.js'], 'public/js/scriptStartPage.js') - .scripts(['resources/assets/js/scriptResultPage.js', 'resources/assets/js/result-saver.js'], 'public/js/scriptResultPage.js') - .scripts(['resources/assets/js/searchbar.js'], 'public/js/searchbar.js') - .scripts(['resources/assets/js/focus-creator.js'], 'public/js/focus-creator.js') + 'resources/assets/js/lib/md5.js', 'resources/assets/js/translations.js'], 'public/js/lib.js') + .scripts(['resources/assets/js/scriptStartPage.js', 'resources/assets/js/result-saver.js', 'resources/assets/js/translations.js'], 'public/js/scriptStartPage.js') + .scripts(['resources/assets/js/scriptResultPage.js', 'resources/assets/js/result-saver.js', 'resources/assets/js/translations.js'], 'public/js/scriptResultPage.js') + .scripts(['resources/assets/js/searchbar.js', 'resources/assets/js/translations.js'], 'public/js/searchbar.js') + .scripts(['resources/assets/js/focus-creator.js', 'resources/assets/js/translations.js'], 'public/js/focus-creator.js') // utility - .scripts(['resources/assets/js/utility.js'], 'public/js/utility.js').version(); + .scripts(['resources/assets/js/utility.js', 'resources/assets/js/translations.js'], 'public/js/utility.js') + .version();