Commit 69b49aae authored by Hoto Cocoa's avatar Hoto Cocoa

Color Configure

parent 068b0f5f
Pipeline #32065771 failed with stage
in 1 minute and 36 seconds
......@@ -12,7 +12,8 @@ Security vulnerability should be reported using [Phabricator](https://issue.libr
| Name | Description | Example Variable | Default Variable |
| ---- | ---- | ---- | ---- |
| `$wgLibertyMainColor` | `theme-color` configurations | `#4188F1` | `#4188F1` |
| `$wgLibertyMainColor` | `theme-color` configurations, main color of site | `#4188F1` | `#4188F1` |
| `$wgLibertySecondColor` | Configure of second color of site | `#2774DC` | The value of `$wgLibertyMainColor` subtracted by `1A1415` |
| `$wgTwitterAccount` | Default Twitter account to set a mention | `librewiki` | (none) |
| `$wgLibertyOgLogo` | OpenGraph Image Logo | `https://librewiki.net/images/6/6a/Libre_favicon.png` | (Value of `$wgLogo`) |
| `$wgNaverVerification` | Naver Webmater Tool Verification Code | (Value supplied by Naver.com) | (none) |
......
This diff is collapsed.
......@@ -14,7 +14,8 @@
| 이름 | 설명 | 예시 값 | 기본 값 |
| ---- | ---- | ---- | ---- |
| `$wgLibertyMainColor` | `theme-color` 메타 설정 | `#4188F1` | `#4188F1` |
| `$wgLibertyMainColor` | `theme-color` 메타 설정 및 사이트 주 색상 설정 | `#4188F1` | `#4188F1` |
| `$wgLibertySecondColor` | 사이트 보조 색상 설정 | `#2774DC` | `$wgLibertyMainColor`의 값에서 `1A1415`만큼 뺀 값 |
| `$wgTwitterAccount` | 트위터 카드 계정 설정 | `librewiki` | (없음) |
| `$wgLibertyOgLogo` | 오픈그래프 태그에 사용 될 이미지 설정 | `https://librewiki.net/images/6/6a/Libre_favicon.png` | `$wgLogo`의 값 |
| `$wgNaverVerification` | 네이버 사이트 도구 인증 코드 | (네이버에서 제공된 값) | (없음) |
......
......@@ -12,7 +12,8 @@ class SkinLiberty extends SkinTemplate {
// @codingStandardsIgnoreLine
global $wgSitename, $wgTwitterAccount, $wgLanguageCode, $wgNaverVerification, $wgLogo, $wgLibertyEnableLiveRC;
$mainColor = isset( $GLOBALS['wgLibertyMainColor'] ) ? $GLOBALS['wgLibertyMainColor'] : '#4188F1';
$mainColor = $GLOBALS['wgLibertyMainColor'];
$secondColor = isset( $GLOBALS['wgLibertySecondColor'] ) ? $GLOBALS['wgLibertySecondColor'] : '#'.strtoupper(dechex(hexdec(substr($mainColor, 1, 6)) - hexdec('1A1415')));
$ogLogo = isset( $GLOBALS['wgLibertyOgLogo'] ) ? $GLOBALS['wgLibertyOgLogo'] : $wgLogo;
if ( !preg_match( '/^((?:(?:http(?:s)?)?:)?\/\/(?:.{4,}))$/i', $ogLogo ) ) {
$ogLogo = $GLOBALS['wgServer'].$GLOBALS['wgLogo'];
......@@ -88,6 +89,39 @@ class SkinLiberty extends SkinTemplate {
}
$out->addModuleScripts( $modules );
$out->addInlineStyle(".Liberty .nav-wrapper,
.Liberty .nav-wrapper .navbar .form-inline .btn:hover,
.Liberty .nav-wrapper .navbar .form-inline .btn:focus,
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-header .nav .nav-item .nav-link.active::before,
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-header .nav .nav-item .nav-link:hover::before,
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-header .nav .nav-item .nav-link:focus::before,
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-header .nav .nav-item .nav-link:active::before,
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-footer .label,
.Liberty .content-wrapper .liberty-content .liberty-content-header .content-tools .tools-btn:hover,
.Liberty .content-wrapper .liberty-content .liberty-content-header .content-tools .tools-btn:focus,
.Liberty .content-wrapper .liberty-content .liberty-content-header .content-tools .tools-btn:active {
background-color: $mainColor;
}
.Liberty .nav-wrapper .navbar .form-inline .btn:hover,
.Liberty .nav-wrapper .navbar .form-inline .btn:focus {
border-color: $secondColor;
}
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-header .nav .nav-item .nav-link.active::before,
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-header .nav .nav-item .nav-link:hover::before,
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-header .nav .nav-item .nav-link:focus::before,
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-header .nav .nav-item .nav-link:active::before {
border-bottom: 2px solid $mainColor;
}
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-footer .label:hover,
.Liberty .nav-wrapper .navbar .navbar-nav .nav-item .nav-link:hover,
.Liberty .nav-wrapper .navbar .navbar-nav .nav-item .nav-link:focus,
.dropdown-menu .dropdown-item:hover {
background-color: $secondColor;
}");
}
/**
......
......@@ -187,7 +187,6 @@ strike {
/* Nav */
.Liberty .nav-wrapper {
min-height: 2.8rem;
background-color: #4188f1;
z-index: 1001;
box-shadow: 0 2px 4px 0 rgba( 0, 0, 0, 0.16 ), 0 2px 10px 0 rgba( 0, 0, 0, 0.12 );
}
......@@ -224,7 +223,6 @@ strike {
.Liberty .nav-wrapper .navbar .navbar-nav .nav-item .nav-link:hover,
.Liberty .nav-wrapper .navbar .navbar-nav .nav-item .nav-link:focus {
background-color: #71a5f4;
transition: 0.3s;
}
......@@ -267,8 +265,6 @@ strike {
.Liberty .nav-wrapper .navbar .form-inline .btn:hover,
.Liberty .nav-wrapper .navbar .form-inline .btn:focus {
background-color: #4188f1;
border-color: #5997f3;
color: #fff;
outline: 0;
}
......@@ -427,7 +423,6 @@ strike {
content: ' ';
width: 7.5rem;
display: block;
border-bottom: 2px solid #4188f1;
}
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-content {
......@@ -470,14 +465,12 @@ strike {
}
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-footer .label {
background-color: #5997f3;
padding: 0.4rem;
font-size: 0.8rem;
font-weight: 400;
}
.Liberty .content-wrapper .liberty-sidebar .liberty-right-fixed .live-recent .live-recent-footer .label:hover {
background-color: #2979f0;
transition: 0.3s;
}
......@@ -534,7 +527,6 @@ strike {
.Liberty .content-wrapper .liberty-content .liberty-content-header .content-tools .tools-btn:hover,
.Liberty .content-wrapper .liberty-content .liberty-content-header .content-tools .tools-btn:focus,
.Liberty .content-wrapper .liberty-content .liberty-content-header .content-tools .tools-btn:active {
background-color: #4188f1;
color: #fff;
transition: 0.3s;
outline: 0;
......@@ -750,7 +742,6 @@ strike {
}
.dropdown-menu .dropdown-item:hover {
background-color: #5997f3;
color: #fff;
transition: 0.3s;
}
......
......@@ -19,7 +19,8 @@
},
"config": {
"LibertyEnableLiveRC": true,
"LibertyUseGravatar": true
"LibertyUseGravatar": true,
"LibertyMainColor": "#4188F1"
},
"ResourceModules": {
"skins.liberty.styles": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment