Skip to content

Commit 788adab

Browse files
authored
added Ultroid on termux and sponsor card. (#4)
* Update index.js * Update styles.module.css * Add files via upload * Update docusaurus.config.js * Update index.js * Update index.js
1 parent 89f6188 commit 788adab

File tree

6 files changed

+311
-27
lines changed

6 files changed

+311
-27
lines changed

docusaurus.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ module.exports = {
7878
label: 'GitHub',
7979
href: 'https://github.com/TeamUltroid/Ultroid',
8080
},
81-
{
82-
label: "URL Shortener",
83-
href: "https://tiny.ultroid.tech"
84-
}
81+
// {
82+
// label: "URL Shortener",
83+
// href: "https://tiny.ultroid.tech"
84+
// }
8585
],
8686
},
8787
],

src/pages/index.js

Lines changed: 149 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { useState, useRef, useEffect } from 'react';
22
import clsx from 'clsx';
33
import Layout from '@theme/Layout';
44
import Link from '@docusaurus/Link';
@@ -12,7 +12,7 @@ const features = [
1212
imageUrl: 'img/undraw_pair_programming_njlp.svg',
1313
description: (
1414
<>
15-
Ultroid has been written from scratch, making it more stable and less of crashes
15+
Ultroid has been written from scratch, making it more stable and less prone to crashes.
1616
</>
1717
),
1818
},
@@ -22,7 +22,7 @@ const features = [
2222
description: (
2323
<>
2424
Ultroid warns you when you try to install/execute dangerous stuff
25-
(people nowadays make plugins to hack user accounts, Ultroid is safe)
25+
(people nowadays make plugins to hack user accounts, Ultroid is safe).
2626
</>
2727
),
2828
},
@@ -31,34 +31,168 @@ const features = [
3131
imageUrl: 'img/undraw_cloud_hosting_aodd.svg',
3232
description: (
3333
<>
34-
Unlike many others userbots* which are being suspended by heroku, Ultroid doesn't get suspended.
34+
Unlike many other userbots which are suspended by Heroku, Ultroid doesnt get suspended.
3535
</>
3636
),
3737
},
38+
{
39+
title: 'Ultroid on Termux',
40+
imageUrl: 'img/undraw_mobile-app_qxev.svg',
41+
description: (
42+
<>
43+
Run Ultroid on Termux with just a few clicks — everything is automated for you. Fast, simple, beginner-friendly, and designed to work seamlessly on mobile devices.
44+
</>
45+
),
46+
downloadLinks: [
47+
{
48+
label: 'arm64',
49+
size: '32.80 MB',
50+
href: 'https://github.com/TeamUltroid/Ultroid-Termux/releases/download/v0.118.0%2Bc579131-apt-android-7-github-debug/termux-app_v0.118.0+c579131-apt-android-7-github-debug_arm64-v8a.apk'
51+
},
52+
{
53+
label: 'armeabi',
54+
size: '31.00 MB',
55+
href: 'https://github.com/TeamUltroid/Ultroid-Termux/releases/download/v0.118.0%2Bc579131-apt-android-7-github-debug/termux-app_v0.118.0+c579131-apt-android-7-github-debug_armeabi-v7a.apk'
56+
},
57+
{
58+
label: 'universal',
59+
size: '108.0 MB',
60+
href: 'https://github.com/TeamUltroid/Ultroid-Termux/releases/download/v0.118.0%2Bc579131-apt-android-7-github-debug/termux-app_v0.118.0+c579131-apt-android-7-github-debug_universal.apk'
61+
}
62+
],
63+
64+
},
65+
{
66+
title: 'Support Ultroid',
67+
imageUrl: 'img/undraw_new-entries_xw4m.svg',
68+
69+
description: (
70+
<>
71+
If you liked our work and want to sponsor or fund the project, your support means the world to us! It helps us keep improving Ultroid for the community.
72+
</>
73+
),
74+
sponsor: true,
75+
sponsorLinks: [
76+
{
77+
label: 'Sponsor on GitHub',
78+
href: 'https://github.com/sponsors/TeamUltroid',
79+
type: 'primary',
80+
}
81+
],
82+
},
3883
];
3984

