Compare commits

...

57 Commits

Author SHA1 Message Date
giuliof 2ae8b535e0 Added "calendario" element and changed link of "Recupero Hardware" to digitale civile 2024-01-06 12:24:35 +00:00
giomba 6bdcc7a577 golemnavbar: patch for not clickable links 2022-01-15 23:18:03 +01:00
giomba dd133e6202 left-navigation: display none 2021-12-06 21:33:12 +01:00
giomba 49c069cb9b search bar: responsive version 2021-12-06 21:30:35 +01:00
giomba 97f12e75cd Logo size background-image: contain 2021-12-06 21:09:45 +01:00
giomba d0c066d89f move side panel lower, to make room for logo 2021-12-05 21:44:29 +01:00
giomba 800de152bc hide left/right navigation bars in mobile version
even Wikipedia's has messy bars, so...
2021-12-05 21:40:09 +01:00
giomba c4411860a6 move personal menu out of the GOLEM navbar 2021-12-05 21:32:38 +01:00
giomba e48047b91c left/right navigation containers padding, to show GOLEM navbar 2021-12-05 21:12:23 +01:00
giomba 7875ae7bb5 restore GOLEM navigation bar 2021-12-05 21:01:50 +01:00
giomba fec8e7a6b8 add golem.css resource to legacy skin too 2021-12-05 20:55:15 +01:00
giomba b1d623c980 typo fix 2021-12-05 20:44:16 +01:00
giomba 7e4ea56236 move golem.css into resource directory 2021-12-05 20:43:18 +01:00
giomba 85fce1d958 Merge remote-tracking branch 'mediawiki/REL1_35' into feature/golem 2021-12-05 20:33:44 +01:00
giomba b036a7ec09 Merge remote-tracking branch 'mediawiki/REL1_34' into feature/golem 2021-12-05 20:15:12 +01:00
giomba 1707c3d040 restored GOLEM Navigation Bar 2021-12-05 19:05:09 +01:00
giomba d650fbcc40 ul 2021-12-05 19:03:24 +01:00
giomba 21b6175fec closing too many </div> 2021-12-05 18:58:56 +01:00
giomba 34bfa714c9 Merge branch 'REL1_33' into devel/golem-custom 2021-12-05 18:42:00 +01:00
libraryupgrader 1b03bafb12 build: Updating browserslist to 4.16.6
* https://npmjs.com/advisories/1747 (CVE-2021-23364)

Change-Id: Id24db33314062bf1ebb324a160199a75ea8a5071
2021-05-28 02:48:48 +00:00
libraryupgrader a79dcd6299 build: Updating npm dependencies
* jsdoc: 3.6.3 → 3.6.7
  * https://npmjs.com/advisories/1674 (CVE-2021-23358)
* stylelint-config-wikimedia: 0.10.1 → 0.10.3
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)
* lodash: 4.17.19 → 4.17.21
  * https://npmjs.com/advisories/1673 (CVE-2021-23337)
* html-webpack-plugin: 4.0.0-beta.11 → 4.5.2
  * https://npmjs.com/advisories/1673 (CVE-2021-23337)
* hosted-git-info: 2.8.8 → 2.8.9
  * https://npmjs.com/advisories/1677 (CVE-2021-23362)
* url-parse: 1.4.7 → 1.5.1
  * https://npmjs.com/advisories/1678 (CVE-2021-27515)
* @stylelint/postcss-markdown: 0.36.1 → 0.36.2
  * https://npmjs.com/advisories/1700 (CVE-2020-7753)
* websocket-extensions: 0.1.3 → 0.1.4
  * https://npmjs.com/advisories/1710 (CVE-2020-7662)

