Skip to content

Commit

Permalink
Further styling and cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
fabtreb committed Aug 22, 2024
1 parent f3fca8c commit d67ea56
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/content/build-xdapp/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 1
---

# First XDapp
# My First XDapp

This QuickStart guide will run through how to start an Omni XDApp (cross-chain decentralized app) in 5 minutes.

Expand Down
30 changes: 25 additions & 5 deletions docs/content/build-xdapp/showcase-dapps.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,37 @@
sidebar_position: 1
---

import GitHubCodeBlock from '@site/src/components/GitHubCodeBlock/GitHubCodeBlock';

# Showcase

TODO


Awesome Omni Examples and Templates
## Cross-stake

An example xchain staking app that allows ERC20 deposits on multiple chains.
https://github.com/kevinhalliday/xstake

<GitHubCodeBlock url="https://github.com/kevinhalliday/xstake/blob/main/src/XStaker.sol"/>


## Ethereum to Omni bridge

OMNI is an ERC-20 token on Layer 1, and we understand that developers and users need a seamless way to transfer it to the Omni EVM for gas payments. To address this, we've developed a bridge that utilizes the Omni protocol, ensuring smooth and secure token transfers.


### Omni to Ethereum
<GitHubCodeBlock url="https://github.com/omni-network/omni/blob/main/contracts/core/src/token/OmniBridgeL1.sol"/>

### Ethereum to Omni
<GitHubCodeBlock url="https://github.com/omni-network/omni/blob/main/contracts/core/src/token/OmniBridgeNative.sol" />


See the Awesome Omni repo for a list of Omni examples and templates that you can use to get started with your Omni projects.
## What else?

- Cross-stake
- Bridge
:::tip
Get inspired by the following ideas. Looking forward to seeing your PRs on https://github.com/omni-network/awesome-omni
:::

<div class="grid-wrapper">
<div class="grid-rfp">
Expand Down
6 changes: 1 addition & 5 deletions docs/content/build-xdapp/walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import GitHubCodeBlock from '@site/src/components/GitHubCodeBlock/GitHubCodeBloc

# XDapp walkthrough

Here's an example of a simple cross-chain contract set for setting and getting a string. This contract lets you send greetings from a rollup chain to a global storage contract deployed on Omni. Two main contracts are used in this example:
Let's see what's happening under the hood. This contract lets you send greetings from a rollup chain to a global storage contract deployed on Omni. Two main contracts are used in this example:

1. `Greeter` - A contract deployed on a rollup that sends greetings to the Omni EVM.
2. `GreetingBook` - A contract deployed on the Omni EVM that stores greetings from all supported chains.
Expand All @@ -15,8 +15,6 @@ Here's an example of a simple cross-chain contract set for setting and getting a

<GitHubCodeBlock url="https://github.com/omni-network/hello-world-template/blob/48ff2f5277b4c144802c1ffa894a03ac071f02fc/src/Greeter.sol" />

### Walkthrough

Let's walk through this step by step.

First, inherit from `XApp`.
Expand Down Expand Up @@ -53,8 +51,6 @@ function greet(string calldata greeting) external payable {

<GitHubCodeBlock url="https://github.com/omni-network/hello-world-template/blob/eb02c55bc8ef92c09e7cb6e40420353e41e2841c/src/GreetingBook.sol" />

### Walkthrough

Similar to `Greeter`, we inherit from `XApp`.

```solidity
Expand Down
5 changes: 5 additions & 0 deletions docs/website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ const config: Config = {

themeConfig: {
image: "img/omni-banner.png",
docs: {
sidebar: {
autoCollapseCategories: true,
},
},
navbar: {
title: 'Omni Developers',
logo: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.code-snippet-container {
position: relative;
display: block;
height: 200px; /* Set your desired height */
overflow-y: auto; /* Enable vertical scrolling if content exceeds height */
}

.code-snippet-footer {
Expand Down
2 changes: 1 addition & 1 deletion docs/website/src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function Feature({title, Svg, description, link}: FeatureItem) {
<div className={clsx('col col--4')}>
<Link href={link}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img"/>
<Svg className="cta-img" role="img" viewBox="0 0 500 500"/>
</div>
<div className="text--center padding-horiz--md">
<Heading as="h3" className="cta">{title}</Heading>
Expand Down
5 changes: 3 additions & 2 deletions docs/website/src/components/IntroVideo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ export default function VideoSequence() {
// }, []);

return (
<div className={styles.videoContainer}>
// <div className={styles.videoContainer}>
<div>

<img src='img/omni-intro.png'/>
<img src='img/omni-intro.png' width="90%"/>

{/* <video ref={video1Ref} className={styles.video} controls style={{ display: 'block' }}>
<source src="/img/OmniDocsAnim.mp4" type="video/mp4" />
Expand Down
17 changes: 15 additions & 2 deletions docs/website/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@
--ifm-cta-color: black;
--ifm-link-color: #3e88ff;
--ifm-navbar-link-hover-color: #3e88ff;
--ifm-footer-link-hover-color: #3e88ff;
--ifm-hero-background-color: #edf4ff;
background-color: #ffffff;
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme="dark"] {
--ifm-color-primary: #7eafff;
--ifm-color-primary-dark: #6285bc;
--ifm-color-primary-dark: #0d2143;
--ifm-color-primary-darker: #8498b9;
--ifm-color-primary-darkest: #afbfd8;
--ifm-color-primary-light: #79cbcf;
Expand All @@ -56,6 +58,7 @@
--ifm-menu-color-background-active: #0d2143;
--ifm-menu-color-active: #606770;
--ifm-cta-color: #e7ebeb;
--ifm-hero-background-color: #edf4ff;
background-color: #00122f;
}

Expand Down Expand Up @@ -178,14 +181,24 @@ figcaption {
color: var(--ifm-cta-color);
}

.cta-img {
width: 30%;
height: auto;
}

.hero__title {
font-size: 2.5rem;
}

.hero__subtitle {
font-size: 1.5rem;
color: var(--ifm-heading-color);
}

.button.button--secondary {
color: var(--ifm-color-primary);
color: white;
background-color: var(--ifm-color-primary-dark);
margin-top: 3%;
}

.table-of-contents__link--active {
Expand Down
2 changes: 1 addition & 1 deletion docs/website/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function HomepageHeader() {


return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<header className={clsx('hero', styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
Cross-Chain Liquidity at your fingertips
Expand Down

0 comments on commit d67ea56

Please sign in to comment.