chalknotes 0.0.33 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cli.js +11 -57
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -87,9 +87,9 @@ const appRouter = path.join(process.cwd(), '/app')
87
87
  function getTemplates(theme, routeBasePath) {
88
88
  const routePath = routeBasePath.replace(/^\//, ''); // Remove leading slash
89
89
 
90
- if (theme === 'dark') {
91
- return {
92
- pageRouter: `
90
+ // Both themes now use responsive dark mode
91
+ return {
92
+ pageRouter: `
93
93
  import { getStaticPropsForPost, getStaticPathsForPosts } from 'chalknotes';
94
94
  import NotionRenderer from './NotionRenderer';
95
95
 
@@ -98,10 +98,10 @@ export const getStaticPaths = getStaticPathsForPosts;
98
98
 
99
99
  export default function BlogPost({ post }) {
100
100
  return (
101
- <div className="min-h-screen bg-gray-900">
101
+ <div className="min-h-screen bg-gray-50 dark:bg-gray-900">
102
102
  <main className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
103
- <article className="bg-gray-800 rounded-lg shadow-lg border border-gray-700 p-8">
104
- <h1 className="text-4xl font-bold text-white mb-6 leading-tight">
103
+ <article className="bg-white dark:bg-gray-800 rounded-lg shadow-sm dark:shadow-lg border border-gray-200 dark:border-gray-700 p-8">
104
+ <h1 className="text-4xl font-bold text-gray-900 dark:text-white mb-6 leading-tight">
105
105
  {post.title}
106
106
  </h1>
107
107
  <NotionRenderer blocks={post.blocks} />
@@ -110,7 +110,7 @@ export default function BlogPost({ post }) {
110
110
  </div>
111
111
  );
112
112
  }`.trim(),
113
- appRouter: `
113
+ appRouter: `
114
114
  import { getPostBySlug } from 'chalknotes';
115
115
  import NotionRenderer from './NotionRenderer';
116
116
 
@@ -118,10 +118,10 @@ export default async function BlogPost({ params }) {
118
118
  const post = await getPostBySlug(params.slug);
119
119
 
120
120
  return (
121
- <div className="min-h-screen bg-gray-900">
121
+ <div className="min-h-screen bg-gray-50 dark:bg-gray-900">
122
122
  <main className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
123
- <article className="bg-gray-800 rounded-lg shadow-lg border border-gray-700 p-8">
124
- <h1 className="text-4xl font-bold text-white mb-6 leading-tight">
123
+ <article className="bg-white dark:bg-gray-800 rounded-lg shadow-sm dark:shadow-lg border border-gray-200 dark:border-gray-700 p-8">
124
+ <h1 className="text-4xl font-bold text-gray-900 dark:text-white mb-6 leading-tight">
125
125
  {post.title}
126
126
  </h1>
127
127
  <NotionRenderer blocks={post.blocks} />
@@ -130,53 +130,7 @@ export default async function BlogPost({ params }) {
130
130
  </div>
131
131
  );
132
132
  }`.trim()
133
- };
134
- } else {
135
- // Default theme (light mode)
136
- return {
137
- pageRouter: `
138
- import { getStaticPropsForPost, getStaticPathsForPosts } from 'chalknotes';
139
- import NotionRenderer from './NotionRenderer';
140
-
141
- export const getStaticProps = getStaticPropsForPost;
142
- export const getStaticPaths = getStaticPathsForPosts;
143
-
144
- export default function BlogPost({ post }) {
145
- return (
146
- <div className="min-h-screen bg-gray-50">
147
- <main className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
148
- <article className="bg-white rounded-lg shadow-sm border border-gray-200 p-8">
149
- <h1 className="text-4xl font-bold text-gray-900 mb-6 leading-tight">
150
- {post.title}
151
- </h1>
152
- <NotionRenderer blocks={post.blocks} />
153
- </article>
154
- </main>
155
- </div>
156
- );
157
- }`.trim(),
158
- appRouter: `
159
- import { getPostBySlug } from 'chalknotes';
160
- import NotionRenderer from './NotionRenderer';
161
-
162
- export default async function BlogPost({ params }) {
163
- const post = await getPostBySlug(params.slug);
164
-
165
- return (
166
- <div className="min-h-screen bg-gray-50">
167
- <main className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
168
- <article className="bg-white rounded-lg shadow-sm border border-gray-200 p-8">
169
- <h1 className="text-4xl font-bold text-gray-900 mb-6 leading-tight">
170
- {post.title}
171
- </h1>
172
- <NotionRenderer blocks={post.blocks} />
173
- </article>
174
- </main>
175
- </div>
176
- );
177
- }`.trim()
178
- };
179
- }
133
+ };
180
134
  }
181
135
 
182
136
  // NotionRenderer component template
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chalknotes",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "description": "A tool that simplifies blogs.",
5
5
  "main": "src/index.js",
6
6
  "bin": {