Change-Id: I39cf6b3998197938fff7126bf70c7b0e3ed0898a
2021-05-16 23:12:09 +00:00
giomba 50a7c86f33 fixed description 2021-05-11 20:51:22 +02:00
giomba b8a5db32f4 hidden unused disclaimer link 2021-05-11 20:50:19 +02:00
giomba 6b518ca545 removed unused input for nonexistent (now) drop-down menu 2021-05-10 22:06:16 +02:00
giomba c1cc8083ef spacing improvements 2021-05-10 22:01:28 +02:00
giomba 25ba173abe personal menu now fully integrated in left panel 2021-05-10 21:45:44 +02:00
giomba 6873f047b7 personal actions menu, same style of portal menus 2021-05-10 21:39:22 +02:00
giomba 7e8aaad2ad personal actions menu moved like portal menu 2021-05-10 21:37:56 +02:00
giomba 5869fce77a wrong class name for portal lists 2021-05-10 21:30:36 +02:00
giomba d5d1b0ebb7 adjusting vector tabs to resemble normal left panel menu 2021-05-10 21:25:51 +02:00
giomba 27c3c6c4dd moved menu to top (also on mobile) 2021-05-10 10:47:12 +02:00
giomba a3fc66105a fixed "other" menu 2021-05-09 21:59:00 +02:00
giomba bc85d9c952 removed indentation from various menu <ul><li> 2021-05-09 21:53:15 +02:00
giomba 59631f6578 removed javascript and jquery code to handle collapsible tabs 2021-05-09 21:48:33 +02:00
giomba 7f87f040c0 removed code which handles collapsible tabs 2021-05-09 21:45:58 +02:00
giomba cf34ef1acb removed superfluos html elements 2021-05-09 21:41:04 +02:00
giomba 2b132de23b moved mw-body to proper position outside of golem navbar range 2021-05-09 21:39:10 +02:00
giomba 9df275a028 moved padding from left pane 2021-05-09 21:35:14 +02:00
giomba b40568a266 moved html code for tabs to mw-panel 2021-05-09 21:33:12 +02:00
giomba 7fdfd79a5f moved tabs to left panel, so it's easier to manage them in css 2021-05-09 21:30:25 +02:00
giomba 8d05fb227f removed unused space of unused logo 2021-05-09 21:04:25 +02:00
giomba 426e449190 fixed search bar position for mobile version too 2021-05-09 20:56:22 +02:00
giomba 8d1d3f3d75 better positioning for search bar 2021-05-09 20:54:27 +02:00
giomba ef5ff1ca3f mediawiki vector skin adaptation for golem
not fully ready, but stil...
2021-05-09 15:21:09 +02:00
giomba 934d2cbcfc fork 2021-05-09 13:51:53 +02:00
libraryupgrader 37d7761eba build: Updating ssri to 6.0.2
* https://npmjs.com/advisories/565

Change-Id: Ic1e29c12fb0bdb01fc7d153d73509c1bfbe649f7
2021-04-15 13:55:13 +00:00
libraryupgrader 57326a0290 build: Updating y18n to 4.0.1
* https://npmjs.com/advisories/1654 (CVE-2020-7774)

Change-Id: Id525485ab8f37690c47394a110fa78295418c7e7
2021-03-30 13:02:47 +00:00
Jack Phoenix a57b2b67b2 Don't add Vector-specific <body> classes when not using Vector
Hooks are global, unlike the old Skin addToBodyAttributes() method, which was per-skin.

Follow-up to a04fc71f30

Change-Id: Ic8a581256c4775ba45b2c5188d678751ba9c7023
(cherry picked from commit 3ea7bec6db)
2021-03-23 16:57:23 +00:00
libraryupgrader 2ac57c85ea build: Updating elliptic to 6.5.4
* https://npmjs.com/advisories/1648 (CVE-2020-28498)

Change-Id: I7770e9015aa2da482aee8e59eee8245713f9eee7
2021-03-08 18:17:21 +00:00
libraryupgrader b5465a9841 build: Updating prismjs to 1.23.0
* https://npmjs.com/advisories/1638 (CVE-2021-23341)

Additional changes:
* Dropped .php5 and .inc files from .phpcs.xml (T200956).

Change-Id: If1118f28dbdf741ddbab89724aaab07624787f9c
2021-03-05 04:27:04 +00:00
libraryupgrader e3d48bca71 build: Updating npm dependencies
* bundlesize: 0.18.0 → 0.18.1
  * https://npmjs.com/advisories/1594 (CVE-2020-28168)
* github-build: 1.2.1 → 1.2.2
  * https://npmjs.com/advisories/1594 (CVE-2020-28168)

Change-Id: I6eab00d09acf94935fd22a5a2d3551109b599f21
2021-01-08 04:51:31 +00:00
libraryupgrader d49790d546 build: Updating npm dependencies
* node-fetch: 2.6.0 → 2.6.1
  * https://npmjs.com/advisories/1556 (CVE-2020-15168)
* elliptic: 6.5.2 → 6.5.3
  * https://npmjs.com/advisories/1547 (CVE-2020-13822)
* webpack: 4.43.0 → 4.44.2
  * https://npmjs.com/advisories/1548
* terser-webpack-plugin: 1.4.3 → 1.4.5
  * https://npmjs.com/advisories/1548
* bl: 4.0.2 → 4.0.3
  * https://npmjs.com/advisories/1555
* node-fetch: 2.6.0 → 2.6.1
  * https://npmjs.com/advisories/1556 (CVE-2020-15168)
* ini: 1.3.5 → 1.3.8
  * https://npmjs.com/advisories/1589

Additional changes:
* Added the "composer phan" command to conveniently run phan.

Change-Id: I5755f281e2916775999b53c74696515005758ed7
2021-01-03 19:13:50 +00:00
hmonroy 771c8764c8 Remove the loading background image for loading class
The star should spin its current background image when transitioning between different
watch requests.

Bug: T259053
Depends-On: I1e11f0e129c53b405a2ffa8
Change-Id: Id2f9b2e25761c052aeaa410edead65ec298209a2
(cherry picked from commit 4169fc6dc1)
2020-09-11 03:30:08 +00:00
DannyS712 a6445a69c2 Restore div wrapper around print footer
Div with a `printfooter` class that is hidden on normal page views

