MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus Shoplytics Wiki
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 4: | Zeile 4: | ||
const searchForm = ` | const searchForm = ` | ||
<h1 style="color:#220e60; font-weight:700; text-align:center; border:0;">Wie können wir dir helfen?</h1><br> | <h1 style="color:#220e60; font-weight:700; text-align:center; border:0;">Wie können wir dir helfen?</h1><br> | ||
<style>.firstHeading {display:none;}</style> | <style>.firstHeading, .searchInput {display:none;}</style> | ||
<form style="text-align: center;" action="/index.php" method="get" class="custom-search-form" style="margin-top: 1em;"> | <form style="text-align: center;" action="/index.php" method="get" class="custom-search-form" style="margin-top: 1em;"> | ||
<input type="hidden" name="title" value="Spezial:Suche"> | <input type="hidden" name="title" value="Spezial:Suche"> | ||
<input | <input style="box-sizing: border-box; border: solid 2px #220e60; border-radius: 3em; padding:15px;" type="search" name="search" placeholder="Shoplytics Wiki durchsuchen..."> | ||
</form> | </form> | ||
`; | `; | ||
Version vom 21. April 2025, 10:39 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */
$(document).ready(function() {
if (mw.config.get('wgPageName') === 'Hauptseite') {
const searchForm = `
<h1 style="color:#220e60; font-weight:700; text-align:center; border:0;">Wie können wir dir helfen?</h1><br>
<style>.firstHeading, .searchInput {display:none;}</style>
<form style="text-align: center;" action="/index.php" method="get" class="custom-search-form" style="margin-top: 1em;">
<input type="hidden" name="title" value="Spezial:Suche">
<input style="box-sizing: border-box; border: solid 2px #220e60; border-radius: 3em; padding:15px;" type="search" name="search" placeholder="Shoplytics Wiki durchsuchen...">
</form>
`;
$('#bodyContent').prepend(searchForm);
}
});