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 #486 from gregrickaby/feature/next-app-dir-mantine-v7
Feature/next app dir mantine v7
- Loading branch information
Showing
42 changed files
with
2,401 additions
and
1,659 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,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
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 @@ | ||
.header { | ||
align-items: center; | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.title { | ||
cursor: pointer; | ||
} | ||
|
||
.description { | ||
border: 0; | ||
clip: rect(0 0 0 0); | ||
height: 1px; | ||
margin: -1px; | ||
overflow: hidden; | ||
padding: 0; | ||
position: absolute; | ||
white-space: nowrap; | ||
width: 1px; | ||
} |
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 {Title} from '@mantine/core' | ||
import classes from '~/components/Header.module.css' | ||
import {useRedditContext} from '~/components/RedditProvider' | ||
import config from '~/lib/config' | ||
|
||
/** | ||
* Header component. | ||
*/ | ||
export default function Header() { | ||
const {setSearchInput, setSubreddit} = useRedditContext() | ||
|
||
/** | ||
* Reset the search input and subreddit. | ||
*/ | ||
function resetSearch() { | ||
setSearchInput(config?.redditApi?.subReddit) | ||
setSubreddit(config?.redditApi?.subReddit) | ||
} | ||
|
||
return ( | ||
<header className={classes.header}> | ||
<Title className={classes.title} order={1} onClick={resetSearch}> | ||
{config.siteName} | ||
</Title> | ||
<Title className={classes.description} order={2}> | ||
{config.siteDescription} | ||
</Title> | ||
</header> | ||
) | ||
} |
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,3 +1,5 @@ | ||
'use client' | ||
|
||
import Hls from 'hls.js' | ||
import {LegacyRef, useEffect, useRef, VideoHTMLAttributes} from 'react' | ||
|
||
|
Oops, something went wrong.
66e39e1
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:
viewer-for-reddit – ./
viewer-for-reddit-gregrickaby.vercel.app
viewer-for-reddit-git-main-gregrickaby.vercel.app
reddit-image-viewer.vercel.app
redditviewer.vercel.app
viewer-for-reddit.vercel.app