fixing scrollbar and all support for smaller display device.

This commit is contained in:
Phapoom Saksri 2024-07-27 22:06:16 +07:00
parent b05b10073a
commit dca873e930
3 changed files with 12 additions and 3 deletions

View file

@ -26,6 +26,7 @@ function MyApp({ Component, pageProps }) {
} }
}, [stright]) }, [stright])
return <Component {...pageProps} /> return <Component {...pageProps} />
} }

View file

@ -30,15 +30,14 @@ export async function getStaticProps({ params: { slug } }) {
export default function PostPage({ frontmatter, content }) { export default function PostPage({ frontmatter, content }) {
const postTags = frontmatter.tags.map((tag) => ( const postTags = frontmatter.tags.map((tag) => (
<div <div
className="inline-block border rounded-md font-bold text-lg mr-1 py-0.5 px-2.5 overflow-y-auto" className="inline-block border rounded-md font-bold text-lg mr-1 py-0.5 px-2.5"
key={tag.toString()} key={tag.toString()}
> >
{tag} {tag}
</div> </div>
)) ))
const proseClass = const proseClass =
"prose p-4 prose-invert prose-neutral mx-auto bg-gray-700/50 backdrop-blue-md backdrop-blur-md h-100 overflow-y-auto" "prose p-4 prose-invert prose-neutral mx-auto bg-gray-700/50 backdrop-blue-md backdrop-blur-md h-100 overflow-y-auto h-screen"
return ( return (
<> <>
<Head> <Head>

View file

@ -20,5 +20,14 @@ body {
@media only screen and (orientation: portrait) { @media only screen and (orientation: portrait) {
body { body {
--background-image: url("/mobile.jpg"); --background-image: url("/mobile.jpg");
overflow: auto;
}
}
/* In case if device height is less than 900px */
/* Notice: This design for small screen and mobile devices, scroll bar still be shown, will fix in next commit! <3 */
@media only screen and (max-height: 900px) {
body {
overflow: auto;
} }
} }