Bug: T257914
Change-Id: Ibd3e73076f290a92671c7cdd72672921fa64fc05
(cherry picked from commit 56dbfd9a46)
2020-07-14 14:29:46 +00:00
Timo Tijhof f39a3f028f vector.js: Remove eager calculation of p-cactions width on page load
With these optimisations applied, there is no longer any need for
the width value during most page views, and even for most resize
operations. As such, eagerly computing it ahead of time, even from an
idle callback, no longer makes sense.

It is still memoised because it's worth avoiding a recalc during
some of the code paths that need it. Also because this way the
logic stays compatible. I don't know for sure if all involved logic
would be able to handle the value changing over time.

Optimisations:

* Where possible, don't depend on jQuery width() working on invisible
  elements. Specifically, don't depend on it giving you the width of the
  element *as if* it were visible when it is invisible. When logged-out and,
  when navigating special pages (e.g. Special:Blankpage), the #p-cactions
  element is an emptyPortlet with `display: none;` set.

  The animation logic was depending on initialCactionsWidth() providing
  the width the element would have if it were visible. This is because
  jQuery width(), will actually change 'display: none' to 'display: block',
  force render virtually, compute the width, and then change back.
  Instead of depending on this discouraged feature [1], move this calculation
  to the code dealing with the animation and calculating it there, ourselves,
  right after making it visible for real (but before shrinking it for the
  hidden-to-visible growing expansion animation).

* Document our reliance on this discouraged feature for the remaining two
  callers in expandCondition() and collapseCondition(). Both of those
  need the initial width as-if visible and generally are not in charge
  direclty of making it visible (so there's no better place to measure
  it), and are in fact almost always called when the element is invisible,
  thus pretty much exclusively depending on it, not even as an edge case.

* In collapseCondition(), optimise the logic to remember whether
  collapsing is needed. This way, it won't need to call initialCactionsWidth()
  if the loop iterated zero times (turns out to be impossible, but not
  obvious from the code).

Follows-up 46f1d41 and 9b2bcbb.

Change-Id: I6f3a5c937eb17d194a7e00ab273768a5f2cb7cd2
(cherry picked from commit e32df2ad20)
2019-10-02 12:42:42 +00:00
Volker E d30064229f Replace raster image gradients with CSS where easily applicable
Replace raster image gradients (before base64 embedded) for modern
browsers by CSS gradients. Only relying on conventional image URLs
in browsers that don't support linear-gradient.
Also
- adding a darkened border for inactive tabs to harmonize visual
  perception of border as one continuous line and
- DRYing tab separator selectors, saving ~8 bytes gzipped.

Bug: T63099
Bug: T121730
Change-Id: I76d32b84ddff06a2c7ef983e6f89ca6e74257a67
2019-10-01 21:38:24 +00:00
Volker E bb2fd9cf9c Replace portal break image by SVG gradient
Replace raster image gradients (before base64 embedded) for modern
browsers by CSS gradients. Only relying on conventional image URLs
in browsers that don't support linear-gradient.
Also updating color to Wikimedia Design Style Guide color and
removing obsolete *-ltr/*-rtl images that have been introduced in
MW core 1.16.0beta1 but have been replaced by unified 'portal-break'
image afterwards.

Bug: T63099
Bug: T121730
Change-Id: Id0ab5eb7d4a5751316ce750aff2dffbda62f6b09
(cherry picked from commit 5ed9bf8be6)
2019-10-01 19:31:30 +00:00
26 changed files with 2658 additions and 853 deletions

View File

@ -2,6 +2,6 @@
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
<file>.</file>
<arg name="extensions" value="php,php5,inc"/>
<arg name="extensions" value="php"/>
<arg name="encoding" value="UTF-8"/>
</ruleset>

129
components/navigation.less Normal file
View File

@ -0,0 +1,129 @@
@import 'mediawiki.mixins';
@import 'personalNavigation';
@import 'search';
@import 'tabs';
/* Hide, but keep accessible for screen-readers */
#mw-navigation h2 {
position: absolute;
top: -9999px;
}
.mw-jump-link:not( :focus ) {
.mixin-screen-reader-text;
}
/* Head */
#mw-page-base {
height: 5em;
background-position: bottom left;
.vertical-gradient( @background-color-base, @background-color-secondary, 50%, 100% );
}
#mw-head-base {
margin-top: -5em;
margin-left: 10em;
height: 5em;
}
#mw-head {
position: absolute;
top: 2.5em;
right: 0;
width: 100%;
}
/* Navigation Containers */
#left-navigation {
padding-top: 6px;
}
#right-navigation {
padding-top: 6px;
}
/* Logo */
#p-logo {
width: 10em;
height: 160px;
a {
display: block;
width: 10em;
height: 160px;
background-repeat: no-repeat;
background-position: center center;
text-decoration: none;
}
}
/* Panel */
#mw-panel {
position: absolute;
top: 60px;
width: 10em;
left: 0;
font-size: @font-size-nav-main;
.portal {
margin: 0 0.6em 0 0.7em;
padding: 0.25em 0;
direction: ltr;
h3 {
color: @color-nav-subtle;
font-weight: normal;
margin: 0.5em 0 0 ( @margin-left-nav-main-body / @font-size-nav-main-heading );
padding: 0.25em 0;
cursor: default;
border: 0;
font-size: @font-size-nav-main-heading;
}
.body {
margin-left: @margin-left-nav-main-body;
padding-top: 0;
background-image: url( images/portal-separator.png ); // Support: IE 8 & 9, Fx 3.6-15, Safari 5.1-6, Chrome 10-25
background-image: linear-gradient( to right, transparent 0, #c8ccd1 35%, #c8ccd1 70%, transparent 100% ); // Standard (Firefox 16+, IE 10+, Safari 6.1+, Chrome 26+)
background-repeat: no-repeat;
background-size: 100% @border-width-base;
ul {
list-style: none none;
margin: 0;
padding-top: 0.3em;
}
li {
margin: 0;
padding: 0.25em 0;
font-size: @font-size-nav-main-body;
line-height: @line-height-nav;
word-wrap: break-word;
a {
color: @color-link;
&:visited {
color: @color-link--visited;
}
}
}
}
}
/* First sidebar portlet. Not using :first-of-type for IE<=8 support. */
#p-logo + .portal {
background-image: none;
margin-top: 1em;
h3 {
display: none;
}
.body {
background-image: none;
margin-left: @margin-left-nav-main-body;
}
}
}

