-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2025-5p_transformation\app.py
300 lines (248 loc) · 8.88 KB
/
2025-5p_transformation\app.py
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
import customtkinter as ctk
from PIL import Image, ImageTk
class DetoxApp(ctk.CTk):
def __init__(self):
super().__init__()
# Configure window
self.title("5P Transformation - Your Journey to Thriving in 2025")
self.geometry("1400x900")
# Set theme colors
self.colors = {
"primary": "#004d40", # Dark emerald
"secondary": "#ffd700", # Yellow
"text_light": "#ffffff",
"text_dark": "#333333",
"background": "#001f1a", # Darker emerald
"accent": "#00796b" # Medium emerald
}
# Set theme
ctk.set_appearance_mode("dark")
ctk.set_default_color_theme("dark-blue")
# Initialize pages dictionary
self.pages = {}
self.current_page = None
# Create UI
self.setup_ui()
def setup_ui(self):
# Configure grid
self.grid_columnconfigure(1, weight=1)
self.grid_rowconfigure(0, weight=1)
# Create sidebar
self.create_sidebar()
# Create main content
self.create_main_content()
# Create pages
self.create_pages()
# Show welcome page by default
self.show_page("🏠 Welcome")
def create_pages(self):
"""Create all application pages"""
self.pages = {
"🏠 Welcome": self.create_welcome_page,
"👥 People Detox": self.create_people_page,
"🏠 Places Detox": self.create_places_page,
"👤 Personal Growth": self.create_personal_page,
"💼 Professional Growth": self.create_professional_page,
"🎯 Purpose Discovery": self.create_purpose_page,
"📝 Journal": self.create_journal_page,
"📊 Progress": self.create_progress_page
}
def create_sidebar(self):
# Sidebar frame
self.sidebar = ctk.CTkFrame(
self,
fg_color=self.colors["primary"],
width=250
)
self.sidebar.grid(row=0, column=0, sticky="nsew")
self.sidebar.grid_propagate(False)
# App title
title = ctk.CTkLabel(
self.sidebar,
text="5P Transformation",
font=("Helvetica", 24, "bold"),
text_color=self.colors["secondary"]
)
title.pack(pady=30)
# Navigation buttons
nav_items = [
"🏠 Welcome",
"👥 People Detox",
"🏠 Places Detox",
"👤 Personal Growth",
"💼 Professional Growth",
"🎯 Purpose Discovery",
"📝 Journal",
"📊 Progress"
]
for item in nav_items:
btn = ctk.CTkButton(
self.sidebar,
text=item,
fg_color="transparent",
text_color=self.colors["text_light"],
hover_color=self.colors["accent"],
anchor="w",
command=lambda x=item: self.show_page(x)
)
btn.pack(pady=5, padx=20, fill="x")
def create_main_content(self):
# Main content frame
self.main_frame = ctk.CTkFrame(self)
self.main_frame.grid(row=0, column=1, sticky="nsew", padx=20, pady=20)
self.main_frame.grid_columnconfigure(0, weight=1)
self.main_frame.grid_rowconfigure(0, weight=1)
def show_page(self, page_name):
"""Switch to the selected page"""
# Clear current page
if self.current_page:
self.current_page.destroy()
# Create new page
if page_name in self.pages:
self.current_page = self.pages[page_name]()
self.current_page.grid(row=0, column=0, sticky="nsew", padx=20, pady=20)
print(f"Showing page: {page_name}")
def create_welcome_page(self):
"""Create welcome page"""
page = ctk.CTkFrame(self.main_frame)
# Welcome message
welcome = ctk.CTkLabel(
page,
text="Welcome to Your 2025 Transformation Journey",
font=("Helvetica", 32, "bold"),
text_color=self.colors["secondary"]
)
welcome.pack(pady=50)
# Motivation quote
quote = ctk.CTkLabel(
page,
text="'We're not just surviving, we're thriving in 2025'",
font=("Helvetica", 18, "italic"),
text_color=self.colors["text_light"]
)
quote.pack(pady=20)
# Get Started button
start_btn = ctk.CTkButton(
page,
text="Begin Your Journey",
font=("Helvetica", 16, "bold"),
fg_color=self.colors["accent"],
hover_color=self.colors["primary"],
command=self.start_journey
)
start_btn.pack(pady=30)
return page
def create_people_page(self):
"""Create people detox page"""
page = ctk.CTkFrame(self.main_frame)
title = ctk.CTkLabel(
page,
text="People Detox",
font=("Helvetica", 32, "bold"),
text_color=self.colors["secondary"]
)
title.pack(pady=30)
description = ctk.CTkLabel(
page,
text="Transform your relationships and social connections",
font=("Helvetica", 16),
text_color=self.colors["text_light"]
)
description.pack(pady=20)
return page
def create_places_page(self):
"""Create places detox page"""
page = ctk.CTkFrame(self.main_frame)
title = ctk.CTkLabel(
page,
text="Places Detox",
font=("Helvetica", 32, "bold"),
text_color=self.colors["secondary"]
)
title.pack(pady=30)
description = ctk.CTkLabel(
page,
text="Optimize your environment for success",
font=("Helvetica", 16),
text_color=self.colors["text_light"]
)
description.pack(pady=20)
return page
def create_personal_page(self):
"""Create personal growth page"""
page = ctk.CTkFrame(self.main_frame)
title = ctk.CTkLabel(
page,
text="Personal Growth",
font=("Helvetica", 32, "bold"),
text_color=self.colors["secondary"]
)
title.pack(pady=30)
return page
def create_professional_page(self):
"""Create professional growth page"""
page = ctk.CTkFrame(self.main_frame)
title = ctk.CTkLabel(
page,
text="Professional Growth",
font=("Helvetica", 32, "bold"),
text_color=self.colors["secondary"]
)
title.pack(pady=30)
return page
def create_purpose_page(self):
"""Create purpose discovery page"""
page = ctk.CTkFrame(self.main_frame)
title = ctk.CTkLabel(
page,
text="Purpose Discovery",
font=("Helvetica", 32, "bold"),
text_color=self.colors["secondary"]
)
title.pack(pady=30)
return page
def create_journal_page(self):
"""Create journal page"""
page = ctk.CTkFrame(self.main_frame)
title = ctk.CTkLabel(
page,
text="Journal",
font=("Helvetica", 32, "bold"),
text_color=self.colors["secondary"]
)
title.pack(pady=30)
# Add journal entry field
journal_entry = ctk.CTkTextbox(
page,
width=800,
height=400,
font=("Helvetica", 14)
)
journal_entry.pack(pady=20)
# Save button
save_btn = ctk.CTkButton(
page,
text="Save Entry",
font=("Helvetica", 16),
fg_color=self.colors["accent"],
hover_color=self.colors["primary"]
)
save_btn.pack(pady=20)
return page
def create_progress_page(self):
"""Create progress page"""
page = ctk.CTkFrame(self.main_frame)
title = ctk.CTkLabel(
page,
text="Progress Tracking",
font=("Helvetica", 32, "bold"),
text_color=self.colors["secondary"]
)
title.pack(pady=30)
return page
def start_journey(self):
"""Start the transformation journey"""
self.show_page("👥 People Detox")
if __name__ == "__main__":
app = DetoxApp()
app.mainloop()