diff --git a/.github/workflows/codeql-scan.yml b/.github/workflows/codeql-scan.yml index 8d717d7..888d818 100644 --- a/.github/workflows/codeql-scan.yml +++ b/.github/workflows/codeql-scan.yml @@ -1,13 +1,13 @@ # GitHub SAST (static application security testing) tool that scans code for security bugs and unsafe coding practices -name: "CodeQL Scan" +name: 'CodeQL Scan' # Events that triggers CodeQL to run on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] # Option to configure as a scheduled action to monitor for drift in code # schedule: @@ -28,23 +28,23 @@ jobs: fail-fast: false matrix: # Add more languages if relevnt to the project - language: [ 'javascript' ] + language: ['javascript'] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v2 - # Initialises the CodeQL tools for scanning (sorry Americans) - - name: Initialise CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initialises the CodeQL tools for scanning (sorry Americans) + - name: Initialise CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Run the analysis and upload results to the security tab - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + # Run the analysis and upload results to the security tab + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/trivy-scan.yml b/.github/workflows/trivy-scan.yml index c956a13..3308d13 100644 --- a/.github/workflows/trivy-scan.yml +++ b/.github/workflows/trivy-scan.yml @@ -5,9 +5,9 @@ name: Trivy Scan # Events that triggers Trivy to run on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: build: diff --git a/components/FeatureSection.tsx b/components/FeatureSection.tsx index 6ee4856..56f4fe4 100644 --- a/components/FeatureSection.tsx +++ b/components/FeatureSection.tsx @@ -52,7 +52,9 @@ const FeatureSection = () => { Completely permissionless.

- Open source, all data is on-chain. Trade spot margined markets and leveraged perpetual futures all cross-collateralized with up to 10x leverage. + Open source, all data is on-chain. Trade spot margined + markets and leveraged perpetual futures all + cross-collateralized with up to 10x leverage.

{ + const sideImage = useRef(null) + //let heroText = useRef(null) + + const tl = gsap.timeline() + //let App = useRef(null) + + useEffect(() => { + //gsap.to(App.current, 0, {css: {visibility:'visible'}}) + + /* + const tagOne = heroText.children[0]; + const tagTwo = heroText.children[1]; + const tagThree = heroText.children[2]; + const tagFour = heroText.children[3]; + + //content animation + tl.from(tagOne, .7, {opacity: 0, y: 50, ease: Power3.easeOut}, 'Start') + .from(tagTwo, .7, {opacity: 0, y: 50, ease: Power3.easeOut, delay: .2}, 'Start') + .from(tagThree, .7, {opacity: 0, y: 50, ease: Power3.easeOut, delay: .4}, 'Start') + .from(tagFour, .7, {opacity: 0, y: 50, ease: Power3.easeOut, delay: .6}, 'Start') + */ + //image animation + tl.to(sideImage.current, 0.7, { + opacity: 1, + y: 0, + ease: Power3.easeOut, + }) + }, []) + + return ( +
+
+
+
+ +
+
+
+
+ ) +} + +export default HeroSectionHome diff --git a/components/HeroSectionHome.tsx b/components/HeroSectionHome.tsx index 16264ef..f32c16a 100644 --- a/components/HeroSectionHome.tsx +++ b/components/HeroSectionHome.tsx @@ -5,26 +5,10 @@ import { gsap, Power3 } from 'gsap' const HeroSectionHome = () => { const sideImage = useRef(null) - //let heroText = useRef(null) const tl = gsap.timeline() - //let App = useRef(null) useEffect(() => { - //gsap.to(App.current, 0, {css: {visibility:'visible'}}) - - /* - const tagOne = heroText.children[0]; - const tagTwo = heroText.children[1]; - const tagThree = heroText.children[2]; - const tagFour = heroText.children[3]; - - //content animation - tl.from(tagOne, .7, {opacity: 0, y: 50, ease: Power3.easeOut}, 'Start') - .from(tagTwo, .7, {opacity: 0, y: 50, ease: Power3.easeOut, delay: .2}, 'Start') - .from(tagThree, .7, {opacity: 0, y: 50, ease: Power3.easeOut, delay: .4}, 'Start') - .from(tagFour, .7, {opacity: 0, y: 50, ease: Power3.easeOut, delay: .6}, 'Start') - */ //image animation tl.to(sideImage.current, 0.7, { opacity: 1, @@ -34,96 +18,71 @@ const HeroSectionHome = () => { }, []) return ( -
-
-
-
-
-
-
-
{heroText = el}}*/> -

- Long & short everything. -

+
+
+
+

+ A New Dawn.{' '} +

-

- Lightning fast{' '} - ·{' '} - Near-zero fees{' '} - ·{' '} - Permissionless -

+

+ The next generation of Mango is on the horizon. With exciting new + features and risk mitigation strategies, Mango v4 is your one-stop + DeFi shop. +

+

+ Join our communtiy and stay up-to-date on Discord. +

- - -
-

- Powered by -

-
-
- - Solana - -
-
- - Serum - -
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
-
-
+
+ + + + + Buy MNGO + +
+
+

+ Powered by +

