
会改哪些设置
| 主题 | default |
|---|---|
| 圆角 | 8px |
| 表单位置 | 居中 |
| 表单CSS | 是 |
| 表单CSS(移动端) | 是 |
这些都在 Casdoor 应用的 界面定制 标签页里,套用主题之后还可以继续调整。
套用到应用
- 在下面填好应用,调整主题的设置,然后复制 JSON。
- 在 Casdoor 控制台打开 应用,编辑这个应用,点击顶部的 导入JSON,粘贴 JSON 后点 确定。
- 点击 保存。下次打开登录页时就会用上这个主题。
{
"name": "<应用名称>",
"organization": "<组织>",
"themeData": {
"themeType": "default",
"colorPrimary": "#268bd2",
"borderRadius": 8,
"isCompact": false,
"isEnabled": true
},
"formOffset": 2,
"formCss": "<style>\n.login-background {\n color-scheme: light;\n --background: 44 87% 94%;\n --foreground: 192 81% 14%;\n --card: 44 87% 94%;\n --card-foreground: 192 81% 14%;\n --popover: 44 87% 94%;\n --popover-foreground: 192 81% 14%;\n --muted: 46 42% 88%;\n --muted-foreground: 194 14% 40%;\n --accent: 46 42% 88%;\n --accent-foreground: 192 81% 14%;\n --border: 45 30% 80%;\n --input: 45 30% 80%;\n --ring: 192 81% 14%;\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;\n background: linear-gradient(180deg, #eee8d5 0%, #fdf6e3 60%);\n}\n\n\n.login-content > div {\n max-width: 420px;\n}\n.login-panel {\n border: 1px solid #d9d2bf;\n border-radius: 14px;\n background: #fdf6e3;\n box-shadow: 0 24px 60px -24px rgba(88, 110, 117, 0.35);\n}\n.login-background > div:first-of-type button {\n color: #93a1a1;\n}\n.signin-methods > div {\n border: 1px solid #d9d2bf;\n background: #fdf6e3;\n}\n.signin-methods [role='tab'] {\n color: #93a1a1;\n}\n.signin-methods [role='tab'][data-state='active'] {\n background: #fdf6e3 !important;\n color: #268bd2;\n box-shadow: none !important;\n}\n.login-form label {\n color: #586e75;\n font-weight: 500;\n}\n.login-form input:not([type='checkbox']):not([type='radio']) {\n height: 44px;\n border: 1px solid #d9d2bf;\n border-radius: 8px;\n background: #fdf6e3;\n color: #073642;\n box-shadow: none;\n}\n.login-form input:not([type='checkbox']):not([type='radio'])::placeholder {\n color: #93a1a1;\n}\n.login-form input:not([type='checkbox']):not([type='radio']):focus {\n border-color: #268bd2;\n box-shadow: 0 0 0 3px color-mix(in srgb, #268bd2 25%, transparent);\n}\n.login-password button {\n color: #93a1a1;\n}\n.login-form [role='checkbox'] {\n border-color: #93a1a1;\n border-radius: 4px;\n}\n.login-form [role='checkbox'][data-state='checked'] {\n background: #268bd2;\n border-color: #268bd2;\n color: #fdf6e3;\n}\n.login-form a {\n color: #268bd2;\n font-weight: 500;\n}\n.login-form .login-button {\n height: 44px;\n border-radius: 8px;\n background: #268bd2;\n color: #fdf6e3;\n font-weight: 600;\n box-shadow: none;\n}\n.login-form .login-button:hover {\n background: #268bd2;\n filter: brightness(1.08);\n}\n.login-form .login-signup-link,\n.login-form .login-forget-password label {\n color: #586e75;\n}\n#footer {\n color: #93a1a1;\n}\n\n.login-panel {\n border-top: 4px solid #268bd2;\n}\n.signin-methods > div {\n background: #eee8d5;\n}\n.login-form .login-forget-password {\n width: 100%;\n}\n</style>",
"formCssMobile": "<style>\n.login-background {\n color-scheme: light;\n --background: 44 87% 94%;\n --foreground: 192 81% 14%;\n --card: 44 87% 94%;\n --card-foreground: 192 81% 14%;\n --popover: 44 87% 94%;\n --popover-foreground: 192 81% 14%;\n --muted: 46 42% 88%;\n --muted-foreground: 194 14% 40%;\n --accent: 46 42% 88%;\n --accent-foreground: 192 81% 14%;\n --border: 45 30% 80%;\n --input: 45 30% 80%;\n --ring: 192 81% 14%;\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;\n background: linear-gradient(180deg, #eee8d5 0%, #fdf6e3 60%);\n}\n.login-background > div:first-of-type button {\n color: #93a1a1;\n}\n.signin-methods > div {\n border: 1px solid #d9d2bf;\n background: #fdf6e3;\n}\n.signin-methods [role='tab'] {\n color: #93a1a1;\n}\n.signin-methods [role='tab'][data-state='active'] {\n background: #fdf6e3 !important;\n color: #268bd2;\n box-shadow: none !important;\n}\n.login-form label {\n color: #586e75;\n font-weight: 500;\n}\n.login-form input:not([type='checkbox']):not([type='radio']) {\n height: 44px;\n border: 1px solid #d9d2bf;\n border-radius: 8px;\n background: #fdf6e3;\n color: #073642;\n box-shadow: none;\n}\n.login-form input:not([type='checkbox']):not([type='radio'])::placeholder {\n color: #93a1a1;\n}\n.login-form input:not([type='checkbox']):not([type='radio']):focus {\n border-color: #268bd2;\n box-shadow: 0 0 0 3px color-mix(in srgb, #268bd2 25%, transparent);\n}\n.login-password button {\n color: #93a1a1;\n}\n.login-form [role='checkbox'] {\n border-color: #93a1a1;\n border-radius: 4px;\n}\n.login-form [role='checkbox'][data-state='checked'] {\n background: #268bd2;\n border-color: #268bd2;\n color: #fdf6e3;\n}\n.login-form a {\n color: #268bd2;\n font-weight: 500;\n}\n.login-form .login-button {\n height: 44px;\n border-radius: 8px;\n background: #268bd2;\n color: #fdf6e3;\n font-weight: 600;\n box-shadow: none;\n}\n.login-form .login-button:hover {\n background: #268bd2;\n filter: brightness(1.08);\n}\n.login-form .login-signup-link,\n.login-form .login-forget-password label {\n color: #586e75;\n}\n#footer {\n color: #93a1a1;\n}\n\n.login-panel {\n border-top: 4px solid #268bd2;\n}\n.signin-methods > div {\n background: #eee8d5;\n}\n.login-form .login-forget-password {\n width: 100%;\n}\n</style>"
}更多登录主题
查看全部
Aurora
登录主题A pastel mesh of color tinted by your accent behind a frosted glass card, with soft rounded fields and a gradient button. CSS only, so organization admins can install it.
浅色毛玻璃渐变

Backdrop
登录主题Your own picture behind the whole page, dimmed a little, with a frosted glass card on top. It comes with a dusk mountain scene; give it any image address to use yours. Organization admins can install it.
深色背景图毛玻璃

Bare
登录主题Nothing but the form: no card, no background, a small left-aligned logo, quiet text tabs, hairline fields and a round button, with plenty of white space. CSS only, so organization admins can install it.
浅色极简无卡片
