Skip to content

Commit

Permalink
Merge branch 'feature/footer' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Ho3einWave committed Nov 20, 2024
2 parents 454f1ec + a63bec7 commit 3045d8c
Show file tree
Hide file tree
Showing 20 changed files with 232 additions and 23 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=2">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png?v=2">
<link rel="manifest" href="/site.webmanifest?v=2">
<link rel="mask-icon" href="/safari-pinned-tab.svg?v=2" color="#5bbad5">
<link rel="mask-icon" href="/safari-pinned-tab.svg?v=2" color="#20be5e">
<link rel="shortcut icon" href="/favicon.ico?v=2">
<meta name="msapplication-TileColor" content="#000000">
<meta name="theme-color" content="#005be9">
Expand All @@ -33,7 +33,7 @@
<meta name="twitter:description"
content="Instant token swaps with best rates and high liquidity on MyTonSwap, a decentralized exchange platform on the TON blockchain.">
<meta name="twitter:image" content="https://app.mytonswap.com/logo.png">
<meta name="theme-color" content="#f6f8fa" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#20be5e" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#000000" media="(prefers-color-scheme: dark)">
<script>
if (window.Telegram.WebApp.initData.length !== 0) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"cypress:run": "cypress run"
},
"dependencies": {
"@mytonswap/widget": "^2.0.9",
"@mytonswap/widget": "^2.0.13",
"@tonconnect/ui-react": "^2.0.9",
"clsx": "^2.1.1",
"framer-motion": "^11.11.11",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

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

Binary file added public/apple-touch-icon.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 added public/favicon-96x96.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 added public/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "MyTonSwap",
"short_name": "MyTonSwap",
"icons": [
{
"src": "/web-app-manifest-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"theme_color": "#00220d",
"background_color": "#000000",
"display": "standalone"
}
Binary file added public/web-app-manifest-192x192.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 added public/web-app-manifest-512x512.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 added src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 94 additions & 0 deletions src/components/common/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import Logo from "@/assets/logo.png";
import { footer_links } from "@/constants/links";
import { socials } from "@/constants/socials";

const Footer = () => {
return (
<div className="max-w-screen-lg dark:text-white mx-auto pb-8">
<div className="grid grid-cols-1 mx-4 md:grid-cols-footer">
<div>
<div className="flex flex-col gap-y-4">
<span className="flex items-center font-bold">
<img
src={Logo}
alt="MyTonSwap Logo"
className="w-6"
/>{" "}
MyTonSwap
</span>
<p className="max-w-[230px]">
Swap Toncoin for any token instantly at the best
rate.
</p>
<a
className="mt-2"
href="https://ton.app/dex/mytonswap?id=2657"
>
<img
src="https://ton.app/a2/badge/topapp?appId=2657"
alt="MyTonSwap — #0 Dex in Ton App"
loading="lazy"
className="w-24"
/>
</a>
<div className="flex items-center gap-x-4 text-xl mt-8">
{socials.map(({ icon, link, name }) => (
<a
key={name}
href={link}
target="_blank"
rel="noopener noreferrer"
className="flex items-center transition-all dark:text-white/50 text-black/50 dark:hover:text-green-600 hover:text-green-500"
>
{icon}
</a>
))}
</div>
</div>
</div>
{footer_links.map(({ category_name, links }) => {
return (
<div>
<h1 className="font-semibold">{category_name}</h1>
<div className="flex flex-col opacity-50 gap-y-2 mt-2">
{links.map((item) => (
<a href={item.link} className="text-sm">
{item.name}
</a>
))}
</div>
</div>
);
})}
</div>
<hr className="my-8 opacity-30" />
<div>
<p className="text-justify text-sm opacity-70">
Disclaimer: Nothing on this site is investment advice. All
information is for informational purposes only. You should
not construe any such information or other material as
legal, tax, investment, financial, or other advice. Nothing
contained on our site constitutes a solicitation,
recommendation, endorsement, or offer by MyTonSwap or any
third party service provider to buy or sell any assets,
digital coins and tokens, securities or other financial
instruments in this or in any other jurisdiction in which
such solicitation or offer would be unlawful under the
securities laws of such jurisdiction.
</p>
</div>
<hr className="my-8 opacity-30" />
<div className="text-sm opacity-70 grid grid-cols-2">
<div>
<p>Based on TON</p>
</div>
<div className="text-right">
MyTonSwap © {new Date().getFullYear()}
</div>
<div></div>
</div>
</div>
);
};

export default Footer;
2 changes: 1 addition & 1 deletion src/components/common/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Navbar = () => {
return (
<div
dir={direction}
className="border-b-[1px] border-black/10 dark:border-white/10"
className="border-b-[1px] border-black/10 dark:border-white/10 bg-black py-2"
>
<nav className="max-w-screen-lg h-16 flex items-center justify-between mx-auto px-4">
<ul className=" dark:text-white flex items-center h-full">
Expand Down
53 changes: 53 additions & 0 deletions src/constants/links.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
export const footer_links = [
{
category_name: "MyTonSwap",
links: [
{
name: "Blog",
link: "https://mytonswap.com/blog",
},
{
name: "User Documentation",
link: "https://docs.mytonswap.com/",
},
{
name: "Trading Bot",
link: "https://t.me/MyTonSwap_Trading_bot",
},
],
},
{
category_name: "Developers",
links: [
{
name: "Documentation",
link: "https://mytonswap.com/docs",
},
{
name: "Github",
link: "https://github.com/mytonswap",
},
{
name: "Swap Widget",
link: "https://mytonswap.com/docs",
},
{
name: "Swap SDK",
link: "https://mytonswap.com/docs",
},
],
},
{
category_name: "Support",
links: [
{
name: "Contact Us",
link: "https://t.me/Mytonswap_SupportAcc",
},
{
name: "Community Chat",
link: "https://t.me/MyTonSwap_Chat",
},
],
},
];
23 changes: 23 additions & 0 deletions src/constants/socials.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { BsGithub, BsRobot, BsTelegram, BsTwitterX } from "react-icons/bs";
export const socials = [
{
name: "Telegram",
link: "https://t.me/mytonswap",
icon: <BsTelegram />,
},
{
name: "Twitter",
link: "https://x.com/mytonswap",
icon: <BsTwitterX />,
},
{
name: "Github",
link: "https://github.com/mytonswap",
icon: <BsGithub />,
},
{
name: "Trading Bot",
link: "https://github.com/mytonswap",
icon: <BsRobot />,
},
];
6 changes: 4 additions & 2 deletions src/pages/Swap.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useTonConnectUI } from "@tonconnect/ui-react";
import Navbar from "../components/common/Navbar";
import Navbar from "@/components/common/Navbar";
import { createSwap } from "@mytonswap/widget";
import { useEffect, useRef } from "react";
import { TON_CONNECT_APP_ID, TON_CONNECT_UI_PREFERENCES } from "../constants";
import { useQueryState } from "nuqs";
import Footer from "@/components/common/Footer";
const Swap = () => {
const [tc] = useTonConnectUI();
const initMount = useRef(false);
Expand Down Expand Up @@ -31,9 +32,10 @@ const Swap = () => {
data-testid="app-bg"
>
<Navbar />
<div className="items-center w-fit mx-auto mt-5">
<div className="items-center w-fit mx-auto mt-5 min-h-[calc(100dvh-81px)]">
<div id="swap-widget"></div>
</div>
<Footer />
</div>
);
};
Expand Down
14 changes: 7 additions & 7 deletions src/styles/index.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap");

@tailwind base;
@tailwind components;
Expand Down Expand Up @@ -28,29 +28,29 @@
}

.dark:root {
--border-color: #1d2939;
--border-color: #344054;
--primary-color: #16a34a;
--secondary-color: #283241;
--background-color: #101828;
--modal-background-color: #101828;
--modal-background-color: #1d2939;
--swap-container-background-color: #101828;
--swap-container-border-color: #1d293900;
--input-card-pay-color: #09090b;
--input-card-receive-color: #344054;
--input-card-color: #101828;
--input-token-color: #1d2939;
--input-token-color: #101828;
--change-direction-background-color: #101828;
--change-direction-icon-color: #16a34a;
--light-shade-color: #1d2939;
--slippage-box-color: #101828;
--slippage-box-color: #344054;
--text-black-color: #ffffff;
--text-white-color: #ffffff;
--text-fade-color: #6b7280;
--text-fade-color: #687085;
--skeleton-shine-color: #585959;
}

body {
font-family: "Inter", sans-serif;
font-family: "Plus Jakarta Sans", sans-serif;
}

@keyframes slideIn {
Expand Down
3 changes: 3 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export default {
900: "#030508",
},
},
gridTemplateColumns: {
footer: "350px 1fr 1fr 1fr",
},
},
},
plugins: [],
Expand Down
6 changes: 5 additions & 1 deletion tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
"noUncheckedSideEffectImports": true,
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"include": ["src", "cypress"]
}
14 changes: 10 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import path from "path";

// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
})
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});

0 comments on commit 3045d8c

Please sign in to comment.