Marvin J. Quispe Sedano commited on
Commit
8c37953
·
1 Parent(s): 9f0a5fa
Files changed (4) hide show
  1. pages/00_app.py +3 -37
  2. pages/01_home.py +0 -11
  3. pages/02_leafmap.py +0 -11
  4. pages/03_geemap.py +0 -11
pages/00_app.py CHANGED
@@ -1,40 +1,6 @@
1
  import solara
2
 
3
  @solara.component
4
- def Page():
5
- with solara.Column():
6
- solara.Title("Home Geo")
7
-
8
- with solara.Sidebar():
9
- with solara.Card("I am in the sidebar"):
10
- solara.Markdown("This is the sidebar at the home page!")
11
-
12
- solara.Info("I'm in the main content area, put your main content here")
13
-
14
- with solara.Card("Agro Lima - Geodashboard"):
15
- markdown = """
16
- ### Introduction
17
-
18
- The project seeks to create an AI system to promote the consumption of nutritious vegetables in Lima,
19
- improving public health and supporting local farmers. It uses data analytics and an interactive chatbot
20
- to optimize production and distribution.
21
-
22
- - GitHub: <https://github.com/marvinjqs>
23
-
24
-
25
- ![](https://geosat.space/wp-content/uploads/2024/02/Washington-Crops-latest-satellite-imagery.gif)
26
-
27
- """
28
-
29
- solara.Markdown(markdown)
30
-
31
- # Configurar el layout para la página con barra lateral
32
- @solara.component
33
- def Layout(children):
34
- with solara.Row(): # Organizar como fila
35
- with solara.Column(width=200): # Barra lateral con pestañas en columna
36
- solara.Button("Markdown Editor", on_click=lambda: solara.routing.push("/02-markdown-editor"))
37
- with solara.Column(): # Contenido principal
38
- children() # Mostrar el contenido de la página actual
39
-
40
- solara.run(Page, layout=Layout)
 
1
  import solara
2
 
3
  @solara.component
4
+ def Layout(children=[]):
5
+ # there will only be 1 child, which is the Page()
6
+ return children[0]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pages/01_home.py CHANGED
@@ -27,14 +27,3 @@ def Page():
27
  """
28
 
29
  solara.Markdown(markdown)
30
-
31
- # Configurar el layout para la página con barra lateral
32
- @solara.component
33
- def Layout(children):
34
- with solara.Row(): # Organizar como fila
35
- with solara.Column(width=200): # Barra lateral con pestañas en columna
36
- solara.Button("Markdown Editor", on_click=lambda: solara.routing.push("/02-markdown-editor"))
37
- with solara.Column(): # Contenido principal
38
- children() # Mostrar el contenido de la página actual
39
-
40
- solara.run(Page, layout=Layout)
 
27
  """
28
 
29
  solara.Markdown(markdown)
 
 
 
 
 
 
 
 
 
 
 
pages/02_leafmap.py CHANGED
@@ -37,14 +37,3 @@ def Page():
37
  )
38
  solara.Text(f"Zoom: {zoom.value}")
39
  solara.Text(f"Center: {center.value}")
40
-
41
- # Configurar el layout para la página con barra lateral
42
- @solara.component
43
- def Layout(children):
44
- with solara.Row(): # Organizar como fila
45
- with solara.Column(width=200): # Barra lateral con pestañas en columna
46
- solara.Button("Markdown Editor", on_click=lambda: solara.routing.push("/02-markdown-editor"))
47
- with solara.Column(): # Contenido principal
48
- children() # Mostrar el contenido de la página actual
49
-
50
- solara.run(Page, layout=Layout)
 
37
  )
38
  solara.Text(f"Zoom: {zoom.value}")
39
  solara.Text(f"Center: {center.value}")
 
 
 
 
 
 
 
 
 
 
 
pages/03_geemap.py CHANGED
@@ -65,14 +65,3 @@ def Page():
65
  solara.Text(f"Zoom: {zoom.value}")
66
  solara.Text(f"Center: {center.value}")
67
 
68
-
69
- # Configurar el layout para la página con barra lateral
70
- @solara.component
71
- def Layout(children):
72
- with solara.Row(): # Organizar como fila
73
- with solara.Column(width=200): # Barra lateral con pestañas en columna
74
- solara.Button("Markdown Editor", on_click=lambda: solara.routing.push("/02-markdown-editor"))
75
- with solara.Column(): # Contenido principal
76
- children() # Mostrar el contenido de la página actual
77
-
78
- solara.run(Page, layout=Layout)
 
65
  solara.Text(f"Zoom: {zoom.value}")
66
  solara.Text(f"Center: {center.value}")
67