Skip to content

Commit

Permalink
#318: Use CodeBlock instead of <code> in the homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
shalithasuranga committed Aug 10, 2024
1 parent e62f306 commit 6227107
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, {useEffect, useState} from 'react';
import clsx from 'clsx';
import Layout from '@theme/Layout';
import Link from '@docusaurus/Link';
import CodeBlock from '@theme/CodeBlock';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import useBaseUrl from '@docusaurus/useBaseUrl';
import styles from './styles.module.css';
Expand Down Expand Up @@ -237,9 +238,9 @@ export default function Home() {
<div className="container">
<h1 className="hero__title">Start building lightweight apps!</h1>
<p className="hero__subtitle">
<code className={styles.code}>
<CodeBlock className={styles.code} language="bash">
npm install -g @neutralinojs/neu
</code>
</CodeBlock>
</p>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@
}

.code {
color: rgb(40, 40, 40);
margin-top: 1.5rem;
display: inline-block;
}

0 comments on commit 6227107

Please sign in to comment.