Skip to content

Commit 5f36d72

Browse files
committed
add console style class
1 parent d3280ab commit 5f36d72

File tree

8 files changed

+411
-39
lines changed

8 files changed

+411
-39
lines changed

pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {FrontMetter, MetterKey, getPostSlugs, getPosts} from '../utils/api'
77

88
const fields:MetterKey[] = ['slug', 'title', 'date', 'author']
99
export async function getStaticProps(context:any){
10-
console.log('++++++++++++++++ Home getStaticProps', context);
10+
console.log('++++++ Home getStaticProps', context);
1111
let mdFiles:{[folder:string]:FrontMetter[]} = {};
1212
let mdTree = getPostSlugs()
1313
mdFiles[mdTree.folder] = (getPosts(fields, mdTree.list, mdTree.folder))

pages/posts/build.js

Lines changed: 381 additions & 14 deletions
Large diffs are not rendered by default.

pages/posts/tutorial-assets.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@ import content from '../../Docs/tutorial-assets.md'
44
// let content = 'NOTHING';
55

66
Marked.setOptions({
7-
renderer: new Renderer(),
8-
gfm: true,
9-
// tables: true,
10-
breaks: false,
11-
pedantic: false,
12-
sanitize: false,
13-
smartLists: true,
14-
smartypants: false
7+
renderer: new Renderer(),
8+
gfm: true,
9+
// tables: true,
10+
breaks: false,
11+
pedantic: false,
12+
sanitize: false,
13+
smartLists: true,
14+
smartypants: false
1515
});
1616
// let output = Marked(md, opts)
1717
// let content = Marked('I am using **__markdown__**.')
1818
// const content = Marked(marked)
1919
// window.marked = Marked;
2020

2121
export default function TutorialAssets(props:any){
22-
console.log('++++++++++++++++++++++++TutorialAssets', props);
23-
return (
24-
<Layout><div dangerouslySetInnerHTML={{__html:`${content}`}}></div></Layout>
25-
);
22+
console.log('++++++ TutorialAssets', props);
23+
return (
24+
<Layout><div dangerouslySetInnerHTML={{__html:`${content}`}}></div></Layout>
25+
);
2626
}
2727
export async function getServerSideProps(){
2828
// Fetch data from external API
2929
const res = await fetch(`https://github.com/manifest.json`)
3030
const data = await res.json()
31-
console.log('++++++++++++++++++++++++TutorialAssets->getServerSideProps', data.name);
31+
console.log('++++++ TutorialAssets->getServerSideProps', data.name);
3232

3333
return {
3434
props: {

pages/route/[[...catchopt]].tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default function Catchopt(props:any){
55
const Router = useRouter()
66
let json = JSON.stringify(Router.query);
77
let fallback = Router.isFallback && "FALLBACK";
8-
console.log(`-----------------[[...catchopt]].tsx`, fallback, props, Router);
8+
console.log(`------ [[...catchopt]].tsx`, fallback, props, Router);
99
return (
1010
<Layout>
1111
<h3 className="card">Optional Catch-all Routes Test</h3>
@@ -19,7 +19,7 @@ export default function Catchopt(props:any){
1919
}
2020

2121
export async function getStaticProps(context: any) {
22-
console.log("+++++++++++++++Optional Catch-all getStaticProps", context);
22+
console.log("++++++ Optional Catch-all getStaticProps", context);
2323
return {
2424
props: {
2525
data: JSON.stringify(context)
@@ -28,7 +28,7 @@ export async function getStaticProps(context: any) {
2828
}
2929

3030
export async function getStaticPaths(context:any) {
31-
console.log("+++++++++++++++Optional Catch-all getStaticPaths", context);
31+
console.log("++++++ Optional Catch-all getStaticPaths", context);
3232
const res = await fetch(`https://github.com/manifest.json`)
3333
const data = await res.json()
3434
let locale = context.locale ?? 'zh-CN';

pages/route/[dynamic].tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {useRouter} from 'next/router'
44
export default function Dynamic(props:any){
55
const Router = useRouter()
66
let json = JSON.stringify(Router.query);
7-
console.log("-----------------route [dynamic].tsx", props, json, Router);
7+
console.log("------ route [dynamic].tsx", props, json, Router);
88
return (
99
<Layout>
1010
<h3 className="card">Dynamic Routes Test</h3>
@@ -14,7 +14,7 @@ export default function Dynamic(props:any){
1414
}
1515

1616
export async function getStaticProps(context: any) {
17-
console.log("+++++++++++++++Dynamic getStaticProps", context);
17+
console.log("++++++ Dynamic getStaticProps", context);
1818
return {
1919
props: {
2020
data: JSON.stringify(context)
@@ -23,7 +23,7 @@ export async function getStaticProps(context: any) {
2323
}
2424

2525
export async function getStaticPaths(context:any) {
26-
console.log("+++++++++++++++Dynamic getStaticPaths", context);
26+
console.log("++++++ Dynamic getStaticPaths", context);
2727
let locale = context.locale ?? 'zh-CN';
2828
let paths = [
2929
{params:{ locale, dynamic: 'dynamic' }},

pages/route/normal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {useRouter} from 'next/router'
33

44
export default function Normal(props:any){
55
const Router = useRouter()
6-
console.log("-----------------route normal.tsx", props, Router);
6+
console.log("------ route normal.tsx", props, Router);
77
return (
88
<>
99
<Layout>
@@ -14,7 +14,7 @@ export default function Normal(props:any){
1414
)
1515
}
1616
// export async function getStaticProps(context: any) {
17-
// console.log("+++++++++++++++getStaticcontext", context);
17+
// console.log("++++++ getStaticcontext", context);
1818
// return {
1919
// props: {
2020
// data: JSON.stringify(context)

pages/tutorial/[...slug].tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function Markdown({post}: {post: FrontMetter}){
4444
type Params = { params: { slug: string[]|string } }
4545

4646
export async function getStaticProps({ params }: Params) {
47-
console.log("+++++++++++++++[...slug] getStaticProps", params);
47+
console.log("++++++[...slug] getStaticProps", params);
4848
const post = getPostBySlug(params.slug, [
4949
'title',
5050
'date',
@@ -78,7 +78,7 @@ export async function getStaticPaths(context:any) {
7878
)
7979
})
8080

81-
console.log("+++++++++++++++[...slug] getStaticPaths", context, JSON.stringify(paths));
81+
console.log("++++++[...slug] getStaticPaths", context, JSON.stringify(paths));
8282
return {
8383
fallback: false,
8484
paths,

styles/theme.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ img {
2828
pre {
2929
padding: 0 16px;
3030
background: darkblue;
31-
color: rgb(202, 200, 193) !important;
31+
color: rgb(202, 200, 193);
3232
white-space: break-spaces;
3333
}
3434
.bgDarkblue {
@@ -75,6 +75,11 @@ pre {
7575
}
7676

7777
.normalList { list-style: none; padding: 0; margin: 0;}
78+
.console {
79+
font-size: 0.7rem;
80+
color: rgb(202, 200, 193) !important;
81+
background: darkblue;
82+
}
7883

7984
.card {
8085
margin: 1rem;

0 commit comments

Comments
 (0)