Skip to content

Commit

Permalink
[WIP] - Theme Folder and Tailwind specific styles
Browse files Browse the repository at this point in the history
Right now there's a folder called themes with the `theme.tsx` file inside it but there's no integration with tailwind nor it's possible to add inline scripts and style tags. I'll be looking for it.
  • Loading branch information
rhamses committed Apr 4, 2024
1 parent 77f1942 commit 6f1569b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/cms/admin/pages/login.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { ToggleTheme } from '../theme';
import { LoginWrapper, Script, Head, ThemeToggle } from '../theme-tailwind';
import {
LoginWrapper,
Head,
ThemeToggle
} from '../themes/tailwind-default/theme';
export const Login = (props: {
children?: string;
screenTitle?: string;
Expand Down Expand Up @@ -76,7 +79,11 @@ export const Setup = (props: { children?: string; screenTitle?: string }) => {
screenTitle={props.screenTitle}
errorTitle='setup-errors'
formTitle='formio-setup'
/>
loginScreenTitle='SonicJS'
loginScreenIntro='Welcome to the Admin Panel'
>
<ThemeToggle />
</LoginWrapper>
</body>
</html>
);
Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
button[type="submit"] {
@apply bg-amber-500 w-full hover:bg-amber-500/50 text-black tracking-wider font-bold py-2 px-4 rounded;
}
@media (prefers-color-scheme: dark) {
.form-control {
@apply bg-neutral-900 text-neutral-100;
}
button[type="submit"] {
@apply bg-amber-500 w-full hover:bg-amber-500/50 text-black tracking-wider font-bold py-2 px-4 rounded;
}
}
}

:root {
Expand Down

0 comments on commit 6f1569b

Please sign in to comment.