|
| 1 | +import reflex as rx |
| 2 | + |
| 3 | +from pcweb.components.button import button |
| 4 | +from pcweb.components.docpage.navbar import navbar |
| 5 | +from pcweb.components.webpage.badge import badge |
| 6 | +from pcweb.pages.framework.index_colors import index_colors |
| 7 | +from pcweb.pages.framework.views.footer_index import footer_index |
| 8 | +from pcweb.pages.hosting.views.features import grid |
| 9 | + |
| 10 | +numbers = { |
| 11 | + "1": """ |
| 12 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none"> |
| 13 | + <path d="M10.5 8.5L12.5 7V17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /> |
| 14 | + <path d="M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /> |
| 15 | + </svg> |
| 16 | + """, |
| 17 | + "2": """ |
| 18 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none" class="text-purple-10"> |
| 19 | + <path d="M9 10C9 8.34315 10.3431 7 12 7C13.6569 7 15 8.34315 15 10C15 12.0786 12.1196 13.9172 10.3503 14.8505C9.54685 15.2743 9 16.0917 9 17H15" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> |
| 20 | + <path d="M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> |
| 21 | +</svg> |
| 22 | + |
| 23 | + """, |
| 24 | + "3": """ |
| 25 | + |
| 26 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none"> |
| 27 | + <path d="M12.5 12H11.5M12.5 12C13.8807 12 15 10.8807 15 9.5C15 8.11929 13.8807 7 12.5 7H11.5C10.1193 7 9 8.11929 9 9.5M12.5 12C13.8807 12 15 13.1193 15 14.5C15 15.8807 13.8807 17 12.5 17H11.5C10.1193 17 9 15.8807 9 14.5" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> |
| 28 | + <path d="M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> |
| 29 | +</svg> |
| 30 | + """, |
| 31 | + "4": """ |
| 32 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none"> |
| 33 | + <path d="M15 7V12.5M15 12.5V17M15 12.5H9.43601C9.19521 12.5 9 12.3048 9 12.064C9 12.0216 9.00619 11.9794 9.01839 11.9387L10.5 7" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> |
| 34 | + <path d="M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> |
| 35 | +</svg> |
| 36 | + |
| 37 | + """, |
| 38 | +} |
| 39 | + |
| 40 | + |
| 41 | +def affiliates_title(): |
| 42 | + return rx.box( |
| 43 | + rx.heading( |
| 44 | + "Reflex Affiliate Program", |
| 45 | + class_name="gradient-heading font-x-large lg:font-xxx-large text-start text-transparent lg:text-center", |
| 46 | + ), |
| 47 | + rx.text( |
| 48 | + "Become a Reflex partner in under 5 minutes and start earning 50% of your referrals’ subscription revenue for their first six months—join today!", |
| 49 | + class_name="font-md text-balance text-slate-9", |
| 50 | + ), |
| 51 | + class_name="section-header", |
| 52 | + ) |
| 53 | + |
| 54 | + |
| 55 | +def feature_card(icon: str, title: str, description: str) -> rx.Component: |
| 56 | + return rx.box( |
| 57 | + rx.box( |
| 58 | + rx.box( |
| 59 | + rx.icon(tag=icon, class_name="!text-slate-12 !size-5"), |
| 60 | + rx.text(title, class_name="text-slate-12 text-base font-medium"), |
| 61 | + class_name="flex flex-row gap-2 items-center", |
| 62 | + ), |
| 63 | + rx.text( |
| 64 | + description, class_name="text-slate-9 font-medium text-sm text-start" |
| 65 | + ), |
| 66 | + class_name="flex flex-col gap-2 w-[22rem] h-[9rem] px-1 lg:px-8 py-6", |
| 67 | + ), |
| 68 | + class_name="border-slate-3 border-b box-border", |
| 69 | + ) |
| 70 | + |
| 71 | + |
| 72 | +def step_box(step_number: str) -> rx.Component: |
| 73 | + """Helper function to create a step number box with consistent styling.""" |
| 74 | + return rx.box( |
| 75 | + rx.box( |
| 76 | + # rx.text( |
| 77 | + # f"Step {step_number}", |
| 78 | + # class_name="text-md text-center text-slate-10", |
| 79 | + # ), |
| 80 | + # rx.html( |
| 81 | + # numbers[step_number], |
| 82 | + # filter=rx.color_mode_cond("", "invert(0.85)"), |
| 83 | + # ), |
| 84 | + color=rx.color("accent", 5), |
| 85 | + class_name="w-full h-[5rem] flex items-center justify-center p-3 col-start-2 row-span-full row-start-1 bg-[size:10px_10px] bg-fixed bg-[image:repeating-linear-gradient(315deg,currentColor_0,currentColor_1px,_transparent_0,_transparent_50%)]", |
| 86 | + ), |
| 87 | + display=["none" if i <= 3 else "flex" for i in range(6)], |
| 88 | + color=rx.color("accent", 4), |
| 89 | + class_name="w-full h-[5rem] flex items-center justify-center py-3 col-start-2 row-span-full row-start-1 bg-[size:10px_10px] bg-fixed bg-[image:repeating-linear-gradient(-315deg,currentColor_0,currentColor_1px,_transparent_0,_transparent_50%)]", |
| 90 | + ) |
| 91 | + |
| 92 | + |
| 93 | +def spacer() -> rx.Component: |
| 94 | + """Helper function to create a consistent height spacer.""" |
| 95 | + return rx.box(class_name="h-[4rem]") |
| 96 | + |
| 97 | + |
| 98 | +def features() -> rx.Component: |
| 99 | + return rx.el.section( |
| 100 | + grid(), |
| 101 | + rx.box( |
| 102 | + rx.box( |
| 103 | + feature_card( |
| 104 | + "frame", |
| 105 | + "Submit Your Application", |
| 106 | + "Provide your basic info to get a unique affiliate link.", |
| 107 | + ), |
| 108 | + feature_card( |
| 109 | + "audio-lines", |
| 110 | + "Track Your Referrals", |
| 111 | + "Log in to your Affiliate Dashboard to see clicks, sign‑ups, and revenue data.", |
| 112 | + ), |
| 113 | + spacer(), |
| 114 | + class_name="flex flex-col pt-8 lg:border-r border-slate-3", |
| 115 | + ), |
| 116 | + rx.box( |
| 117 | + # Right column with steps 1 and 3 |
| 118 | + spacer(), |
| 119 | + feature_card( |
| 120 | + "share-2", |
| 121 | + "Share Reflex", |
| 122 | + "Post your link anywhere—blog posts, social media, email newsletters, even your YouTube channel.", |
| 123 | + ), |
| 124 | + feature_card( |
| 125 | + "dollar-sign", |
| 126 | + "Get Paid", |
| 127 | + "We'll send you 50% of each referred user's subscription revenue for their first six months.", |
| 128 | + ), |
| 129 | + class_name="flex flex-col", |
| 130 | + ), |
| 131 | + class_name="flex lg:flex-row flex-col justify-center items-center", |
| 132 | + ), |
| 133 | + rx.link( |
| 134 | + button("Become a Partner", variant="primary", size="xl"), |
| 135 | + href="https://cal.com/forms/09dc3703-39fc-42ec-b03b-8ee32de7590f", |
| 136 | + is_external=True, |
| 137 | + class_name="p-3 border border-slate-3 rounded-[1.375rem] border-solid lg:mt-0 mt-4", |
| 138 | + ), |
| 139 | + class_name="flex flex-col justify-center items-center max-w-[64.19rem] lg:border-x border-slate-3 w-full mx-auto lg:pb-[5.5rem] pb-4 relative overflow-hidden pt-10", |
| 140 | + ) |
| 141 | + |
| 142 | + |
| 143 | +def features_small_screen(): |
| 144 | + return rx.box( |
| 145 | + rx.box( |
| 146 | + rx.box( |
| 147 | + feature_card( |
| 148 | + "frame", |
| 149 | + "Submit Your Application", |
| 150 | + "Provide your basic info to get a unique affiliate link.", |
| 151 | + ), |
| 152 | + class_name="flex flex-col", |
| 153 | + ), |
| 154 | + rx.box( |
| 155 | + feature_card( |
| 156 | + "share-2", |
| 157 | + "Share Reflex", |
| 158 | + "Post your link anywhere—blog posts, social media, email newsletters, even your YouTube channel.", |
| 159 | + ), |
| 160 | + class_name="flex flex-col", |
| 161 | + ), |
| 162 | + rx.box( |
| 163 | + feature_card( |
| 164 | + "audio-lines", |
| 165 | + "Track Your Referrals", |
| 166 | + "Log in to your Affiliate Dashboard to see clicks, sign‑ups, and revenue data.", |
| 167 | + ), |
| 168 | + class_name="flex flex-col", |
| 169 | + ), |
| 170 | + rx.box( |
| 171 | + feature_card( |
| 172 | + "dollar-sign", |
| 173 | + "Get Paid", |
| 174 | + "We'll send you 50% of each referred user's subscription revenue for their first six months.", |
| 175 | + ), |
| 176 | + class_name="flex flex-col", |
| 177 | + ), |
| 178 | + class_name="grid grid-cols-1 md:grid-cols-2 gap-4", |
| 179 | + ), |
| 180 | + rx.box( |
| 181 | + rx.link( |
| 182 | + button("Become a Partner", variant="primary", size="xl"), |
| 183 | + href="https://cal.com/forms/09dc3703-39fc-42ec-b03b-8ee32de7590f", |
| 184 | + is_external=True, |
| 185 | + class_name="p-3 border border-slate-3 rounded-[1.375rem] border-solid lg:mt-0 mt-4", |
| 186 | + ), |
| 187 | + class_name="flex items-center justify-center", |
| 188 | + ), |
| 189 | + class_name="flex flex-col justify-center", |
| 190 | + ) |
| 191 | + |
| 192 | + |
| 193 | +@rx.page(route="/affiliates", title="Affiliates · Reflex") |
| 194 | +def affiliates() -> rx.Component: |
| 195 | + return rx.box( |
| 196 | + index_colors(), |
| 197 | + navbar(), |
| 198 | + rx.el.section( |
| 199 | + affiliates_title(), |
| 200 | + rx.box( |
| 201 | + features(), |
| 202 | + class_name="hidden lg:block", # Hide by default, show on lg screens and up |
| 203 | + ), |
| 204 | + rx.box( |
| 205 | + features_small_screen(), |
| 206 | + class_name="block lg:hidden", # Show by default, hide on lg screens and up |
| 207 | + ), |
| 208 | + id="affiliates", |
| 209 | + class_name="section-content", |
| 210 | + ), |
| 211 | + footer_index(), |
| 212 | + badge(), |
| 213 | + class_name="flex flex-col w-full max-w-[94.5rem] justify-center items-center mx-auto px-4 lg:px-5 relative overflow-hidden", |
| 214 | + ) |
0 commit comments