Skip to content

Commit 7cbcca4

Browse files
committed
ui fixes
1 parent 75c236d commit 7cbcca4

17 files changed

Lines changed: 197 additions & 33 deletions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { FC, PropsWithChildren } from "react"
22

33
const Container: FC<PropsWithChildren> = ({ children }) => {
4-
return <div className="container mx-auto px-5">{children}</div>
4+
return <div className="max-w-7xl mx-auto px-5">{children}</div>
55
}
66

77
export default Container

MyApp.Client/components/layout-article.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import Head from "next/head"
33
import Nav from "./nav"
44
import Footer from "./footer"
55
import Meta from "./meta"
6-
import Breadcrumbs from "./breadcrumbs"
76

87
type Props = {
98
title: string,
@@ -19,10 +18,10 @@ const Page: FC<Props> = ({ title, children }) => {
1918
</Head>
2019
<Nav />
2120
<div className="min-h-screen">
22-
<main className="flex justify-center">
23-
<div className="mx-auto px-5">
24-
<Breadcrumbs className="my-8" name={title} />
25-
<article className="prose lg:prose-xl mb-32">
21+
<main>
22+
<div className="max-w-7xl mx-auto px-5">
23+
<h1 className="text-4xl font-bold my-8 text-gray-900 dark:text-gray-100">{title}</h1>
24+
<article className="prose lg:prose-xl max-w-4xl mb-32">
2625
{children}
2726
</article>
2827
</div>

MyApp.Client/components/layout-page.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import Head from "next/head"
33
import Nav from "./nav"
44
import Footer from "./footer"
55
import Meta from "./meta"
6-
import Breadcrumbs from "./breadcrumbs"
76

87
type Props = {
98
title: string,
109
className?: string,
10+
bodyClass?: string,
1111
children: React.ReactNode,
1212
}
1313

14-
const Page: FC<Props> = ({ title, className, children }) => {
14+
const Page: FC<Props> = ({ title, className, bodyClass, children }) => {
1515
return (
1616
<>
1717
<Meta />
@@ -21,9 +21,11 @@ const Page: FC<Props> = ({ title, className, children }) => {
2121
<Nav />
2222
<div className="min-h-screen">
2323
<main>
24-
<div className={`container mx-auto px-5 ${className ?? ''}`}>
25-
<Breadcrumbs className="my-8" name={title} />
26-
{children}
24+
<div className={`max-w-7xl mx-auto px-5 ${className ?? ''}`}>
25+
<div className={bodyClass ?? 'max-w-5xl'}>
26+
<h1 className="text-4xl font-bold my-8 text-gray-900 dark:text-gray-100">{title}</h1>
27+
{children}
28+
</div>
2729
</div>
2830
</main>
2931
</div>

MyApp.Client/components/post-header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ const PostHeader = ({ title, coverImage, date, author }: Props) => {
2121
<div className="mb-8 md:mb-16 sm:mx-0">
2222
<CoverImage title={title} src={coverImage} />
2323
</div>
24-
<div className="max-w-4xl mx-auto">
24+
<div className="mx-auto max-w-4xl">
2525
<div className="block md:hidden mb-6">
2626
<Avatar name={author.name} picture={author.picture} />
2727
</div>
28-
<div className="mb-6 text-lg text-gray-600 dark:text-gray-400">
28+
<div className="mb-6 text-lg font-semibold text-gray-600 dark:text-gray-400">
2929
<DateFormatter dateString={date} />
3030
</div>
3131
</div>

MyApp.Client/pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { AppProps } from "next/app"
22
import "../styles/index.css"
33
import "../styles/main.css"
4-
import "prismjs/themes/prism-tomorrow.css"
4+
import "../styles/prism-dark-blue.css"
55

66
import Link from 'next/link'
77
import { setLinkComponent, Loading, ClientContext } from '@servicestack/react'

MyApp.Client/pages/admin.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ValidateAuth, appAuth } from "@/lib/auth"
55
function Admin () {
66
const { user, signOut } = appAuth()
77
return (<Page title="Admin Page">
8-
<div className="flex flex-col items-center justify-center">
8+
<div className="max-w-3xs flex flex-col justify-center items-center">
99
<svg className="w-36 h-36 text-gray-700" viewBox="0 0 24 24" fill="currentColor">
1010
<path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/>
1111
</svg>

MyApp.Client/pages/bookings-auto.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import SrcPage from "@/components/src-page"
77
function Index() {
88

99

10-
return (<Page title="Bookings CRUD (Auto Columns)" className="max-w-screen-lg">
10+
return (<Page title="Bookings CRUD (Auto Columns)">
1111

1212
<div className="mb-4 flex justify-end">
1313
<Link href="/bookings-custom" className="text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300">

MyApp.Client/pages/bookings-custom.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function Index() {
99
const { currency } = useFormatters()
1010
const [coupon, setCoupon] = useState<any>(null)
1111

12-
return (<Page title="Bookings CRUD (Custom Columns)" className="max-w-screen-lg">
12+
return (<Page title="Bookings CRUD (Custom Columns)">
1313

1414
<div className="mb-4 flex justify-end">
1515
<Link href="/bookings-auto" className="text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300">

MyApp.Client/pages/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ const Index = ({ allPosts }: Props) => {
4141
</div>
4242
</div>
4343

44-
<div className="mb-40 mx-auto max-w-7xl">
45-
<p className="mt-4 mb-10 mx-auto max-w-4xl text-xl text-gray-600 dark:text-gray-400">
44+
<div className="mb-40">
45+
<p className="mt-4 mb-10 text-xl text-gray-600 dark:text-gray-400">
4646
Manage your ServiceStack App and explore, discover, query and call APIs instantly with
4747
built-in Auto UIs dynamically generated from the rich metadata of your App's typed C# APIs &amp; DTOs
4848
</p>

MyApp.Client/pages/posts.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from "react"
22
import Layout from "../components/layout"
3-
import Breadcrumbs from "../components/breadcrumbs"
43
import { getAllPosts } from "../lib/api"
54
import Post from "../types/post"
65

@@ -9,12 +8,12 @@ type Props = {
98
}
109
const Posts = ({ allPosts }: Props) => {
1110
return (<Layout>
12-
<main className="flex justify-center">
13-
<div className="mx-auto px-5">
14-
<Breadcrumbs className="my-8" name="Markdown Posts" />
11+
<main>
12+
<div className="max-w-7xl mx-auto px-5">
13+
<h1 className="text-4xl font-bold my-8 text-gray-900 dark:text-gray-100">Markdown Posts</h1>
1514
<h3 className="text-lg mb-8">
1615
List of Markdown Posts in <span
17-
className="bg-blue-50 text-blue-500 py-1 px-2 rounded">/pages</span>
16+
className="bg-blue-50 text-blue-500 dark:bg-blue-900 dark:text-blue-200 py-1 px-2 rounded">/pages</span>
1817
</h3>
1918
{allPosts.map((post) => (
2019
<div className="mb-8" key={post.slug}>

0 commit comments

Comments
 (0)