MediaWiki:Common.js: Unterschied zwischen den Versionen
Erscheinungsbild
Die Seite wurde neu angelegt: „$(document).ready(function () { const toggle = $('<button>') .text('🌓 Dark Mode') .attr('id', 'toggle-dark') .css({ position: 'fixed', top: '1em', right: '1em', zIndex: 999, padding: '0.5em', background: '#1a1a1a', color: '#eee', border: '1px solid #444', borderRadius: '4px', cursor: 'pointer' }) .click(function () { $('body').toggleClass('dark-mode'); }); $('…“ |
Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
$(document).ready(function () { | $(document).ready(function () { | ||
const toggle = $('<button>') | const toggle = $('<button>') | ||
.text('🌓 | .text('🌓') | ||
.attr('id', 'toggle-dark') | .attr('id', 'toggle-dark') | ||
.css({ | .css({ | ||
position: 'fixed', | position: 'fixed', | ||
bottom: '1em', | |||
right: '1em', | right: '1em', | ||
zIndex: 999, | zIndex: 999, | ||
padding: '0. | padding: '0.6em 0.8em', | ||
background: ' | background: 'rgba(30,30,30,0.7)', | ||
color: '# | color: '#ccc', | ||
border: ' | border: 'none', | ||
borderRadius: ' | borderRadius: '50%', | ||
cursor: 'pointer' | fontSize: '1.2em', | ||
cursor: 'pointer', | |||
backdropFilter: 'blur(4px)' | |||
}) | }) | ||
.hover( | |||
function () { $(this).css('background', '#444'); }, | |||
function () { $(this).css('background', 'rgba(30,30,30,0.7)'); } | |||
) | |||
.click(function () { | .click(function () { | ||
$('body').toggleClass('dark-mode'); | $('body').toggleClass('dark-mode'); | ||
Version vom 16. Juni 2025, 20:34 Uhr
$(document).ready(function () {
const toggle = $('<button>')
.text('🌓')
.attr('id', 'toggle-dark')
.css({
position: 'fixed',
bottom: '1em',
right: '1em',
zIndex: 999,
padding: '0.6em 0.8em',
background: 'rgba(30,30,30,0.7)',
color: '#ccc',
border: 'none',
borderRadius: '50%',
fontSize: '1.2em',
cursor: 'pointer',
backdropFilter: 'blur(4px)'
})
.hover(
function () { $(this).css('background', '#444'); },
function () { $(this).css('background', 'rgba(30,30,30,0.7)'); }
)
.click(function () {
$('body').toggleClass('dark-mode');
});
$('body').append(toggle);
});