251
components/tabs.less Normal file
View File

@ -0,0 +1,251 @@
@import 'mediawiki.mixins';
/**
* Styling for namespace tabs (page, discussion) and views (read, edit, view history, watch and other actions)
*/
/* Namespaces and Views */
.vectorTabs {
// Tab separator: Outer start border (left in LTR) of tab row.
background-position: left bottom;
float: left;
height: 2.5em;
padding-left: @border-width-base;
/* Navigation Labels */
h3 {
display: none;
}
ul {
list-style-type: none;
list-style-image: none;
li {
}
}
li {
// Tab fade background: Fade inside from light grey to white.
background-image: url( images/tab-normal-fade.png ); // Support: IE 8 & 9, Fx 3.6-15, Safari 5.1-6, Chrome 10-25
background-image: linear-gradient( to top, @border-color-content--tabs-inactive 0, #e8f2f8 1px, #fff 100% ); // Support: Standard (Firefox 16+, IE 10+, Safari 6.1+, Chrome 26+)
background-position: left bottom;
background-repeat: repeat-x;
float: left;
display: block;
height: 100%;
margin: 0;
padding: 0;
line-height: @line-height-nav;
white-space: nowrap;
a {
color: @color-link;
display: block;
height: 1.9em;
padding-left: 0.615em; // Equals `8px` at computed `font-size` of `13px` below
padding-right: 0.615em;
cursor: pointer;
font-size: @font-size-tabs;
}
}
.new {
a,
a:visited {
color: @color-link-new;
}
}
.selected {
// Replace tab fade with flat color (matching top of would-be fade).
background-image: url( images/tab-current-fade.png );
// Overwrite above in browsers that support `rgba()`.
background: rgba( 255, 255, 255, 1 ); // stylelint-disable-line declaration-block-no-shorthand-property-overrides
a,
a:visited {
color: @color-link-selected;
text-decoration: none;
}
}
.icon {
a {
background-position: right bottom;
background-repeat: no-repeat;
}
}
// Tab separator: Border between tabs and outer right border.
span {
background-position: right bottom;
display: inline-block;
height: 100%;
a {
display: block;
position: relative;
}
}
}
/* Variants and Actions */
.vectorMenu {
direction: ltr;
cursor: pointer;
line-height: 1.125em;
h3 {
span {
color: @color-nav-subtle;
position: relative;
display: block;
padding-left: 0.615em;
padding-top: 1.25em;
padding-right: 16px;
font-size: @font-size-tabs;
font-weight: normal;
&:after {
content: '';
position: absolute;
top: 1.25em;
right: 0;
bottom: 0;
left: 0;
.background-image-svg('images/arrow-down.svg', 'images/arrow-down.png');
background-position: 100% 50%;
background-repeat: no-repeat;
// Modify the color of the image from the default #222 to approx. #444 to match the text.
opacity: 0.85;
}
}
&:hover span,
&:focus span {
color: @color-base;
&:after {
opacity: 1;
}
}
}
.menu {
list-style: none none;
background-color: @background-color-base;
clear: both;
// Match the width of the dropdown "heading" (the tab)
min-width: 100%;
position: absolute;
top: 2.5em;
left: -@border-width-base;
margin: 0;
border: @border-width-base @border-style-base @border-color-base;
border-top-width: 0;
padding: 0;
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
text-align: left;
opacity: 0;
visibility: hidden;
.transition( opacity 100ms );
// Menus must overlap indicators (z-index: 1) and VisualEditor toolbar (z-index: 2)
z-index: 2;
}
&:hover .menu {
opacity: 1;
visibility: visible;
}
// This is in a separate block, so that browsers supporting :hover but not :checked still apply the rule above
// Support: IE8
.vectorMenuCheckbox:checked ~ .menu {
opacity: 1;
visibility: visible;
}
li {
padding: 0;
margin: 0;
text-align: left;
line-height: 1em;
a {
color: @color-link;
display: block;
padding: 0.625em;
white-space: nowrap;
cursor: pointer;
font-size: @font-size-tabs;
}
}
.selected a,
.selected a:visited {
color: @color-link-selected;
text-decoration: none;
}
}
#mw-head .vectorMenu h3 {
// Tab separator: Outer end (right in LTR) border of "Actions" menu.
background-position: right bottom;
float: left;
font-size: @font-size-reset;
height: 2.5em;
margin: 0 -@border-width-base 0 0;
// `padding-right` >= `1px` effectively moves the "background border" outside of the element to
// act like a real border. It is necessary for `.vectorMenu .menu` dropdown to align well.
// 0.5em equals `8px` at computed `font-size` of `14px` as visually harmonically with
// `padding-left` in `.vectorMenu h3 span`
padding: 0 0.5em 0 0;
}
// Tab Separators
// `.vectorTabs`: Outer start border (left in LTR) of tab row.
// `.vectorTabs span`: Border between tabs and outer end (right in LTR) border.
// `#mw-head .vectorMenu h3`: // Outer end (right in LTR) border of "Actions" menu.
.vectorTabs,
.vectorTabs span,
#mw-head .vectorMenu h3 {
background-image: url( images/tab-separator.png );
background-image: linear-gradient( to bottom, rgba( 167, 215, 249, 0 ) 0, @border-color-content 100% );
background-repeat: no-repeat;
// Contain gradient to 1px × 100% size and draw from top to bottom-left or -right corner.
background-size: @border-width-base 100%;
}
// Invisible checkbox covering the dropdown menu handle
.vectorMenuCheckbox {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
z-index: 1;
opacity: 0;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
// Hide the checkbox completely in browsers that don't support :checked
display: none;
:not( :checked ) > & {
// When the browser supports :checked, display it
display: block;
}
&:checked + h3 span:after {
transform: scaleY( -1 );
}
&:focus + h3 {
// Simulate browser focus ring
outline: dotted 1px; // Firefox style
outline: auto -webkit-focus-ring-color; // Webkit style
}
}
@import 'watchstar.less';

