-
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b46c7d4
commit ac76d7a
Showing
20 changed files
with
1,084 additions
and
849 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,125 @@ | ||
import { createStyles } from 'antd-style'; | ||
import { rgba } from 'polished'; | ||
import { adjustHue, rgba } from 'polished'; | ||
|
||
export const useStyles = createStyles( | ||
({ css, token }, { headerHeight = 64 }: { headerHeight?: number; size?: number }) => ({ | ||
container: css` | ||
height: calc(100vh - ${headerHeight}px); | ||
`, | ||
inner: css` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 16px; | ||
height: 100%; | ||
padding: 16px; | ||
[id$='_results'] { | ||
flex: 1; | ||
padding: 0 !important; | ||
background: none !important; | ||
> div:not([id$='_gallery_container']) { | ||
flex-grow: 0 !important; | ||
} | ||
( | ||
{ css, token, stylish }, | ||
{ headerHeight = 64, isPrimaryColor }: { headerHeight?: number; isPrimaryColor?: boolean }, | ||
) => { | ||
const primaryGradient = | ||
isPrimaryColor && | ||
css` | ||
background-image: linear-gradient( | ||
-45deg, | ||
${token.colorPrimary}, | ||
${adjustHue(45, token.colorPrimary)}, | ||
${token.colorPrimary}, | ||
${adjustHue(-45, token.colorPrimary)} | ||
); | ||
`; | ||
return { | ||
container: css` | ||
height: calc(100vh - ${headerHeight}px); | ||
`, | ||
inner: css` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 16px; | ||
height: 100%; | ||
padding: 16px; | ||
button { | ||
&.svelte-1p4r00v { | ||
padding: 0; | ||
} | ||
div[id$='_gallery_container'] { | ||
flex-grow: 1 !important; | ||
} | ||
&[id$='_generate'] { | ||
&::before { | ||
${stylish.gradientAnimation}; | ||
${primaryGradient}; | ||
position: absolute; | ||
z-index: 50; | ||
padding: 2px; | ||
overflow: hidden; | ||
border-radius: inherit; | ||
content: ''; | ||
inset: 0; | ||
[id$='img_gallery_container'] { | ||
div:not(.livePreview) { | ||
box-sizing: border-box; | ||
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); | ||
mask-composite: xor; | ||
mask-composite: exclude; | ||
} | ||
} | ||
} | ||
[id$='_gallery'] { | ||
height: 100%; | ||
.progressDiv > .progress { | ||
${stylish.gradientAnimation}; | ||
${primaryGradient}; | ||
} | ||
.livePreview { | ||
top: 28px; | ||
left: 4px; | ||
background: ${token.colorBgElevated}; | ||
} | ||
[id$='_results'] { | ||
flex: 1; | ||
padding: 0 !important; | ||
background: none !important; | ||
.preview { | ||
max-height: unset !important; | ||
background: ${rgba(token.colorBgLayout, 0.5)} !important; | ||
} | ||
> div:not([id$='_gallery_container']) { | ||
flex-grow: 0 !important; | ||
} | ||
.empty { | ||
height: 100%; | ||
[id$='_gallery_container'] { | ||
flex-grow: 1 !important; | ||
} | ||
[id$='img_gallery_container'] { | ||
div:not(.livePreview) { | ||
box-sizing: border-box; | ||
} | ||
} | ||
[id$='_gallery'] { | ||
height: 100%; | ||
} | ||
.livePreview { | ||
top: 28px; | ||
left: 4px; | ||
background: ${token.colorBgElevated}; | ||
} | ||
.preview { | ||
max-height: unset !important; | ||
background: ${rgba(token.colorBgLayout, 0.5)} !important; | ||
} | ||
.empty { | ||
height: 100%; | ||
} | ||
[id^='html_info_']:has(p) { | ||
padding: 8px 12px; | ||
font-family: ${token.fontFamilyCode}; | ||
font-size: 12px; | ||
color: ${token.colorInfoText}; | ||
background: ${token.colorInfoBg}; | ||
border: 1px solid ${token.colorInfoBorder}; | ||
border-radius: ${token.borderRadius}px; | ||
} | ||
p { | ||
margin: 0.2em 0; | ||
text-align: unset; | ||
} | ||
} | ||
} | ||
button[id$='_generate'] { | ||
height: 44px !important; | ||
min-height: 44px !important; | ||
max-height: 44px !important; | ||
} | ||
button.svelte-1p4r00v { | ||
padding: 0; | ||
} | ||
p { | ||
margin: 0.2em 0; | ||
text-align: unset; | ||
} | ||
[id^='html_info_']:has(p) { | ||
padding: 8px 12px; | ||
font-family: ${token.fontFamilyCode}; | ||
font-size: 12px; | ||
color: ${token.colorInfoText}; | ||
background: ${token.colorInfoBg}; | ||
border: 1px solid ${token.colorInfoBorder}; | ||
border-radius: ${token.borderRadius}px; | ||
} | ||
`, | ||
}), | ||
`, | ||
}; | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.