summaryrefslogtreecommitdiffstats
path: root/src/app/(auth)/welcome.tsx
blob: 1d166883824f4435c962403177ff2f7e45d50b56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
import { Link } from 'expo-router';
import { Pressable, StyleSheet, Text, View } from 'react-native';
import theme from '@/theme';
import { Feather, MaterialIcons } from '@expo/vector-icons';

const { colors, spacing, radius, typography, fontWeight, layout, shadows } = theme;

export default function WelcomeScreen() {
  return (
    <View style={styles.container}>
      {/* bloque central de bienvenida */}
      <View style={styles.content}>
        {/* icono superior */}
        <View style={styles.iconBox}>
          <MaterialIcons name="business" size={28} color={colors.white} />
        </View>

        {/* titulo principal */}
        <Text style={styles.title}>App Oficina</Text>

        {/* subtitulo descriptivo */}
        <Text style={styles.subtitle}>
          Reserva oficinas, despachos y puestos de trabajo de forma rápida y sencilla
        </Text>

        {/* tarjeta de ventajas */}
        <View style={styles.featuresCard}>
          {/* ventaja 1 */}
          <View style={styles.featureItem}>
            <View style={styles.featureIconWrap}>
              <MaterialIcons name="business" size={16} color={colors.primary} />
            </View>

            <View style={styles.featureTextBlock}>
              <Text style={styles.featureTitle}>Espacios flexibles</Text>
              <Text style={styles.featureDescription}>
                Oficinas privadas, despachos y puestos individuales
              </Text>
            </View>
          </View>

          {/* ventaja 2 */}
          <View style={styles.featureItem}>
            <View style={styles.featureIconWrap}>
              <Feather name="calendar" size={16} color={colors.primary} />
            </View>

            <View style={styles.featureTextBlock}>
              <Text style={styles.featureTitle}>Reserva en tiempo real</Text>
              <Text style={styles.featureDescription}>
                Comprueba disponibilidad y reserva al instante
              </Text>
            </View>
          </View>

          {/* ventaja 3 */}
          <View style={styles.featureItem}>
            <View style={styles.featureIconWrap}>
              <MaterialIcons name="access-time" size={16} color={colors.primary} />
            </View>

            <View style={styles.featureTextBlock}>
              <Text style={styles.featureTitle}>Gestión sencilla</Text>
              <Text style={styles.featureDescription}>
                Administra todas tus reservas desde un solo lugar
              </Text>
            </View>
          </View>
        </View>

        {/* boton principal */}
        <Link href="/(auth)/login" asChild>
          <Pressable style={styles.button}>
            <Text style={styles.buttonText}>Iniciar sesión</Text>
          </Pressable>
        </Link>

        {/* boton secundario */}
        <Link href="/(auth)/register" asChild>
          <Pressable style={styles.buttonSecondary}>
            <Text style={styles.buttonSecondaryText}>Registrarse</Text>
          </Pressable>
        </Link>

        {/* texto inferior */}
        <Text style={styles.footerText}>
          Diseñado para profesionales y equipos modernos
        </Text>
      </View>
    </View>
  );
}

const styles = StyleSheet.create({
  // el ancho queda acotado igual que en home y profile
  container: {
    flex: 1,
    backgroundColor: colors.background,
  },

  // contenido central de bienvenida controlando el ancho maximo, el centrado y el espaciado
  content: {
    flex: 1,
    justifyContent: 'center',
    paddingHorizontal: spacing.xl,
    paddingTop: spacing.xl,
    paddingBottom: spacing.xl,
    gap: spacing.lg,
    maxWidth: layout.contentWidth,
    width: '100%',
    alignSelf: 'center',
  },

  // caja azul del icono superior
  iconBox: {
    width: 56,
    height: 56,
    borderRadius: radius.lg,
    backgroundColor: colors.primary,
    alignItems: 'center',
    justifyContent: 'center',
    alignSelf: 'center',
    ...shadows.card,
  },

  // titulo principal
  title: {
    fontSize: 36,
    fontWeight: fontWeight.semibold,
    color: colors.text,
    textAlign: 'center',
  },

  // subtitulo
  subtitle: {
    fontSize: typography.md,
    color: colors.textSecondary,
    textAlign: 'center',
    lineHeight: 22,
    maxWidth: 300,
  },

  // tarjeta de ventajas
  featuresCard: {
    width: '100%',
    backgroundColor: colors.surface,
    borderRadius: radius.xxl,
    borderWidth: 1,
    borderColor: colors.border,
    padding: spacing.lg,
    gap: spacing.lg,
    ...shadows.card,
  },

  // fila de cada ventaja
  featureItem: {
    flexDirection: 'row',
    alignItems: 'flex-start',
    gap: spacing.md,
  },

  // fondo del icono de cada ventaja
  featureIconWrap: {
    width: 32,
    height: 32,
    borderRadius: radius.md,
    backgroundColor: colors.primarySoft,
    alignItems: 'center',
    justifyContent: 'center',
  },

  // bloque de textos de cada ventaja
  featureTextBlock: {
    flex: 1,
    gap: 2,
  },

  // titulo de la ventaja
  featureTitle: {
    fontSize: typography.md,
    fontWeight: fontWeight.semibold,
    color: colors.text,
  },

  // descripcion de la ventaja
  featureDescription: {
    fontSize: typography.sm,
    color: colors.textSecondary,
    lineHeight: 18,
  },

  // boton principal
  button: {
    width: '100%',
    backgroundColor: colors.primary,
    paddingVertical: spacing.lg,
    borderRadius: radius.md,
    alignItems: 'center',
    justifyContent: 'center',
  },

  // texto del boton principal
  buttonText: {
    color: colors.white,
    fontWeight: fontWeight.semibold,
    fontSize: typography.md,
  },

  // boton secundario con borde
  buttonSecondary: {
    width: '100%',
    backgroundColor: colors.surface,
    paddingVertical: spacing.lg,
    borderRadius: radius.md,
    alignItems: 'center',
    justifyContent: 'center',
    borderWidth: 1,
    borderColor: colors.border,
  },

  // texto del boton secundario
  buttonSecondaryText: {
    color: colors.text,
    fontWeight: fontWeight.medium,
    fontSize: typography.md,
  },

  // texto inferior discreto
  footerText: {
    marginTop: spacing.sm,
    fontSize: typography.sm,
    color: colors.textSecondary,
    textAlign: 'center',
  },
});