Skip to content

Commit d56bd18

Browse files
committed
Better FA icon + missing explanations
1 parent 4911549 commit d56bd18

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/components/pageLayouts/PreviewModeBanner.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ const ExplanationTooltipOverlay: React.FunctionComponent = (): JSX.Element => {
2525
<ExternalLink href={'https://nextjs.org/docs/advanced-features/preview-mode'}>Learn more</ExternalLink><br />
2626
<br />
2727
Disabling <b>preview mode</b> will make SSG pages go back to their normal behaviour.<br />
28+
<br />
29+
<i><b>Tip</b>: Make sure to hard refresh the page (<code>cmd+shift+r</code> on MacOs) after enabling it, to refresh the browser cache.</i><br />
30+
<i><b>Tip</b>: We enabled <b>preview mode</b> on the <code>production</code> stage for showcase purpose</i><br />
2831
</span>
2932
);
3033
};
@@ -63,6 +66,10 @@ const PreviewModeBanner: React.FunctionComponent<Props> = (props): JSX.Element =
6366
right: 20px;
6467
}
6568
}
69+
70+
[class*="fa-"] {
71+
margin-bottom: 1px
72+
}
6673
`}
6774
>
6875
{
@@ -74,7 +81,7 @@ const PreviewModeBanner: React.FunctionComponent<Props> = (props): JSX.Element =
7481
overlay={<ExplanationTooltipOverlay />}
7582
placement={'bottom'}
7683
>
77-
<FontAwesomeIcon icon={['fas', 'question']} size={'xs'} />
84+
<FontAwesomeIcon icon={['fas', 'question-circle']} size={'xs'} />
7885
</Tooltip>
7986
</span>
8087
<span className={'right'}>
@@ -85,13 +92,7 @@ const PreviewModeBanner: React.FunctionComponent<Props> = (props): JSX.Element =
8592
onClick={stopPreviewMode}
8693
onKeyPress={stopPreviewMode}
8794
>
88-
Leave preview mode&nbsp;
89-
<Tooltip
90-
overlay={<span>This is a tooltip</span>}
91-
placement={'bottom'}
92-
>
93-
<FontAwesomeIcon icon={['fas', 'question']} size={'xs'} />
94-
</Tooltip>
95+
Leave preview mode
9596
</a>
9697
</span>
9798
</div>
@@ -103,7 +104,7 @@ const PreviewModeBanner: React.FunctionComponent<Props> = (props): JSX.Element =
103104
overlay={<ExplanationTooltipOverlay />}
104105
placement={'bottom'}
105106
>
106-
<FontAwesomeIcon icon={['fas', 'question']} />
107+
<FontAwesomeIcon icon={['fas', 'question-circle']} size={'xs'} />
107108
</Tooltip>
108109
</span>
109110
<span className={'right'}>

src/pages/_app.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { config, library } from '@fortawesome/fontawesome-svg-core';
22
import '@fortawesome/fontawesome-svg-core/styles.css';
33
import { faGithub } from '@fortawesome/free-brands-svg-icons';
44
import { faTimesCircle } from '@fortawesome/free-regular-svg-icons';
5-
import { faArrowCircleLeft, faArrowCircleRight, faBook, faBookReader, faCoffee, faHome, faQuestion, faUserCog } from '@fortawesome/free-solid-svg-icons';
5+
import { faArrowCircleLeft, faArrowCircleRight, faBook, faBookReader, faCoffee, faHome, faQuestionCircle, faUserCog } from '@fortawesome/free-solid-svg-icons';
66
import 'animate.css/animate.min.css'; // Loads animate.css CSS file. See https://github.com/daneden/animate.css
77
import 'bootstrap/dist/css/bootstrap.min.css'; // Loads bootstrap CSS file. See https://stackoverflow.com/a/50002905/2391795
88
import 'rc-tooltip/assets/bootstrap.css';
@@ -22,7 +22,7 @@ import '../utils/monitoring/sentry';
2222
config.autoAddCss = false; // Tell Font Awesome to skip adding the CSS automatically since it's being imported above
2323
library.add(
2424
faGithub,
25-
faArrowCircleLeft, faArrowCircleRight, faBook, faBookReader, faCoffee, faHome, faQuestion, faUserCog,
25+
faArrowCircleLeft, faArrowCircleRight, faBook, faBookReader, faCoffee, faHome, faQuestionCircle, faUserCog,
2626
faTimesCircle,
2727
);
2828

0 commit comments

Comments
 (0)