View File

@ -48,6 +48,7 @@
"parallel-lint . --exclude node_modules --exclude vendor",
"phpcs -p -s",
"minus-x check ."
]
],
"phan": "phan -d . --long-progress-bar"
}
}

View File

@ -3,7 +3,7 @@
"authors": []
},
"skinname-vector": "Vector",
"vector-skin-desc": "Modern version of MonoBook with fresh look and many usability improvements",
"vector-skin-desc": "Modern version of MonoBook with fresh look and many usability improvements, customized for GOLEM",
"prefs-vector-enable-vector-1-label": "Use Legacy Vector",
"prefs-vector-enable-vector-1-help": "Over the next few years, we will be gradually updating the Vector skin. Legacy Vector will allow you to view the old version of Vector (as of December 2019). To learn more about the updates, go to our [[mw:Reading/Web/Desktop_Improvements|project page]].",
"vector-opt-out": "Switch to old look",

View File

@ -11,7 +11,7 @@
"Scompo"
]
},
"vector-skin-desc": "Versione moderna del MonoBook con un aspetto rinnovato e molti miglioramenti dell'usabilità",
"vector-skin-desc": "Versione moderna del MonoBook con un aspetto rinnovato e miglioramenti dell'usabilità, personalizzato per GOLEM",
"vector-opt-out-tooltip": "Cambia le tue impostazioni per ritornare alla visualizzazione della skin precedente (legacy Vector)",
"vector.css": "/* Gli stili CSS inseriti qui si applicano agli utenti che usano il tema Vector */",
"vector.js": "/* Il codice JavaScript inserito qui viene caricato dagli utenti che usano il tema Vector */",

View File

