Merge pull request 'improve dark theme of French, German and Korean 'Main_Page' (#46, #70)' (#80) from eUgEntOptIc44/Wikiless:main into main

Reviewed-on: https://codeberg.org/orenom/Wikiless/pulls/80
This commit is contained in:
orenom
2022-07-25 15:38:23 +02:00
10 changed files with 103 additions and 9 deletions
+2 -2
View File
@@ -75,7 +75,7 @@ module.exports = function(redis) {
// load custom language specific languages
let lang_suffix = ''
let load_custom_styles = ['fr', 'ko']
let load_custom_styles = ['de', 'fr', 'ko']
if(load_custom_styles.includes(lang)) {
lang_suffix = '_' + lang
@@ -87,7 +87,7 @@ module.exports = function(redis) {
} else if(theme === 'dark') {
// if the user has chosen the dark theme from the preferences
data = data.replace('</head>', `<link rel="stylesheet" href="/wikipedia_styles_light${lang_suffix}.css">
<link rel="stylesheet" href="/wikipedia_styles_dark.css"></head>`)
<link rel="stylesheet" href="/wikipedia_styles_dark${lang_suffix}.css"></head>`)
} else {
// default, auto theme
data = data.replace('</head>', `<link rel="stylesheet" href="/styles${lang_suffix}.css"></head>`)
+2
View File
@@ -0,0 +1,2 @@
@import "wikipedia_styles_light.css";
@import "wikipedia_styles_dark_de.css" (prefers-color-scheme: dark);
+1 -1
View File
@@ -1,2 +1,2 @@
@import "wikipedia_styles_light_fr.css";
@import "wikipedia_styles_dark.css" (prefers-color-scheme: dark);
@import "wikipedia_styles_dark_fr.css" (prefers-color-scheme: dark);
+1 -1
View File
@@ -1,2 +1,2 @@
@import "wikipedia_styles_light_ko.css";
@import "wikipedia_styles_dark.css" (prefers-color-scheme: dark);
@import "wikipedia_styles_dark_ko.css" (prefers-color-scheme: dark);
+12
View File
@@ -0,0 +1,12 @@
@import "wikipedia_styles_dark.css";
/* slightly increasing readability of top-left wikipedia logo */
#p-logo .mw-wiki-logo {
filter: invert(1);
}
/* big white boxes on German landing page */
.mw-parser-output .hauptseite-box-content,
.mw-parser-output .hauptseite-preview-wikidata {
background-color: transparent!important;
}
+38
View File
@@ -0,0 +1,38 @@
@import "wikipedia_styles_dark.css";
/* the logo section at the left side at the top of the French page header */
img.mw-logo-wordmark, img.mw-logo-tagline {
filter: invert(90%);
}
/* icon in first row of top-right dropdown */
.mw-ui-icon-wikimedia-logIn::before {
filter:invert(1);
}
/* overwriting messy styling of top-right dropdown */
#p-personal .vector-menu-content,
.vector-user-menu-create-account,
.vector-user-menu-login,
.vector-user-menu-anon-editor,
.vector-menu-content-item, .vector-menu-content-item:hover,
.vector-menu-content-list #pt-anontalk, .vector-menu-content-list #pt-anontalk a, .vector-menu-content-list #pt-anontalk a:hover,
.vector-menu-content-list #pt-anoncontribs a {
background-color: var(--black_8)!important;
color: var(--white) !important;
}
/* main content of French 'Main_Page' */
#accueil_2017_en-tete {
background: transparent !important;
border: 1px solid var(--gray-5);
}
#mw-content-text h2 {
background: transparent !important;
}
div.accueil_2017_cadre {
box-shadow: none;
border: 1px solid var(--gray-5);
}
+40
View File
@@ -0,0 +1,40 @@
@import "wikipedia_styles_dark.css";
/* the logo section at the left side at the top of the Korean page header */
img.mw-logo-wordmark, img.mw-logo-tagline {
filter: invert(90%);
}
/* icon in first row of top-right dropdown */
.mw-ui-icon-wikimedia-logIn::before {
filter:invert(1);
}
/* overwriting messy styling of top-right dropdown */
#p-personal .vector-menu-content,
.vector-user-menu-create-account,
.vector-user-menu-login,
.vector-user-menu-anon-editor,
.vector-menu-content-item, .vector-menu-content-item:hover,
.vector-menu-content-list #pt-anontalk, .vector-menu-content-list #pt-anontalk a, .vector-menu-content-list #pt-anontalk a:hover,
.vector-menu-content-list #pt-anoncontribs a {
background-color: var(--black_8)!important;
color: var(--white) !important;
}
/* fix white background of boxes on Korean landing page */
.mw-parser-output .main-top,
.mw-parser-output .main-top-left,
.mw-parser-output .main-top-left p,
.mw-parser-output .main-box {
background: transparent!important;
color: var(--white) !important;
}
/* svg icons on middle-left 'main-boxes' of Korean landing page
-> svg styling is not possible here -> using css filter
*/
.main-shortcut-item img {
filter: invert(90%);
}
+2
View File
@@ -0,0 +1,2 @@
@import "wikipedia_styles_light.css";
+2 -2
View File
@@ -2776,9 +2776,9 @@ a.mw-ui-button:focus {
}
/* END WIKILESS OVERRIDES */
.mw-ui-icon-wikimedia-logIn:before {
background-image: url(/w/load.php?modules=skins.vector.icons&image=logIn&format=rasterized&lang=fr&skin=vector&version=3vgeg);
background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22 viewBox=%220 0 20 20%22%3E%3Ctitle%3E log in %3C/title%3E%3Cpath d=%22M1 11v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v6h8V5l4.75 5L9 15v-4H1z%22/%3E%3C/svg%3E");
background-image: linear-gradient(transparent, transparent),
url(/w/load.php?modules=skins.vector.icons&image=logIn&format=original&lang=fr&skin=vector&version=3vgeg);
url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22 viewBox=%220 0 20 20%22%3E%3Ctitle%3E log in %3C/title%3E%3Cpath d=%22M1 11v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v6h8V5l4.75 5L9 15v-4H1z%22/%3E%3C/svg%3E");
}
.mw-ui-icon-wikimedia-logIn-progressive:before {
background-image: url(/w/load.php?modules=skins.vector.icons&image=logIn&variant=progressive&format=rasterized&lang=fr&skin=vector&version=3vgeg);
+3 -3
View File
@@ -2776,9 +2776,9 @@ a.mw-ui-button:focus {
}
/* END WIKILESS OVERRIDES */
.mw-ui-icon-wikimedia-logIn:before {
background-image: url(/w/load.php?modules=skins.vector.icons&image=logIn&format=rasterized&lang=fr&skin=vector&version=3vgeg);
background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22 viewBox=%220 0 20 20%22%3E%3Ctitle%3E log in %3C/title%3E%3Cpath d=%22M1 11v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v6h8V5l4.75 5L9 15v-4H1z%22/%3E%3C/svg%3E");
background-image: linear-gradient(transparent, transparent),
url(/w/load.php?modules=skins.vector.icons&image=logIn&format=original&lang=fr&skin=vector&version=3vgeg);
url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22 viewBox=%220 0 20 20%22%3E%3Ctitle%3E log in %3C/title%3E%3Cpath d=%22M1 11v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v6h8V5l4.75 5L9 15v-4H1z%22/%3E%3C/svg%3E");
}
.mw-ui-icon-wikimedia-logIn-progressive:before {
background-image: url(/w/load.php?modules=skins.vector.icons&image=logIn&variant=progressive&format=rasterized&lang=fr&skin=vector&version=3vgeg);
@@ -5730,4 +5730,4 @@ div.after-portlet-lang:after {
}
.infobox {
float: right;
}
}