+
+
+ + Solana + +
+
+
+
+ +
+
+
+
) diff --git a/components/NavBarBeta copy.tsx b/components/NavBarBeta copy.tsx new file mode 100644 index 0000000..e636415 --- /dev/null +++ b/components/NavBarBeta copy.tsx @@ -0,0 +1,1027 @@ +import { useEffect, useState } from 'react' +import MangoPill from '../components/MangoPill' +//import MangoSale from '../components/MangoSale' +import Button from './Button' +import GradientText from './GradientText' +//import ThemeSwitch from './ThemeSwitch' + +const NavBarBeta = () => { + const [mobileMenuVisible, setMobileMenuVisible] = useState(false) + const [productMenuVisible, setProductMenuVisible] = useState(false) + const [supportMenuVisible, setSupportMenuVisible] = useState(false) + const [communityMenuVisible, setCommunityMenuVisible] = useState(false) + + const toggleMobileMenu = (e) => { + setMobileMenuVisible(!mobileMenuVisible) + e.stopPropagation() + } + + const toggleProducts = (e) => { + setProductMenuVisible(!productMenuVisible) + setSupportMenuVisible(false) + setCommunityMenuVisible(false) + e.stopPropagation() + } + const toggleCommunity = (e) => { + setCommunityMenuVisible(!communityMenuVisible) + setSupportMenuVisible(false) + setProductMenuVisible(false) + e.stopPropagation() + } + + const toggleSupport = (e) => { + setSupportMenuVisible(!supportMenuVisible) + setProductMenuVisible(false) + setCommunityMenuVisible(false) + + e.stopPropagation() + } + + const closeMenu = () => { + setMobileMenuVisible(false) + setProductMenuVisible(false) + setSupportMenuVisible(false) + setCommunityMenuVisible(false) + } + + const doNothing = (e) => { + e.stopPropagation() + } + + useEffect(() => { + window.addEventListener('click', closeMenu) + return () => window.removeEventListener('click', closeMenu) + }) + + return ( +
+ {/* Main Menu */} +
+
+
+ +
+ +
+ +
+ + {/* +
+ +
+ */} +
+
+
+ + {/* Mobile menu */} + +
+
+ +
+
+
+
+ ) +} + +export default NavBarBeta diff --git a/components/NavBarBeta.tsx b/components/NavBarBeta.tsx index e636415..93609e1 100644 --- a/components/NavBarBeta.tsx +++ b/components/NavBarBeta.tsx @@ -1,1022 +1,45 @@ -import { useEffect, useState } from 'react' -import MangoPill from '../components/MangoPill' -//import MangoSale from '../components/MangoSale' -import Button from './Button' -import GradientText from './GradientText' -//import ThemeSwitch from './ThemeSwitch' - const NavBarBeta = () => { - const [mobileMenuVisible, setMobileMenuVisible] = useState(false) - const [productMenuVisible, setProductMenuVisible] = useState(false) - const [supportMenuVisible, setSupportMenuVisible] = useState(false) - const [communityMenuVisible, setCommunityMenuVisible] = useState(false) - - const toggleMobileMenu = (e) => { - setMobileMenuVisible(!mobileMenuVisible) - e.stopPropagation() - } - - const toggleProducts = (e) => { - setProductMenuVisible(!productMenuVisible) - setSupportMenuVisible(false) - setCommunityMenuVisible(false) - e.stopPropagation() - } - const toggleCommunity = (e) => { - setCommunityMenuVisible(!communityMenuVisible) - setSupportMenuVisible(false) - setProductMenuVisible(false) - e.stopPropagation() - } - - const toggleSupport = (e) => { - setSupportMenuVisible(!supportMenuVisible) - setProductMenuVisible(false) - setCommunityMenuVisible(false) - - e.stopPropagation() - } - - const closeMenu = () => { - setMobileMenuVisible(false) - setProductMenuVisible(false) - setSupportMenuVisible(false) - setCommunityMenuVisible(false) - } - - const doNothing = (e) => { - e.stopPropagation() - } - - useEffect(() => { - window.addEventListener('click', closeMenu) - return () => window.removeEventListener('click', closeMenu) - }) - return (
{/* Main Menu */} -
-
-
- -
- -
- -
- - {/* -
- -
- */} -
+
+ - - {/* Mobile menu */} - - diff --git a/pages/index copy.tsx b/pages/index copy.tsx new file mode 100644 index 0000000..42d68cd --- /dev/null +++ b/pages/index copy.tsx @@ -0,0 +1,23 @@ +import NavBarBeta from '../components/NavBarBeta' +import HeroSectionHome from '../components/HeroSectionHome' +import TradeSection from '../components/TradeSection' +import FooterSection from '../components/FooterSection' +import LendSection from '../components/LendSection' +import CommunitySection from '../components/CommunitySection' + +const Index = () => { + return ( +
+
+ + + + + + +
+
+ ) +} + +export default Index diff --git a/pages/index.tsx b/pages/index.tsx index 42d68cd..3bb6f7a 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,21 +1,14 @@ import NavBarBeta from '../components/NavBarBeta' import HeroSectionHome from '../components/HeroSectionHome' -import TradeSection from '../components/TradeSection' -import FooterSection from '../components/FooterSection' -import LendSection from '../components/LendSection' -import CommunitySection from '../components/CommunitySection' const Index = () => { return ( -
+
- - - - -
) } diff --git a/public/img/trade.png b/public/img/trade.png new file mode 100644 index 0000000..cfcdfb4 Binary files /dev/null and b/public/img/trade.png differ diff --git a/public/socials/discord-white.svg b/public/socials/discord-white.svg new file mode 100644 index 0000000..54f0e1b --- /dev/null +++ b/public/socials/discord-white.svg @@ -0,0 +1,3 @@ + + + diff --git a/styles/index.css b/styles/index.css index 24bc3ce..88292c6 100644 --- a/styles/index.css +++ b/styles/index.css @@ -57,3 +57,8 @@ animation-delay: 4s; } } + +.radial-gradient-bg { + background-image: radial-gradient(at 300% 100%, #5b48ad 0, transparent 75%); + @apply bg-th-bkg-1; +}