@ -210,6 +210,10 @@ class Hooks {
* @param string[] &$bodyAttrs
*/
public static function onOutputPageBodyAttributes( OutputPage $out, Skin $sk, &$bodyAttrs ) {
if ( !$sk instanceof SkinVector ) {
return;
}
$skinVersionLookup = new SkinVersionLookup(
$out->getRequest(), $sk->getUser(), self::getServiceConfig()
);

View File

@ -102,6 +102,12 @@ class SkinVector extends SkinTemplate {
];
}
$printFooter = Html::rawElement(
'div',
[ 'class' => 'printfooter' ],
$this->printSource()
);
return [
// Data objects:
'array-indicators' => $indicators,
@ -119,7 +125,7 @@ class SkinVector extends SkinTemplate {
'html-undelete-link' => $this->prepareUndeleteLink() ?: null,
// Result of OutputPage::addHTML calls
'html-body-content' => $this->wrapHTML( $title, $out->mBodytext )
. $this->printSource(),
. $printFooter,
'html-after-content' => $this->afterContentHook(),
];
}

View File

@ -114,7 +114,24 @@ class VectorTemplate extends BaseTemplate {
$contentNavigation = $this->getSkin()->getMenuProps();
$skin = $this->getSkin();
$out = $skin->getOutput();
$title = $out->getTitle();
$title = $out->getTitle();
/* GOLEM Navigation Bar -- BEGIN */
$golemNavBar = '<div id="golemnavbar">
<div id="golemnavbarlinks">
<ul>
<li id="golemmotto">I computer sceglierebbero Linux &#x1f427;</li>
<li><a href="https://golem.linux.it/">Home</a></li>
<li><a href="https://golem.linux.it/wiki/Chi_siamo">Chi siamo</a></li>
<li><a href="https://golem.linux.it/wp/calendario">Calendario</a></li>
<li><a href="https://golem.linux.it/wp/contatti/">Contatti</a></li>
<li><a href="https://golem.linux.it/wiki/">Wiki</a></li>
<li><a href="https://digitalecivile.golem.linux.it/donazione">Recupero Hardware</a></li>
</ul>
</div>
</div>';
/* GOLEM Navigation Bar -- END */
// Naming conventions for Mustache parameters.
//
@ -138,7 +155,8 @@ class VectorTemplate extends BaseTemplate {
// @phan-suppress-next-line PhanUndeclaredMethod
$commonSkinData = $skin->getTemplateData() + [
'html-headelement' => $out->headElement( $skin ),
'html-headelement' => $out->headElement( $skin ),
'html-golemnavbar' => $golemNavBar,
'page-langcode' => $title->getPageViewLanguage()->getHtmlCode(),
'page-isarticle' => (bool)$out->isArticle(),
@ -146,7 +164,6 @@ class VectorTemplate extends BaseTemplate {
// From OutputPage::getPageTitle, via ::setPageTitle().
'html-title' => $out->getPageTitle(),
'msg-tagline' => $skin->msg( 'tagline' )->text(),
'html-newtalk' => $newTalksHtml ? '<div class="usermessage">' . $newTalksHtml . '</div>' : '',
'msg-vector-jumptonavigation' => $skin->msg( 'vector-jumptonavigation' )->text(),

View File

@ -0,0 +1,37 @@
{{{html-headelement}}}
{{{html-golemnavbar}}}
<div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
<div id="content" class="mw-body" role="main">
<a id="top"></a>
{{#html-sitenotice}}<div id="siteNotice" class="mw-body-content">{{{html-sitenotice}}}</div>{{/html-sitenotice}}
{{{html-indicators}}}
<h1 id="firstHeading" class="firstHeading" lang="{{page-langcode}}">{{{html-title}}}</h1>
{{{html-prebodyhtml}}}
<div id="bodyContent" class="mw-body-content">
{{#page-isarticle}}<div id="siteSub" class="noprint">{{msg-tagline}}</div>{{/page-isarticle}}
<div id="contentSub"{{{html-userlangattributes}}}>{{{html-subtitle}}}</div>
{{#html-undelete}}<div id="contentSub2">{{{html-undelete}}}</div>{{/html-undelete}}
{{#html-newtalk}}<div class="usermessage">{{{html-newtalk}}}</div>{{/html-newtalk}}
{{!
Keep this empty `div` for compatibility with gadgets and user scripts
using this place to insert extra elements before.
}}
<div id="jump-to-nav"></div>
<a class="mw-jump-link" href="#mw-head">{{msg-jumptonavigation}}</a>
<a class="mw-jump-link" href="#p-search">{{msg-jumptosearch}}</a>
{{{html-bodycontent}}}
{{#html-printfooter}}
<div class="printfooter">{{{html-printfooter}}}</div>
{{/html-printfooter}}
{{{html-catlinks}}}
<div class="visualClear"></div>
{{{html-debuglog}}}
</div>
</div>
{{{html-dataAfterContent}}}
{{! html-unported outputs <div id="mw-navigation"> and <div id="footer"> }}
{{{html-unported}}}
{{{html-printtail}}}
</body>
</html>

View File

@ -32,6 +32,7 @@
}}
{{{html-headelement}}}
{{{html-golemnavbar}}}
<div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
<div id="content" class="mw-body" role="main">

View File

@ -36,6 +36,7 @@
}}
{{{html-headelement}}}
{{{html-golemnavbar}}}
<div class="mw-page-container">
<div class="mw-page-container-inner">

9
jsduck.json Normal file
View File

@ -0,0 +1,9 @@
{
"--title": "Vector skin - Documentation",
"--output": "docs",
"--processes": "0",
"--warnings-exit-nonzero": true,
"--warnings": ["-nodoc(class,public)"],
"--": [
]
}

2763
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -23,17 +23,17 @@
"@types/mustache": "4.0.1",
"@types/node-fetch": "2.5.7",
"babel-loader": "8.0.6",
"bundlesize": "0.18.0",
"bundlesize": "0.18.1",
"eslint-config-wikimedia": "0.16.2",
"grunt-banana-checker": "0.9.0",
"jsdoc": "3.6.3",
"jsdoc": "3.6.7",
"jsdoc-wmf-theme": "0.0.3",
"less": "3.8.1",
"less-loader": "4.1.0",
"mustache": "3.0.1",
"node-fetch": "2.6.0",
"node-fetch": "2.6.1",
"pre-commit": "1.2.2",
"stylelint-config-wikimedia": "0.10.1",
"stylelint-config-wikimedia": "0.10.3",
"svgo": "1.3.2",
"typescript": "3.8.3"
}

View File

@ -19,7 +19,7 @@
table-layout: fixed;
width: 100%;
overflow: hidden;
font-size: 150%;
padding-top: 3em;
.portal {
display: block;
@ -62,21 +62,18 @@
}
}
#right-navigation {
// float: none; Override not needed with `position: absolute` above.
position: absolute;
top: inherit;
right: 0;
margin-top: 0;
#p-views {
display: none;
}
#left-navigation {
// float: none; Override not needed with `position: absolute` above.
position: absolute;
top: inherit;
margin: 0;
display: block;
}
#right-navigation {
float: none;
margin-top: 0;
padding-top: 0;
}
#left-navigation {
display: none;
}
#p-namespaces,
#p-views,

View File

@ -4,9 +4,7 @@
/* Search */
#p-search {
float: left;
margin-right: 0.5em;
margin-left: 0.5em;
display: inline-block;
h3 {
.mixin-screen-reader-text;

View File

@ -9,6 +9,7 @@
a {
background-position: center center;
background-repeat: no-repeat;
background-size: contain;
display: block;
width: 10em;
height: 160px;

View File

@ -62,7 +62,6 @@
// Loading watchstar link class.
#ca-unwatch.icon .loading:before,
#ca-watch.icon .loading:before {
background-image: linear-gradient( transparent, transparent ), url( images/watch-icon-loading.svg );
.rotation( 700ms );
/* Suppress the hilarious rotating focus outline on Firefox */
outline: 0;

View File

@ -0,0 +1,172 @@
@media screen and (min-width: 600px) {
/* GOLEM Navbar desktop style -- BEGIN */
div#golemnavbar {
background: black;
border-bottom: 5px solid green;
margin: 0;
padding: 10px;
height: 21px;
font-family: sans-serif;
box-sizing: content-box !important;
line-height: 1.5em;
}
#golemnavbarlinks {
text-align: right;
font-size: 14px;
}
#golemnavbar li {
color: white;
display: inline;
padding: 5px;
margin: 5px;
}
#golemnavbar li > a, #golemnavbar li > a:visited {
font-weight: bold;
text-decoration: none;
color: white;
margin: 0px;
}
#golemnavbar li > a:hover, #golemnavbar li > a.selected{
color: green !important;
}
#golemnavbar li > a:hover {
text-decoration: underline;
}
#golemnavbarlogo {
float: left;
position: relative; /* la barra di admin di wp sputtana parecchie cose */
top: -3px;
height: 35px !important;
width: 123.34px;
background-image: url('golem-cut.png');
background-size: contain;
}
#golemnavbarlogo:hover {
background-image: url('golem-cut-top.png');
}
#golemmotto {
font-style: italic;
}
/* GOLEM Navbar desktop style -- END */
/* GOLEM Template Note style -- BEGIN */
.golem-template-note {
padding: 4px;
}
.golem-template-note-info {
background-color: #D6FEFF;
border: 1px solid #72E4FF;
}
.golem-template-note-example {
background-color: #E2FFE3;
border: 1px solid #00CB07;
}
.golem-template-note-reminder {
background-color: #FFFCC0;
border: 1px solid #D4D400;
}
.golem-template-note-warning {
background-color: #FFFCC0;
border: 1px solid #D4D400;
}
.golem-template-note-attention {
background-color: #FFD0CA;
border: 1px solid #AD1400;
}
/* GOLEM Template Note style -- END */
/* GOLEM Wiki Buttons -- BEGIN */
div.golem-wikibutton {
width: 5cm;
height: 2cm;
line-height: 2cm;
border: 1px solid gray;
border-radius: 7px;
text-align: center;
display: inline-block;
}
div.golem-wikibutton a, div.golem-wikibutton a:visited {
color: blue;
/* font-weight: bold; */
}
/* GOLEM Wiki Buttons -- END */
/* GOLEM Wiki Template Sviluppo -- BEGIN */
.golem-mw-template-sviluppo {
float: right;
width: 240px;
color: white;
padding: 5px;
margin-left: 15px;
border-radius: 15px;
font-weight: bold;
}
/* GOLEM Wiki Template Sviluppo -- END */
}
@media screen and (max-width: 600px) {
/* GOLEM Navbar mobile style CSS -- BEGIN */
div#golemnavbar {
background: black;
border-bottom: 5px solid green;
margin: 0;
padding: 10px;
font-family: sans-serif;
box-sizing: content-box !important;
}
#golemnavbarlinks {
text-align: center;
font-size: 14px;
}
#golemnavbar ul {
list-style: none;
}
#golemnavbar li {
color: white;
padding: 5px;
margin: 5px;
}
#golemnavbar li a, #golemnavbar li a:visited {
color: green;
}
#golemmotto::before {
content: "GOLEM - ";
}
/* GOLEM Navbar mobile style CSS -- END */
/* GOLEM Template Sviluppo -- BEGIN */
.golem-mw-template-sviluppo {
/* float: right; */
width: 240px;
color: white;
padding: 5px;
/* margin-left: 15px; */
border-radius: 15px;
font-weight: bold;
margin: 0 auto;
clear: both;
}
/* GOLEM Template Sviluppo -- END */
}

