AIdeaText commited on
Commit
1dc293c
verified
1 Parent(s): 2f3ae34

Update modules/ui/views/landing_view.py

Browse files
Files changed (1) hide show
  1. modules/ui/views/landing_view.py +41 -83
modules/ui/views/landing_view.py CHANGED
@@ -22,109 +22,67 @@ def get_asset_path(filename, asset_type='img_logo'):
22
  asset_path = current_dir / 'assets' / asset_type / filename
23
  return str(asset_path)
24
 
25
- def create_landing_view():
26
- """Crea la vista de landing con header y distribuci贸n 25-75"""
27
- # Para el logo
28
- logo_path = get_asset_path('Logo_300x300.png', 'img_logo')
29
-
30
- # Definir los estilos como una cadena separada para mejor manejo
31
  custom_css = """
32
- /* Reset y variables */
33
- * {
34
- margin: 0;
35
- padding: 0;
36
- box-sizing: border-box;
37
- }
38
-
39
  /* Variables de color corporativo */
40
  :root {
41
- --color-primary: rgb(174, 0, 37);
42
- --color-secondary: rgb(7, 60, 99);
43
  --color-background: #ffffff;
44
  --color-border: #e0e0e0;
45
  }
46
 
47
- /* Layout principal */
48
- #header-logo {
49
- text-align: center;
50
- padding: 2rem 0;
51
- margin-bottom: 2rem;
52
- background-color: var(--color-background);
53
- }
54
-
55
- #header-logo img {
56
- max-width: 200px;
57
- height: auto;
58
- display: block;
59
- margin: 0 auto;
60
- }
61
-
62
- .container {
63
- max-width: 1400px;
64
- margin: 0 auto;
65
- padding: 0 2rem;
66
- }
67
-
68
- /* Formularios */
69
- .gr-form {
70
- border: 1px solid var(--color-border);
71
- padding: 1.5rem;
72
- border-radius: 8px;
73
- background-color: var(--color-background);
74
- box-shadow: 0 2px 4px rgba(0,0,0,0.1);
75
- margin-bottom: 1rem;
76
- }
77
-
78
- /* Botones */
79
- .primary-btn {
80
  background-color: var(--color-primary) !important;
 
81
  color: white !important;
82
- border: none !important;
83
- padding: 0.5rem 1rem !important;
84
- border-radius: 4px !important;
85
- cursor: pointer !important;
86
- transition: opacity 0.3s ease !important;
87
- }
88
-
89
- .primary-btn:hover {
90
- opacity: 0.9 !important;
91
  }
92
 
93
- .secondary-btn {
 
94
  background-color: var(--color-secondary) !important;
 
95
  color: white !important;
96
- border: none !important;
97
- padding: 0.5rem 1rem !important;
98
- border-radius: 4px !important;
99
- cursor: pointer !important;
100
- transition: opacity 0.3s ease !important;
101
  }
102
-
103
- .secondary-btn:hover {
104
- opacity: 0.9 !important;
 
 
105
  }
106
-
107
- /* Tabs */
108
- .tabs {
109
- border-bottom: 2px solid var(--color-secondary) !important;
110
- margin-bottom: 1rem !important;
111
  }
112
-
113
- .tab-selected {
114
- color: var(--color-primary) !important;
115
- border-bottom: 2px solid var(--color-primary) !important;
116
- font-weight: bold !important;
 
117
  }
118
-
119
- /* Contenido multimedia */
120
- .media-box {
121
- padding: 1.5rem;
122
- background-color: var(--color-background);
123
- border-radius: 8px;
124
- box-shadow: 0 2px 4px rgba(0,0,0,0.1);
125
  }
126
  """
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  with gr.Blocks(css=custom_css) as view:
129
  # El resto del c贸digo permanece igual pero con algunas modificaciones en las clases
130
 
 
22
  asset_path = current_dir / 'assets' / asset_type / filename
23
  return str(asset_path)
24
 
 
 
 
 
 
 
25
  custom_css = """
 
 
 
 
 
 
 
26
  /* Variables de color corporativo */
27
  :root {
28
+ --color-primary: rgb(174, 0, 37); /* Rojo corporativo */
29
+ --color-secondary: rgb(7, 60, 99); /* Azul corporativo */
30
  --color-background: #ffffff;
31
  --color-border: #e0e0e0;
32
  }
33
 
34
+ /* Sobreescribir los estilos por defecto de Gradio */
35
+ .dark button.primary-btn,
36
+ button.primary-btn {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  background-color: var(--color-primary) !important;
38
+ border-color: var(--color-primary) !important;
39
  color: white !important;
 
 
 
 
 
 
 
 
 
40
  }
41
 
42
+ .dark button.secondary-btn,
43
+ button.secondary-btn {
44
  background-color: var(--color-secondary) !important;
45
+ border-color: var(--color-secondary) !important;
46
  color: white !important;
 
 
 
 
 
47
  }
48
+
49
+ /* Sobreescribir los estilos de los tabs */
50
+ .tabs.svelte-1g805jl .tabitem.svelte-1g805jl.selected {
51
+ color: var(--color-primary) !important;
52
+ border-color: var(--color-primary) !important;
53
  }
54
+
55
+ .tabs.svelte-1g805jl {
56
+ border-bottom-color: var(--color-secondary) !important;
 
 
57
  }
58
+
59
+ /* Asegurar que los botones mantengan los colores al hacer hover */
60
+ .dark button.primary-btn:hover,
61
+ button.primary-btn:hover {
62
+ background-color: rgb(144, 0, 27) !important; /* Versi贸n m谩s oscura del rojo */
63
+ border-color: rgb(144, 0, 27) !important;
64
  }
65
+
66
+ .dark button.secondary-btn:hover,
67
+ button.secondary-btn:hover {
68
+ background-color: rgb(5, 40, 79) !important; /* Versi贸n m谩s oscura del azul */
69
+ border-color: rgb(5, 40, 79) !important;
 
 
70
  }
71
  """
72
 
73
+ # En los botones, aseg煤rate de que las clases se apliquen correctamente
74
+ login_button = gr.Button(
75
+ "Ingresar",
76
+ elem_classes="primary-btn",
77
+ variant="primary"
78
+ )
79
+
80
+ register_button = gr.Button(
81
+ "Enviar Solicitud",
82
+ elem_classes="secondary-btn",
83
+ variant="secondary"
84
+ )
85
+
86
  with gr.Blocks(css=custom_css) as view:
87
  # El resto del c贸digo permanece igual pero con algunas modificaciones en las clases
88