@@ -6,42 +6,46 @@ from pcweb.pages import docs
66from pcweb.styles.styles import get_code_style, cell_style
77
88
9- regions = {
9+ REGIONS_DICT = {
1010 " ams" : " Amsterdam, Netherlands" ,
1111 " arn" : " Stockholm, Sweden" ,
12- " atl" : " Atlanta, Georgia (US)" ,
13- " bog" : " Bogotá, Colombia" ,
1412 " bom" : " Mumbai, India" ,
15- " bos" : " Boston, Massachusetts (US)" ,
1613 " cdg" : " Paris, France" ,
17- " den" : " Denver, Colorado (US)" ,
1814 " dfw" : " Dallas, Texas (US)" ,
1915 " ewr" : " Secaucus, NJ (US)" ,
20- " eze" : " Ezeiza, Argentina" ,
2116 " fra" : " Frankfurt, Germany" ,
22- " gdl" : " Guadalajara, Mexico" ,
23- " gig" : " Rio de Janeiro, Brazil" ,
2417 " gru" : " Sao Paulo, Brazil" ,
25- " hkg" : " Hong Kong, Hong Kong" ,
2618 " iad" : " Ashburn, Virginia (US)" ,
2719 " jnb" : " Johannesburg, South Africa" ,
2820 " lax" : " Los Angeles, California (US)" ,
2921 " lhr" : " London, United Kingdom" ,
30- " mad" : " Madrid, Spain" ,
31- " mia" : " Miami, Florida (US)" ,
3222 " nrt" : " Tokyo, Japan" ,
3323 " ord" : " Chicago, Illinois (US)" ,
34- " otp" : " Bucharest, Romania" ,
35- " phx" : " Phoenix, Arizona (US)" ,
36- " qro" : " Querétaro, Mexico" ,
37- " scl" : " Santiago, Chile" ,
38- " sea" : " Seattle, Washington (US)" ,
39- " sin" : " Singapore, Singapore" ,
4024 " sjc" : " San Jose, California (US)" ,
25+ " sin" : " Singapore, Singapore" ,
4126 " syd" : " Sydney, Australia" ,
42- " waw" : " Warsaw, Poland" ,
43- " yul" : " Montreal, Canada" ,
44- " yyz" : " Toronto, Canada"
27+ " yyz" : " Toronto, Canada" ,
28+ }
29+
30+ COUNTRIES_CODES = {
31+ " ams" : " NL" ,
32+ " arn" : " SE" ,
33+ " bom" : " IN" ,
34+ " cdg" : " FR" ,
35+ " dfw" : " US" ,
36+ " ewr" : " US" ,
37+ " fra" : " DE" ,
38+ " gru" : " BR" ,
39+ " iad" : " US" ,
40+ " jnb" : " ZA" ,
41+ " lax" : " US" ,
42+ " lhr" : " GB" ,
43+ " nrt" : " JP" ,
44+ " ord" : " US" ,
45+ " sjc" : " US" ,
46+ " sin" : " SG" ,
47+ " syd" : " AU" ,
48+ " yyz" : " CA" ,
4549}
4650
4751
@@ -57,12 +61,55 @@ To scale your app to multiple regions in the Cloud UI, click on the `Settings` t
5761image_zoom(rx.image(src = " /scaling_regions.webp" , padding_bottom = " 20px" ))
5862```
5963
60- The images below show all the regions that can be deployed in.
64+ The table below show all the regions that can be deployed in.
6165
6266``` python eval
63- rx.hstack(
64- image_zoom(rx.image(src = " /regions_1.webp" , padding_bottom = " 20px" )),
65- image_zoom(rx.image(src = " /regions_2.webp" , padding_bottom = " 20px" )),
67+ rx.el.table(
68+ rx.el.thead(
69+ rx.el.tr(
70+ rx.el.th(
71+ rx.el.div(
72+ " Region" ,
73+ ),
74+ class_name = " px-6 py-3 text-left text-sm font-semibold text-secondary-12 text-nowrap" ,
75+ ),
76+ rx.el.th(
77+ rx.el.div(
78+ " Country" ,
79+ ),
80+ class_name = " px-6 py-3 text-left text-sm font-semibold text-secondary-12 text-nowrap" ,
81+ ),
82+ ),
83+ class_name = " bg-slate-2" ,
84+ ),
85+ rx.el.tbody(
86+ * [
87+ rx.el.tr(
88+ rx.el.td(
89+ rx.el.div(
90+ region,
91+ class_name = " h-5 rounded-md border justify-start items-center inline-flex bg-slate-1 text-xs font-medium shrink-0 px-1.5 w-fit text-slate-12 border-slate-6"
92+ ),
93+ class_name = " px-6 py-3" ,
94+ ),
95+ rx.el.td(
96+ rx.el.div(
97+ rx.image(
98+ src = f " https://cloud.reflex.dev/flags/ { COUNTRIES_CODES [region]} .svg " ,
99+ class_name = " rounded-[2px] mr-2 w-5 h-4" ,
100+ ),
101+ REGIONS_DICT [region],
102+ class_name = " flex flex-row items-center gap-2" ,
103+ ),
104+ class_name = " px-6 py-3 text-sm font-medium text-slate-9"
105+ ),
106+ class_name = " even:bg-slate-2 odd:bg-slate-1 hover:bg-secondary-3" ,
107+ )
108+ for region in REGIONS_DICT .keys()
109+ ],
110+ class_name = " divide-y divide-slate-4" ,
111+ ),
112+ class_name = " w-full table-fixed rounded-xl overflow-hidden divide-y divide-slate-4" ,
66113)
67114```
68115
0 commit comments