From 0e8b7f021f27e524f8c0b25dca600c00fd2c2468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C3=A9cureuil?= Date: Wed, 19 Apr 2017 00:18:12 +0200 Subject: Add mw 1.23.15 themes --- vector/collapsibleNav.js | 152 +++++++++++++++++ vector/collapsibleTabs.js | 208 ++++++++++++++++++++++ vector/components/animations.less | 28 +++ vector/components/collapsibleNav.less | 91 ++++++++++ vector/components/common.less | 141 +++++++++++++++ vector/components/externalLinks.less | 10 ++ vector/components/footer.less | 57 +++++++ vector/components/navigation.less | 134 +++++++++++++++ vector/components/notifications.less | 20 +++ vector/components/personalMenu.less | 41 +++++ vector/components/search.less | 113 ++++++++++++ vector/components/tabs.less | 274 +++++++++++++++++++++++++++++ vector/components/watchstar.less | 46 +++++ vector/csshover.htc | 284 +++++++++++++++++++++++++++++++ vector/csshover.min.htc | 12 ++ vector/images/arrow-collapsed-ltr.png | Bin 0 -> 143 bytes vector/images/arrow-collapsed-ltr.svg | 1 + vector/images/arrow-collapsed-rtl.png | Bin 0 -> 145 bytes vector/images/arrow-collapsed-rtl.svg | 1 + vector/images/arrow-down-focus-icon.png | Bin 0 -> 135 bytes vector/images/arrow-down-focus-icon.svg | 1 + vector/images/arrow-down-icon.png | Bin 0 -> 135 bytes vector/images/arrow-down-icon.svg | 1 + vector/images/arrow-expanded.png | Bin 0 -> 145 bytes vector/images/arrow-expanded.svg | 1 + vector/images/bullet-icon.png | Bin 0 -> 107 bytes vector/images/external-link-ltr-icon.png | Bin 0 -> 141 bytes vector/images/external-link-ltr-icon.svg | 1 + vector/images/external-link-rtl-icon.png | Bin 0 -> 141 bytes vector/images/external-link-rtl-icon.svg | 1 + vector/images/link-icon.png | Bin 0 -> 359 bytes vector/images/magnify-clip.png | Bin 0 -> 204 bytes vector/images/page-fade.png | Bin 0 -> 115 bytes vector/images/portal-break-ltr.png | Bin 0 -> 168 bytes vector/images/portal-break-rtl.png | Bin 0 -> 161 bytes vector/images/portal-break.png | Bin 0 -> 96 bytes vector/images/preferences/break.png | Bin 0 -> 103 bytes vector/images/preferences/fade.png | Bin 0 -> 85 bytes vector/images/search-fade.png | Bin 0 -> 94 bytes vector/images/search-ltr.png | Bin 0 -> 214 bytes vector/images/search-ltr.svg | 1 + vector/images/search-rtl.png | Bin 0 -> 214 bytes vector/images/search-rtl.svg | 1 + vector/images/tab-break.png | Bin 0 -> 125 bytes vector/images/tab-current-fade.png | Bin 0 -> 70 bytes vector/images/tab-normal-fade.png | Bin 0 -> 117 bytes vector/images/unwatch-icon-hl.png | Bin 0 -> 716 bytes vector/images/unwatch-icon-hl.svg | 1 + vector/images/unwatch-icon.png | Bin 0 -> 658 bytes vector/images/unwatch-icon.svg | 1 + vector/images/user-icon.png | Bin 0 -> 568 bytes vector/images/user-icon.svg | 1 + vector/images/watch-icon-hl.png | Bin 0 -> 640 bytes vector/images/watch-icon-hl.svg | 1 + vector/images/watch-icon-loading.png | Bin 0 -> 485 bytes vector/images/watch-icon-loading.svg | 1 + vector/images/watch-icon.png | Bin 0 -> 642 bytes vector/images/watch-icon.svg | 1 + vector/screen-hd.less | 30 ++++ vector/screen.less | 10 ++ vector/special.less | 7 + vector/special.preferences.less | 114 +++++++++++++ vector/variables.less | 43 +++++ vector/vector.js | 55 ++++++ 64 files changed, 1885 insertions(+) create mode 100644 vector/collapsibleNav.js create mode 100644 vector/collapsibleTabs.js create mode 100644 vector/components/animations.less create mode 100644 vector/components/collapsibleNav.less create mode 100644 vector/components/common.less create mode 100644 vector/components/externalLinks.less create mode 100644 vector/components/footer.less create mode 100644 vector/components/navigation.less create mode 100644 vector/components/notifications.less create mode 100644 vector/components/personalMenu.less create mode 100644 vector/components/search.less create mode 100644 vector/components/tabs.less create mode 100644 vector/components/watchstar.less create mode 100644 vector/csshover.htc create mode 100644 vector/csshover.min.htc create mode 100644 vector/images/arrow-collapsed-ltr.png create mode 100644 vector/images/arrow-collapsed-ltr.svg create mode 100644 vector/images/arrow-collapsed-rtl.png create mode 100644 vector/images/arrow-collapsed-rtl.svg create mode 100644 vector/images/arrow-down-focus-icon.png create mode 100644 vector/images/arrow-down-focus-icon.svg create mode 100644 vector/images/arrow-down-icon.png create mode 100644 vector/images/arrow-down-icon.svg create mode 100644 vector/images/arrow-expanded.png create mode 100644 vector/images/arrow-expanded.svg create mode 100644 vector/images/bullet-icon.png create mode 100644 vector/images/external-link-ltr-icon.png create mode 100644 vector/images/external-link-ltr-icon.svg create mode 100644 vector/images/external-link-rtl-icon.png create mode 100644 vector/images/external-link-rtl-icon.svg create mode 100644 vector/images/link-icon.png create mode 100644 vector/images/magnify-clip.png create mode 100644 vector/images/page-fade.png create mode 100644 vector/images/portal-break-ltr.png create mode 100644 vector/images/portal-break-rtl.png create mode 100644 vector/images/portal-break.png create mode 100644 vector/images/preferences/break.png create mode 100644 vector/images/preferences/fade.png create mode 100644 vector/images/search-fade.png create mode 100644 vector/images/search-ltr.png create mode 100644 vector/images/search-ltr.svg create mode 100644 vector/images/search-rtl.png create mode 100644 vector/images/search-rtl.svg create mode 100644 vector/images/tab-break.png create mode 100644 vector/images/tab-current-fade.png create mode 100644 vector/images/tab-normal-fade.png create mode 100644 vector/images/unwatch-icon-hl.png create mode 100644 vector/images/unwatch-icon-hl.svg create mode 100644 vector/images/unwatch-icon.png create mode 100644 vector/images/unwatch-icon.svg create mode 100644 vector/images/user-icon.png create mode 100644 vector/images/user-icon.svg create mode 100644 vector/images/watch-icon-hl.png create mode 100644 vector/images/watch-icon-hl.svg create mode 100644 vector/images/watch-icon-loading.png create mode 100644 vector/images/watch-icon-loading.svg create mode 100644 vector/images/watch-icon.png create mode 100644 vector/images/watch-icon.svg create mode 100644 vector/screen-hd.less create mode 100644 vector/screen.less create mode 100644 vector/special.less create mode 100644 vector/special.preferences.less create mode 100644 vector/variables.less create mode 100644 vector/vector.js (limited to 'vector') diff --git a/vector/collapsibleNav.js b/vector/collapsibleNav.js new file mode 100644 index 0000000..45258e5 --- /dev/null +++ b/vector/collapsibleNav.js @@ -0,0 +1,152 @@ +/** + * Collapsible navigation for Vector + */ +( function ( mw, $ ) { + 'use strict'; + var map; + + // Use the same function for all navigation headings - don't repeat + function toggle( $element ) { + var isCollapsed = $element.parent().is( '.collapsed' ); + + $.cookie( + 'vector-nav-' + $element.parent().attr( 'id' ), + isCollapsed, + { 'expires': 30, 'path': '/' } + ); + + $element + .parent() + .toggleClass( 'expanded' ) + .toggleClass( 'collapsed' ) + .find( '.body' ) + .slideToggle( 'fast' ); + isCollapsed = !isCollapsed; + + $element + .find( '> a' ) + .attr( { + 'aria-pressed': isCollapsed ? 'false' : 'true', + 'aria-expanded': isCollapsed ? 'false' : 'true' + } ); + } + + /* Browser Support */ + + map = { + // Left-to-right languages + ltr: { + // Collapsible Nav is broken in Opera < 9.6 and Konqueror < 4 + opera: [['>=', 9.6]], + konqueror: [['>=', 4.0]], + blackberry: false, + ipod: false, + iphone: false, + ps3: false + }, + // Right-to-left languages + rtl: { + opera: [['>=', 9.6]], + konqueror: [['>=', 4.0]], + blackberry: false, + ipod: false, + iphone: false, + ps3: false + } + }; + if ( !$.client.test( map ) ) { + return true; + } + + $( function ( $ ) { + var $headings, tabIndex; + + /* General Portal Modification */ + + // Always show the first portal + $( '#mw-panel > .portal:first' ).addClass( 'first persistent' ); + // Apply a class to the entire panel to activate styles + $( '#mw-panel' ).addClass( 'collapsible-nav' ); + // Use cookie data to restore preferences of what to show and hide + $( '#mw-panel > .portal:not(.persistent)' ) + .each( function ( i ) { + var id = $(this).attr( 'id' ), + state = $.cookie( 'vector-nav-' + id ); + $(this).find( 'ul:first' ).attr( 'id', id + '-list' ); + // Add anchor tag to heading for better accessibility + $( this ).find( 'h3' ).wrapInner( + $( '' ) + .attr( { + href: '#', + 'aria-haspopup': 'true', + 'aria-controls': id + '-list', + role: 'button' + } ) + .click( false ) + ); + // In the case that we are not showing the new version, let's show the languages by default + if ( + state === 'true' || + ( state === null && i < 1 ) || + ( state === null && id === 'p-lang' ) + ) { + $(this) + .addClass( 'expanded' ) + .removeClass( 'collapsed' ) + .find( '.body' ) + .hide() // bug 34450 + .show(); + $(this).find( 'h3 > a' ) + .attr( { + 'aria-pressed': 'true', + 'aria-expanded': 'true' + } ); + } else { + $(this) + .addClass( 'collapsed' ) + .removeClass( 'expanded' ); + $(this).find( 'h3 > a' ) + .attr( { + 'aria-pressed': 'false', + 'aria-expanded': 'false' + } ); + } + // Re-save cookie + if ( state !== null ) { + $.cookie( 'vector-nav-' + $(this).attr( 'id' ), state, { 'expires': 30, 'path': '/' } ); + } + } ); + + /* Tab Indexing */ + + $headings = $( '#mw-panel > .portal:not(.persistent) > h3' ); + + // Get the highest tab index + tabIndex = $( document ).lastTabIndex() + 1; + + // Fix the search not having a tabindex + $( '#searchInput' ).attr( 'tabindex', tabIndex++ ); + + // Make it keyboard accessible + $headings.attr( 'tabindex', function () { + return tabIndex++; + }); + + // Toggle the selected menu's class and expand or collapse the menu + $( '#mw-panel' ) + .delegate( '.portal:not(.persistent) > h3', 'keydown', function ( e ) { + // Make the space and enter keys act as a click + if ( e.which === 13 /* Enter */ || e.which === 32 /* Space */ ) { + toggle( $(this) ); + } + } ) + .delegate( '.portal:not(.persistent) > h3', 'mousedown', function ( e ) { + if ( e.which !== 3 ) { // Right mouse click + toggle( $(this) ); + $(this).blur(); + } + return false; + } ); + }); + +}( mediaWiki, jQuery ) ); diff --git a/vector/collapsibleTabs.js b/vector/collapsibleTabs.js new file mode 100644 index 0000000..0e49744 --- /dev/null +++ b/vector/collapsibleTabs.js @@ -0,0 +1,208 @@ +/** + * Collapsible tabs jQuery Plugin + */ +( function ( $ ) { + var rtl = $( 'html' ).attr( 'dir' ) === 'rtl'; + $.fn.collapsibleTabs = function ( options ) { + // return if the function is called on an empty jquery object + if ( !this.length ) { + return this; + } + // Merge options into the defaults + var $settings = $.extend( {}, $.collapsibleTabs.defaults, options ); + + this.each( function () { + var $el = $( this ); + // add the element to our array of collapsible managers + $.collapsibleTabs.instances = ( $.collapsibleTabs.instances.length === 0 ? + $el : $.collapsibleTabs.instances.add( $el ) ); + // attach the settings to the elements + $el.data( 'collapsibleTabsSettings', $settings ); + // attach data to our collapsible elements + $el.children( $settings.collapsible ).each( function () { + $.collapsibleTabs.addData( $( this ) ); + } ); + } ); + + // if we haven't already bound our resize handler, bind it now + if ( !$.collapsibleTabs.boundEvent ) { + $( window ).on( 'resize', $.debounce( 500, function () { + $.collapsibleTabs.handleResize(); + } ) ); + $.collapsibleTabs.boundEvent = true; + } + + // call our resize handler to setup the page + $.collapsibleTabs.handleResize(); + return this; + }; + /** + * Returns the amount of horizontal distance between the two tabs groups + * (#left-navigation and #right-navigation), in pixels. If negative, this + * means that the tabs overlap, and the value is the width of overlapping + * parts. + * + * Used in default expandCondition and collapseCondition. + * + * @return {Numeric} distance/overlap in pixels + */ + function calculateTabDistance() { + var $leftTab, $rightTab, leftEnd, rightStart; + + // In RTL, #right-navigation is actually on the left and vice versa. + // Hooray for descriptive naming. + if ( !rtl ) { + $leftTab = $( '#left-navigation' ); + $rightTab = $( '#right-navigation' ); + } else { + $leftTab = $( '#right-navigation' ); + $rightTab = $( '#left-navigation' ); + } + + leftEnd = $leftTab.offset().left + $leftTab.width(); + rightStart = $rightTab.offset().left; + + return rightStart - leftEnd; + } + $.collapsibleTabs = { + instances: [], + boundEvent: null, + defaults: { + expandedContainer: '#p-views ul', + collapsedContainer: '#p-cactions ul', + collapsible: 'li.collapsible', + shifting: false, + expandCondition: function ( eleWidth ) { + // If there are at least eleWidth + 1 pixels of free space, expand. + // We add 1 because .width() will truncate fractional values + // but .offset() will not. + return calculateTabDistance() >= (eleWidth + 1); + }, + collapseCondition: function () { + // If there's an overlap, collapse. + return calculateTabDistance() < 0; + } + }, + addData: function ( $collapsible ) { + var $settings = $collapsible.parent().data( 'collapsibleTabsSettings' ); + if ( $settings ) { + $collapsible.data( 'collapsibleTabsSettings', { + expandedContainer: $settings.expandedContainer, + collapsedContainer: $settings.collapsedContainer, + expandedWidth: $collapsible.width(), + prevElement: $collapsible.prev() + } ); + } + }, + getSettings: function ( $collapsible ) { + var $settings = $collapsible.data( 'collapsibleTabsSettings' ); + if ( !$settings ) { + $.collapsibleTabs.addData( $collapsible ); + $settings = $collapsible.data( 'collapsibleTabsSettings' ); + } + return $settings; + }, + handleResize: function () { + $.collapsibleTabs.instances.each( function () { + var $el = $( this ), + data = $.collapsibleTabs.getSettings( $el ); + + if ( data.shifting ) { + return; + } + + // if the two navigations are colliding + if ( $el.children( data.collapsible ).length > 0 && data.collapseCondition() ) { + + $el.trigger( 'beforeTabCollapse' ); + // move the element to the dropdown menu + $.collapsibleTabs.moveToCollapsed( $el.children( data.collapsible + ':last' ) ); + } + + // if there are still moveable items in the dropdown menu, + // and there is sufficient space to place them in the tab container + if ( $( data.collapsedContainer + ' ' + data.collapsible ).length > 0 && + data.expandCondition( $.collapsibleTabs.getSettings( $( data.collapsedContainer ).children( + data.collapsible + ':first' ) ).expandedWidth ) ) { + //move the element from the dropdown to the tab + $el.trigger( 'beforeTabExpand' ); + $.collapsibleTabs + .moveToExpanded( data.collapsedContainer + ' ' + data.collapsible + ':first' ); + } + } ); + }, + moveToCollapsed: function ( ele ) { + var outerData, expContainerSettings, target, + $moving = $( ele ); + + outerData = $.collapsibleTabs.getSettings( $moving ); + if ( !outerData ) { + return; + } + expContainerSettings = $.collapsibleTabs.getSettings( $( outerData.expandedContainer ) ); + if ( !expContainerSettings ) { + return; + } + expContainerSettings.shifting = true; + + // Remove the element from where it's at and put it in the dropdown menu + target = outerData.collapsedContainer; + $moving.css( 'position', 'relative' ) + .css( ( rtl ? 'left' : 'right' ), 0 ) + .animate( { width: '1px' }, 'normal', function () { + var data, expContainerSettings; + $( this ).hide(); + // add the placeholder + $( '' ).insertAfter( this ); + $( this ).detach().prependTo( target ).data( 'collapsibleTabsSettings', outerData ); + $( this ).attr( 'style', 'display: list-item;' ); + data = $.collapsibleTabs.getSettings( $( ele ) ); + if ( data ) { + expContainerSettings = $.collapsibleTabs.getSettings( $( data.expandedContainer ) ); + if ( expContainerSettings ) { + expContainerSettings.shifting = false; + $.collapsibleTabs.handleResize(); + } + } + } ); + }, + moveToExpanded: function ( ele ) { + var data, expContainerSettings, $target, expandedWidth, + $moving = $( ele ); + + data = $.collapsibleTabs.getSettings( $moving ); + if ( !data ) { + return; + } + expContainerSettings = $.collapsibleTabs.getSettings( $( data.expandedContainer ) ); + if ( !expContainerSettings ) { + return; + } + expContainerSettings.shifting = true; + + // grab the next appearing placeholder so we can use it for replacing + $target = $( data.expandedContainer ).find( 'span.placeholder:first' ); + expandedWidth = data.expandedWidth; + $moving.css( 'position', 'relative' ).css( ( rtl ? 'right' : 'left' ), 0 ).css( 'width', '1px' ); + $target.replaceWith( + $moving + .detach() + .css( 'width', '1px' ) + .data( 'collapsibleTabsSettings', data ) + .animate( { width: expandedWidth + 'px' }, 'normal', function () { + $( this ).attr( 'style', 'display: block;' ); + var data, expContainerSettings; + data = $.collapsibleTabs.getSettings( $( this ) ); + if ( data ) { + expContainerSettings = $.collapsibleTabs.getSettings( $( data.expandedContainer ) ); + if ( expContainerSettings ) { + expContainerSettings.shifting = false; + $.collapsibleTabs.handleResize(); + } + } + } ) + ); + } + }; + +}( jQuery ) ); diff --git a/vector/components/animations.less b/vector/components/animations.less new file mode 100644 index 0000000..9163779 --- /dev/null +++ b/vector/components/animations.less @@ -0,0 +1,28 @@ +/* Animate between standard and high definition layouts */ +body.vector-animateLayout { + div#content, + div#footer, + #left-navigation { + .transition(margin-left 250ms, padding 250ms;); + } + + #p-logo { + .transition(left 250ms); + } + + #mw-panel { + .transition(padding-right 250ms); + } + + #p-search { + .transition(margin-right 250ms); + } + + #p-personal { + .transition(right 250ms); + } + + #mw-head-base { + .transition(margin-left 250ms); + } +} diff --git a/vector/components/collapsibleNav.less b/vector/components/collapsibleNav.less new file mode 100644 index 0000000..e6f5c9a --- /dev/null +++ b/vector/components/collapsibleNav.less @@ -0,0 +1,91 @@ +/** + * LESS Stylesheet for collapsible nav + */ +@import "mediawiki.mixins.less"; + +#mw-panel.collapsible-nav { + .portal { + background-position: left top; + background-repeat: no-repeat; + .background-image('images/portal-break.png'); + padding: 0.25em 0 !important; + margin: -11px 9px 10px 11px; + + h3 { + font-size: @menu-main-heading-font-size; + color: @collapsible-nav-heading-color; + font-weight: normal; + background-position: left center; + background-repeat: no-repeat; + .background-image-svg('images/arrow-expanded.svg', 'images/arrow-expanded.png'); + padding: @collapsible-nav-heading-padding; + margin-bottom: 0; + + &:hover { + cursor: pointer; + text-decoration: none; + } + + a { + color: @collapsible-nav-heading-color; + text-decoration: none; + } + } + + .body { + margin: @collapsible-nav-body-margin; + background-image: none !important; + padding-top: 0; + display: none; + + ul { + li { + padding: 0.25em 0; + } + } + } + + + /* First */ + &.first { + background-image: none; + margin-top: 0; + h3 { + display: none; + } + } + + /* Persistent */ + &.persistent { + .body { + display: block; + margin-left: 0.5em; + } + + h3 { + background-image: none !important; + padding-left: 0.7em; + cursor: default; + } + } + + /* Collapsed */ + &.collapsed { + h3 { + color: @collapsible-nav-heading-collapsed-color; + background-position: left center; + background-repeat: no-repeat; + .background-image-svg('images/arrow-collapsed-ltr.svg', 'images/arrow-collapsed-ltr.png'); + margin-bottom: 0; + + &:hover { + text-decoration: underline; + } + + a { + color: @collapsible-nav-heading-collapsed-color; + } + } + } + } +} diff --git a/vector/components/common.less b/vector/components/common.less new file mode 100644 index 0000000..25ba301 --- /dev/null +++ b/vector/components/common.less @@ -0,0 +1,141 @@ +/* + * Any rules which should not be flipped automatically in right-to-left situations should be + * prepended with @noflip in a comment block. + * + * This stylesheet employs a few CSS trick to accomplish compatibility with a wide range of web + * browsers. The most common trick is to use some styles in IE6 only. This is accomplished by using + * a rule that makes things work in IE6, and then following it with a rule that begins with + * "html > body" or use a child selector ">", which is ignored by IE6 because it does not support + * the child selector. You can spot this by looking for the "OVERRIDDEN BY COMPLIANT BROWSERS" and + * "IGNORED BY IE6" comments. + */ +@import "mediawiki.mixins"; + +/* Framework */ +html { + font-size: @html-font-size; +} +html, +body { + height: 100%; + margin: 0; + padding: 0; + font-family: @content-font-family; +} +body { + background-color: @menu-background-color; +} + +/* Content */ +div#content { + margin-left: 10em; + padding: @content-padding; + /* Border on top, left, and bottom side */ + border: 1px solid @content-border-color; + border-right-width: 0; + /* Merge the border with tabs' one (in their background image) */ + margin-top: -1px; + background-color: @body-background-color; + color: @content-font-color; + direction: ltr; + + .mw-editsection, + .mw-editsection-like { + font-family: @content-font-family; + } + + p { + line-height: inherit; + margin: 0.5em 0; + } + + h1, + h2, + #firstHeading { + font-family: @content-heading-font-family; + line-height: @heading-line-height; + margin-bottom: 0.25em; + padding: 0; + } + + h1, + #firstHeading { + font-size: @content-heading-font-size; + } + + h2 { + font-size: 1.5em; + margin-top: 1em; + } + + h3, + h4, + h5, + h6 { + line-height: @content-line-height; + margin-top: 0.3em; + margin-bottom: 0; + padding-bottom: 0; + } + + h3 { + font-size: 1.17em; + } + + h3, + h4 { + font-weight: bold; + } + + h4, + h5, + h6 { + font-size: 100%; /* (reset) */ + } + + #toc h2, + .toc h2 { + font-size: 100%; /* (reset) */ + font-family: @content-font-family; + } +} + +/* Hide empty portlets */ +div.emptyPortlet { + display: none; +} + +ul { + list-style-type: disc; + .list-style-image('images/bullet-icon.png'); +} + +pre, .mw-code { + line-height: 1.3em; +} + +/* Site Notice (includes notices from CentralNotice extension) */ +#siteNotice { + font-size: 0.8em; +} + +.redirectText { + font-size: 140%; +} + +.redirectMsg img { + vertical-align: text-bottom; +} + +#bodyContent { + position: relative; + width: 100%; + line-height: @content-line-height; + font-size: @content-font-size; +} + +/* Tooltips are outside of the normal body code, so this helps make the size of the text sensible */ +// FIXME: Should be part of jquery.tipsy.css +.tipsy { + font-size: 0.8em; +} diff --git a/vector/components/externalLinks.less b/vector/components/externalLinks.less new file mode 100644 index 0000000..91388c6 --- /dev/null +++ b/vector/components/externalLinks.less @@ -0,0 +1,10 @@ +@import "mediawiki.mixins.less"; +// External links +#content { + .external { + background-position: center right; + background-repeat: no-repeat; + .background-image-svg('images/external-link-ltr-icon.svg', 'images/external-link-ltr-icon.png'); + padding-right: 13px; + } +} diff --git a/vector/components/footer.less b/vector/components/footer.less new file mode 100644 index 0000000..3d61b66 --- /dev/null +++ b/vector/components/footer.less @@ -0,0 +1,57 @@ +/* Footer */ +div#footer { + margin-left: 10em; + margin-top: 0; + padding: 0.75em; + direction: ltr; + + ul { + list-style-type: none; + list-style-image: none; + margin: 0; + padding: 0; + + li { + margin: 0; + padding: 0; + padding-top: 0.5em; + padding-bottom: 0.5em; + color: #333; + font-size: 0.7em; + } + } + + #footer-icons { + float: right; + + li { + float: left; + margin-left: 0.5em; + line-height: 2em; + text-align: right; + } + } + + #footer-info { + li { + line-height: 1.4em; + } + } + + #footer-places { + li { + float: left; + margin-right: 1em; + line-height: 2em; + } + } +} + +body.ltr { + div#footer { + #footer-places { + /* @noflip */ + float: left; + } + } +} diff --git a/vector/components/navigation.less b/vector/components/navigation.less new file mode 100644 index 0000000..f3a5a49 --- /dev/null +++ b/vector/components/navigation.less @@ -0,0 +1,134 @@ +@import "mediawiki.mixins"; +@import "personalMenu"; +@import "collapsibleNav"; +@import "search"; +@import "tabs"; + +/* Hide, but keep accessible for screen-readers */ +#mw-navigation h2 { + position: absolute; + top: -9999px; +} + +/* Head */ +#mw-page-base { + height: 5em; + background-position: bottom left; + background-repeat: repeat-x; + /* This image is only a fallback (for IE 6-9), so we do not @embed it. */ + background-image: url('images/page-fade.png'); + .vertical-gradient(@body-background-color, @menu-background-color, 50%, 100%); + background-color: @body-background-color; +} + +#mw-head-base { + margin-top: -5em; + margin-left: 10em; + height: 5em; +} + +div#mw-head { + position: absolute; + top: 0; + right: 0; + width: 100%; + + h3 { + margin: 0; + padding: 0; + } +} + +/* Navigation Containers */ +#left-navigation { + float: left; + margin-left: 10em; + margin-top: 2.5em; + /* When right nav would overlap left nav, it's placed below it + (normal CSS floats behavior). This rule ensures that no empty space + is shown between them due to right nav's margin-top. Page layout + is still broken, but at least the nav overlaps only the page title + instead of half the content. */ + margin-bottom: -2.5em; + /* IE 6 double-margin bug fix */ + display: inline; +} + +#right-navigation { + float: right; + margin-top: 2.5em; +} + +/* Logo */ +#p-logo { + position: absolute; + top: -160px; + left: 0; + width: 10em; + height: 160px; + + a { + display: block; + width: 10em; + height: 160px; + background-repeat: no-repeat; + background-position: center center; + text-decoration: none; + } +} + +/* Panel */ +div#mw-panel { + font-size: @menu-main-font-size; + position: absolute; + top: 160px; + padding-top: 1em; + width: 10em; + left: 0; + + div.portal { + padding-bottom: 1.5em; + direction: ltr; + + h3 { + font-weight: normal; + color: #444; + padding: @menu-main-heading-padding; + cursor: default; + border: none; + font-size: @menu-main-heading-font-size; + } + + div.body { + padding-top: 0.5em; + margin: @menu-main-body-margin; + + .background-image('images/portal-break.png'); + background-repeat: no-repeat; + background-position: top left; + + ul { + list-style-type: none; + list-style-image: none; + padding: @menu-main-body-padding; + margin: 0; + + li { + line-height: 1.125em; + padding: 0; + padding-bottom: 0.5em; + margin: 0; + font-size: @menu-main-body-font-size; + word-wrap: break-word; + + a { + color: @menu-main-body-link-color; + &:visited { + color: @menu-main-body-link-visited-color; + } + } + } + } + } + } +} diff --git a/vector/components/notifications.less b/vector/components/notifications.less new file mode 100644 index 0000000..cadb61c --- /dev/null +++ b/vector/components/notifications.less @@ -0,0 +1,20 @@ +/* mediawiki.notification */ +.skin-vector { + .mw-notification-area { + font-size: 0.8em; + } + + .mw-notification-area-layout { + top: 7em; + } + + .mw-notification { + background-color: #fff; + background-color: rgba(255, 255, 255, 0.93); + padding: 0.75em 1.5em; + border: solid 1px @content-border-color; + border-radius: 0.75em; + -webkit-box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125); + box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125); + } +} diff --git a/vector/components/personalMenu.less b/vector/components/personalMenu.less new file mode 100644 index 0000000..7256929 --- /dev/null +++ b/vector/components/personalMenu.less @@ -0,0 +1,41 @@ +/* Personal */ +#p-personal { + position: absolute; + top: 0.33em; + right: 0.75em; + /* Display on top of page tabs - bugs 37158, 48078 */ + z-index: 100; + + h3 { + display: none; + } + + ul { + list-style-type: none; + list-style-image: none; + margin: 0; + padding-left: 10em; /* Keep from overlapping logo */ + } + + li { + line-height: 1.125em; + /* @noflip */ + float: left; + margin-left: 0.75em; + margin-top: 0.5em; + font-size: @menu-personal-font-size; + white-space: nowrap; + } +} + +/* Icon for Usernames */ +#pt-userpage, +#pt-anonuserpage, +#pt-login { + background-position: left top; + background-repeat: no-repeat; + /* SVG support using a transparent gradient to guarantee cross-browser + * compatibility (browsers able to understand gradient syntax support also SVG) */ + .background-image-svg('images/user-icon.svg', 'images/user-icon.png'); + padding-left: 15px !important; +} diff --git a/vector/components/search.less b/vector/components/search.less new file mode 100644 index 0000000..46c3030 --- /dev/null +++ b/vector/components/search.less @@ -0,0 +1,113 @@ +/* Search */ +#p-search { + /* @noflip */ + float: left; + margin-right: 0.5em; + margin-left: 0.5em; + + h3 { + display: none; + } + + form, + input { + margin: 0; + margin-top: 0.4em; + } +} + +div#simpleSearch { + display: block; + width: 14em; + height: 1.4em; + margin-top: 0.65em; + position: relative; + min-height: 1px; /* Gotta trigger hasLayout for IE7 */ + border: solid 1px #aaa; + color: black; + background-color: white; + .background-image('images/search-fade.png'); + background-position: top left; + background-repeat: repeat-x; + + // Styles for both the search input and the button + input { + position: absolute; + margin: 0; + padding: 0; + border: 0; + background-color: transparent; + color: black; + } + + // The search input + #searchInput { + top: 0; + left: 0; + width: 90%; + padding: 0.2em 0 0.2em 0.2em; + font-size: 13px; + direction: ltr; + + &:focus { + outline: none; + } + + // These rules MAY NOT be merged because of how CSS requires browsers + // to parse unrecognized selectors! + // Note these rules ensure that placeholder text can be distinguished from + // standard text. In browsers which make this distinction clear these rules + // are not necessary. + // For inputs that use jquery.placeholder.js e.g. IE9- + &.placeholder { + color: #999; + } + // Distinguish placeholder text in IE10+ + &:-ms-input-placeholder { + color: #999; + } + // Distinguish placeholder text in Firefox 18- + &:-moz-placeholder { + color: #999; + } + + // Undo the styles Webkit browsers apply to type=search fields, + // we provide our own + -webkit-appearance: textfield; + + &::-webkit-search-decoration, + &::-webkit-search-cancel-button, + &::-webkit-search-results-button, + &::-webkit-search-results-decoration { + -webkit-appearance: textfield; + } + } + + // The buttons. They are displayed in the same position, and if both are + // present the fulltext search one obscures the 'Go' one. + #searchButton, + #mw-searchButton { + top: 0; + right: 0; + width: 10%; + height: 100%; + cursor: pointer; + /* Hide button text and replace it with the image. */ + /* This would be 100% if not for Firefox shenanigans (bug 60900). */ + text-indent: 200%; + /* Needed to make IE6 respect the text-indent. */ + line-height: 1; + /* Opera 12 on RTL flips the text in a funny way without this. */ + /* @noflip */ + direction: ltr; + white-space: nowrap; + overflow: hidden; + .background-image-svg('images/search-ltr.svg', 'images/search-ltr.png'); + background-position: center center; + background-repeat: no-repeat; + } + + #mw-searchButton { + z-index: 1; + } +} diff --git a/vector/components/tabs.less b/vector/components/tabs.less new file mode 100644 index 0000000..7e24ae7 --- /dev/null +++ b/vector/components/tabs.less @@ -0,0 +1,274 @@ +/* +Styling for namespace tabs (page, discussion) and views (read, edit, view history, watch and other actions) +*/ + +/* Navigation Labels */ +div.vectorTabs h3, +div.vectorMenu h3 span { + display: none; +} + +/* Namespaces and Views */ +div.vectorTabs { + /* @noflip */ + float: left; + height: 2.5em; + .background-image('images/tab-break.png'); + background-position: bottom left; + background-repeat: no-repeat; + padding-left: 1px; + + ul { + /* @noflip */ + float: left; + height: 100%; + list-style-type: none; + list-style-image: none; + margin: 0; + padding: 0; + .background-image('images/tab-break.png'); + background-position: right bottom; + background-repeat: no-repeat; + + li { + /* @noflip */ + float: left; + line-height: 1.125em; + /* For IE6, overridden later to display:block by modern browsers */ + display: inline-block; + height: 100%; + margin: 0; + padding: 0; + background-color: #f3f3f3; + .background-image('images/tab-normal-fade.png'); + background-position: bottom left; + background-repeat: repeat-x; + white-space: nowrap; + } + + /* IGNORED BY IE6 which doesn't support child selector */ + > li { + display: block; + } + } + + li { + &.new { + a, + a:visited{ + color: #a55858; + } + } + + &.selected { + .background-image('images/tab-current-fade.png'); + a, + a:visited{ + color: #333; + text-decoration: none; + } + } + + &.icon { + a { + background-position: bottom right; + background-repeat: no-repeat; + } + } + + a { + /* For IE6, overridden later to display:block by modern browsers */ + display: inline-block; + height: 1.9em; + padding-left: 0.5em; + padding-right: 0.5em; + color: @menu-link-color; + cursor: pointer; + font-size: 0.8em; + } + + /* Ignored by IE6 which doesn't support child selector */ + > a { + display: block; + } + } + + span { + display: inline-block; + .background-image('images/tab-break.png'); + background-position: bottom right; + background-repeat: no-repeat; + + a { + /* For IE6, overridden later to display:block by modern browsers */ + display: inline-block; + padding-top: 1.25em; + } + + /* Ignored by IE6 which doesn't support child selector */ + > a { + /* @noflip */ + float: left; + display: block; + } + } +} + +/* Variants and Actions */ +div.vectorMenu { + /* @noflip */ + direction: ltr; + /* @noflip */ + float: left; + .background-image-svg('images/arrow-down-icon.svg', 'images/arrow-down-icon.png'); + /* @noflip */ + background-position: 100% 60%; + background-repeat: no-repeat; + cursor: pointer; + .transition(background-position 250ms); +} + +div.vectorMenu.menuForceShow { + background-position: 100% 100%; +} + +div.vectorMenuFocus { + .background-image-svg('images/arrow-down-focus-icon.svg', 'images/arrow-down-focus-icon.png'); + background-position: 100% 60%; +} + +body.rtl div.vectorMenu { + /* @noflip */ + direction: rtl; +} + +/* OVERRIDDEN BY COMPLIANT BROWSERS */ +div#mw-head div.vectorMenu h3 { + /* @noflip */ + float: left; + .background-image('images/tab-break.png'); + background-repeat: no-repeat; + background-position: bottom left; + margin-left: -1px; +} + +/* IGNORED BY IE6 */ +div#mw-head div.vectorMenu > h3 { + background-image: none; +} + +div#mw-head div.vectorMenu h4, +div.vectorMenu#p-variants #mw-vector-current-variant { + display: inline-block; + float: left; + font-size: 0.8em; + padding-left: 0.5em; + padding-top: 1.375em; + font-weight: normal; + border: none; +} + +/* OVERRIDDEN BY COMPLIANT BROWSERS */ +div.vectorMenu h3 a { + display: inline-block; + width: 24px; + height: 1.9em; + text-decoration: none; + .background-image('images/tab-break.png'); + background-repeat: no-repeat; + background-position: bottom right; +} + +/* IGNORED BY IE6 */ +div.vectorMenu h3 > a { + display: block; +} + +div.vectorMenu div.menu { + position: relative; + display: none; + clear: both; + text-align: left; +} + +/* OVERRIDDEN BY COMPLIANT BROWSERS */ +body.rtl div.vectorMenu div.menu { + /* @noflip */ + margin-left: 24px; +} + +/* IGNORED BY IE6 */ +body.rtl div.vectorMenu > div.menu { + /* @noflip */ + margin-left: auto; +} + +/* IGNORED BY IE6 */ +/* Also fixes old versions of FireFox */ +body.rtl div.vectorMenu > div.menu, +x:-moz-any-link { + /* @noflip */ + margin-left: 23px; +} + +/* Enable forcing showing of the menu for accessibility */ +div.vectorMenu:hover div.menu, +div.vectorMenu.menuForceShow div.menu { + display: block; +} + +div.vectorMenu ul { + position: absolute; + background-color: white; + border: solid 1px silver; + border-top-width: 0; + list-style-type: none; + list-style-image: none; + padding: 0; + margin: 0; + margin-left: -1px; + text-align: left; +} + +/* Fixes old versions of FireFox */ +div.vectorMenu ul, +x:-moz-any-link { + min-width: 5em; +} + +/* Returns things back to normal in modern versions of FireFox */ +div.vectorMenu ul, +x:-moz-any-link, +x:default { + min-width: 0; +} + +div.vectorMenu li { + padding: 0; + margin: 0; + text-align: left; + line-height: 1em; +} + +/* OVERRIDDEN BY COMPLIANT BROWSERS */ +div.vectorMenu li a { + display: inline-block; + padding: 0.5em; + white-space: nowrap; + color: @menu-link-color; + cursor: pointer; + font-size: 0.8em; +} + +/* IGNORED BY IE6 */ +div.vectorMenu li > a { + display: block; +} + +div.vectorMenu li.selected a, +div.vectorMenu li.selected a:visited { + color: #333; + text-decoration: none; +} + +@import 'watchstar.less'; diff --git a/vector/components/watchstar.less b/vector/components/watchstar.less new file mode 100644 index 0000000..1a6d1fc --- /dev/null +++ b/vector/components/watchstar.less @@ -0,0 +1,46 @@ +@import "mediawiki.mixins.rotation" + +/* Watch/Unwatch Icon Styling */ +#ca-unwatch.icon a, +#ca-watch.icon a { + margin: 0; + padding: 0; + display: block; + width: 26px; + /* This hides the text but shows the background image */ + padding-top: 3.1em; + margin-top: 0; + /* Only applied in IE6 */ + margin-top: -0.8em !ie; + height: 0; + overflow: hidden; + background-position: 5px 60%; +} +#ca-unwatch.icon a { + .background-image-svg('images/unwatch-icon.svg', 'images/unwatch-icon.png'); +} +#ca-watch.icon a { + .background-image-svg('images/watch-icon.svg', 'images/watch-icon.png'); +} +#ca-unwatch.icon a:hover, +#ca-unwatch.icon a:focus { + .background-image-svg('images/unwatch-icon-hl.svg', 'images/unwatch-icon-hl.png'); +} +#ca-watch.icon a:hover, +#ca-watch.icon a:focus { + .background-image-svg('images/watch-icon-hl.svg', 'images/watch-icon-hl.png'); +} +#ca-unwatch.icon a.loading, +#ca-watch.icon a.loading { + .background-image-svg('images/watch-icon-loading.svg', 'images/watch-icon-loading.png'); + .rotation(700ms); + /* Suppress the hilarious rotating focus outline on Firefox */ + outline: none; + background-position: 50% 60%; + -webkit-transform-origin: 50% 57%; + transform-origin: 50% 57%; +} +#ca-unwatch.icon a span, +#ca-watch.icon a span { + display: none; +} diff --git a/vector/csshover.htc b/vector/csshover.htc new file mode 100644 index 0000000..a13ea68 --- /dev/null +++ b/vector/csshover.htc @@ -0,0 +1,284 @@ + + \ No newline at end of file diff --git a/vector/csshover.min.htc b/vector/csshover.min.htc new file mode 100644 index 0000000..7e5c57b --- /dev/null +++ b/vector/csshover.min.htc @@ -0,0 +1,12 @@ + + diff --git a/vector/images/arrow-collapsed-ltr.png b/vector/images/arrow-collapsed-ltr.png new file mode 100644 index 0000000..063ac6f Binary files /dev/null and b/vector/images/arrow-collapsed-ltr.png differ diff --git a/vector/images/arrow-collapsed-ltr.svg b/vector/images/arrow-collapsed-ltr.svg new file mode 100644 index 0000000..b943caa --- /dev/null +++ b/vector/images/arrow-collapsed-ltr.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/arrow-collapsed-rtl.png b/vector/images/arrow-collapsed-rtl.png new file mode 100644 index 0000000..c346218 Binary files /dev/null and b/vector/images/arrow-collapsed-rtl.png differ diff --git a/vector/images/arrow-collapsed-rtl.svg b/vector/images/arrow-collapsed-rtl.svg new file mode 100644 index 0000000..5faf356 --- /dev/null +++ b/vector/images/arrow-collapsed-rtl.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/arrow-down-focus-icon.png b/vector/images/arrow-down-focus-icon.png new file mode 100644 index 0000000..7640bd1 Binary files /dev/null and b/vector/images/arrow-down-focus-icon.png differ diff --git a/vector/images/arrow-down-focus-icon.svg b/vector/images/arrow-down-focus-icon.svg new file mode 100644 index 0000000..826c280 --- /dev/null +++ b/vector/images/arrow-down-focus-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/arrow-down-icon.png b/vector/images/arrow-down-icon.png new file mode 100644 index 0000000..12e3b93 Binary files /dev/null and b/vector/images/arrow-down-icon.png differ diff --git a/vector/images/arrow-down-icon.svg b/vector/images/arrow-down-icon.svg new file mode 100644 index 0000000..8e31b2f --- /dev/null +++ b/vector/images/arrow-down-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/arrow-expanded.png b/vector/images/arrow-expanded.png new file mode 100644 index 0000000..0221028 Binary files /dev/null and b/vector/images/arrow-expanded.png differ diff --git a/vector/images/arrow-expanded.svg b/vector/images/arrow-expanded.svg new file mode 100644 index 0000000..e744ec3 --- /dev/null +++ b/vector/images/arrow-expanded.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/bullet-icon.png b/vector/images/bullet-icon.png new file mode 100644 index 0000000..7bae98f Binary files /dev/null and b/vector/images/bullet-icon.png differ diff --git a/vector/images/external-link-ltr-icon.png b/vector/images/external-link-ltr-icon.png new file mode 100644 index 0000000..6308383 Binary files /dev/null and b/vector/images/external-link-ltr-icon.png differ diff --git a/vector/images/external-link-ltr-icon.svg b/vector/images/external-link-ltr-icon.svg new file mode 100644 index 0000000..5969d03 --- /dev/null +++ b/vector/images/external-link-ltr-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/external-link-rtl-icon.png b/vector/images/external-link-rtl-icon.png new file mode 100644 index 0000000..5313234 Binary files /dev/null and b/vector/images/external-link-rtl-icon.png differ diff --git a/vector/images/external-link-rtl-icon.svg b/vector/images/external-link-rtl-icon.svg new file mode 100644 index 0000000..75a7025 --- /dev/null +++ b/vector/images/external-link-rtl-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/link-icon.png b/vector/images/link-icon.png new file mode 100644 index 0000000..b70efaa Binary files /dev/null and b/vector/images/link-icon.png differ diff --git a/vector/images/magnify-clip.png b/vector/images/magnify-clip.png new file mode 100644 index 0000000..00a9cee Binary files /dev/null and b/vector/images/magnify-clip.png differ diff --git a/vector/images/page-fade.png b/vector/images/page-fade.png new file mode 100644 index 0000000..b4a6034 Binary files /dev/null and b/vector/images/page-fade.png differ diff --git a/vector/images/portal-break-ltr.png b/vector/images/portal-break-ltr.png new file mode 100644 index 0000000..20bf366 Binary files /dev/null and b/vector/images/portal-break-ltr.png differ diff --git a/vector/images/portal-break-rtl.png b/vector/images/portal-break-rtl.png new file mode 100644 index 0000000..e5f6223 Binary files /dev/null and b/vector/images/portal-break-rtl.png differ diff --git a/vector/images/portal-break.png b/vector/images/portal-break.png new file mode 100644 index 0000000..90c3918 Binary files /dev/null and b/vector/images/portal-break.png differ diff --git a/vector/images/preferences/break.png b/vector/images/preferences/break.png new file mode 100644 index 0000000..b529308 Binary files /dev/null and b/vector/images/preferences/break.png differ diff --git a/vector/images/preferences/fade.png b/vector/images/preferences/fade.png new file mode 100644 index 0000000..638084d Binary files /dev/null and b/vector/images/preferences/fade.png differ diff --git a/vector/images/search-fade.png b/vector/images/search-fade.png new file mode 100644 index 0000000..6cb7d28 Binary files /dev/null and b/vector/images/search-fade.png differ diff --git a/vector/images/search-ltr.png b/vector/images/search-ltr.png new file mode 100644 index 0000000..1db2eb2 Binary files /dev/null and b/vector/images/search-ltr.png differ diff --git a/vector/images/search-ltr.svg b/vector/images/search-ltr.svg new file mode 100644 index 0000000..0720f20 --- /dev/null +++ b/vector/images/search-ltr.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/search-rtl.png b/vector/images/search-rtl.png new file mode 100644 index 0000000..c26c8d0 Binary files /dev/null and b/vector/images/search-rtl.png differ diff --git a/vector/images/search-rtl.svg b/vector/images/search-rtl.svg new file mode 100644 index 0000000..622d5f9 --- /dev/null +++ b/vector/images/search-rtl.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/tab-break.png b/vector/images/tab-break.png new file mode 100644 index 0000000..6d37af5 Binary files /dev/null and b/vector/images/tab-break.png differ diff --git a/vector/images/tab-current-fade.png b/vector/images/tab-current-fade.png new file mode 100644 index 0000000..b8f772f Binary files /dev/null and b/vector/images/tab-current-fade.png differ diff --git a/vector/images/tab-normal-fade.png b/vector/images/tab-normal-fade.png new file mode 100644 index 0000000..f719a88 Binary files /dev/null and b/vector/images/tab-normal-fade.png differ diff --git a/vector/images/unwatch-icon-hl.png b/vector/images/unwatch-icon-hl.png new file mode 100644 index 0000000..6b2b502 Binary files /dev/null and b/vector/images/unwatch-icon-hl.png differ diff --git a/vector/images/unwatch-icon-hl.svg b/vector/images/unwatch-icon-hl.svg new file mode 100644 index 0000000..d52d547 --- /dev/null +++ b/vector/images/unwatch-icon-hl.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/unwatch-icon.png b/vector/images/unwatch-icon.png new file mode 100644 index 0000000..9fd9436 Binary files /dev/null and b/vector/images/unwatch-icon.png differ diff --git a/vector/images/unwatch-icon.svg b/vector/images/unwatch-icon.svg new file mode 100644 index 0000000..cde7bc5 --- /dev/null +++ b/vector/images/unwatch-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/user-icon.png b/vector/images/user-icon.png new file mode 100644 index 0000000..57f9f8d Binary files /dev/null and b/vector/images/user-icon.png differ diff --git a/vector/images/user-icon.svg b/vector/images/user-icon.svg new file mode 100644 index 0000000..4335bcf --- /dev/null +++ b/vector/images/user-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/watch-icon-hl.png b/vector/images/watch-icon-hl.png new file mode 100644 index 0000000..4cb87cd Binary files /dev/null and b/vector/images/watch-icon-hl.png differ diff --git a/vector/images/watch-icon-hl.svg b/vector/images/watch-icon-hl.svg new file mode 100644 index 0000000..664c671 --- /dev/null +++ b/vector/images/watch-icon-hl.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/watch-icon-loading.png b/vector/images/watch-icon-loading.png new file mode 100644 index 0000000..5f0c490 Binary files /dev/null and b/vector/images/watch-icon-loading.png differ diff --git a/vector/images/watch-icon-loading.svg b/vector/images/watch-icon-loading.svg new file mode 100644 index 0000000..751eb14 --- /dev/null +++ b/vector/images/watch-icon-loading.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/images/watch-icon.png b/vector/images/watch-icon.png new file mode 100644 index 0000000..39daff2 Binary files /dev/null and b/vector/images/watch-icon.png differ diff --git a/vector/images/watch-icon.svg b/vector/images/watch-icon.svg new file mode 100644 index 0000000..907b05b --- /dev/null +++ b/vector/images/watch-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vector/screen-hd.less b/vector/screen-hd.less new file mode 100644 index 0000000..8b286f4 --- /dev/null +++ b/vector/screen-hd.less @@ -0,0 +1,30 @@ +/* Vector screen styles for high definition displays */ + +@import "variables.less"; + +div#content { + margin-left: 11em; + padding: 1.25em 1.5em 1.5em 1.5em; +} +#p-logo { + left: @menu-main-logo-left; +} +div#footer { + margin-left: 11em; + padding: 1.25em; +} +#mw-panel { + padding-left: 0.5em; +} +#p-search { + margin-right: 1em; +} +#left-navigation { + margin-left: 11em; +} +#p-personal { + right: 1em; +} +#mw-head-base { + margin-left: 11em; +} diff --git a/vector/screen.less b/vector/screen.less new file mode 100644 index 0000000..f7b374f --- /dev/null +++ b/vector/screen.less @@ -0,0 +1,10 @@ +/* Vector screen styles */ + +@import "variables.less"; + +@import "components/common.less"; +@import "components/animations.less"; +@import "components/navigation.less"; +@import "components/footer.less"; +@import 'components/notifications.less'; +@import "components/externalLinks.less"; diff --git a/vector/special.less b/vector/special.less new file mode 100644 index 0000000..6af4b1e --- /dev/null +++ b/vector/special.less @@ -0,0 +1,7 @@ +/** + * Adjusts for decreased margin-bottom for h2 elements inside #content div + * introduced in March / April 2014 typography update. + */ +table.mw-specialpages-table { + margin-top: 0; +} diff --git a/vector/special.preferences.less b/vector/special.preferences.less new file mode 100644 index 0000000..a9b1006 --- /dev/null +++ b/vector/special.preferences.less @@ -0,0 +1,114 @@ +@import "mediawiki.mixins"; +@import "variables"; + +/** + * The following code is highly modified from monobook. It would be nice if the + * preftoc id was more human readable like preferences-toc for instance, + * howerver this would require backporting the other skins. + */ + +#preftoc { + /* Tabs */ + width: 100%; + float: left; + clear: both; + margin: 0 !important; + padding: 0 !important; + .background-image('images/preferences/break.png'); + background-position: bottom left; + background-repeat: no-repeat; + + li { + /* Tab */ + float: left; + margin: 0; + padding: 0; + padding-right: 1px; + height: 2.25em; + white-space: nowrap; + list-style-type: none; + list-style-image: none; + .background-image('images/preferences/break.png'); + background-position: bottom right; + background-repeat: no-repeat; + + /* Sadly, IE6 won't understand this */ + &:first-child { + margin-left: 1px; + } + + &.selected { + a { + .background-image('images/preferences/fade.png'); + background-position: bottom; + background-repeat: repeat-x; + color: #333; + text-decoration: none; + } + } + } + + a, + a:active { + display: inline-block; + position: relative; + color: @menu-link-color; + padding: 0.5em; + text-decoration: none; + background-image: none; + font-size: 0.9em; + } + + a:hover, + a:focus { + text-decoration: underline; + } +} + +#preferences { + float: left; + width: 100%; + margin: 0; + margin-top: -2px; + clear: both; + border: solid 1px #ccc; + background-color: #fafafa; + + fieldset { + border: none; + border-top: solid 1px #ccc; + + &.prefsection { + border: none; + padding: 0; + margin: 1em; + + legend.mainLegend { + display: none; + } + } + } + + legend { + color: #666; + } + + td { + padding-left: 0.5em; + padding-right: 0.5em; + } + + div.mw-prefs-buttons { + padding: 1em; + + input { + margin-right: 0.25em; + } + } +} + +.htmlform-tip { + font-size: x-small; + padding: .2em 2em; + color: #666; +} diff --git a/vector/variables.less b/vector/variables.less new file mode 100644 index 0000000..f008a3a --- /dev/null +++ b/vector/variables.less @@ -0,0 +1,43 @@ +@html-font-size: 1em; + +// Page content +// FIXME: Use global variable since Echo and CentralNotice use this variable +@content-border-color: #a7d7f9; +// FIXME: Find an open font that works with this stack and is readable by Windows users +@content-font-family: sans-serif; +@content-font-color: #252525; +@content-font-size: 0.875em; +@content-line-height: 1.6; +@content-padding: 1em; +@content-heading-font-size: 1.8em; +@content-heading-font-family: sans-serif; +@body-background-color: #fff; +@heading-line-height: 1.3; + +// Navigation +@menu-background-color: #f6f6f6; + +// Common menu +@menu-link-color: #0645ad; + +// Main menu +@menu-main-font-size: inherit; +@menu-main-heading-font-size: 0.75em; +@menu-main-heading-padding: 0 1.75em 0.25em 0.25em; + +@menu-main-body-font-size: 0.75em; +@menu-main-body-link-color: #0645ad; +@menu-main-body-link-visited-color: #0b0080; +@menu-main-body-margin: 0 0 0 1.25em; +@menu-main-body-padding: 0; +@menu-main-logo-left: 0.5em; + +// Personal menu +@menu-personal-font-size: 0.75em; + +// Collapsible nav +@collapsible-nav-heading-color: #4d4d4d; +@collapsible-nav-heading-collapsed-color: #0645ad; + +@collapsible-nav-heading-padding: 4px 0 3px 1.5em; +@collapsible-nav-body-margin: 0 0 0 1.25em; diff --git a/vector/vector.js b/vector/vector.js new file mode 100644 index 0000000..0bc114a --- /dev/null +++ b/vector/vector.js @@ -0,0 +1,55 @@ +/** + * Vector-specific scripts + */ +jQuery( function ( $ ) { + $( 'div.vectorMenu' ).each( function () { + var $el = $( this ); + $el.find( '> h3 > a' ).parent() + .attr( 'tabindex', '0' ) + // For accessibility, show the menu when the h3 is clicked (bug 24298/46486) + .on( 'click keypress', function ( e ) { + if ( e.type === 'click' || e.which === 13 ) { + $el.toggleClass( 'menuForceShow' ); + e.preventDefault(); + } + } ) + // When the heading has focus, also set a class that will change the arrow icon + .focus( function () { + $el.find( '> a' ).addClass( 'vectorMenuFocus' ); + } ) + .blur( function () { + $el.find( '> a' ).removeClass( 'vectorMenuFocus' ); + } ) + .find( '> a:first' ) + // As the h3 can already be focused there's no need for the link to be focusable + .attr( 'tabindex', '-1' ); + } ); + + /** + * Collapsible tabs for Vector + */ + var $cactions = $( '#p-cactions' ); + + // Bind callback functions to animate our drop down menu in and out + // and then call the collapsibleTabs function on the menu + $( '#p-views ul' ) + .bind( 'beforeTabCollapse', function () { + // If the dropdown was hidden, show it + if ( $cactions.hasClass( 'emptyPortlet' ) ) { + $cactions + .removeClass( 'emptyPortlet' ) + .find( 'h3' ) + .css( 'width', '1px' ).animate( { 'width': '24px' }, 390 ); + } + } ) + .bind( 'beforeTabExpand', function () { + // If we're removing the last child node right now, hide the dropdown + if ( $cactions.find( 'li' ).length === 1 ) { + $cactions.find( 'h3' ).animate( { 'width': '1px' }, 390, function () { + $( this ).attr( 'style', '' ) + .parent().addClass( 'emptyPortlet' ); + }); + } + } ) + .collapsibleTabs(); +} ); -- cgit v1.2.1