import React, { useState } from 'react'; import { View, Text, StyleSheet, I18nManager, Button } from 'react-native'; import './i18n'; import { useTranslation } from 'react-i18next'; import SpinWheel from './components/SpinWheel'; import FakeForm from './components/FakeForm'; import Lesson from './components/Lesson'; export default function App() { const [spun, setSpun] = useState(false); const { t, i18n } = useTranslation(); return ( <View style={styles.container}> <Text style={styles.title}>🎯 {t('appTitle')}</Text> <Text style={styles.subtitle}>{t('appSubtitle')}</Text> <SpinWheel onFinish={() => setSpun(true)} /> {spun && ( <> <FakeForm /> <Lesson /> </> )} <View style={styles.langButtons}> <Button title="🇺🇸 English" onPress={() => i18n.changeLanguage('en')} /> <Button title="🇪🇸 Español" onPress={() => i18n.changeLanguage('es')} /> </View> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, padding: 20, justifyContent: 'center', backgroundColor: '#f8f8ff' }, title: { fontSize: 28, fontWeight: 'bold', textAlign: 'center', marginBottom: 10 }, subtitle: { fontSize: 18, textAlign: 'center', marginBottom: 20 }, langButtons: { flexDirection: 'row', justifyContent: 'space-around', marginTop: 30 } }); - Initial Deployment
Browse files- README.md +7 -5
- index.html +171 -19
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: spin
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: pink
|
5 |
+
colorTo: blue
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,171 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Spin Wheel App</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
.wheel-container {
|
11 |
+
position: relative;
|
12 |
+
width: 300px;
|
13 |
+
height: 300px;
|
14 |
+
margin: 0 auto;
|
15 |
+
}
|
16 |
+
|
17 |
+
.wheel {
|
18 |
+
width: 100%;
|
19 |
+
height: 100%;
|
20 |
+
border-radius: 50%;
|
21 |
+
position: relative;
|
22 |
+
overflow: hidden;
|
23 |
+
transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
|
24 |
+
transform: rotate(0deg);
|
25 |
+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
|
26 |
+
border: 8px solid #fff;
|
27 |
+
}
|
28 |
+
|
29 |
+
.wheel-section {
|
30 |
+
position: absolute;
|
31 |
+
width: 50%;
|
32 |
+
height: 50%;
|
33 |
+
transform-origin: bottom right;
|
34 |
+
display: flex;
|
35 |
+
align-items: center;
|
36 |
+
justify-content: center;
|
37 |
+
font-weight: bold;
|
38 |
+
color: white;
|
39 |
+
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
|
40 |
+
}
|
41 |
+
|
42 |
+
.wheel-pointer {
|
43 |
+
position: absolute;
|
44 |
+
top: -20px;
|
45 |
+
left: 50%;
|
46 |
+
transform: translateX(-50%);
|
47 |
+
width: 0;
|
48 |
+
height: 0;
|
49 |
+
border-left: 20px solid transparent;
|
50 |
+
border-right: 20px solid transparent;
|
51 |
+
border-top: 40px solid #ef4444;
|
52 |
+
z-index: 10;
|
53 |
+
}
|
54 |
+
|
55 |
+
.spin-btn {
|
56 |
+
position: absolute;
|
57 |
+
top: 50%;
|
58 |
+
left: 50%;
|
59 |
+
transform: translate(-50%, -50%);
|
60 |
+
width: 60px;
|
61 |
+
height: 60px;
|
62 |
+
border-radius: 50%;
|
63 |
+
background: white;
|
64 |
+
display: flex;
|
65 |
+
align-items: center;
|
66 |
+
justify-content: center;
|
67 |
+
font-weight: bold;
|
68 |
+
cursor: pointer;
|
69 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
70 |
+
z-index: 20;
|
71 |
+
border: none;
|
72 |
+
outline: none;
|
73 |
+
}
|
74 |
+
|
75 |
+
.form-input {
|
76 |
+
transition: all 0.3s;
|
77 |
+
}
|
78 |
+
|
79 |
+
.form-input:focus {
|
80 |
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
|
81 |
+
}
|
82 |
+
|
83 |
+
@keyframes fadeIn {
|
84 |
+
from { opacity: 0; transform: translateY(20px); }
|
85 |
+
to { opacity: 1; transform: translateY(0); }
|
86 |
+
}
|
87 |
+
|
88 |
+
.fade-in {
|
89 |
+
animation: fadeIn 0.5s ease-out forwards;
|
90 |
+
}
|
91 |
+
|
92 |
+
@media (max-width: 640px) {
|
93 |
+
.wheel-container {
|
94 |
+
width: 250px;
|
95 |
+
height: 250px;
|
96 |
+
}
|
97 |
+
|
98 |
+
.wheel-section {
|
99 |
+
font-size: 0.8rem;
|
100 |
+
}
|
101 |
+
}
|
102 |
+
</style>
|
103 |
+
</head>
|
104 |
+
<body class="bg-gray-50 min-h-screen flex items-center justify-center p-4">
|
105 |
+
<div class="max-w-md w-full bg-white rounded-xl shadow-lg p-6">
|
106 |
+
<h1 class="text-3xl font-bold text-center mb-2">🎯 Spin to Win</h1>
|
107 |
+
<p class="text-lg text-gray-600 text-center mb-6">Spin the wheel to get your prize!</p>
|
108 |
+
|
109 |
+
<div class="wheel-container mb-8">
|
110 |
+
<div class="wheel-pointer"></div>
|
111 |
+
<div class="wheel" id="wheel">
|
112 |
+
<!-- Wheel sections will be added by JavaScript -->
|
113 |
+
</div>
|
114 |
+
<button class="spin-btn" id="spinBtn">
|
115 |
+
<i class="fas fa-sync-alt text-xl text-blue-500"></i>
|
116 |
+
</button>
|
117 |
+
</div>
|
118 |
+
|
119 |
+
<div id="contentArea" class="hidden">
|
120 |
+
<div class="fade-in mb-6">
|
121 |
+
<h2 class="text-xl font-semibold mb-4">Claim Your Prize</h2>
|
122 |
+
<form class="space-y-4">
|
123 |
+
<div>
|
124 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Name</label>
|
125 |
+
<input type="text" class="form-input w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
126 |
+
</div>
|
127 |
+
<div>
|
128 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Email</label>
|
129 |
+
<input type="email" class="form-input w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
130 |
+
</div>
|
131 |
+
<button type="submit" class="w-full bg-blue-500 text-white py-2 px-4 rounded-lg hover:bg-blue-600 transition duration-200">Submit</button>
|
132 |
+
</form>
|
133 |
+
</div>
|
134 |
+
|
135 |
+
<div class="fade-in bg-blue-50 p-4 rounded-lg">
|
136 |
+
<h3 class="text-lg font-medium text-blue-800 mb-2">Today's Lesson</h3>
|
137 |
+
<p class="text-blue-700">Congratulations! You've won a special discount. Remember that persistence is key to success. Keep spinning and keep winning!</p>
|
138 |
+
</div>
|
139 |
+
</div>
|
140 |
+
|
141 |
+
<div class="flex justify-around mt-8">
|
142 |
+
<button id="langEn" class="px-4 py-2 bg-gray-200 rounded-lg hover:bg-gray-300 transition duration-200 flex items-center">
|
143 |
+
<span class="mr-2">🇺🇸</span> English
|
144 |
+
</button>
|
145 |
+
<button id="langEs" class="px-4 py-2 bg-gray-200 rounded-lg hover:bg-gray-300 transition duration-200 flex items-center">
|
146 |
+
<span class="mr-2">🇪🇸</span> Español
|
147 |
+
</button>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
|
151 |
+
<script>
|
152 |
+
document.addEventListener('DOMContentLoaded', function() {
|
153 |
+
// Wheel configuration
|
154 |
+
const wheel = document.getElementById('wheel');
|
155 |
+
const spinBtn = document.getElementById('spinBtn');
|
156 |
+
const contentArea = document.getElementById('contentArea');
|
157 |
+
const langEn = document.getElementById('langEn');
|
158 |
+
const langEs = document.getElementById('langEs');
|
159 |
+
|
160 |
+
// Wheel sections data
|
161 |
+
const sections = [
|
162 |
+
{ color: '#ef4444', text: '10% Off' },
|
163 |
+
{ color: '#f59e0b', text: 'Free Item' },
|
164 |
+
{ color: '#10b981', text: '20% Off' },
|
165 |
+
{ color: '#3b82f6', text: 'Try Again' },
|
166 |
+
{ color: '#6366f1', text: '15% Off' },
|
167 |
+
{ color: '#8b5cf6', text: 'Free Shipping' },
|
168 |
+
{ color: '#ec4899', text: '5% Off' },
|
169 |
+
{ color: '#f43f5e', text: '
|
170 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=99Odeshi/spin" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
171 |
+
</html>
|