Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit 904187a

Browse files
Merge pull request #23 from NilFoundation/ui-kit
UI kit
2 parents 7a192f7 + df5b474 commit 904187a

File tree

6 files changed

+98
-89
lines changed

6 files changed

+98
-89
lines changed

nil-docs/docusaurus.config.js

+63-62
Original file line numberDiff line numberDiff line change
@@ -92,71 +92,72 @@ const config = {
9292
],
9393
themeConfig:
9494
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
95-
({
96-
colorMode: {
97-
defaultMode: 'dark',
98-
disableSwitch: true,
95+
(
96+
{
97+
colorMode: {
98+
defaultMode: 'dark',
99+
disableSwitch: true,
99100

100-
},
101-
navbar: {
102-
title: '=nil; Foundation',
103-
logo: {
104-
alt: '=nil; Foundation Logo',
105-
src: 'img/nil-logo.avif',
106101
},
107-
items: [
108-
{
109-
position: 'left',
110-
label: 'zkLLVM',
111-
to: '/zkllvm/overview/what-is-zkllvm'
112-
113-
},
114-
{
115-
position: 'left',
116-
label: 'Proof Market',
117-
to: '/proof-market/intro'
118-
},
119-
{
120-
position: 'left',
121-
label: 'zkSharding',
122-
to: 'https://nil.foundation/blog/post/nil_zkSharding'
123-
},
124-
{
125-
position: 'left',
126-
label: 'Crypto3',
127-
to: '/crypto3/intro'
102+
navbar: {
103+
title: '=nil; Foundation',
104+
logo: {
105+
alt: '=nil; Foundation Logo',
106+
src: 'img/nil-logo.avif',
128107
},
129-
],
130-
},
131-
footer: {
132-
links: [
133-
{
134-
title: 'Community',
135-
items: [
136-
{
137-
label: 'Discord',
138-
to: 'https://discord.gg/KmTAEjbmM3'
139-
},
140-
{
141-
label: 'GitHub',
142-
to: 'https://github.com/nilfoundation'
143-
},
144-
{
145-
label: 'Telegram',
146-
to: 'https://t.me/nilfoundation'
147-
}
148-
],
149-
}
150-
],
151-
style: 'dark',
152-
copyright: `Copyright © ${new Date().getFullYear()} =nil; Foundation`,
153-
},
154-
prism: {
155-
defaultLanguage: 'clike',
156-
theme: prismThemes.vsDark,
157-
darkTheme: prismThemes.vsDark,
158-
},
159-
}),
108+
items: [
109+
{
110+
position: 'left',
111+
label: 'zkLLVM',
112+
to: '/zkllvm/overview/what-is-zkllvm'
113+
114+
},
115+
{
116+
position: 'left',
117+
label: 'Proof Market',
118+
to: '/proof-market/intro'
119+
},
120+
{
121+
position: 'left',
122+
label: 'zkSharding',
123+
to: 'https://nil.foundation/blog/post/nil_zkSharding'
124+
},
125+
{
126+
position: 'left',
127+
label: 'Crypto3',
128+
to: '/crypto3/intro'
129+
},
130+
],
131+
},
132+
footer: {
133+
links: [
134+
{
135+
title: 'Community',
136+
items: [
137+
{
138+
label: 'Discord',
139+
to: 'https://discord.gg/KmTAEjbmM3'
140+
},
141+
{
142+
label: 'GitHub',
143+
to: 'https://github.com/nilfoundation'
144+
},
145+
{
146+
label: 'Telegram',
147+
to: 'https://t.me/nilfoundation'
148+
}
149+
],
150+
}
151+
],
152+
style: 'dark',
153+
copyright: `Copyright © ${new Date().getFullYear()} =nil; Foundation`,
154+
},
155+
prism: {
156+
defaultLanguage: 'clike',
157+
theme: prismThemes.vsDark,
158+
darkTheme: prismThemes.vsDark,
159+
},
160+
}),
160161
};
161162

162163
export default config;

nil-docs/src/components/GitHubButton/styles.module.css

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
align-items: center;
1313
}
1414

