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 = $('
' + name + '
'); - $(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(''); - } - } - } - // 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 = $('\
\ -

Gespeicherte Ergebnisse

\ +

' + t('result-saver.title') + '

\
\ '); $('#additions-container').append(tabPanel); @@ -141,19 +141,20 @@ Results.prototype.addToContainer = function (container) { var options = $('\
\
\ - \ + \
\
\ \
\
\ \ + \ + ' + t('result-saver.deleteAll') + '\ + \
\
\ '); @@ -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 = $('\
\ -
\ +
\ \
\
\ @@ -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': ' löschen', + '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 ', + '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 @@ + '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 @@ + '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 @@ + '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 @@ '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']) - @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 @@
-
+
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 ...