Skip to content

Commit

Permalink
fix: styling
Browse files Browse the repository at this point in the history
  • Loading branch information
isordo committed Oct 5, 2023
1 parent 986a2eb commit 839d5de
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 25 deletions.
7 changes: 6 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@
--ifm-color-primary-lighter: rgb(85 142 243);
--ifm-color-primary-lightest: rgb(92 147 243);
--ifm-code-font-size: 95%;

--docusaurus-highlighted-code-line-bg: rgb(222, 223, 225);
--ifm-color-dark: #35415b;
}

[data-theme="dark"] {
/* Color which works with dark mode syntax highlighting theme */
--docusaurus-highlighted-code-line-bg: rgb(72, 77, 91);
}

.docusaurus-highlight-code-line {
background-color: rgb(72, 77, 91);
display: block;
Expand Down
16 changes: 8 additions & 8 deletions src/docs/blockchains/blockchain-substrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ slug: /blockchains/substrate

The following permission scopes are available in the Substrate package.

```typescript
```ts
export enum SubstratePermissionScope {
"transfer" = "transfer",
"sign_payload_json" = "sign_payload_json",
Expand All @@ -19,7 +19,7 @@ export enum SubstratePermissionScope {

The supported message types.

```typescript
```ts
export enum SubstrateMessageType {
"transfer_request" = "transfer_request",
"sign_payload_request" = "sign_payload_request",
Expand All @@ -32,7 +32,7 @@ export enum SubstrateMessageType {

This message is used to request permissions to use an account.

```typescript
```ts
export interface SubstratePermissionRequest
extends PermissionRequestV3<"substrate"> {
blockchainData: {
Expand All @@ -50,7 +50,7 @@ export interface SubstratePermissionRequest
This message is used to share information about an account with a dApp.
```typescript
```ts
export interface SubstratePermissionResponse
extends PermissionResponseV3<"substrate"> {
blockchainData: {
Expand All @@ -73,7 +73,7 @@ export interface SubstratePermissionResponse
This message is used to initiate a transfer between two accounts.
```typescript
```ts
export interface SubstrateTransferRequest
extends BlockchainMessage<"substrate"> {
blockchainData: {
Expand All @@ -95,7 +95,7 @@ export interface SubstrateTransferRequest
This message is used to share information about a requested operation with the dApp.
```typescript
```ts
export type SubstrateTransferResponse =
| {
transactionHash: string;
Expand All @@ -115,7 +115,7 @@ export type SubstrateTransferResponse =
This message is used to request the signature for a payload.
```typescript
```ts
export interface SubstrateSignPayloadRequest
extends BlockchainMessage<"substrate"> {
blockchainData: {
Expand Down Expand Up @@ -200,7 +200,7 @@ export interface SubstrateSignPayloadRequest
This message is used to share information about a requested signature with the dApp.
```typescript
```ts
export type SubstrateSignPayloadResponse =
| {
transactionHash: string;
Expand Down
12 changes: 6 additions & 6 deletions src/docs/blockchains/blockchain-tezos-sapling.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `Tezos Sapling` package enables messages related to the Sapling implementati

The following permission scopes are available in the Tezos Sapling package.

```typescript
```ts
export enum TezosSaplingPermissionScope {
/**
* The "viewing_key" permission is used to signal to the wallet that a dApp requests access to the viewing key. Sharing the viewing key will give up ALL privacy advantages of sapling, so this permission should only be granted in very specific cases.
Expand All @@ -26,7 +26,7 @@ export enum TezosSaplingPermissionScope {

At the moment, only simple transfers are supported. At a later stage, this package will be extended to include shield and unshield operations, as well as shielded contract calls.

```typescript
```ts
export enum TezosSaplingMessageType {
/**
* This message type is used for transfers from one sapling address to another.
Expand All @@ -42,7 +42,7 @@ export enum TezosSaplingMessageType {

This message is used to request permissions to use an account.

```typescript
```ts
export interface TezosSaplingPermissionRequest
extends PermissionRequestV3<"tezos-sapling"> {
blockchainData: {
Expand All @@ -62,7 +62,7 @@ export interface TezosSaplingPermissionRequest
This message is used to share information about an account with a dApp.
```typescript
```ts
export interface TezosSaplingPermissionResponse
extends PermissionResponseV3<"tezos-sapling"> {
blockchainData: {
Expand All @@ -87,7 +87,7 @@ export interface TezosSaplingPermissionResponse
This message is used to initiate a transfer between two accounts.
```typescript
```ts
export interface TezosSaplingTransferRequest
extends BlockchainMessage<"tezos-sapling"> {
blockchainData: {
Expand All @@ -106,7 +106,7 @@ export interface TezosSaplingTransferRequest
This message is used to share information about a requested operation with the dApp.
```typescript
```ts
export type TezosSaplingTransferResponse =
| {
transactionHash: string;
Expand Down
12 changes: 6 additions & 6 deletions src/docs/blockchains/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ See the docs about the individual packages for more information about the messag

In the Beacon protocol, every message is wrapped in the following wrapper.

```typescript
```ts
export interface BeaconMessageWrapper<T extends BeaconBaseMessage> {
id: string; // ID of the message. The same ID is used in the request and response
version: string;
Expand All @@ -34,7 +34,7 @@ export interface BeaconMessageWrapper<T extends BeaconBaseMessage> {

The layout for the basic message is the same for all blockchains.

```typescript
```ts
export interface BlockchainMessage<T extends string = string> {
blockchainIdentifier: T;
type: unknown;
Expand All @@ -50,7 +50,7 @@ For this reason, there are two messages, `PermissionRequest` and `PermissionResp

Those messages are handled differently from the generic `BlockchainRequest` and `BlockchainResponse` messages because they have to be completed first before any other action can take place.

```typescript
```ts
export interface PermissionRequestV3<T extends string = string>
extends BlockchainMessage<T> {
blockchainIdentifier: T;
Expand All @@ -62,7 +62,7 @@ export interface PermissionRequestV3<T extends string = string>
}
```
```typescript
```ts
export interface PermissionResponseV3<T extends string = string>
extends BlockchainMessage<T> {
blockchainIdentifier: T;
Expand All @@ -80,7 +80,7 @@ Following are the generic messages of the Beacon Protocol. They can be extended
Please see the docs about the specific blockchain messages for examples.
```typescript
```ts
export interface BlockchainRequestV3<T extends string = string>
extends BlockchainMessage<T> {
blockchainIdentifier: T;
Expand All @@ -93,7 +93,7 @@ export interface BlockchainRequestV3<T extends string = string>
}
```
```typescript
```ts
export interface BlockchainResponseV3<T extends string = string>
extends BlockchainMessage<T> {
blockchainIdentifier: T;
Expand Down
4 changes: 2 additions & 2 deletions src/docs/blockchains/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ slug: /blockchains/usage

Let's look at an example how a dApp can be initialized with support for a `substrate` based blockchain.

```typescript
```ts
import { DAppClient } from "@airgap/beacon-dapp";
import { SubstrateBlockchain } from "@airgap/beacon-blockchain-substrate";

Expand Down Expand Up @@ -42,7 +42,7 @@ client.getActiveAccount().then((activeAccount) => {

On the wallet side, the blockchain doesn't explicitly have to be registered, it can be filtered by the `blockchainIdentifier` property.

```typescript
```ts
import { WalletClient } from "@airgap/beacon-wallet";
import { BeaconMessageType } from "@airgap/beacon-types";

Expand Down
2 changes: 1 addition & 1 deletion src/docs/wallet/messages/substrate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
title: Substrate
---

See [dApp docs](/blockchains/substrate)
See [DApp docs](/blockchains/substrate)
2 changes: 1 addition & 1 deletion src/docs/wallet/messages/tezos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
title: Tezos
---

See [dApp docs](/blockchains/tezos)
See [DApp docs](/blockchains/tezos)

0 comments on commit 839d5de

Please sign in to comment.