Skip to content

Commit

Permalink
improvements #156
Browse files Browse the repository at this point in the history
  • Loading branch information
tima101 committed May 29, 2021
1 parent 25ea612 commit 0954f1f
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 19 deletions.
1 change: 0 additions & 1 deletion book/10-begin/app/components/posts/PostEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ class PostEditor extends React.Component<Props, State> {
input: {
border: 'none',
outline: 'none',
font: '16px Roboto',
color: isThemeDark ? '#fff' : '#000',
fontWeight: 300,
height: '100vh',
Expand Down
2 changes: 1 addition & 1 deletion book/10-end/app/components/posts/PostContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class PostContent extends React.Component<Props> {

return (
<div
style={{ fontSize: '15px', lineHeight: '2em', fontWeight: 300, wordBreak: 'break-all' }}
style={{ fontSize: '15px', lineHeight: '2em', font: '16px Roboto', wordBreak: 'break-all' }}
dangerouslySetInnerHTML={{ __html: html }}
/>
);
Expand Down
3 changes: 1 addition & 2 deletions book/10-end/app/components/posts/PostEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ class PostEditor extends React.Component<Props, State> {
input: {
border: 'none',
outline: 'none',
font: '16px Roboto',
color: isThemeDark ? '#fff' : '#000',
fontWeight: 300,
font: '16px Roboto',
height: '100vh',
lineHeight: '1.5em',
backgroundColor: content ? textareaBackgroundColor : 'transparent',
Expand Down
2 changes: 0 additions & 2 deletions book/10-end/app/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ class MyDocument extends Document {
rel="prefetch"
href="/fonts/IBM-Plex-Mono/IBMPlexMono-Regular.woff2"
as="font"
crossOrigin="anonymous"
type="font/woff2"
/>
<link
rel="prefetch"
href="/fonts/IBM-Plex-Mono/IBMPlexMono-Bold.woff2"
as="font"
crossOrigin="anonymous"
type="font/woff2"
/>

Expand Down
6 changes: 3 additions & 3 deletions book/7-end/app/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ class MyApp extends App {
const { Component, pageProps } = this.props;
const store = this.store;

const isThemeDark = store.currentUser ? store.currentUser.darkTheme : true;

return (
<ThemeProvider
theme={store.currentUser && store.currentUser.darkTheme ? themeDark : themeLight}
>
<ThemeProvider theme={isThemeDark ? themeDark : themeLight}>
<Head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
Expand Down
6 changes: 3 additions & 3 deletions book/8-begin/app/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ class MyApp extends App {
const { Component, pageProps } = this.props;
const store = this.store;

const isThemeDark = store.currentUser ? store.currentUser.darkTheme : true;

return (
<ThemeProvider
theme={store.currentUser && store.currentUser.darkTheme ? themeDark : themeLight}
>
<ThemeProvider theme={isThemeDark ? themeDark : themeLight}>
<Head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
Expand Down
1 change: 0 additions & 1 deletion book/8-end/app/components/posts/PostEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ class PostEditor extends React.Component<Props, State> {
input: {
border: 'none',
outline: 'none',
font: '16px Roboto',
color: isThemeDark ? '#fff' : '#000',
fontWeight: 300,
height: '100vh',
Expand Down
1 change: 0 additions & 1 deletion book/9-begin/app/components/posts/PostEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ class PostEditor extends React.Component<Props, State> {
input: {
border: 'none',
outline: 'none',
font: '16px Roboto',
color: isThemeDark ? '#fff' : '#000',
fontWeight: 300,
height: '100vh',
Expand Down
1 change: 0 additions & 1 deletion book/9-end/app/components/posts/PostEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ class PostEditor extends React.Component<Props, State> {
input: {
border: 'none',
outline: 'none',
font: '16px Roboto',
color: isThemeDark ? '#fff' : '#000',
fontWeight: 300,
height: '100vh',
Expand Down
2 changes: 1 addition & 1 deletion saas/app/components/posts/PostContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class PostContent extends React.Component<Props> {

return (
<div
style={{ fontSize: '15px', lineHeight: '2em', fontWeight: 300, wordBreak: 'break-all' }}
style={{ fontSize: '15px', lineHeight: '2em', font: '16px Roboto', wordBreak: 'break-all' }}
dangerouslySetInnerHTML={{ __html: html }}
/>
);
Expand Down
2 changes: 1 addition & 1 deletion saas/app/components/posts/PostEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class PostEditor extends React.Component<Props, State> {
border: 'none',
outline: 'none',
color: isThemeDark ? '#fff' : '#000',
fontWeight: 300,
font: '16px Roboto',
height: '100vh',
lineHeight: '1.5em',
backgroundColor: content ? textareaBackgroundColor : 'transparent',
Expand Down
2 changes: 0 additions & 2 deletions saas/app/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ class MyDocument extends Document {
rel="prefetch"
href="/fonts/IBM-Plex-Mono/IBMPlexMono-Regular.woff2"
as="font"
crossOrigin="anonymous"
type="font/woff2"
/>
<link
rel="prefetch"
href="/fonts/IBM-Plex-Mono/IBMPlexMono-Bold.woff2"
as="font"
crossOrigin="anonymous"
type="font/woff2"
/>

Expand Down

0 comments on commit 0954f1f

Please sign in to comment.