|
|
| 第1行: |
第1行: |
| <noinclude>给{{tl|背景图片}}提供更好的体验效果</noinclude><includeonly><!--{if !isset($wgSideBarPic) || !$wgSideBarPic}--><!--{assign var="wgSideBarPic" value=true scope="global"}--><script> | | <noinclude>给{{tl|背景图片}}提供更好的体验效果</noinclude><includeonly><!--{if !isset($wgSideBarPic) || !$wgSideBarPic}--><!--{assign var="wgSideBarPic" value=true scope="global"}--><style> |
| window.RLQ = window.RLQ || [];
| | /* 低像素设备隐藏 */ |
| window.RLQ.push(function() {
| |
| $(function() { | |
| var sidebarCharacter = $(".sidebar-character").slice(0, 3);
| |
| if (!sidebarCharacter.length) return;
| |
| $("body").addClass("sideBarPic");
| |
| sidebarCharacter.addClass('active').each(function() {
| |
| var self = $(this);
| |
| self.appendTo("#mw-navigation").fadeIn().addClass(this.dataset.align === 'top' ? 'top' : 'bottom').css('user-select', 'none');
| |
| self.find('img').removeAttr('width').removeAttr('height');
| |
| });
| |
| $(window).on('resize', function() {
| |
| sidebarCharacter.each(function() {
| |
| var self = $(this);
| |
| self.find('img').width(self.width());
| |
| });
| |
| }).resize();
| |
| if (sidebarCharacter.is('[data-displaylogo="yes"]')) $('body').addClass('show-logo');
| |
| });
| |
| });</script><style>
| |
| @media screen and (max-width: 600px) { | | @media screen and (max-width: 600px) { |
| /* 低像素设备隐藏 */
| |
| .sidebar-character { | | .sidebar-character { |
| display: none!important; | | display: none!important; |