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

@ -1,58 +1,58 @@
{ {
"description": "项目配置文件", "description": "项目配置文件",
"packOptions": { "packOptions": {
"ignore": [] "ignore": []
},
"miniprogramRoot": "miniprogram/",
"compileType": "miniprogram",
"libVersion": "2.16.1",
"projectname": "mini-dlpu-v3",
"setting": {
"urlCheck": false,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": true,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}, },
"enableEngineNative": false, "miniprogramRoot": "miniprogram/",
"useIsolateContext": false, "compileType": "miniprogram",
"userConfirmedBundleSwitch": false, "libVersion": "2.16.1",
"packNpmManually": false, "projectname": "mini-dlpu-v3",
"packNpmRelationList": [], "setting": {
"minifyWXSS": true, "urlCheck": false,
"disableUseStrict": false, "es6": true,
"minifyWXML": true, "enhance": true,
"showES6CompileOption": false, "postcss": true,
"useCompilerPlugins": [ "preloadBackgroundData": false,
"typescript", "minified": true,
"sass" "newFeature": false,
] "coverView": true,
}, "nodeModules": false,
"simulatorType": "wechat", "autoAudits": false,
"simulatorPluginLibVersion": {}, "showShadowRootInWxmlPanel": true,
"appid": "wx7d809f5e8955843d", "scopeDataCheck": false,
"scripts": { "uglifyFileName": true,
"beforeCompile": "" "checkInvalidKey": true,
}, "checkSiteMap": true,
"condition": {} "uploadWithSourceMap": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": false,
"useApiHook": false,
"useApiHostProcess": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": [
"typescript",
"sass"
]
},
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"appid": "wx7d809f5e8955843d",
"scripts": {
"beforeCompile": ""
},
"condition": {}
} }