-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
17 changed files
with
150 additions
and
3 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { UiCardTitle, UiNotFound, UiStack } from '@pubkey-ui/core' | ||
|
||
export function DemoFeatureNotFound() { | ||
return ( | ||
<UiStack> | ||
<UiCardTitle>NotFound</UiCardTitle> | ||
<UiNotFound /> | ||
</UiStack> | ||
) | ||
} |
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 +1,2 @@ | ||
export * from './ui-card' | ||
export * from './ui-card-title' |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './ui-not-found' |
34 changes: 34 additions & 0 deletions
34
packages/core/src/lib/ui-not-found/ui-not-found.module.css
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.root { | ||
padding-top: rem(80px); | ||
padding-bottom: rem(80px); | ||
} | ||
|
||
.label { | ||
text-align: center; | ||
font-weight: 900; | ||
font-size: rem(38px); | ||
line-height: 1; | ||
margin-bottom: calc(1.5 * var(--mantine-spacing-xl)); | ||
color: var(--mantine-color-gray-2); | ||
|
||
@media (max-width: $mantine-breakpoint-sm) { | ||
font-size: rem(32px); | ||
} | ||
} | ||
|
||
.description { | ||
max-width: rem(500px); | ||
margin: auto; | ||
margin-top: var(--mantine-spacing-xl); | ||
margin-bottom: calc(1.5 * var(--mantine-spacing-xl)); | ||
} | ||
|
||
.title { | ||
text-align: center; | ||
font-weight: 900; | ||
font-size: rem(38px); | ||
|
||
@media (max-width: $mantine-breakpoint-sm) { | ||
font-size: rem(32px); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Button, Container, Group, Text, Title } from '@mantine/core' | ||
import { useUiTheme } from '../ui-theme' | ||
import classes from './ui-not-found.module.css' | ||
|
||
export function UiNotFound({ to = '/' }: { to?: string }) { | ||
const { Link } = useUiTheme() | ||
return ( | ||
<Container className={classes.root}> | ||
<div className={classes.label}>404</div> | ||
<Title className={classes.title}>You have found a secret place.</Title> | ||
<Text c="dimmed" size="lg" ta="center" className={classes.description}> | ||
Unfortunately, this is only a 404 page. You may have mistyped the address, or the page has been moved to another | ||
URL. | ||
</Text> | ||
<Group justify="center"> | ||
<Button variant="subtle" size="md" component={Link} to={to}> | ||
Take me back! | ||
</Button> | ||
</Group> | ||
</Container> | ||
) | ||
} |
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 |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
"layout", | ||
"logo", | ||
"menu", | ||
"not-found", | ||
"search-input", | ||
"stack", | ||
"tab-routes", | ||
|
1 change: 1 addition & 0 deletions
1
packages/generators/src/generators/component/files/card/index.ts.template
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 +1,2 @@ | ||
export * from './<%= prefixFileName %>-card' | ||
export * from './<%= prefixFileName %>-card-title' |
34 changes: 34 additions & 0 deletions
34
...src/generators/component/files/not-found/__prefixFileName__-not-found.module.css.template
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.root { | ||
padding-top: rem(80px); | ||
padding-bottom: rem(80px); | ||
} | ||
|
||
.label { | ||
text-align: center; | ||
font-weight: 900; | ||
font-size: rem(38px); | ||
line-height: 1; | ||
margin-bottom: calc(1.5 * var(--mantine-spacing-xl)); | ||
color: var(--mantine-color-gray-2); | ||
|
||
@media (max-width: $mantine-breakpoint-sm) { | ||
font-size: rem(32px); | ||
} | ||
} | ||
|
||
.description { | ||
max-width: rem(500px); | ||
margin: auto; | ||
margin-top: var(--mantine-spacing-xl); | ||
margin-bottom: calc(1.5 * var(--mantine-spacing-xl)); | ||
} | ||
|
||
.title { | ||
text-align: center; | ||
font-weight: 900; | ||
font-size: rem(38px); | ||
|
||
@media (max-width: $mantine-breakpoint-sm) { | ||
font-size: rem(32px); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...rators/src/generators/component/files/not-found/__prefixFileName__-not-found.tsx.template
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Button, Container, Group, Text, Title } from '@mantine/core' | ||
import { use<%= prefix.className %>Theme } from '../<%= prefix.fileName %>-theme' | ||
import classes from './<%= prefix.fileName %>-not-found.module.css' | ||
|
||
export function <%= prefix.className %>NotFound({ to = '/' }: { to?: string }) { | ||
const { Link } = use<%= prefix.className %>Theme() | ||
return ( | ||
<Container className={classes.root}> | ||
<div className={classes.label}>404</div> | ||
<Title className={classes.title}>You have found a secret place.</Title> | ||
<Text c="dimmed" size="lg" ta="center" className={classes.description}> | ||
Unfortunately, this is only a 404 page. You may have mistyped the address, or the page has been moved to another | ||
URL. | ||
</Text> | ||
<Group justify="center"> | ||
<Button variant="subtle" size="md" component={Link} to={to}> | ||
Take me back! | ||
</Button> | ||
</Group> | ||
</Container> | ||
) | ||
} |
1 change: 1 addition & 0 deletions
1
packages/generators/src/generators/component/files/not-found/index.ts.template
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './<%= prefix.fileName %>-not-found' |
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
10 changes: 10 additions & 0 deletions
10
packages/generators/src/generators/feature/files/demo/demo-feature-not-found.tsx.template
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { UiCardTitle, UiNotFound, UiStack } from '@pubkey-ui/core' | ||
|
||
export function DemoFeatureNotFound() { | ||
return ( | ||
<UiStack> | ||
<UiCardTitle>NotFound</UiCardTitle> | ||
<UiNotFound /> | ||
</UiStack> | ||
) | ||
} |
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