View File

@ -102,7 +102,7 @@ body {
/* Tabs */
#mw-head {
position: absolute;
top: 0;
top: 2.5em;
right: 0;
width: 100%;
}
@ -110,7 +110,7 @@ body {
/* Navigation Containers */
#left-navigation {
float: left;
margin-top: @height-header;
margin-top: 6em;
/* 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
@ -121,7 +121,7 @@ body {
#right-navigation {
float: right;
margin-top: @height-header;
margin-top: 6em;
}
#p-personal {
@ -147,7 +147,7 @@ body {
// The sidebar is absolutely positioned inside the header which applies a top
// margin so we need to subtract this top margin in order to get the correct
// sidebar position.
top: @height-header - @margin-top-header;
top: 3em;
left: 0;
width: @width-grid-column-one;
.box-sizing( border-box );

View File

@ -85,7 +85,7 @@ body {
#mw-head {
position: absolute;
top: 0;
top: 2.5em;
right: 0;
width: 100%;
}
@ -101,16 +101,18 @@ body {
is still broken, but at least the nav overlaps only the page title
instead of half the content. */
margin-bottom: -2.5em;
padding-top: 6px;
}
#right-navigation {
float: right;
margin-top: 2.5em;
padding-top: 6px;
}
#mw-panel {
position: absolute;
top: 0;
top: 3em;
width: 10em;
left: 0;
}

