Skip to content

Commit

Permalink
Fix some syntax, color, search bar (#35)
Browse files Browse the repository at this point in the history
## Description
<!-- Describe your changes in detail -->
fix syntax in installation guide, fix color theme for footer, add search
bar

## Motivation and Context
<!-- Why is this change required? What problem does it solve? -->
Search bar is important,
<!-- If it fixes an open issue, please link to the issue here. -->

## Screenshots (if appropriate):
<!-- Provide before and after screen shots -->
- Before


![Screenshot_1417](https://github.com/astriaorg/docs/assets/98658943/d5f78b2c-1367-4841-8ff4-8178c3c7f8d1)

- After


![Screenshot_1420](https://github.com/astriaorg/docs/assets/98658943/0732cf39-671e-48f1-9e0d-d291b6e73508)


## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [x] Edits to existing documentation
- [x] Changing documentation structure (relocating existing files,
ensure redirects exist)
- [x] Stylistic changes (provide screenshots above)
  • Loading branch information
Megumiiiiii committed Jan 22, 2024
1 parent 95f8f2b commit 429d607
Show file tree
Hide file tree
Showing 5 changed files with 269 additions and 31 deletions.
38 changes: 23 additions & 15 deletions docs/components/_astria-cli-install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,35 @@ import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="ARM Mac" label="ARM Mac" default>
```bash
curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.2.2/astria-cli-aarch64-apple-darwin.tar.gz > astria-cli.tar.gz
tar -xvzf astria-cli.tar.gz
```

```bash
curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.2.2/astria-cli-aarch64-apple-darwin.tar.gz > astria-cli.tar.gz
tar -xvzf astria-cli.tar.gz
```

</TabItem>
<TabItem value="X86_64 Mac" label="X86_64 Mac">
```bash
curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.2.2/astria-cli-x86_64-apple-darwin.tar.gz > astria-cli.tar.gz
tar -xvzf astria-cli.tar.gz
```

```bash
curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.2.2/astria-cli-x86_64-apple-darwin.tar.gz > astria-cli.tar.gz
tar -xvzf astria-cli.tar.gz
```

</TabItem>
<TabItem value="x86_64 Linux" label="x86_64 Linux">
```bash
curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.2.2/astria-cli-x86_64-unknown-linux-gnu.tar.gz > astria-cli.tar.gz
tar -xvzf astria-cli.tar.gz
```

```bash
curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.2.2/astria-cli-x86_64-unknown-linux-gnu.tar.gz > astria-cli.tar.gz
tar -xvzf astria-cli.tar.gz
```

</TabItem>
<TabItem value="From Source" label="From Source">
```bash
cargo install astria-cli --git=https://github.com/astriaorg/astria --tag=cli-v0.2.2 --locked
```

```bash
cargo install astria-cli --git=https://github.com/astriaorg/astria --tag=cli-v0.2.2 --locked
```

</TabItem>
</Tabs>

Expand Down
23 changes: 17 additions & 6 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ const config = {
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
showLastUpdateTime: true,
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/astriaorg/docs',
'https://github.com/astriaorg/docs/edit/main/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
Expand All @@ -52,6 +53,8 @@ const config = {
],
],

plugins: [require.resolve("@cmfcmf/docusaurus-search-local")],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
Expand All @@ -75,8 +78,21 @@ const config = {
label: 'GitHub',
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
docs: {
sidebar: {
hideable: true,
},
},
colorMode: {
defaultMode: 'light',
disableSwitch: false,
},
footer: {
style: 'dark',
links: [
Expand Down Expand Up @@ -130,11 +146,6 @@ const config = {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
colorMode: {
defaultMode: 'light',
disableSwitch: true,
respectPrefersColorScheme: false,
}
}),
};

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"fmt": "eslint --fix docs/**/*.md src/**/*.tsx"
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "^1.1.0",
"@docusaurus/core": "2.4.1",
"@docusaurus/preset-classic": "2.4.1",
"@mdx-js/react": "^1.6.22",
Expand Down
11 changes: 6 additions & 5 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
--ifm-heading-font-weight: 500;
--ifm-heading-line-height: 90%;
--ifm-button-font-weight: 500;
--ifm-footer-background-color: #050a0d;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}

Expand All @@ -31,10 +30,15 @@
--ifm-color-primary-light: #74a4bf;
--ifm-color-primary-lighter: #74a4bf;
--ifm-color-primary-lightest: #74a4bf;
--ifm-footer-background-color: #050a0d;
--ifm-background-color: #202020ba !important;
--ifm-navbar-background-color: #050a0d !important;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

.footer--dark {
--ifm-footer-background-color: #050a0d;
}

@font-face {
font-family: 'Nb akademie webfont';
src: url('https://uploads-ssl.webflow.com/640f864b2475ae4fe0020732/64187fae529f2ffb5ab47365_nb_akademie_bold_italic-webfont.woff2') format('woff2'), url('https://uploads-ssl.webflow.com/640f864b2475ae4fe0020732/64187faec94b753200b79739_nb_akademie_extrabold_italic-webfont.woff2') format('woff2'), url('https://uploads-ssl.webflow.com/640f864b2475ae4fe0020732/64187fae76b8505457807f32_nb_akademie_bold_italic-webfont.eot') format('embedded-opentype'), url('https://uploads-ssl.webflow.com/640f864b2475ae4fe0020732/64187fae5afcf40f48849d18_nb_akademie_extrabold_italic-webfont.eot') format('embedded-opentype'), url('https://uploads-ssl.webflow.com/640f864b2475ae4fe0020732/64187faeceba9af69de76648_nb_akademie_bold_italic-webfont.woff') format('woff'), url('https://uploads-ssl.webflow.com/640f864b2475ae4fe0020732/64187fae999e333d2560bee8_nb_akademie_extrabold_italic-webfont.woff') format('woff'), url('https://uploads-ssl.webflow.com/640f864b2475ae4fe0020732/64187fae0a428f2e3de48a02_nb_akademie_bold_italic-webfont.ttf') format('truetype'), url('https://uploads-ssl.webflow.com/640f864b2475ae4fe0020732/64187fae0a428f5654e48a07_nb_akademie_extrabold_italic-webfont.ttf') format('truetype');
Expand Down Expand Up @@ -267,9 +271,6 @@ p {
letter-spacing: -0.02em;
}

.footer--dark {
background-color: var(--ifm-color-primary-darker);
}

.body---large {
color: #fff;
Expand Down
Loading

0 comments on commit 429d607

Please sign in to comment.