Skip to content

Commit

Permalink
feat: update layout, set docs config and hide navbar for the desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
akushniruk committed Feb 17, 2025
1 parent 0c2d02d commit 342755e
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 124 deletions.
4 changes: 4 additions & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
sidebar_position: 1
slug: /
title: Introduction
---

![erc7824](/img/erc7824.png)

# Introduction

## Inject Nitro in your Stack
Expand Down
34 changes: 4 additions & 30 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,15 @@ const config = {
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: '/',
sidebarPath: './sidebars.js',
breadcrumbs: false,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/erc7824/website/tree/main/docs/',
},
blog: {
showReadingTime: true,
feedOptions: {
type: ['rss', 'atom'],
xslt: true,
},
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
// Useful options to enforce blogging best practices
onInlineTags: 'warn',
onInlineAuthors: 'warn',
onUntruncatedBlogPosts: 'warn',
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
Expand All @@ -76,25 +64,11 @@ const config = {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'ERC7824',
logo: {
alt: 'ERC-7824',
src: 'img/logo.svg',
srcDark: 'img/logo_dark.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
},
{to: '/blog', label: 'Blog', position: 'left'},
{
href: 'https://github.com/erc7824/nitro',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
Expand Down
19 changes: 0 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 61 additions & 25 deletions src/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,30 +1,66 @@
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
* Global CSS overrides for Docusaurus.
* Infima is bundled by default.
*/

/* You can override the default Infima variables here. */
/* Default theme variables */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}

/* Dark mode variables */
[data-theme="dark"] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .logo [fill="#000"] {
fill: #000;
}

[data-theme="dark"] .logo [fill="#000"] {
fill: #fff;
}

.logo {
width: -webkit-fill-available;
height: 70px;
padding-top: 16px;
margin-top: 8px;
}

@media (min-width: 1416px) {
html.docs-doc-page .main-wrapper {
align-self: center;
max-width: 1400px;
width: 1400px;
}
}

.navbar .navbar__inner {
margin: 0 auto;
max-width: 1360px;
}

@media (min-width: 996px) {
:root {
--ifm-navbar-height: 0;
}
.navbar {
display: none !important;
}
}
43 changes: 0 additions & 43 deletions src/pages/index.js

This file was deleted.

10 changes: 10 additions & 0 deletions src/theme/Admonition/Layout/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import Layout from '@theme-original/Admonition/Layout';

export default function LayoutWrapper(props) {
return (
<>
<Layout {...props} />
</>
);
}
15 changes: 15 additions & 0 deletions src/theme/DocSidebar/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';
import DocSidebar from '@theme-original/DocSidebar';
import Logo from '@site/static/img/logo.svg';

export default function DocSidebarWrapper(props) {

return (
<>
<div className="logo__wrapper">
<Logo className='logo'/>
</div>
<DocSidebar {...props} />
</>
);
}
Binary file added static/img/erc7824.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/img/favicon.ico
Binary file not shown.
14 changes: 7 additions & 7 deletions static/img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 342755e

Please sign in to comment.