31
screen-hd.less Normal file
View File

@ -0,0 +1,31 @@
/* Vector screen styles for high definition displays */
@import 'variables.less';
.mw-body,
#mw-head-base,
#left-navigation,
#mw-data-after-content,
#footer {
/* margin-left: 11em;*/
}
.mw-body {
padding: 1.25em 1.5em 1.5em 1.5em;
}
#footer {
padding: 1.25em;
}
#mw-panel {
padding-left: 0.5em;
}
#p-search {
margin-right: 1em;
}
#p-personal {
right: 1em;
}

View File

@ -1,11 +1,13 @@
{
"name": "Vector",
"name": "VectorGOLEM",
"author": [
"Trevor Parscal",
"Roan Kattouw",
"giuliof",
"giomba",
"..."
],
"url": "https://www.mediawiki.org/wiki/Skin:Vector",
"url": "https://git.golem.linux.it/golem/VectorGOLEM",
"descriptionmsg": "vector-skin-desc",
"namemsg": "skinname-vector",
"license-name": "GPL-2.0-or-later",
@ -14,7 +16,7 @@
"MediaWiki": ">= 1.35.0"
},
"ValidSkinNames": {
"vector": "Vector"
"vectorgolem": "Vector"
},
"MessagesDirs": {
"Vector": [
@ -48,7 +50,7 @@
"desktop",
"mobile"
],
"styles": [ "resources/skins.vector.styles/skin-legacy.less" ]
"styles": [ "resources/skins.vector.styles/skin-legacy.less", "resources/skins.vector.styles/golem.less" ]
},
"skins.vector.styles": {
"class": "ResourceLoaderSkinModule",
@ -57,7 +59,7 @@
"desktop",
"mobile"
],
"styles": [ "resources/skins.vector.styles/skin.less" ]
"styles": [ "resources/skins.vector.styles/skin.less", "resources/skins.vector.styles/golem.less" ]
},
"skins.vector.icons": {
"class": "ResourceLoaderImageModule",

View File

@ -106,7 +106,7 @@
// Navigation: Personal tools
@background-position-nav-personal-icon: left ( 4 / @font-size-browser / @font-size-nav-personal );
@background-size-nav-personal-icon: 14 / @font-size-browser / @font-size-nav-personal;
@top-personal-tools: 6px;
@top-personal-tools: 6em;
@font-size-nav-personal: 0.75em;
// Using `unit()` without second parameter to achieve a unitless output for `line-height`.
@line-height-nav-personal: unit( 14 / @font-size-browser / @font-size-nav-personal ); // Equals `1.667`.

6
vector.js Normal file
View File

@ -0,0 +1,6 @@
/**
* Collapsible tabs for Vector
*/
jQuery( function ( $ ) {
/* DO NOTHING -- previously used for collapsible tabs */
} );