-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from gregrickaby/feature/next-app-router-mant…
…ine-v7 Next app router mantine v7
- Loading branch information
Showing
43 changed files
with
3,130 additions
and
5,426 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['stylelint-config-standard'] | ||
} |
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,21 @@ | ||
.container { | ||
margin: 0 auto; | ||
padding: 0 20px; | ||
max-width: 1200px; | ||
|
||
& > * { | ||
margin-bottom: 20px; | ||
margin-top: 20px; | ||
} | ||
} | ||
|
||
.search { | ||
align-items: center; | ||
display: flex; | ||
gap: 10px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.main { | ||
min-height: 100vh; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.backtotop { | ||
bottom: 12px; | ||
position: fixed; | ||
right: 12px; | ||
z-index: 100; | ||
} |
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,32 @@ | ||
'use client' | ||
|
||
import {Affix, Button, rem, Transition} from '@mantine/core' | ||
import {useWindowScroll} from '@mantine/hooks' | ||
import {IconArrowUp} from '@tabler/icons-react' | ||
import classes from '~/components/BackToTop.module.css' | ||
|
||
/** | ||
* Back To Top component. | ||
*/ | ||
export default function BackToTop() { | ||
const [scroll, scrollTo] = useWindowScroll() | ||
|
||
return ( | ||
<div className={classes.backtotop}> | ||
<Affix position={{bottom: rem(20), right: rem(20)}}> | ||
<Transition transition="slide-up" mounted={scroll.y > 0}> | ||
{(transitionStyles) => ( | ||
<Button | ||
aria-label="scroll to top" | ||
leftSection={<IconArrowUp size="1rem" />} | ||
style={transitionStyles} | ||
onClick={() => scrollTo({y: 0})} | ||
> | ||
Scroll to top | ||
</Button> | ||
)} | ||
</Transition> | ||
</Affix> | ||
</div> | ||
) | ||
} |
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,24 @@ | ||
.description { | ||
font-size: 2rem; | ||
font-weight: 700; | ||
line-height: 1; | ||
margin: 0; | ||
text-align: center; | ||
text-transform: capitalize; | ||
} | ||
|
||
.bigtemp { | ||
font-size: 8rem; | ||
font-weight: 700; | ||
line-height: 1; | ||
margin: 0; | ||
text-align: center; | ||
} | ||
|
||
.feelslike { | ||
font-size: 2rem; | ||
font-weight: 700; | ||
line-height: 1; | ||
margin: 0; | ||
text-align: center; | ||
} |
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,53 @@ | ||
'use client' | ||
|
||
import {Stack, Text} from '@mantine/core' | ||
import classes from '~/components/CurrentConditions.module.css' | ||
import {useWeatherContext} from '~/components/WeatherProvider' | ||
import {formatTemperature} from '~/lib/helpers' | ||
|
||
/** | ||
* Current Conditions component. | ||
*/ | ||
export default function CurrentConditions() { | ||
const { | ||
weather: { | ||
current: { | ||
weather: [{description}], | ||
temp, | ||
feels_like | ||
} | ||
}, | ||
tempUnit | ||
} = useWeatherContext() | ||
|
||
return ( | ||
<Stack align="center"> | ||
<Text | ||
className={classes.description} | ||
component="p" | ||
gradient={{from: 'indigo', to: 'cyan', deg: 45}} | ||
variant="gradient" | ||
> | ||
{description} | ||
</Text> | ||
<Text | ||
className={classes.bigtemp} | ||
component="p" | ||
gradient={{from: 'indigo', to: 'cyan', deg: 45}} | ||
variant="gradient" | ||
> | ||
{formatTemperature(tempUnit, temp)} | ||
</Text> | ||
{feels_like > temp && ( | ||
<Text | ||
className={classes.feelslike} | ||
component="p" | ||
gradient={{from: 'yellow', to: 'orange', deg: 45}} | ||
variant="gradient" | ||
> | ||
Feels Like: {formatTemperature(tempUnit, feels_like)} | ||
</Text> | ||
)} | ||
</Stack> | ||
) | ||
} |
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,19 @@ | ||
.footer { | ||
display: flex; | ||
flex-direction: column; | ||
font-family: monospace; | ||
font-size: 0.875rem; | ||
text-align: center; | ||
|
||
p { | ||
margin-bottom: 0; | ||
} | ||
|
||
a { | ||
color: var(--mantine-color-anchor); | ||
|
||
&:hover { | ||
text-decoration: none; | ||
} | ||
} | ||
} |
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,33 @@ | ||
import {IconBrandGithub} from '@tabler/icons-react' | ||
import classes from '~/components/Footer.module.css' | ||
import config from '~/lib/config' | ||
|
||
/** | ||
* Footer component. | ||
*/ | ||
export default function Footer() { | ||
return ( | ||
<footer className={classes.footer}> | ||
<p> | ||
website by{' '} | ||
<a | ||
aria-label={`visit ${config.siteAuthor} website`} | ||
href={config.authorUrl} | ||
rel="author" | ||
> | ||
{config.siteAuthor} | ||
</a> | ||
</p> | ||
<p> | ||
<a | ||
aria-label="view source code on github" | ||
href={config.githubUrl} | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
<IconBrandGithub /> | ||
</a> | ||
</p> | ||
</footer> | ||
) | ||
} |
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,11 @@ | ||
.title { | ||
text-align: center; | ||
} | ||
|
||
.card { | ||
text-align: center; | ||
|
||
img { | ||
margin: 0 auto; | ||
} | ||
} |
Oops, something went wrong.
cf8ac4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
local-weather – ./
local-weather-gregrickaby.vercel.app
local-weather-git-main-gregrickaby.vercel.app
localwx.vercel.app