15+
16+
1517
.gitHubLogo {
1618
object-fit: contain;
1719
height: 2.5em;

nil-docs/src/components/HomepageFeatures/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import clsx from 'clsx';
21
import styles from './styles.module.css';
32
import Crypto3 from '../../../static/img/productImages/Crypto3.png';
43
import zkLLVM from '../../../static/img/productImages/zkLLVM.png';
54
import ProofMarket from '../../../static/img/productImages/PM.png';
65
import zkSharding from '../../../static/img/productImages/zkSharding.png';
76

7+
88
const ProductsList =
99
[
1010
{

nil-docs/src/components/HomepageFeatures/styles.module.css

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.productDescription {
22
width: 100%;
33
display: flex;
4+
flex-direction: column;
45
padding-right: 24px;
56
padding-left: 24px;
67
}
@@ -16,6 +17,7 @@ p {
1617
}
1718

1819
.rowFlex .col {
20+
flex: 1 1 50%;
1921
margin-left: 10px;
2022
margin-right: 10px;
2123
}

nil-docs/src/theme/Root.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ const { theme } = createTheme(engine);
1313

1414

1515
export default function Root({ children }) {
16-
return <>{children}</>;
17-
// return <StyletronProvider value={engine}>
18-
// <BaseProvider theme={theme}>
19-
// {children}
20-
// </BaseProvider>
21-
// </StyletronProvider>
16+
17+
return <StyletronProvider value={engine}>
18+
<BaseProvider theme={theme}>
19+
{children}
20+
</BaseProvider>
21+
</StyletronProvider>
2222

2323
}

nil-docs/zkllvm/overview/key-components-tools.md

+24-20
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {Accordion, Panel} from '@nilfoundation/ui-kit/dist/ui-kit.js'
2+
13
# Key components and tools
24

35
## zkLLVM Components
@@ -29,26 +31,28 @@ It is only necessary to generate constraints once per every circuit/input type p
2931

3032
Together, these products ensure that the circuit can be proven with dynamic inputs.
3133

32-
<details>
33-
<summary>Click here to learn more about assigner extendibility</summary>
34-
<p>
35-
The core of <code>assigner</code> is an LLVM IR parser, which can be ported into any programming language. To access its current implementation, [**click here**](https://github.com/NilFoundation/zkllvm-assigner). This implementation is written in C++ and supports only the PLONK arithmetization.
36-
</p>
37-
<p>
38-
<code>assigner</code> can be extended to support any other arithmetization. This process involves implementing the LLVM IR parser and following these steps.
39-
<ul>
40-
<li>Find a suitable components library for the chosen arithmetization (such as <strong><a href="https://github.com/zcash/halo2">halo2</a></strong> for Rust)</li>
41-
<li>Use the components library to implement assignment table generation</li>
42-
<li>Use the components library to implement constraints generation and serialization</li>
43-
</ul>
44-
</p>
45-
<p>
46-
Note that the zkLLVM frontends output IRs that are modified compared to the IRs generated by the vanilla LLVM project. As a result, any external tool that uses the original <code>LLVMIRParser</code> from LLVM will be unable to parse IRs from zkLLVM.
47-
</p>
48-
<p>
49-
When extending <code>assigner</code>, simply reusing an external parser will not work: it will need to be adapted to fully parse the modified IRs supplied by frontends.
50-
</p>
51-
</details>
34+
<Accordion>
35+
<Panel title='Click here to learn more about assigner extendibility'>
36+
<p>
37+
The core of <code>assigner</code> is an LLVM IR parser, which can be ported into any programming language. To access its current implementation, [**click here**](https://github.com/NilFoundation/zkllvm-assigner). This implementation is written in C++ and supports only the PLONK arithmetization.
38+
</p>
39+
<p>
40+
<code>assigner</code> can be extended to support any other arithmetization. This process involves implementing the LLVM IR parser and following these steps.
41+
<ul>
42+
<li>Find a suitable components library for the chosen arithmetization (such as <strong><a href="https://github.com/zcash/halo2">halo2</a></strong> for Rust)</li>
43+
<li>Use the components library to implement assignment table generation</li>
44+
<li>Use the components library to implement constraints generation and serialization</li>
45+
</ul>
46+
</p>
47+
<p>
48+
Note that the zkLLVM frontends output IRs that are modified compared to the IRs generated by the vanilla LLVM project. As a result, any external tool that uses the original <code>LLVMIRParser</code> from LLVM will be unable to parse IRs from zkLLVM.
49+
</p>
50+
<p>
51+
When extending <code>assigner</code>, simply reusing an external parser will not work: it will need to be adapted to fully parse the modified IRs supplied by frontends.
52+
</p>
53+
</Panel>
54+
</Accordion>
55+
5256

5357
## Proof system components
5458

0 commit comments

Comments
 (0)