40-
function Feature({ imageUrl, title, description }) {
85+
function Feature({ imageUrl, title, description, downloadLinks, sponsor, sponsorLinks }) {
4186
const imgUrl = useBaseUrl(imageUrl);
87+
const [menuOpen, setMenuOpen] = useState(false);
88+
const dropdownRef = useRef(null);
89+
90+
useEffect(() => {
91+
function handleClickOutside(event) {
92+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
93+
setMenuOpen(false);
94+
}
95+
}
96+
function handleKeyDown(event) {
97+
if (event.key === 'Escape') {
98+
setMenuOpen(false);
99+
}
100+
}
101+
if (menuOpen) {
102+
document.addEventListener('mousedown', handleClickOutside);
103+
window.addEventListener('keydown', handleKeyDown);
104+
}
105+
return () => {
106+
document.removeEventListener('mousedown', handleClickOutside);
107+
window.removeEventListener('keydown', handleKeyDown);
108+
};
109+
}, [menuOpen]);
110+
42111
return (
43112
<div className={clsx('col col--4', styles.feature)}>
44113
{imgUrl && (
45114
<div className="text--center">
46115
<img className={styles.featureImage} src={imgUrl} alt={title} />
47116
</div>
48117
)}
118+
49119
<h3>{title}</h3>
50-
<p>{description}</p>
120+
<p className={styles.justifyText}>{description}</p>
121+
122+
{(downloadLinks || sponsorLinks) && (
123+
<div className={styles.buttonRow}>
124+
{downloadLinks && !sponsor && (
125+
<div className={styles.termuxDownloadWrapper} ref={dropdownRef}>
126+
<Link
127+
className={clsx('button button--primary button--lg', styles.downloadButton)}
128+
to="#"
129+
onClick={(e) => {
130+
e.preventDefault();
131+
setMenuOpen(!menuOpen);
132+
}}
133+
>
134+
Download{' '}
135+
<span
136+
className={clsx(styles.downloadArrow, {
137+
[styles.rotated]: menuOpen,
138+
})}
139+
>
140+
141+
</span>
142+
143+
</Link>
144+
<ul
145+
className={clsx(styles.termuxDropdownMenu, {
146+
[styles.open]: menuOpen,
147+
[styles.closed]: !menuOpen,
148+
})}
149+
style={{ pointerEvents: menuOpen ? 'auto' : 'none' }}
150+
>
151+
{downloadLinks.map(({ label, size, href }, i) => (
152+
<li key={i}>
153+
<Link
154+
className={styles.termuxDropdownItem}
155+
to={href}
156+
target="_blank"
157+
rel="noopener noreferrer"
158+
>
159+
<span className={styles.itemName}>{label}</span>
160+
<span className={styles.itemSize}>{size}</span>
161+
</Link>
162+
</li>
163+
))}
164+
</ul>
165+
</div>
166+
)}
167+
168+
{sponsor && sponsorLinks && (
169+
<div className={styles.termuxDownloadWrapper}>
170+
{sponsorLinks.map(({ label, href }, idx) => (
171+
<a
172+
key={idx}
173+
href={href}
174+
target="_blank"
175+
rel="noopener noreferrer"
176+
className={clsx('button button--primary button--lg', styles.downloadButton)}
177+
>
178+
{label}
179+
</a>
180+
))}
181+
</div>
182+
)}
183+
</div>
184+
)}
185+
186+
51187
</div>
52188
);
53189
}
54190

191+
55192
function Home() {
56-
const context = useDocusaurusContext();
57-
const { siteConfig = {} } = context;
193+
const { siteConfig = {} } = useDocusaurusContext();
58194
return (
59-
<Layout
60-
title={`Ultroid Userbot`}
61-
description="Ultroid Userbot Documentation">
195+
<Layout title="Ultroid Userbot" description="Ultroid Userbot Documentation">
62196
<header className={clsx('hero hero--primary', styles.heroBanner)}>
63197
<div className="container">
64198
<h1 className="hero__title">{siteConfig.title}</h1>
@@ -67,24 +201,17 @@ function Home() {
67201
<Link
68202
className={clsx(
69203
'margin-horiz--xs button button--outline button--secondary button--lg',
70-
styles.getStarted,
204+
styles.getStarted
71205
)}
72-
to={useBaseUrl('docs/')}>
206+
to={useBaseUrl('docs/')}
207+
>
73208
Get Started
74209
</Link>
75-
{/* <Link
76-
className={clsx(
77-
'margin-horiz--xs button button--bg button--success button--lg',
78-
styles.deploy,
79-
)}
80-
to={useBaseUrl('docs/installation/heroku')}>
81-
Deploy Now
82-
</Link> */}
83210
</div>
84211
</div>
85212
</header>
86213
<main>
87-
{features && features.length > 0 && (
214+
{features.length > 0 && (
88215
<section className={styles.features}>
89216
<div className="container">
90217
<div className="row">

0 commit comments

Comments
 (0)