提交 abc5081d 编写于 作者: 李少辉-开发者's avatar 李少辉-开发者 🎧

upgrade dark css

Signed-off-by: 李少辉-开发者's avatarlish <lish@csdn.net>
上级 2d8ce65a
......@@ -70,7 +70,6 @@ export class FixbarComponent {
if (this.isDark) {
document.documentElement.classList.add('dark-container')
}
const url = this.router.url.split('?')[0]
this.themeList = this.themeList.filter(t => {
return t.url !== url
......@@ -133,8 +132,7 @@ export class FixbarComponent {
mitt.emit('dark', this.isDark)
window.localStorage.setItem(STORAGE_KEY_MAP.isDark, String(Number(this.isDark)))
document.documentElement.classList.toggle('dark-container')
if (this.isDark) {
if (this.isDark) {
this.removeBackground()
} else {
const { data } = this.activatedRoute.snapshot
......
......@@ -3,6 +3,12 @@
// <html>
.dark-container {
.ant-card-bordered.ant-card {
background: #0d1117;
}
.wallpaper{
background-color: rgba(25, 29, 34, 1)!important;
}
.dark {
&-primary {
color: #58a6ff !important;
......@@ -35,7 +41,7 @@
}
&-text {
color: #6e7681 !important;
color: #cccccc !important;
}
&-text-active {
......
<div class="sim">
<div *ngIf="posterImageUrls" class="wallpaper" [ngStyle]="{ 'background':'url(' + posterImageUrls + '),rgba(0, 129, 255, 0.9)' }">
<div *ngIf="posterImageUrls" id="search-banner" class="wallpaper" [ngStyle]="{ 'background': background, 'background-color': bgColor }">
<h1 class="title dark-title">{{ title }}</h1>
<h2 class="description dark-text-active" [innerHTML]="description"></h2>
<app-search-engine></app-search-engine>
......
......@@ -35,6 +35,8 @@ export default class SimComponent {
gitRepoUrl: string = gitRepoUrl
title: string = title
posterImageUrls?: string = simThemeConfig.posterImageUrls[0]
bgColor: string = 'rgba(0, 129, 255, 0.9)'
background: string = `url('${this.posterImageUrls}')`
description: string = simThemeConfig.description.replace('${total}', String(totalWeb()))
isLogin = isLogin
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册