Menú alternativo
Menú alternativo personal
No has accedido
Tu dirección IP será visible si haces alguna edición

Diferencia entre revisiones de «MediaWiki:Vector.js»

Página de la interfaz de MediaWiki
imported>Jorge Abellán
Sin resumen de edición
imported>Jorge Abellán
Sin resumen de edición
Línea 29: Línea 29:
*/
*/


$(".ns-1 #firstHeading, .ns-2 #firstHeading, .ns-3 #firstHeading, .ns-4 #firstHeading, .ns-5 #firstHeading, .ns-6 #firstHeading, .ns-7 #firstHeading, .ns-8 #firstHeading, .ns-9 #firstHeading, .ns-10 #firstHeading, .ns-11 #firstHeading, .ns-12 #firstHeading, .ns-13 #firstHeading., ns-14 #firstHeading, .ns-15 #firstHeading, .ns--1 #firstHeading, .ns--2 #firstHeading")
$(".ns-1 #firstHeading", ".ns-2 #firstHeading", ".ns-3 #firstHeading", ".ns-4 #firstHeading", ".ns-5 #firstHeading", ".ns-6 #firstHeading", ".ns-7 #firstHeading", ".ns-8 #firstHeading", ".ns-9 #firstHeading", ".ns-10 #firstHeading", ".ns-11 #firstHeading", ".ns-12 #firstHeading", ".ns-13 #firstHeading., ns-14 #firstHeading", ".ns-15 #firstHeading", ".ns--1 #firstHeading", ".ns--2 #firstHeading")
.before('<div class="logo-container"><a href="/wiki/P%C3%A1gina_principal" title="Inicio"><img alt="Inicio" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Wikisp-logo-horizontal.svg/langes-200px-Wikisp-logo-horizontal.svg.png" decoding="async" width="200" height="51" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Wikisp-logo-horizontal.svg/langes-300px-Wikisp-logo-horizontal.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Wikisp-logo-horizontal.svg/langes-400px-Wikisp-logo-horizontal.svg.png 2x" data-file-width="769" data-file-height="195"></a></div>');
.before('<div class="logo-container"><a href="/wiki/P%C3%A1gina_principal" title="Inicio"><img alt="Inicio" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Wikisp-logo-horizontal.svg/langes-200px-Wikisp-logo-horizontal.svg.png" decoding="async" width="200" height="51" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Wikisp-logo-horizontal.svg/langes-300px-Wikisp-logo-horizontal.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Wikisp-logo-horizontal.svg/langes-400px-Wikisp-logo-horizontal.svg.png 2x" data-file-width="769" data-file-height="195"></a></div>');



Revisión del 03:51 14 jun 2020

$( "#mw-head" ).prepend('<li id="show-panel">Mostrar panel</li>');

$("#show-panel").click(function(){
   if ($('#mw-panel').is(":visible")) {
   		$('#mw-panel').hide('slide');
		$(".mw-body").animate({margin: '-1px auto auto 0',});
		$("#show-panel").text("Mostrar panel");
        $("#footer").animate({margin: '0 0 0 1em',});
		
   } else {
	   	$('#mw-panel').show('slide');
		$(".mw-body").animate({margin: '-1px auto auto 11em',});
		$("#show-panel").text("Ocultar panel");
		$("#footer").animate({margin: '0 0 0 11em',});
   }
});

$(window).scroll(function(){
    if ($(this).scrollTop() > 130) {
       $('#nav').addClass('pinned');
    } else {
       $('#nav').removeClass('pinned');
    }
});


/* AÑADIR AUTOMÁTICAMENTE EL MENÚ A TODAS LAS PÁGINAS
$( "#firstHeading" ).before('<div id="nav" class="top-nav plainlinks"><div class="flex"><div class="logo-container"><a href="/wiki/P%C3%A1gina_principal" title="Inicio"><img alt="Inicio" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Wikisp-logo-horizontal.svg/langes-200px-Wikisp-logo-horizontal.svg.png" decoding="async" width="200" height="51" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Wikisp-logo-horizontal.svg/langes-300px-Wikisp-logo-horizontal.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Wikisp-logo-horizontal.svg/langes-400px-Wikisp-logo-horizontal.svg.png 2x" data-file-width="769" data-file-height="195"></a></div><span class="button"><a href="'+ window.location.href +'">{{NAMESPACE}}</a></span><span class="button"><a href="/wiki/{{TALKPAGENAMEE}}">Discusión</a></span><span class="button join" id="ca-view"><a href="'+ window.location.href +'">Leer</a></span><span class="button join" id="ca-edit"><a href="/index.php?title=$1&amp;action=edit">Editar</a></span><span class="button join" id="ca-history"><a href="/index.php?title=$1&amp;action=history">Ver historial</a></span><div class="vectorMenu"><span class="button join"><img alt="OOjs UI icon expand-invert.svg" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/OOjs_UI_icon_expand-invert.svg/langes-20px-OOjs_UI_icon_expand-invert.svg.png" decoding="async" width="20" height="20" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/OOjs_UI_icon_expand-invert.svg/langes-30px-OOjs_UI_icon_expand-invert.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/OOjs_UI_icon_expand-invert.svg/langes-40px-OOjs_UI_icon_expand-invert.svg.png 2x" data-file-width="20" data-file-height="20"></span><ul class="menu"><li id="ca-delete"><a href="/index.php?title=$1&amp;action=delete">Borrar</a></li><li id="ca-move"><a href="/wiki/Especial:MoverP%C3%A1gina/$1">Trasladar</a></li><li id="ca-protect"><a href="/index.php?title=$1&amp;action=protect">Proteger</a></li></ul></div></div></div></div>');
*/

$(".ns-1 #firstHeading", ".ns-2 #firstHeading", ".ns-3 #firstHeading", ".ns-4 #firstHeading", ".ns-5 #firstHeading", ".ns-6 #firstHeading", ".ns-7 #firstHeading", ".ns-8 #firstHeading", ".ns-9 #firstHeading", ".ns-10 #firstHeading", ".ns-11 #firstHeading", ".ns-12 #firstHeading", ".ns-13 #firstHeading., ns-14 #firstHeading", ".ns-15 #firstHeading", ".ns--1 #firstHeading", ".ns--2 #firstHeading")
.before('<div class="logo-container"><a href="/wiki/P%C3%A1gina_principal" title="Inicio"><img alt="Inicio" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Wikisp-logo-horizontal.svg/langes-200px-Wikisp-logo-horizontal.svg.png" decoding="async" width="200" height="51" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Wikisp-logo-horizontal.svg/langes-300px-Wikisp-logo-horizontal.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Wikisp-logo-horizontal.svg/langes-400px-Wikisp-logo-horizontal.svg.png 2x" data-file-width="769" data-file-height="195"></a></div>');

/* MOSTRAR BARRA DE BÚSQUEDA AL PULSAR EN MENÚ EN EL ICONO DE BÚSQUEDA */
$('#searchinput').hide();
$("#buscar").click(function() {
	$("#searchinput").slideToggle("fast");
});