Remove center layout for empty repo info - hard to read (#219)

This commit is contained in:
Tan Nhu 2023-01-16 12:34:59 -08:00 committed by GitHub
parent fd5bbc6904
commit a611a2c038
3 changed files with 12 additions and 28 deletions

View File

@ -1,21 +1,8 @@
.main {
min-height: var(--page-min-height, 100%);
background-color: var(--primary-bg) !important;
background-color: var(--white) !important;
}
.repoEmpty {
height: calc(100vh - 73px);
display: flex;
align-items: center;
justify-content: center;
.layout {
background: var(--white);
max-width: min(800px, calc(100vw - 300px));
// margin: 0 auto !important;
padding: var(--spacing-xxlarge);
box-shadow: 0px 0px 1px rgba(40, 41, 61, 0.08), 0px 0.5px 2px rgba(96, 97, 112, 0.16),
0px 0px 1px rgba(40, 41, 61, 0.08), 0px 0.5px 2px rgba(96, 97, 112, 0.16);
border-radius: var(--box-radius, 4px);
}
.emptyRepo {
padding: var(--spacing-xxlarge) !important;
}

View File

@ -2,7 +2,6 @@
// this is an auto-generated file
declare const styles: {
readonly main: string
readonly repoEmpty: string
readonly layout: string
readonly emptyRepo: string
}
export default styles

View File

@ -61,16 +61,14 @@ const EmptyRepositoryInfo: React.FC<Pick<GitInfoProps, 'repoMetadata'>> = ({ rep
useDisableCodeMainLinks(true)
return (
<Container className={css.repoEmpty}>
<Container className={css.layout}>
<MarkdownViewer
source={getString('repoEmptyMarkdown')
.replace(/NEW_FILE_URL/g, newFileURL)
.replace(/REPO_URL/g, repoMetadata.git_url || '')
.replace(/REPO_NAME/g, repoMetadata.uid || '')
.replace(/CREATE_API_TOKEN_URL/g, currentUserProfileURL || '')}
/>
</Container>
<Container className={css.emptyRepo}>
<MarkdownViewer
source={getString('repoEmptyMarkdown')
.replace(/NEW_FILE_URL/g, newFileURL)
.replace(/REPO_URL/g, repoMetadata.git_url || '')
.replace(/REPO_NAME/g, repoMetadata.uid || '')
.replace(/CREATE_API_TOKEN_URL/g, currentUserProfileURL || '')}
/>
</Container>
)
}