From 3d1ecd2ea3fe37fef6a25cf6fce76adacd0eb5a0 Mon Sep 17 00:00:00 2001 From: Effie Date: Thu, 2 Oct 2025 23:53:33 +1000 Subject: [PATCH] add base skin files --- .eslintrc.json | 12 +++++++ .gitignore | 2 ++ .stylelintrc.json | 7 ++++ i18n/en.json | 10 ++++++ i18n/qqq.json | 10 ++++++ package.json | 18 +++++++++++ resources/print.less | 27 ++++++++++++++++ resources/skin.js | 0 resources/skin.less | 0 skin.json | 72 +++++++++++++++++++++++++++++++++++++++++ templates/skin.mustache | 0 11 files changed, 158 insertions(+) create mode 100644 .eslintrc.json create mode 100644 .gitignore create mode 100644 .stylelintrc.json create mode 100644 i18n/en.json create mode 100644 i18n/qqq.json create mode 100644 package.json create mode 100644 resources/print.less create mode 100644 resources/skin.js create mode 100644 resources/skin.less create mode 100644 skin.json create mode 100644 templates/skin.mustache diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..f59fc50 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,12 @@ +{ + "root": true, + "extends": [ + "wikimedia/client-es6", + "wikimedia/jquery", + "wikimedia/mediawiki" + ], + "rules": { + "compat/compat": "off", + "vue/no-v-html": "off" + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..df07347 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.eslintcache +node_modules/ diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..3282735 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,7 @@ +{ + "extends": "stylelint-config-wikimedia", + "rules": { + "selector-max-id": null, + "no-descending-specificity": null + } +} diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 0000000..5283764 --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,10 @@ +{ + "@metadata": { + "authors": [ + "..." + ] + }, + "skinname-crystal": "Crystal", + "crystal-skin-desc": "A skin for Final Fantasy fansites, by Esby.", + "crystal-no-categories": "No categories." +} diff --git a/i18n/qqq.json b/i18n/qqq.json new file mode 100644 index 0000000..e621082 --- /dev/null +++ b/i18n/qqq.json @@ -0,0 +1,10 @@ +{ + "@metadata": { + "authors": [ + "..." + ] + }, + "skinname-crystal": "{{optional}}", + "crystal-skin-desc": "{{desc|what=skin|name=Crystal|url=https://www.mediawiki.org/wiki/Skin:Crystal}}", + "crystal-no-categories": "Message to show when no categories available" +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..398afa4 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "Crystal", + "private": true, + "scripts": { + "test": "npm -s run lint", + "lint": "npm -s run lint:js && npm -s run lint:styles && npm -s run lint:i18n", + "lint:fix:js": "npm -s run lint:js -- --fix", + "lint:fix:styles": "npm -s run lint:styles -- --fix", + "lint:js": "eslint --cache .", + "lint:styles": "stylelint \"**/*.{less,css}\"", + "lint:i18n": "banana-checker i18n/" + }, + "devDependencies": { + "eslint-config-wikimedia": "0.25.1", + "grunt-banana-checker": "0.11.0", + "stylelint-config-wikimedia": "0.15.0" + } +} diff --git a/resources/print.less b/resources/print.less new file mode 100644 index 0000000..1f092ef --- /dev/null +++ b/resources/print.less @@ -0,0 +1,27 @@ +/* Styles for print view and printing. */ +/* You can use CSS files or Less files depending on your preference. */ + +/* Hide some extra stuff from print view (some of the navigation is already hidden automatically, +but not all). */ +.mw-indicators, +.mw-portlet-personal, +.mw-portlet-views, +.mw-portlet-namespaces, +.mw-portlet-cactions, +.mw-portlet-notifications, +.mw-interlanguage-selector, +.mw-portlet-lang, +.toggle-list, +.catlinks, +.mw-footer, +.mw-portlet-variants, +form.mw-portlet, +#toc-sticky { + display: none; +} + +#p-logo a { + display: flex; + align-items: center; + column-gap: 10px; +} diff --git a/resources/skin.js b/resources/skin.js new file mode 100644 index 0000000..e69de29 diff --git a/resources/skin.less b/resources/skin.less new file mode 100644 index 0000000..e69de29 diff --git a/skin.json b/skin.json new file mode 100644 index 0000000..f535359 --- /dev/null +++ b/skin.json @@ -0,0 +1,72 @@ +{ + "name": "Crystal", + "version": "1.0.0", + "author": [ + "[https://skins.wmflabs.org skins.wmflabs.org v.3.0]" + ], + "url": "https://www.mediawiki.org/wiki/Skin:Crystal", + "descriptionmsg": "crystal-skin-desc", + "namemsg": "skinname-crystal", + "type": "skin", + "requires": { + "MediaWiki": ">= 1.41.0" + }, + "ValidSkinNames": { + "crystal": { + "class": "SkinMustache", + "args": [ + { + "name": "crystal", + "responsive": true, + "toc": true, + "messages": [ + "crystal-no-categories", + "otherlanguages", + "sitetitle", + "search", + "tagline" + ], + "styles": [ + "codex-styles", + "skins.crystal.styles" + ], + "scripts": [] + } + ] + } + }, + "MessagesDirs": { + "Crystal": [ + "i18n" + ] + }, + "ResourceModules": { + "skins.crystal.styles": { + "class": "MediaWiki\\ResourceLoader\\SkinModule", + "features": { + "normalize": true, + "elements": true, + "content-tables": true, + "content-links": true, + "content-media": true, + "content-links-external": false, + "interface-message-box": true, + "interface-category": true, + "toc": true + }, + "targets": [ + "desktop", + "mobile" + ], + "styles": [ + "resources/skin.less" + ] + } + }, + "ResourceFileModulePaths": { + "localBasePath": "", + "remoteSkinPath": "Crystal" + }, + "ResourceModuleSkinStyles": {}, + "manifest_version": 2 +} diff --git a/templates/skin.mustache b/templates/skin.mustache new file mode 100644 index 0000000..e69de29