App Style

This commit is contained in:
MrKBear 2022-01-04 22:48:21 +08:00
parent 1c3171f1e4
commit 1db7507293
4 changed files with 104 additions and 66 deletions

View File

@ -5,12 +5,12 @@ $theme-color-red: #FF9393;
$theme-color-light-layout: #F8F8F8; $theme-color-light-layout: #F8F8F8;
$theme-color-light-background: #f4f0f1; $theme-color-light-background: #f4f0f1;
$theme-color-light-title: rgba(0, 0, 0, .65); $theme-color-light-title: rgba(0, 0, 0, .65);
$theme-color-light-text: rgba(0, 0, 0, .55); $theme-color-light-text: rgba(0, 0, 0, .5);
$theme-color-dark-layout: #1f1f1f; $theme-color-dark-layout: #1f1f1f;
$theme-color-dark-background: #181615; $theme-color-dark-background: #181615;
$theme-color-dark-title: rgba(255, 255, 255, .65); $theme-color-dark-title: rgba(255, 255, 255, .65);
$theme-color-dark-text: rgba(255, 255, 255, .55); $theme-color-dark-text: rgba(255, 255, 255, .5);
$black-filter: brightness(0) opacity(.65); $black-filter: brightness(0) opacity(.65);
$white-filter: brightness(100) opacity(.65); $white-filter: brightness(100) opacity(.65);
@ -42,18 +42,31 @@ view.top-shadow {
box-shadow: 0 1.6px 3.6px 0 rgba(0, 0, 0, .05); box-shadow: 0 1.6px 3.6px 0 rgba(0, 0, 0, .05);
} }
view.text {
}
page { page {
background-color: $theme-color-light-background; background-color: $theme-color-light-background;
color: $theme-color-light-text; color: $theme-color-light-text;
font-weight: 500; }
font-size: .9em;
view, text {
font-size: .99em;
font-family: Hiragino Sans GB, MicroSoft YaHei; font-family: Hiragino Sans GB, MicroSoft YaHei;
} }
view.h1 {
color: $theme-color-light-title;
font-size: 1.5em;
}
view.h2 {
color: $theme-color-light-title;
font-size: 1.3em;
}
view.h3 {
color: $theme-color-light-title;
font-size: 1em;
}
@media (prefers-color-scheme: dark){ @media (prefers-color-scheme: dark){
page { page {
background-color: $theme-color-dark-background; background-color: $theme-color-dark-background;
@ -63,4 +76,19 @@ page {
view.card { view.card {
background-color: $theme-color-dark-layout; background-color: $theme-color-dark-layout;
} }
view.h1 {
color: $theme-color-dark-title;
font-size: 1.2em;
}
view.h2 {
color: $theme-color-dark-title;
font-size: 1.3em;
}
view.h3 {
color: $theme-color-dark-title;
font-size: 1em;
}
} }

View File

@ -22,8 +22,18 @@ view.container {
padding-left: 20px; padding-left: 20px;
view.nick { view.nick {
color: $theme-color-light-title; margin: 4px 0;
}
view.student {
margin: 1px 0;
} }
} }
} }
} }
@media (prefers-color-scheme: dark) {
view.container view.user-card view.avatar{
filter: brightness(.8);
}
}

View File

@ -11,7 +11,7 @@
<open-data type="userAvatarUrl" /> <open-data type="userAvatarUrl" />
</view> </view>
<view class="info"> <view class="info">
<view class="nick"> <view class="nick h1">
<open-data type="userNickName" /> <open-data type="userNickName" />
</view> </view>
<view class="student">秦浩轩</view> <view class="student">秦浩轩</view>

View File

@ -26,9 +26,9 @@
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false, "compileHotReLoad": false,
"lazyloadPlaceholderEnable": false, "lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true, "useMultiFrameRuntime": false,
"useApiHook": true, "useApiHook": false,
"useApiHostProcess": true, "useApiHostProcess": false,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],