This view is limited to 50 files because it contains too many changes. See the raw diff here.
Files changed (50) hide show
  1. .env +0 -14
  2. .gitattributes +0 -153
  3. Dockerfile +2 -4
  4. app.py +0 -1048
  5. app_errors.log +0 -0
  6. css/style.css +0 -265
  7. data/activities.json +0 -29
  8. data/admissions_process.json +0 -33
  9. data/applications.json +0 -58
  10. data/arts_performing.json +0 -20
  11. data/arts_visual.json +0 -20
  12. data/blogs.json +0 -20
  13. data/clubs.json +0 -26
  14. data/contact.json +0 -28
  15. data/events.js +0 -22
  16. data/events.json +0 -14
  17. data/facilities.json +0 -38
  18. data/faculty.json +0 -33
  19. data/highlights.json +0 -17
  20. data/history.json +0 -20
  21. data/leadership.json +0 -23
  22. data/mission.json +0 -26
  23. data/news.js +0 -33
  24. data/news.json +0 -18
  25. data/sports_achievements.json +0 -20
  26. data/sports_competitive.json +0 -18
  27. data/sports_recreational.json +0 -18
  28. requirements.txt +0 -18
  29. static/css/style.css +0 -265
  30. static/downloads/admissions/company logo.jpg +0 -0
  31. static/downloads/admissions/prospectus.pdf +0 -0
  32. static/downloads/general/index.html +0 -10
  33. static/images/default.jpg +0 -0
  34. static/js/main.js +0 -63
  35. static/uploads/applications/348f9a45-0184-40ed-8fc4-444829eea40d_academic_records.pdf +0 -0
  36. static/uploads/applications/348f9a45-0184-40ed-8fc4-444829eea40d_birth_certificate.pdf +0 -0
  37. static/uploads/applications/348f9a45-0184-40ed-8fc4-444829eea40d_photo.png +0 -3
  38. static/uploads/applications/348f9a45-0184-40ed-8fc4-444829eea40d_recommendation_letter.pdf +0 -0
  39. static/uploads/applications/7d8de7f4-a5c9-47c3-81e0-9e95eed94557_academic_records.pdf +0 -0
  40. static/uploads/applications/7d8de7f4-a5c9-47c3-81e0-9e95eed94557_birth_certificate.pdf +0 -0
  41. static/uploads/applications/7d8de7f4-a5c9-47c3-81e0-9e95eed94557_photo.png +0 -3
  42. static/uploads/applications/7d8de7f4-a5c9-47c3-81e0-9e95eed94557_recommendation_letter.pdf +0 -0
  43. templates/404.html +0 -17
  44. templates/about.html +0 -342
  45. templates/academics.html +0 -314
  46. templates/admin/application_detail.html +0 -290
  47. templates/admin/applications.html +0 -146
  48. templates/admin/base.html +0 -60
  49. templates/admin/content.html +0 -1
  50. templates/admin/dashboard.html +0 -76
.env DELETED
@@ -1,14 +0,0 @@
1
- # In your .env file (keep this private)
2
- CONTACT_EMAIL=egliszaratus@gmail.com
3
- ADMIN_EMAIL=egliszaratus@gmail.com
4
-
5
- # In app.py
6
- app.config['CONTACT_EMAIL'] = os.environ.get('CONTACT_EMAIL', 'info@munishischool.ac.tz')
7
- app.config['ADMIN_EMAIL'] = os.environ.get('ADMIN_EMAIL', 'admin@munishischool.ac.tz')
8
-
9
-
10
- app.config['ADMIN_USERNAME'] = os.environ.get('ADMIN_USERNAME', 'admin') # Default: 'admin'
11
- app.config['ADMIN_PASSWORD'] = os.environ.get('ADMIN_PASSWORD', generate_password_hash('admin123')) # Default: hashed 'admin123'
12
-
13
- MAIL_USERNAME=egliszaratus@gmail.com
14
- MAIL_PASSWORD=xwzd nogw tavi qgtg
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.gitattributes CHANGED
@@ -33,156 +33,3 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
- static/uploads/applications/348f9a45-0184-40ed-8fc4-444829eea40d_photo.png filter=lfs diff=lfs merge=lfs -text
37
- static/uploads/applications/7d8de7f4-a5c9-47c3-81e0-9e95eed94557_photo.png filter=lfs diff=lfs merge=lfs -text
38
- venv/Lib/site-packages/babel/global.dat filter=lfs diff=lfs merge=lfs -text
39
- venv/Lib/site-packages/babel/locale-data/af.dat filter=lfs diff=lfs merge=lfs -text
40
- venv/Lib/site-packages/babel/locale-data/ak.dat filter=lfs diff=lfs merge=lfs -text
41
- venv/Lib/site-packages/babel/locale-data/am.dat filter=lfs diff=lfs merge=lfs -text
42
- venv/Lib/site-packages/babel/locale-data/ar.dat filter=lfs diff=lfs merge=lfs -text
43
- venv/Lib/site-packages/babel/locale-data/as.dat filter=lfs diff=lfs merge=lfs -text
44
- venv/Lib/site-packages/babel/locale-data/ast.dat filter=lfs diff=lfs merge=lfs -text
45
- venv/Lib/site-packages/babel/locale-data/az.dat filter=lfs diff=lfs merge=lfs -text
46
- venv/Lib/site-packages/babel/locale-data/bal_Latn.dat filter=lfs diff=lfs merge=lfs -text
47
- venv/Lib/site-packages/babel/locale-data/be_TARASK.dat filter=lfs diff=lfs merge=lfs -text
48
- venv/Lib/site-packages/babel/locale-data/be.dat filter=lfs diff=lfs merge=lfs -text
49
- venv/Lib/site-packages/babel/locale-data/bew.dat filter=lfs diff=lfs merge=lfs -text
50
- venv/Lib/site-packages/babel/locale-data/bg.dat filter=lfs diff=lfs merge=lfs -text
51
- venv/Lib/site-packages/babel/locale-data/blo.dat filter=lfs diff=lfs merge=lfs -text
52
- venv/Lib/site-packages/babel/locale-data/bn.dat filter=lfs diff=lfs merge=lfs -text
53
- venv/Lib/site-packages/babel/locale-data/br.dat filter=lfs diff=lfs merge=lfs -text
54
- venv/Lib/site-packages/babel/locale-data/brx.dat filter=lfs diff=lfs merge=lfs -text
55
- venv/Lib/site-packages/babel/locale-data/bs_Cyrl.dat filter=lfs diff=lfs merge=lfs -text
56
- venv/Lib/site-packages/babel/locale-data/bs.dat filter=lfs diff=lfs merge=lfs -text
57
- venv/Lib/site-packages/babel/locale-data/ca.dat filter=lfs diff=lfs merge=lfs -text
58
- venv/Lib/site-packages/babel/locale-data/ccp.dat filter=lfs diff=lfs merge=lfs -text
59
- venv/Lib/site-packages/babel/locale-data/ce.dat filter=lfs diff=lfs merge=lfs -text
60
- venv/Lib/site-packages/babel/locale-data/ceb.dat filter=lfs diff=lfs merge=lfs -text
61
- venv/Lib/site-packages/babel/locale-data/chr.dat filter=lfs diff=lfs merge=lfs -text
62
- venv/Lib/site-packages/babel/locale-data/cs.dat filter=lfs diff=lfs merge=lfs -text
63
- venv/Lib/site-packages/babel/locale-data/cv.dat filter=lfs diff=lfs merge=lfs -text
64
- venv/Lib/site-packages/babel/locale-data/cy.dat filter=lfs diff=lfs merge=lfs -text
65
- venv/Lib/site-packages/babel/locale-data/da.dat filter=lfs diff=lfs merge=lfs -text
66
- venv/Lib/site-packages/babel/locale-data/de.dat filter=lfs diff=lfs merge=lfs -text
67
- venv/Lib/site-packages/babel/locale-data/dsb.dat filter=lfs diff=lfs merge=lfs -text
68
- venv/Lib/site-packages/babel/locale-data/el.dat filter=lfs diff=lfs merge=lfs -text
69
- venv/Lib/site-packages/babel/locale-data/en.dat filter=lfs diff=lfs merge=lfs -text
70
- venv/Lib/site-packages/babel/locale-data/eo.dat filter=lfs diff=lfs merge=lfs -text
71
- venv/Lib/site-packages/babel/locale-data/es.dat filter=lfs diff=lfs merge=lfs -text
72
- venv/Lib/site-packages/babel/locale-data/et.dat filter=lfs diff=lfs merge=lfs -text
73
- venv/Lib/site-packages/babel/locale-data/eu.dat filter=lfs diff=lfs merge=lfs -text
74
- venv/Lib/site-packages/babel/locale-data/fa.dat filter=lfs diff=lfs merge=lfs -text
75
- venv/Lib/site-packages/babel/locale-data/ff_Adlm.dat filter=lfs diff=lfs merge=lfs -text
76
- venv/Lib/site-packages/babel/locale-data/fi.dat filter=lfs diff=lfs merge=lfs -text
77
- venv/Lib/site-packages/babel/locale-data/fil.dat filter=lfs diff=lfs merge=lfs -text
78
- venv/Lib/site-packages/babel/locale-data/fo.dat filter=lfs diff=lfs merge=lfs -text
79
- venv/Lib/site-packages/babel/locale-data/fr.dat filter=lfs diff=lfs merge=lfs -text
80
- venv/Lib/site-packages/babel/locale-data/frr.dat filter=lfs diff=lfs merge=lfs -text
81
- venv/Lib/site-packages/babel/locale-data/fy.dat filter=lfs diff=lfs merge=lfs -text
82
- venv/Lib/site-packages/babel/locale-data/ga.dat filter=lfs diff=lfs merge=lfs -text
83
- venv/Lib/site-packages/babel/locale-data/gd.dat filter=lfs diff=lfs merge=lfs -text
84
- venv/Lib/site-packages/babel/locale-data/gl.dat filter=lfs diff=lfs merge=lfs -text
85
- venv/Lib/site-packages/babel/locale-data/gu.dat filter=lfs diff=lfs merge=lfs -text
86
- venv/Lib/site-packages/babel/locale-data/ha.dat filter=lfs diff=lfs merge=lfs -text
87
- venv/Lib/site-packages/babel/locale-data/he.dat filter=lfs diff=lfs merge=lfs -text
88
- venv/Lib/site-packages/babel/locale-data/hi.dat filter=lfs diff=lfs merge=lfs -text
89
- venv/Lib/site-packages/babel/locale-data/hr.dat filter=lfs diff=lfs merge=lfs -text
90
- venv/Lib/site-packages/babel/locale-data/hsb.dat filter=lfs diff=lfs merge=lfs -text
91
- venv/Lib/site-packages/babel/locale-data/hu.dat filter=lfs diff=lfs merge=lfs -text
92
- venv/Lib/site-packages/babel/locale-data/hy.dat filter=lfs diff=lfs merge=lfs -text
93
- venv/Lib/site-packages/babel/locale-data/ia.dat filter=lfs diff=lfs merge=lfs -text
94
- venv/Lib/site-packages/babel/locale-data/id.dat filter=lfs diff=lfs merge=lfs -text
95
- venv/Lib/site-packages/babel/locale-data/is.dat filter=lfs diff=lfs merge=lfs -text
96
- venv/Lib/site-packages/babel/locale-data/it.dat filter=lfs diff=lfs merge=lfs -text
97
- venv/Lib/site-packages/babel/locale-data/ja.dat filter=lfs diff=lfs merge=lfs -text
98
- venv/Lib/site-packages/babel/locale-data/jv.dat filter=lfs diff=lfs merge=lfs -text
99
- venv/Lib/site-packages/babel/locale-data/ka.dat filter=lfs diff=lfs merge=lfs -text
100
- venv/Lib/site-packages/babel/locale-data/kab.dat filter=lfs diff=lfs merge=lfs -text
101
- venv/Lib/site-packages/babel/locale-data/kgp.dat filter=lfs diff=lfs merge=lfs -text
102
- venv/Lib/site-packages/babel/locale-data/kk_Arab.dat filter=lfs diff=lfs merge=lfs -text
103
- venv/Lib/site-packages/babel/locale-data/kk.dat filter=lfs diff=lfs merge=lfs -text
104
- venv/Lib/site-packages/babel/locale-data/km.dat filter=lfs diff=lfs merge=lfs -text
105
- venv/Lib/site-packages/babel/locale-data/kn.dat filter=lfs diff=lfs merge=lfs -text
106
- venv/Lib/site-packages/babel/locale-data/ko.dat filter=lfs diff=lfs merge=lfs -text
107
- venv/Lib/site-packages/babel/locale-data/kok.dat filter=lfs diff=lfs merge=lfs -text
108
- venv/Lib/site-packages/babel/locale-data/ks.dat filter=lfs diff=lfs merge=lfs -text
109
- venv/Lib/site-packages/babel/locale-data/ku.dat filter=lfs diff=lfs merge=lfs -text
110
- venv/Lib/site-packages/babel/locale-data/ky.dat filter=lfs diff=lfs merge=lfs -text
111
- venv/Lib/site-packages/babel/locale-data/lb.dat filter=lfs diff=lfs merge=lfs -text
112
- venv/Lib/site-packages/babel/locale-data/lij.dat filter=lfs diff=lfs merge=lfs -text
113
- venv/Lib/site-packages/babel/locale-data/lo.dat filter=lfs diff=lfs merge=lfs -text
114
- venv/Lib/site-packages/babel/locale-data/lt.dat filter=lfs diff=lfs merge=lfs -text
115
- venv/Lib/site-packages/babel/locale-data/lv.dat filter=lfs diff=lfs merge=lfs -text
116
- venv/Lib/site-packages/babel/locale-data/mk.dat filter=lfs diff=lfs merge=lfs -text
117
- venv/Lib/site-packages/babel/locale-data/ml.dat filter=lfs diff=lfs merge=lfs -text
118
- venv/Lib/site-packages/babel/locale-data/mn.dat filter=lfs diff=lfs merge=lfs -text
119
- venv/Lib/site-packages/babel/locale-data/mr.dat filter=lfs diff=lfs merge=lfs -text
120
- venv/Lib/site-packages/babel/locale-data/ms.dat filter=lfs diff=lfs merge=lfs -text
121
- venv/Lib/site-packages/babel/locale-data/my.dat filter=lfs diff=lfs merge=lfs -text
122
- venv/Lib/site-packages/babel/locale-data/ne.dat filter=lfs diff=lfs merge=lfs -text
123
- venv/Lib/site-packages/babel/locale-data/nl.dat filter=lfs diff=lfs merge=lfs -text
124
- venv/Lib/site-packages/babel/locale-data/no.dat filter=lfs diff=lfs merge=lfs -text
125
- venv/Lib/site-packages/babel/locale-data/nqo.dat filter=lfs diff=lfs merge=lfs -text
126
- venv/Lib/site-packages/babel/locale-data/or.dat filter=lfs diff=lfs merge=lfs -text
127
- venv/Lib/site-packages/babel/locale-data/pa.dat filter=lfs diff=lfs merge=lfs -text
128
- venv/Lib/site-packages/babel/locale-data/pcm.dat filter=lfs diff=lfs merge=lfs -text
129
- venv/Lib/site-packages/babel/locale-data/pl.dat filter=lfs diff=lfs merge=lfs -text
130
- venv/Lib/site-packages/babel/locale-data/ps.dat filter=lfs diff=lfs merge=lfs -text
131
- venv/Lib/site-packages/babel/locale-data/pt.dat filter=lfs diff=lfs merge=lfs -text
132
- venv/Lib/site-packages/babel/locale-data/ro.dat filter=lfs diff=lfs merge=lfs -text
133
- venv/Lib/site-packages/babel/locale-data/ru.dat filter=lfs diff=lfs merge=lfs -text
134
- venv/Lib/site-packages/babel/locale-data/sc.dat filter=lfs diff=lfs merge=lfs -text
135
- venv/Lib/site-packages/babel/locale-data/sd.dat filter=lfs diff=lfs merge=lfs -text
136
- venv/Lib/site-packages/babel/locale-data/si.dat filter=lfs diff=lfs merge=lfs -text
137
- venv/Lib/site-packages/babel/locale-data/sk.dat filter=lfs diff=lfs merge=lfs -text
138
- venv/Lib/site-packages/babel/locale-data/sl.dat filter=lfs diff=lfs merge=lfs -text
139
- venv/Lib/site-packages/babel/locale-data/so.dat filter=lfs diff=lfs merge=lfs -text
140
- venv/Lib/site-packages/babel/locale-data/sq.dat filter=lfs diff=lfs merge=lfs -text
141
- venv/Lib/site-packages/babel/locale-data/sr_Latn.dat filter=lfs diff=lfs merge=lfs -text
142
- venv/Lib/site-packages/babel/locale-data/sr.dat filter=lfs diff=lfs merge=lfs -text
143
- venv/Lib/site-packages/babel/locale-data/sv.dat filter=lfs diff=lfs merge=lfs -text
144
- venv/Lib/site-packages/babel/locale-data/sw.dat filter=lfs diff=lfs merge=lfs -text
145
- venv/Lib/site-packages/babel/locale-data/syr.dat filter=lfs diff=lfs merge=lfs -text
146
- venv/Lib/site-packages/babel/locale-data/ta.dat filter=lfs diff=lfs merge=lfs -text
147
- venv/Lib/site-packages/babel/locale-data/te.dat filter=lfs diff=lfs merge=lfs -text
148
- venv/Lib/site-packages/babel/locale-data/tg.dat filter=lfs diff=lfs merge=lfs -text
149
- venv/Lib/site-packages/babel/locale-data/th.dat filter=lfs diff=lfs merge=lfs -text
150
- venv/Lib/site-packages/babel/locale-data/ti.dat filter=lfs diff=lfs merge=lfs -text
151
- venv/Lib/site-packages/babel/locale-data/tk.dat filter=lfs diff=lfs merge=lfs -text
152
- venv/Lib/site-packages/babel/locale-data/to.dat filter=lfs diff=lfs merge=lfs -text
153
- venv/Lib/site-packages/babel/locale-data/tr.dat filter=lfs diff=lfs merge=lfs -text
154
- venv/Lib/site-packages/babel/locale-data/trw.dat filter=lfs diff=lfs merge=lfs -text
155
- venv/Lib/site-packages/babel/locale-data/tt.dat filter=lfs diff=lfs merge=lfs -text
156
- venv/Lib/site-packages/babel/locale-data/ug.dat filter=lfs diff=lfs merge=lfs -text
157
- venv/Lib/site-packages/babel/locale-data/uk.dat filter=lfs diff=lfs merge=lfs -text
158
- venv/Lib/site-packages/babel/locale-data/ur.dat filter=lfs diff=lfs merge=lfs -text
159
- venv/Lib/site-packages/babel/locale-data/uz.dat filter=lfs diff=lfs merge=lfs -text
160
- venv/Lib/site-packages/babel/locale-data/vec.dat filter=lfs diff=lfs merge=lfs -text
161
- venv/Lib/site-packages/babel/locale-data/vi.dat filter=lfs diff=lfs merge=lfs -text
162
- venv/Lib/site-packages/babel/locale-data/xnr.dat filter=lfs diff=lfs merge=lfs -text
163
- venv/Lib/site-packages/babel/locale-data/yo.dat filter=lfs diff=lfs merge=lfs -text
164
- venv/Lib/site-packages/babel/locale-data/yrl.dat filter=lfs diff=lfs merge=lfs -text
165
- venv/Lib/site-packages/babel/locale-data/yue_Hans.dat filter=lfs diff=lfs merge=lfs -text
166
- venv/Lib/site-packages/babel/locale-data/yue.dat filter=lfs diff=lfs merge=lfs -text
167
- venv/Lib/site-packages/babel/locale-data/zh_Hant.dat filter=lfs diff=lfs merge=lfs -text
168
- venv/Lib/site-packages/babel/locale-data/zh.dat filter=lfs diff=lfs merge=lfs -text
169
- venv/Lib/site-packages/babel/locale-data/zu.dat filter=lfs diff=lfs merge=lfs -text
170
- venv/Lib/site-packages/click/__pycache__/core.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text
171
- venv/Lib/site-packages/jinja2/__pycache__/compiler.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text
172
- venv/Lib/site-packages/pip/_vendor/__pycache__/typing_extensions.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text
173
- venv/Lib/site-packages/pip/_vendor/distlib/t64-arm.exe filter=lfs diff=lfs merge=lfs -text
174
- venv/Lib/site-packages/pip/_vendor/distlib/t64.exe filter=lfs diff=lfs merge=lfs -text
175
- venv/Lib/site-packages/pip/_vendor/distlib/w64-arm.exe filter=lfs diff=lfs merge=lfs -text
176
- venv/Lib/site-packages/pip/_vendor/distlib/w64.exe filter=lfs diff=lfs merge=lfs -text
177
- venv/Lib/site-packages/pip/_vendor/idna/__pycache__/uts46data.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text
178
- venv/Lib/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text
179
- venv/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text
180
- venv/Lib/site-packages/pip/_vendor/rich/__pycache__/console.cpython-313.pyc filter=lfs diff=lfs merge=lfs -text
181
- venv/Scripts/dotenv.exe filter=lfs diff=lfs merge=lfs -text
182
- venv/Scripts/flask.exe filter=lfs diff=lfs merge=lfs -text
183
- venv/Scripts/pip.exe filter=lfs diff=lfs merge=lfs -text
184
- venv/Scripts/pip3.13.exe filter=lfs diff=lfs merge=lfs -text
185
- venv/Scripts/pip3.exe filter=lfs diff=lfs merge=lfs -text
186
- venv/Scripts/pybabel.exe filter=lfs diff=lfs merge=lfs -text
187
- venv/Scripts/python.exe filter=lfs diff=lfs merge=lfs -text
188
- venv/Scripts/pythonw.exe filter=lfs diff=lfs merge=lfs -text
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
  # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
  # you will also find guides on how best to write your Dockerfile
3
 
4
- FROM python:3.10
5
 
6
  RUN useradd -m -u 1000 user
7
  USER user
@@ -13,6 +13,4 @@ COPY --chown=user ./requirements.txt requirements.txt
13
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
 
15
  COPY --chown=user . /app
16
-
17
- # CHANGE THIS LINE - use gunicorn instead of uvicorn
18
- CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
 
1
  # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
  # you will also find guides on how best to write your Dockerfile
3
 
4
+ FROM python:3.9
5
 
6
  RUN useradd -m -u 1000 user
7
  USER user
 
13
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
 
15
  COPY --chown=user . /app
16
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
app.py DELETED
@@ -1,1048 +0,0 @@
1
- from flask import Flask, render_template, request, session, redirect, url_for, send_from_directory, g, flash, jsonify
2
- from flask_babel import Babel, gettext as _
3
- from flask_mail import Mail, Message
4
- import os
5
- import json
6
- from datetime import datetime
7
- from functools import wraps
8
- import uuid
9
- from werkzeug.utils import secure_filename
10
- from werkzeug.security import generate_password_hash, check_password_hash
11
-
12
- app = Flask(__name__)
13
- app.secret_key = os.environ.get('SECRET_KEY', 'dev_secret_key')
14
-
15
- # Application Configuration
16
- app.config['BABEL_DEFAULT_LOCALE'] = 'en'
17
- app.config['BABEL_TRANSLATION_DIRECTORIES'] = 'translations'
18
- app.config['SCHOOL_NAME'] = "Munishi Secondary School"
19
- app.config['SCHOOL_MOTTO'] = "Excellence Through Diligence"
20
- app.config['CONTACT_EMAIL'] = "info@munishischool.ac.tz"
21
- app.config['CONTACT_PHONE'] = "+255 22 123 4567"
22
- app.config['ADDRESS'] = "P.O. Box 1234, Dar es Salaam, Tanzania"
23
- app.config['SOCIAL_MEDIA'] = {
24
- 'facebook': 'https://facebook.com/munishischool',
25
- 'twitter': 'https://twitter.com/munishischool',
26
- 'instagram': 'https://instagram.com/munishischool',
27
- 'youtube': 'https://youtube.com/munishischool'
28
- }
29
- app.config['UPLOAD_FOLDER'] = 'static/uploads'
30
- app.config['ALLOWED_EXTENSIONS'] = {'png', 'jpg', 'jpeg', 'gif', 'pdf'}
31
- app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB max upload size
32
-
33
- # Admin Configuration
34
- app.config['ADMIN_USERNAME'] = os.environ.get('ADMIN_USERNAME', 'admin')
35
- app.config['ADMIN_PASSWORD'] = os.environ.get('ADMIN_PASSWORD', generate_password_hash('admin123'))
36
- app.config['ADMIN_UPLOAD_FOLDER'] = 'static/uploads/admin'
37
- app.config['APPLICATIONS_PER_PAGE'] = 10
38
- app.config['ADMIN_SESSION_TIMEOUT'] = 3600 # 1 hour in seconds
39
-
40
- # Email Configuration
41
- app.config['MAIL_SERVER'] = 'smtp.gmail.com'
42
- app.config['MAIL_PORT'] = 587
43
- app.config['MAIL_USE_TLS'] = True
44
- app.config['MAIL_USERNAME'] = 'egliszaratus@gmail.com'
45
- app.config['MAIL_PASSWORD'] = 'xwzd nogw tavi qgtg' # Your app password
46
- app.config['MAIL_DEFAULT_SENDER'] = 'Munishi Secondary School <egliszaratus@gmail.com>'
47
- app.config['ADMIN_EMAIL'] = 'egliszaratus@gmail.com'
48
-
49
- # Initialize Babel and Mail
50
- babel = Babel(app)
51
- mail = Mail(app)
52
-
53
- # Admin Authentication Decorator
54
- def admin_required(f):
55
- @wraps(f)
56
- def decorated_function(*args, **kwargs):
57
- if not session.get('admin_logged_in'):
58
- return redirect(url_for('admin_login', next=request.url))
59
-
60
- # Check session timeout
61
- last_activity = session.get('admin_last_activity')
62
- if last_activity and (datetime.now() - datetime.strptime(last_activity, "%Y-%m-%d %H:%M:%S")).seconds > app.config['ADMIN_SESSION_TIMEOUT']:
63
- session.pop('admin_logged_in', None)
64
- flash(_('Your session has timed out. Please log in again.'), 'warning')
65
- return redirect(url_for('admin_login', next=request.url))
66
-
67
- # Update last activity time
68
- session['admin_last_activity'] = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
69
- return f(*args, **kwargs)
70
- return decorated_function
71
-
72
- # Helper Functions
73
- def load_data(filename):
74
- """Load JSON data from the data directory"""
75
- try:
76
- with open(f'data/{filename}.json', 'r', encoding='utf-8') as f:
77
- data = json.load(f)
78
- # Process the data based on type
79
- if isinstance(data, list):
80
- for item in data:
81
- if isinstance(item, dict):
82
- # Escape % signs in strings for translation
83
- for key in ['title', 'description', 'excerpt']:
84
- if key in item and isinstance(item[key], str):
85
- item[key] = item[key].replace('%', '%%')
86
- # Set default image if missing or file doesn't exist
87
- if 'image' in item:
88
- image_path = os.path.join('static', 'images', item['image'])
89
- if not os.path.exists(image_path):
90
- item['image'] = 'default.jpg'
91
- return data
92
- except FileNotFoundError:
93
- app.logger.warning(f"Data file not found: {filename}.json")
94
- return None
95
- except json.JSONDecodeError:
96
- app.logger.error(f"Invalid JSON in file: {filename}.json")
97
- return None
98
- except Exception as e:
99
- app.logger.error(f"Error loading {filename}.json: {str(e)}")
100
- return None
101
-
102
- def save_data(filename, data):
103
- """Save data to JSON file"""
104
- try:
105
- with open(f'data/{filename}.json', 'w', encoding='utf-8') as f:
106
- json.dump(data, f, indent=2, ensure_ascii=False)
107
- return True
108
- except Exception as e:
109
- app.logger.error(f"Error saving data: {str(e)}")
110
- return False
111
-
112
- def allowed_file(filename):
113
- """Check if a file has an allowed extension"""
114
- return '.' in filename and \
115
- filename.rsplit('.', 1)[1].lower() in app.config['ALLOWED_EXTENSIONS']
116
-
117
- def format_date(value, format='medium', part=None):
118
- """Jinja2 filter for date formatting"""
119
- try:
120
- if format == 'full':
121
- format_str = "%A, %d %B %Y"
122
- elif format == 'medium':
123
- format_str = "%d %b %Y"
124
- else:
125
- format_str = format
126
-
127
- date_obj = datetime.strptime(value, "%Y-%m-%d")
128
- formatted = date_obj.strftime(format_str)
129
-
130
- if part == 'first':
131
- return formatted.split()[0]
132
- elif part == 'second':
133
- parts = formatted.split()
134
- return parts[1] if len(parts) > 1 else ''
135
-
136
- return formatted
137
- except Exception as e:
138
- app.logger.error(f"Date formatting error: {str(e)}")
139
- return value
140
-
141
- def format_currency(value):
142
- """Jinja2 filter for currency formatting"""
143
- return f"TZS {value:,.0f}"
144
-
145
- def send_email(subject, recipients, body, html=None):
146
- """Send an email using Flask-Mail"""
147
- try:
148
- msg = Message(
149
- subject=subject,
150
- recipients=recipients,
151
- body=body,
152
- html=html
153
- )
154
- mail.send(msg)
155
- return True
156
- except Exception as e:
157
- app.logger.error(f"Error sending email: {str(e)}")
158
- return False
159
-
160
- # Register filters
161
- app.jinja_env.filters['format_date'] = format_date
162
- app.jinja_env.filters['date'] = format_date
163
- app.jinja_env.filters['format_currency'] = format_currency
164
- app.jinja_env.filters['currency'] = format_currency
165
-
166
- # Make helpers and configuration available to all templates
167
- @app.context_processor
168
- def inject_config():
169
- """Inject configuration and helper functions into all templates"""
170
- return {
171
- 'school_name': app.config['SCHOOL_NAME'],
172
- 'school_motto': app.config['SCHOOL_MOTTO'],
173
- 'contact_email': app.config['CONTACT_EMAIL'],
174
- 'contact_phone': app.config['CONTACT_PHONE'],
175
- 'address': app.config['ADDRESS'],
176
- 'social_media': app.config['SOCIAL_MEDIA'],
177
- 'now': datetime.now(),
178
- 'load_data': load_data
179
- }
180
-
181
- # Language Handling
182
- @app.before_request
183
- def before_request():
184
- """Set language for the request"""
185
- if 'lang' not in session:
186
- session['lang'] = request.accept_languages.best_match(['en', 'sw'])
187
- g.current_lang = session['lang']
188
-
189
- @babel.localeselector
190
- def get_locale():
191
- """Get the current locale"""
192
- return session.get('lang', 'en')
193
-
194
- @app.route('/set_lang/<lang>')
195
- def set_lang(lang):
196
- """Change the application language"""
197
- if lang in ['en', 'sw']:
198
- session['lang'] = lang
199
- return redirect(request.referrer or url_for('home'))
200
-
201
- # Admin Routes
202
- @app.route('/admin/login', methods=['GET', 'POST'])
203
- def admin_login():
204
- if session.get('admin_logged_in'):
205
- return redirect(url_for('admin_dashboard'))
206
-
207
- if request.method == 'POST':
208
- username = request.form.get('username')
209
- password = request.form.get('password')
210
-
211
- if (username == app.config['ADMIN_USERNAME'] and
212
- check_password_hash(app.config['ADMIN_PASSWORD'], password)):
213
- session['admin_logged_in'] = True
214
- session['admin_last_activity'] = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
215
- next_url = request.args.get('next') or url_for('admin_dashboard')
216
- return redirect(next_url)
217
- else:
218
- flash(_('Invalid username or password'), 'error')
219
-
220
- return render_template('admin/login.html')
221
-
222
- @app.route('/admin/logout')
223
- @admin_required
224
- def admin_logout():
225
- session.pop('admin_logged_in', None)
226
- session.pop('admin_last_activity', None)
227
- flash(_('You have been logged out successfully'), 'success')
228
- return redirect(url_for('admin_login'))
229
-
230
- @app.route('/admin/dashboard')
231
- @admin_required
232
- def admin_dashboard():
233
- applications = load_data('applications') or []
234
- stats = {
235
- 'total': len(applications),
236
- 'submitted': len([a for a in applications if a.get('status') == 'submitted']),
237
- 'reviewed': len([a for a in applications if a.get('status') == 'reviewed']),
238
- 'accepted': len([a for a in applications if a.get('status') == 'accepted']),
239
- 'rejected': len([a for a in applications if a.get('status') == 'rejected'])
240
- }
241
-
242
- recent_apps = sorted(applications, key=lambda x: x.get('submission_date', ''), reverse=True)[:5]
243
-
244
- return render_template('admin/dashboard.html', stats=stats, recent_apps=recent_apps)
245
-
246
-
247
- @app.route('/admin/applications')
248
- @admin_required
249
- def admin_applications():
250
- page = request.args.get('page', 1, type=int)
251
- status_filter = request.args.get('status', 'all')
252
- search_query = request.args.get('search', '')
253
- sort_by = request.args.get('sort', 'submission_date')
254
- sort_order = request.args.get('order', 'desc')
255
-
256
- applications = load_data('applications') or []
257
-
258
- # Apply filters
259
- if status_filter != 'all':
260
- applications = [a for a in applications if a['status'] == status_filter]
261
-
262
- if search_query:
263
- search_query = search_query.lower()
264
- applications = [a for a in applications if
265
- search_query in a['first_name'].lower() or
266
- search_query in a['last_name'].lower() or
267
- search_query in a['parent_name'].lower() or
268
- search_query in a['id'].lower()]
269
-
270
- # Sorting
271
- reverse_order = sort_order == 'desc'
272
- if sort_by in ['first_name', 'last_name', 'submission_date', 'status']:
273
- applications.sort(key=lambda x: x.get(sort_by, ''), reverse=reverse_order)
274
-
275
- # Pagination
276
- per_page = app.config['APPLICATIONS_PER_PAGE']
277
- total_pages = max(1, (len(applications) + per_page - 1) // per_page)
278
- paginated_apps = applications[(page-1)*per_page : page*per_page]
279
-
280
- return render_template('admin/applications.html',
281
- applications=paginated_apps,
282
- current_page=page,
283
- total_pages=total_pages,
284
- status_filter=status_filter,
285
- search_query=search_query,
286
- sort_by=sort_by,
287
- sort_order=sort_order)
288
-
289
-
290
-
291
-
292
-
293
- @app.route('/admin/application/<application_id>', methods=['GET', 'POST'])
294
- @admin_required
295
- def admin_application_detail(application_id):
296
- # Load all applications
297
- all_applications = load_data('applications') or []
298
-
299
- # Find the current application
300
- current_app = None
301
- app_index = -1
302
- for i, app_data in enumerate(all_applications):
303
- if app_data['id'] == application_id:
304
- current_app = app_data
305
- app_index = i
306
- break
307
-
308
- if not current_app:
309
- flash(_('Application not found'), 'error')
310
- return redirect(url_for('admin_applications'))
311
-
312
- if request.method == 'POST':
313
- # Capture the current status before any changes
314
- old_status = current_app.get('status')
315
-
316
- # Get form data
317
- new_status = request.form.get('status')
318
- notes = request.form.get('admin_notes', '')
319
-
320
- if new_status in ['submitted', 'reviewed', 'accepted', 'rejected', 'waitlisted']:
321
- # Update application data
322
- current_app['status'] = new_status
323
- current_app['admin_notes'] = notes
324
- current_app['review_date'] = datetime.now().strftime("%Y-%m-%d %H:%M")
325
- current_app['reviewed_by'] = session.get('admin_username', 'admin')
326
-
327
- # Handle file uploads
328
- for file_field in ['additional_docs']:
329
- file = request.files.get(file_field)
330
- if file and allowed_file(file.filename):
331
- filename = secure_filename(
332
- f"{application_id}_{file_field}_{datetime.now().strftime('%Y%m%d%H%M%S')}{os.path.splitext(file.filename)[1]}"
333
- )
334
- upload_dir = os.path.join(app.config['ADMIN_UPLOAD_FOLDER'], 'application_docs')
335
- os.makedirs(upload_dir, exist_ok=True)
336
- file_path = os.path.join(upload_dir, filename)
337
- file.save(file_path)
338
-
339
- if 'admin_uploads' not in current_app:
340
- current_app['admin_uploads'] = []
341
-
342
- current_app['admin_uploads'].append({
343
- 'filename': filename,
344
- 'original_name': file.filename,
345
- 'upload_date': datetime.now().strftime("%Y-%m-%d %H:%M"),
346
- 'uploaded_by': session.get('admin_username', 'admin')
347
- })
348
-
349
- # Update the application in the list
350
- if app_index >= 0:
351
- all_applications[app_index] = current_app
352
-
353
- # Save updated data
354
- if save_data('applications', all_applications):
355
- flash(_('Application updated successfully'), 'success')
356
-
357
- # Send email notifications if status changed
358
- if old_status != new_status:
359
- # Send to applicant/parent
360
- applicant_email = current_app.get('parent_email')
361
- if applicant_email:
362
- # Prepare email content based on status
363
- if new_status == 'accepted':
364
- subject = _("Congratulations! Your Application Has Been Accepted")
365
- body = _(
366
- f"Dear {current_app['first_name']} {current_app['last_name']},\n\n"
367
- "We are pleased to inform you that your application to Munishi Secondary School has been accepted!\n\n"
368
- "Congratulations! We look forward to welcoming you to our school community.\n\n"
369
- "Next Steps:\n"
370
- "1. Please log in to your application portal to review the acceptance letter\n"
371
- "2. Complete the enrollment forms by [date]\n"
372
- "3. Submit any remaining documents\n\n"
373
- "If you have any questions, please contact our admissions office at admissions@munishischool.ac.tz\n\n"
374
- "Sincerely,\n"
375
- "The Admissions Committee\n"
376
- "Munishi Secondary School"
377
- )
378
- elif new_status == 'rejected':
379
- subject = _("Update on Your Application to Munishi Secondary School")
380
- body = _(
381
- f"Dear {current_app['first_name']} {current_app['last_name']},\n\n"
382
- "Thank you for applying to Munishi Secondary School.\n\n"
383
- "After careful consideration, we regret to inform you that we are unable to offer you a place at this time.\n\n"
384
- "We appreciate your interest in our school and wish you the best in your educational journey.\n\n"
385
- "Sincerely,\n"
386
- "The Admissions Committee\n"
387
- "Munishi Secondary School"
388
- )
389
- elif new_status == 'waitlisted':
390
- subject = _("Update on Your Application to Munishi Secondary School")
391
- body = _(
392
- f"Dear {current_app['first_name']} {current_app['last_name']},\n\n"
393
- "Thank you for applying to Munishi Secondary School.\n\n"
394
- "We have received a large number of applications this year. While we are not able to offer you a place at this time, "
395
- "your application has been placed on our waitlist. We will contact you if a place becomes available.\n\n"
396
- "We appreciate your patience and understanding.\n\n"
397
- "Sincerely,\n"
398
- "The Admissions Committee\n"
399
- "Munishi Secondary School"
400
- )
401
- elif new_status == 'reviewed':
402
- subject = _("Update on Your Application to Munishi Secondary School")
403
- body = _(
404
- f"Dear {current_app['first_name']} {current_app['last_name']},\n\n"
405
- "This email is to inform you that your application to Munishi Secondary School has been reviewed.\n\n"
406
- "Our admissions committee has examined your application materials, and we are currently in the final stages "
407
- "of our decision-making process.\n\n"
408
- "We will notify you as soon as a final decision has been made. Thank you for your patience.\n\n"
409
- "Sincerely,\n"
410
- "The Admissions Committee\n"
411
- "Munishi Secondary School"
412
- )
413
- else: # submitted (shouldn't happen, but just in case)
414
- subject = _("Application Update")
415
- body = _(
416
- f"Dear {current_app['first_name']} {current_app['last_name']},\n\n"
417
- "Your application status has been updated to: Submitted\n\n"
418
- "This is usually an initial status when we receive your application. "
419
- "We will begin reviewing it shortly.\n\n"
420
- "Sincerely,\n"
421
- "The Admissions Committee\n"
422
- "Munishi Secondary School"
423
- )
424
-
425
- send_email(subject, [applicant_email], body)
426
-
427
- # Send to admin
428
- admin_subject = _("Application Status Updated: {} {}").format(
429
- current_app['first_name'], current_app['last_name'])
430
- admin_body = _(
431
- f"Application ID: {application_id}\n"
432
- f"Student: {current_app['first_name']} {current_app['last_name']}\n"
433
- f"Parent Email: {current_app.get('parent_email', 'N/A')}\n"
434
- f"Status changed from {old_status} to: {new_status}\n\n"
435
- "Review the application: {}\n"
436
- ).format(url_for('admin_application_detail', application_id=application_id, _external=True))
437
- send_email(admin_subject, [app.config['ADMIN_EMAIL']], admin_body)
438
- else:
439
- flash(_('Failed to save application update. Please try again.'), 'error')
440
-
441
- return redirect(url_for('admin_application_detail', application_id=application_id))
442
-
443
- # Document fields to display
444
- document_fields = [
445
- 'birth_certificate', 'academic_records',
446
- 'recommendation_letter', 'photo'
447
- ]
448
-
449
- # Get all uploaded documents
450
- documents = []
451
- for field in document_fields:
452
- if current_app.get(field):
453
- documents.append({
454
- 'name': field.replace('_', ' ').title(),
455
- 'filename': current_app[field],
456
- 'path': url_for('download_application_file', filename=current_app[field])
457
- })
458
-
459
- # Get admin uploaded documents
460
- admin_documents = []
461
- for doc in current_app.get('admin_uploads', []):
462
- admin_documents.append({
463
- 'name': doc['original_name'],
464
- 'uploaded_by': doc['uploaded_by'],
465
- 'upload_date': doc['upload_date'],
466
- 'path': url_for('download_admin_file', filename=doc['filename'])
467
- })
468
-
469
- return render_template('admin/application_detail.html',
470
- application=current_app,
471
- documents=documents,
472
- admin_documents=admin_documents)
473
-
474
-
475
-
476
-
477
-
478
-
479
- @app.route('/admin/settings', methods=['GET', 'POST'])
480
- @admin_required
481
- def admin_settings():
482
- if request.method == 'POST':
483
- current_password = request.form.get('current_password')
484
- new_password = request.form.get('new_password')
485
- confirm_password = request.form.get('confirm_password')
486
-
487
- if not check_password_hash(app.config['ADMIN_PASSWORD'], current_password):
488
- flash(_('Current password is incorrect'), 'error')
489
- elif new_password != confirm_password:
490
- flash(_('New passwords do not match'), 'error')
491
- elif len(new_password) < 8:
492
- flash(_('Password must be at least 8 characters long'), 'error')
493
- else:
494
- app.config['ADMIN_PASSWORD'] = generate_password_hash(new_password)
495
- flash(_('Password updated successfully'), 'success')
496
- return redirect(url_for('admin_settings'))
497
-
498
- return render_template('admin/settings.html')
499
-
500
- @app.route('/admin/content')
501
- @admin_required
502
- def admin_content():
503
- # Get all content types available for management
504
- content_types = [
505
- {'name': 'News', 'endpoint': 'news', 'count': len(load_data('news') or [])},
506
- {'name': 'Events', 'endpoint': 'events', 'count': len(load_data('events') or [])},
507
- {'name': 'Faculty', 'endpoint': 'faculty', 'count': len(load_data('faculty') or [])},
508
- {'name': 'Alumni', 'endpoint': 'alumni', 'count': len(load_data('alumni') or [])},
509
- {'name': 'Clubs', 'endpoint': 'clubs', 'count': len(load_data('clubs') or [])}
510
- ]
511
-
512
- return render_template('admin/content.html', content_types=content_types)
513
-
514
- @app.route('/admin/content/<content_type>', methods=['GET', 'POST'])
515
- @admin_required
516
- def manage_content(content_type):
517
- if content_type not in ['news', 'events', 'faculty', 'alumni', 'clubs']:
518
- flash(_('Invalid content type'), 'error')
519
- return redirect(url_for('admin_content'))
520
-
521
- data = load_data(content_type) or []
522
-
523
- if request.method == 'POST':
524
- # Handle content creation/update
525
- action = request.form.get('action')
526
- item_id = request.form.get('id')
527
-
528
- if action == 'delete':
529
- # Delete item
530
- data = [item for item in data if item.get('id') != item_id]
531
- save_data(content_type, data)
532
- flash(_('Item deleted successfully'), 'success')
533
- return redirect(url_for('manage_content', content_type=content_type))
534
-
535
- elif action in ['create', 'update']:
536
- # Validate required fields
537
- required_fields = {
538
- 'news': ['title', 'content', 'date'],
539
- 'events': ['title', 'date', 'location'],
540
- 'faculty': ['name', 'position', 'department'],
541
- 'alumni': ['name', 'graduation_year', 'current_position'],
542
- 'clubs': ['name', 'description', 'meeting_schedule']
543
- }.get(content_type, [])
544
-
545
- form_data = {k: request.form.get(k, '').strip() for k in request.form}
546
-
547
- if not all(form_data.get(field) for field in required_fields):
548
- flash(_('Please fill in all required fields'), 'error')
549
- return redirect(url_for('manage_content', content_type=content_type))
550
-
551
- # Handle file upload
552
- image_file = request.files.get('image')
553
- image_filename = None
554
- if image_file and allowed_file(image_file.filename):
555
- image_filename = secure_filename(f"{content_type}_{datetime.now().strftime('%Y%m%d%H%M%S')}_{image_file.filename}")
556
- upload_dir = os.path.join(app.config['ADMIN_UPLOAD_FOLDER'], content_type)
557
- os.makedirs(upload_dir, exist_ok=True)
558
- image_file.save(os.path.join(upload_dir, image_filename))
559
-
560
- if action == 'create':
561
- # Create new item
562
- new_item = {
563
- 'id': str(uuid.uuid4()),
564
- 'created_at': datetime.now().strftime("%Y-%m-%d %H:%M"),
565
- 'created_by': session.get('admin_username', 'admin'),
566
- **form_data
567
- }
568
- if image_filename:
569
- new_item['image'] = image_filename
570
- data.append(new_item)
571
- flash(_('Item created successfully'), 'success')
572
- else:
573
- # Update existing item
574
- for item in data:
575
- if item.get('id') == item_id:
576
- item.update({
577
- 'updated_at': datetime.now().strftime("%Y-%m-%d %H:%M"),
578
- 'updated_by': session.get('admin_username', 'admin'),
579
- **{k: v for k, v in form_data.items() if v}
580
- })
581
- if image_filename:
582
- item['image'] = image_filename
583
- break
584
- flash(_('Item updated successfully'), 'success')
585
-
586
- save_data(content_type, data)
587
- return redirect(url_for('manage_content', content_type=content_type))
588
-
589
- return render_template('admin/manage_content.html',
590
- content_type=content_type,
591
- items=data,
592
- fields=get_content_fields(content_type))
593
-
594
- def get_content_fields(content_type):
595
- """Return field configuration for different content types"""
596
- fields = {
597
- 'news': [
598
- {'name': 'title', 'type': 'text', 'required': True, 'label': _('Title')},
599
- {'name': 'content', 'type': 'textarea', 'required': True, 'label': _('Content')},
600
- {'name': 'excerpt', 'type': 'textarea', 'required': False, 'label': _('Excerpt')},
601
- {'name': 'date', 'type': 'date', 'required': True, 'label': _('Date')},
602
- {'name': 'image', 'type': 'file', 'required': False, 'label': _('Featured Image')},
603
- {'name': 'author', 'type': 'text', 'required': False, 'label': _('Author')},
604
- {'name': 'tags', 'type': 'text', 'required': False, 'label': _('Tags')}
605
- ],
606
- 'events': [
607
- {'name': 'title', 'type': 'text', 'required': True, 'label': _('Title')},
608
- {'name': 'description', 'type': 'textarea', 'required': True, 'label': _('Description')},
609
- {'name': 'date', 'type': 'date', 'required': True, 'label': _('Date')},
610
- {'name': 'time', 'type': 'text', 'required': False, 'label': _('Time')},
611
- {'name': 'location', 'type': 'text', 'required': True, 'label': _('Location')},
612
- {'name': 'image', 'type': 'file', 'required': False, 'label': _('Featured Image')},
613
- {'name': 'registration_link', 'type': 'url', 'required': False, 'label': _('Registration Link')}
614
- ],
615
- 'faculty': [
616
- {'name': 'name', 'type': 'text', 'required': True, 'label': _('Name')},
617
- {'name': 'position', 'type': 'text', 'required': True, 'label': _('Position')},
618
- {'name': 'department', 'type': 'text', 'required': True, 'label': _('Department')},
619
- {'name': 'bio', 'type': 'textarea', 'required': False, 'label': _('Biography')},
620
- {'name': 'image', 'type': 'file', 'required': False, 'label': _('Photo')},
621
- {'name': 'email', 'type': 'email', 'required': False, 'label': _('Email')},
622
- {'name': 'phone', 'type': 'tel', 'required': False, 'label': _('Phone')}
623
- ]
624
- }
625
- return fields.get(content_type, [])
626
-
627
- # Admin API Endpoints
628
- @app.route('/admin/api/application/<application_id>/status', methods=['POST'])
629
- @admin_required
630
- def update_application_status(application_id):
631
- applications = load_data('applications') or []
632
- application = next((app for app in applications if app['id'] == application_id), None)
633
-
634
- if not application:
635
- return jsonify({'success': False, 'message': 'Application not found'}), 404
636
-
637
- new_status = request.json.get('status')
638
- if new_status not in ['submitted', 'reviewed', 'accepted', 'rejected', 'waitlisted']:
639
- return jsonify({'success': False, 'message': 'Invalid status'}), 400
640
-
641
- # Update application
642
- for app in applications:
643
- if app['id'] == application_id:
644
- old_status = app['status']
645
- app['status'] = new_status
646
- app['review_date'] = datetime.now().strftime("%Y-%m-%d %H:%M")
647
- app['reviewed_by'] = session.get('admin_username', 'admin')
648
- break
649
-
650
- save_data('applications', applications)
651
-
652
- # Send email notification if status changed to accepted
653
- if new_status == 'accepted' and new_status != old_status:
654
- # Send to applicant
655
- applicant_email = application.get('parent_email')
656
- if applicant_email:
657
- subject = _("Your Application to Munishi Secondary School Has Been Accepted!")
658
- body = _(
659
- f"Dear {application['first_name']} {application['last_name']},\n\n"
660
- "We are pleased to inform you that your application to Munishi Secondary School has been accepted!\n\n"
661
- "Congratulations! We look forward to welcoming you to our school community.\n\n"
662
- "Next Steps:\n"
663
- "1. Please log in to your application portal to review the acceptance letter\n"
664
- "2. Complete the enrollment forms by [date]\n"
665
- "3. Submit any remaining documents\n\n"
666
- "If you have any questions, please contact our admissions office at admissions@munishischool.ac.tz\n\n"
667
- "Sincerely,\n"
668
- "The Admissions Committee\n"
669
- "Munishi Secondary School"
670
- )
671
- send_email(subject, [applicant_email], body)
672
-
673
- # Send to admin
674
- admin_subject = _("Application Accepted: {} {}").format(
675
- application['first_name'], application['last_name'])
676
- admin_body = _(
677
- f"Application ID: {application_id}\n"
678
- f"Student: {application['first_name']} {application['last_name']}\n"
679
- f"Parent Email: {application.get('parent_email', 'N/A')}\n"
680
- f"Status changed to: Accepted\n\n"
681
- "Review the application: {}\n"
682
- ).format(url_for('admin_application_detail', application_id=application_id, _external=True))
683
- send_email(admin_subject, [app.config['ADMIN_EMAIL']], admin_body)
684
-
685
- return jsonify({'success': True, 'new_status': new_status})
686
-
687
- @app.route('/admin/api/application/<application_id>/notes', methods=['POST'])
688
- @admin_required
689
- def update_application_notes(application_id):
690
- applications = load_data('applications') or []
691
- application = next((app for app in applications if app['id'] == application_id), None)
692
-
693
- if not application:
694
- return jsonify({'success': False, 'message': 'Application not found'}), 404
695
-
696
- notes = request.json.get('notes', '')
697
-
698
- # Update application
699
- for app in applications:
700
- if app['id'] == application_id:
701
- app['admin_notes'] = notes
702
- break
703
-
704
- save_data('applications', applications)
705
- return jsonify({'success': True})
706
-
707
- # Main Routes
708
- @app.route('/')
709
- def home():
710
- """Home page route"""
711
- news_data = load_data('news')
712
- events_data = load_data('events')
713
- highlights_data = load_data('highlights')
714
-
715
- news = news_data[:3] if news_data else []
716
- events = events_data[:3] if events_data else []
717
- highlights = highlights_data[:3] if highlights_data else []
718
-
719
- return render_template('home.html',
720
- news=news,
721
- events=events,
722
- highlights=highlights)
723
-
724
- @app.route('/about')
725
- def about():
726
- """About page route"""
727
- return render_template('about.html',
728
- history=load_data('history') or {},
729
- mission=load_data('mission') or {},
730
- leadership=load_data('leadership') or [],
731
- facilities=load_data('facilities') or [],
732
- faculty=load_data('faculty') or {
733
- 'stats': {'teachers': 0, 'degrees': 0, 'training': 0},
734
- 'department_heads': []
735
- })
736
-
737
- @app.route('/academics')
738
- def academics():
739
- """Academics page route"""
740
- return render_template('academics.html',
741
- subjects=load_data('subjects') or [],
742
- results=load_data('results') or {},
743
- calendar=load_data('calendar') or [])
744
-
745
- # Admissions Routes
746
- @app.route('/admissions')
747
- def admissions():
748
- """Admissions main page"""
749
- return render_template('admissions.html',
750
- process={
751
- 'steps': load_data('admissions_steps') or [],
752
- 'requirements': load_data('admissions_requirements') or []
753
- },
754
- fees=load_data('fee_structure') or [],
755
- scholarships=load_data('scholarships') or [],
756
- downloads=load_data('admissions_downloads') or [])
757
-
758
- @app.route('/admissions/apply', methods=['GET', 'POST'])
759
- def admissions_apply():
760
- """Admissions application form"""
761
- if request.method == 'POST':
762
- # Validate required fields
763
- required_fields = [
764
- 'first_name', 'last_name', 'birthdate', 'gender',
765
- 'parent_name', 'parent_email', 'parent_phone'
766
- ]
767
- if not all(request.form.get(field) for field in required_fields):
768
- flash(_('Please fill in all required fields'), 'error')
769
- return redirect(url_for('admissions_apply'))
770
-
771
- # Create application data
772
- student_data = {
773
- 'id': str(uuid.uuid4()),
774
- 'first_name': request.form.get('first_name'),
775
- 'last_name': request.form.get('last_name'),
776
- 'birthdate': request.form.get('birthdate'),
777
- 'gender': request.form.get('gender'),
778
- 'nationality': request.form.get('nationality', ''),
779
- 'current_school': request.form.get('current_school', ''),
780
- 'applying_grade': request.form.get('applying_grade', ''),
781
- 'parent_name': request.form.get('parent_name'),
782
- 'parent_email': request.form.get('parent_email'),
783
- 'parent_phone': request.form.get('parent_phone'),
784
- 'address': request.form.get('address', ''),
785
- 'emergency_contact': request.form.get('emergency_contact', ''),
786
- 'medical_conditions': request.form.get('medical_conditions', ''),
787
- 'previous_schools': request.form.get('previous_schools', ''),
788
- 'extracurriculars': request.form.get('extracurriculars', ''),
789
- 'why_join': request.form.get('why_join', ''),
790
- 'status': 'submitted',
791
- 'submission_date': datetime.now().strftime("%Y-%m-%d %H:%M"),
792
- }
793
-
794
- # Handle file uploads
795
- uploaded_files = {}
796
- for file_field in ['birth_certificate', 'academic_records', 'recommendation_letter', 'photo']:
797
- file = request.files.get(file_field)
798
- if file and allowed_file(file.filename):
799
- filename = secure_filename(f"{student_data['id']}_{file_field}{os.path.splitext(file.filename)[1]}")
800
- upload_dir = os.path.join(app.config['UPLOAD_FOLDER'], 'applications')
801
- os.makedirs(upload_dir, exist_ok=True)
802
- file_path = os.path.join(upload_dir, filename)
803
- file.save(file_path)
804
- uploaded_files[file_field] = filename
805
-
806
- # Save application data
807
- applications = load_data('applications') or []
808
- full_data = {**student_data, **uploaded_files}
809
- applications.append(full_data)
810
- save_data('applications', applications)
811
-
812
- # Send email notifications
813
- # To applicant
814
- applicant_subject = _("Application Submitted to Munishi Secondary School")
815
- applicant_body = _(
816
- f"Dear {student_data['first_name']} {student_data['last_name']},\n\n"
817
- "Thank you for submitting your application to Munishi Secondary School!\n\n"
818
- f"Your application ID is: {student_data['id']}\n"
819
- "We will review your application and contact you within 5-7 business days.\n\n"
820
- "If you have any questions, please contact our admissions office at admissions@munishischool.ac.tz\n\n"
821
- "Sincerely,\n"
822
- "The Admissions Committee\n"
823
- "Munishi Secondary School"
824
- )
825
- send_email(applicant_subject, [student_data['parent_email']], applicant_body)
826
-
827
- # To admin
828
- admin_subject = _("New Application Submitted: {} {}").format(
829
- student_data['first_name'], student_data['last_name'])
830
- admin_body = _(
831
- f"Application ID: {student_data['id']}\n"
832
- f"Student: {student_data['first_name']} {student_data['last_name']}\n"
833
- f"Applying Grade: {student_data.get('applying_grade', 'N/A')}\n"
834
- f"Parent: {student_data['parent_name']}\n"
835
- f"Email: {student_data['parent_email']}\n"
836
- f"Phone: {student_data['parent_phone']}\n\n"
837
- "Review the application: {}\n"
838
- ).format(url_for('admin_application_detail', application_id=student_data['id'], _external=True))
839
- send_email(admin_subject, [app.config['ADMIN_EMAIL']], admin_body)
840
-
841
- flash(_('Application submitted successfully!'), 'success')
842
- return redirect(url_for('application_success', application_id=student_data['id']))
843
-
844
- return render_template('admissions/apply.html')
845
-
846
- @app.route('/admissions/success/<application_id>')
847
- def application_success(application_id):
848
- """Application submission success page"""
849
- return render_template('admissions/application_success.html',
850
- application_id=application_id)
851
-
852
- @app.route('/admissions/view/<application_id>')
853
- def view_application(application_id):
854
- """View submitted application (admin view)"""
855
- applications = load_data('applications') or []
856
- application = next((app for app in applications if app['id'] == application_id), None)
857
-
858
- if not application:
859
- return render_template('404.html'), 404
860
-
861
- return render_template('admissions/view_application.html',
862
- application=application)
863
-
864
- # Other Routes
865
- @app.route('/student-life')
866
- def student_life():
867
- """Student life page route"""
868
- return render_template('student_life.html',
869
- clubs=load_data('clubs') or [],
870
- sports={
871
- 'competitive': load_data('sports_competitive') or [],
872
- 'recreational': load_data('sports_recreational') or [],
873
- 'achievements': load_data('sports_achievements') or []
874
- },
875
- arts={
876
- 'performing': load_data('arts_performing') or [],
877
- 'visual': load_data('arts_visual') or []
878
- },
879
- activities=load_data('activities') or [],
880
- blogs=load_data('blogs') or [])
881
-
882
- @app.route('/safeguarding')
883
- def safeguarding():
884
- """Safeguarding page route"""
885
- return render_template('safeguarding.html',
886
- policies=load_data('policies') or [])
887
-
888
- @app.route('/news')
889
- def news():
890
- """News listing page route"""
891
- return render_template('news.html',
892
- news=load_data('news') or [])
893
-
894
- @app.route('/news/<slug>')
895
- def news_detail(slug):
896
- """News detail page route"""
897
- news_items = load_data('news') or []
898
- item = next((item for item in news_items if item.get('slug') == slug), None)
899
- if not item:
900
- return render_template('404.html'), 404
901
- return render_template('news_detail.html', item=item)
902
-
903
- @app.route('/events')
904
- def events():
905
- """Events listing page route"""
906
- return render_template('events.html',
907
- events=load_data('events') or [])
908
-
909
- @app.route('/alumni')
910
- def alumni():
911
- """Alumni page route"""
912
- return render_template('alumni.html',
913
- alumni=load_data('alumni') or [])
914
-
915
-
916
-
917
-
918
- # Add these routes in the "Admin Routes" section
919
-
920
- @app.route('/download/application/<filename>')
921
- @admin_required
922
- def download_application_file(filename):
923
- """Download an application file uploaded by the applicant"""
924
- directory = os.path.join(app.config['UPLOAD_FOLDER'], 'applications')
925
- return send_from_directory(directory, filename, as_attachment=True)
926
-
927
- @app.route('/download/admin/<filename>')
928
- @admin_required
929
- def download_admin_file(filename):
930
- """Download an admin uploaded file for an application"""
931
- directory = os.path.join(app.config['ADMIN_UPLOAD_FOLDER'], 'application_docs')
932
- return send_from_directory(directory, filename, as_attachment=True)
933
-
934
-
935
-
936
-
937
- @app.route('/contact', methods=['GET', 'POST'])
938
- def contact():
939
- """Contact page route with form handling"""
940
- contact_data = load_data('contact') or {
941
- 'locations': [],
942
- 'departments': [],
943
- 'office_hours': {}
944
- }
945
-
946
- if request.method == 'POST':
947
- name = request.form.get('name', '').strip()
948
- email = request.form.get('email', '').strip()
949
- subject = request.form.get('subject', 'No Subject').strip()
950
- message = request.form.get('message', '').strip()
951
-
952
- # Validate form data
953
- if not all([name, email, message]):
954
- flash(_('Please fill in all required fields'), 'error')
955
- return redirect(url_for('contact'))
956
-
957
- if '@' not in email or '.' not in email:
958
- flash(_('Please enter a valid email address'), 'error')
959
- return redirect(url_for('contact'))
960
-
961
- # Process the message (in production: save to DB and send email)
962
- print(f"New contact message from {name} ({email}): {message}")
963
-
964
- # Send email to admin
965
- admin_subject = f"New Contact Form Submission: {subject}"
966
- admin_body = (
967
- f"Name: {name}\n"
968
- f"Email: {email}\n"
969
- f"Subject: {subject}\n\n"
970
- f"Message:\n{message}"
971
- )
972
- send_email(admin_subject, [app.config['ADMIN_EMAIL']], admin_body)
973
-
974
- flash(_('Your message has been sent successfully!'), 'success')
975
- return redirect(url_for('contact_success'))
976
-
977
- return render_template('contact.html',
978
- locations=contact_data.get('locations', []),
979
- departments=contact_data.get('departments', []),
980
- office_hours=contact_data.get('office_hours', {}))
981
-
982
- @app.route('/contact/success')
983
- def contact_success():
984
- """Contact success page"""
985
- return render_template('contact_success.html')
986
-
987
- @app.route('/downloads/<category>/<filename>')
988
- def download_file(category, filename):
989
- """File download route"""
990
- try:
991
- # Secure the filename to prevent directory traversal attacks
992
- safe_filename = secure_filename(filename)
993
- directory = os.path.join(app.root_path, 'static', 'downloads', category)
994
-
995
- # Verify file exists before sending
996
- if not os.path.exists(os.path.join(directory, safe_filename)):
997
- app.logger.error(f"File not found: {category}/{safe_filename}")
998
- return render_template('404.html'), 404
999
-
1000
- return send_from_directory(
1001
- directory,
1002
- safe_filename,
1003
- as_attachment=True,
1004
- mimetype='application/octet-stream'
1005
- )
1006
- except Exception as e:
1007
- app.logger.error(f"Download error: {str(e)}")
1008
- return render_template('500.html'), 500
1009
-
1010
- # Error Handlers
1011
- @app.errorhandler(404)
1012
- def page_not_found(e):
1013
- """404 Error handler"""
1014
- return render_template('404.html'), 404
1015
-
1016
- @app.errorhandler(500)
1017
- def internal_server_error(e):
1018
- """500 Error handler"""
1019
- return render_template('500.html'), 500
1020
-
1021
- if __name__ == '__main__':
1022
- # Create necessary directories if they don't exist
1023
- os.makedirs('data', exist_ok=True)
1024
- os.makedirs('static/downloads/admissions', exist_ok=True)
1025
- os.makedirs('static/downloads/scholarships', exist_ok=True)
1026
- os.makedirs('static/uploads/applications', exist_ok=True)
1027
- os.makedirs(app.config['ADMIN_UPLOAD_FOLDER'], exist_ok=True)
1028
-
1029
- # Create admin template files if they don't exist
1030
- admin_templates = [
1031
- 'admin/base.html',
1032
- 'admin/login.html',
1033
- 'admin/dashboard.html',
1034
- 'admin/applications.html',
1035
- 'admin/application_detail.html',
1036
- 'admin/settings.html',
1037
- 'admin/content.html',
1038
- 'admin/manage_content.html'
1039
- ]
1040
-
1041
- os.makedirs('templates/admin', exist_ok=True)
1042
- for template in admin_templates:
1043
- template_path = os.path.join('templates', template)
1044
- if not os.path.exists(template_path):
1045
- with open(template_path, 'w') as f:
1046
- f.write(f"<!-- {template} -->\n")
1047
-
1048
- app.run(debug=True, host='0.0.0.0', port=7860)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app_errors.log DELETED
File without changes
css/style.css DELETED
@@ -1,265 +0,0 @@
1
- /* static/css/style.css */
2
- :root {
3
- --primary: #1a4d8c;
4
- --secondary: #f9a826;
5
- --accent: #e74c3c;
6
- --light: #f8f9fa;
7
- --dark: #343a40;
8
- }
9
-
10
- body {
11
- font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
12
- color: #333;
13
- line-height: 1.6;
14
- }
15
-
16
- /* Accessibility enhancements */
17
- a:focus, button:focus {
18
- outline: 3px solid var(--secondary);
19
- outline-offset: 2px;
20
- }
21
-
22
- .skip-link {
23
- position: absolute;
24
- top: -40px;
25
- left: 0;
26
- background: var(--primary);
27
- color: white;
28
- padding: 8px;
29
- z-index: 100;
30
- }
31
-
32
- .skip-link:focus {
33
- top: 0;
34
- }
35
-
36
- /* Header */
37
- .navbar-brand img {
38
- max-height: 70px;
39
- }
40
-
41
- .navbar .nav-link {
42
- font-weight: 500;
43
- padding: 0.5rem 1rem;
44
- transition: all 0.3s;
45
- position: relative;
46
- }
47
-
48
- .navbar .nav-link:hover {
49
- color: var(--primary);
50
- }
51
-
52
- .navbar .nav-link:after {
53
- content: '';
54
- position: absolute;
55
- width: 0;
56
- height: 2px;
57
- bottom: 0;
58
- left: 0;
59
- background-color: var(--secondary);
60
- transition: width 0.3s;
61
- }
62
-
63
- .navbar .nav-link:hover:after,
64
- .navbar .nav-link.active:after {
65
- width: 100%;
66
- }
67
-
68
- /* Hero Section */
69
- .hero {
70
- background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg') center/cover no-repeat;
71
- color: white;
72
- padding: 100px 0;
73
- text-align: center;
74
- }
75
-
76
- .hero h1 {
77
- font-weight: 700;
78
- font-size: 3rem;
79
- text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
80
- }
81
-
82
- .hero p {
83
- font-size: 1.2rem;
84
- max-width: 700px;
85
- margin: 20px auto;
86
- }
87
-
88
- /* Cards */
89
- .card {
90
- border: none;
91
- border-radius: 10px;
92
- overflow: hidden;
93
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
94
- transition: transform 0.3s, box-shadow 0.3s;
95
- height: 100%;
96
- }
97
-
98
- .card:hover {
99
- transform: translateY(-10px);
100
- box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
101
- }
102
-
103
- .card-img-top {
104
- height: 200px;
105
- object-fit: cover;
106
- }
107
-
108
- .card-title {
109
- color: var(--primary);
110
- font-weight: 700;
111
- }
112
-
113
- /* News section */
114
- .news-card .date {
115
- color: var(--secondary);
116
- font-weight: 600;
117
- }
118
-
119
- /* Buttons */
120
- .btn-primary {
121
- background-color: var(--primary);
122
- border-color: var(--primary);
123
- }
124
-
125
- .btn-primary:hover {
126
- background-color: #0d3a6e;
127
- border-color: #0d3a6e;
128
- }
129
-
130
- .btn-secondary {
131
- background-color: var(--secondary);
132
- border-color: var(--secondary);
133
- color: #fff;
134
- }
135
-
136
- .btn-secondary:hover {
137
- background-color: #e59400;
138
- border-color: #e59400;
139
- }
140
-
141
- /* Section titles */
142
- .section-title {
143
- position: relative;
144
- margin-bottom: 40px;
145
- text-align: center;
146
- }
147
-
148
- .section-title:after {
149
- content: '';
150
- display: block;
151
- width: 80px;
152
- height: 4px;
153
- background: var(--secondary);
154
- margin: 15px auto 0;
155
- }
156
-
157
- /* Testimonials */
158
- .testimonial {
159
- background: var(--light);
160
- padding: 30px;
161
- border-radius: 10px;
162
- position: relative;
163
- }
164
-
165
- .testimonial:after {
166
- content: '"';
167
- position: absolute;
168
- top: 20px;
169
- left: 20px;
170
- font-size: 5rem;
171
- color: rgba(0, 0, 0, 0.05);
172
- font-family: Georgia, serif;
173
- }
174
-
175
- .testimonial .author {
176
- font-weight: 600;
177
- color: var(--primary);
178
- margin-top: 20px;
179
- }
180
-
181
- /* Footer */
182
- footer {
183
- background: linear-gradient(to right, #0a3a6d, #1a4d8c);
184
- }
185
-
186
- footer h5 {
187
- position: relative;
188
- padding-bottom: 15px;
189
- }
190
-
191
- footer h5:after {
192
- content: '';
193
- position: absolute;
194
- left: 0;
195
- bottom: 0;
196
- width: 50px;
197
- height: 2px;
198
- background: var(--secondary);
199
- }
200
-
201
- footer a {
202
- color: #ddd;
203
- text-decoration: none;
204
- transition: color 0.3s;
205
- }
206
-
207
- footer a:hover {
208
- color: var(--secondary);
209
- }
210
-
211
- .social-links a {
212
- display: inline-block;
213
- width: 40px;
214
- height: 40px;
215
- background: rgba(255, 255, 255, 0.1);
216
- border-radius: 50%;
217
- text-align: center;
218
- line-height: 40px;
219
- transition: all 0.3s;
220
- }
221
-
222
- .social-links a:hover {
223
- background: var(--secondary);
224
- transform: translateY(-5px);
225
- }
226
-
227
- /* WhatsApp Button */
228
- .whatsapp-button {
229
- position: fixed;
230
- bottom: 30px;
231
- right: 30px;
232
- width: 60px;
233
- height: 60px;
234
- background: #25d366;
235
- border-radius: 50%;
236
- display: flex;
237
- align-items: center;
238
- justify-content: center;
239
- color: white;
240
- font-size: 2rem;
241
- box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
242
- z-index: 1000;
243
- transition: all 0.3s;
244
- }
245
-
246
- .whatsapp-button:hover {
247
- transform: scale(1.1);
248
- box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
249
- color: white;
250
- }
251
-
252
- /* Responsive adjustments */
253
- @media (max-width: 768px) {
254
- .hero {
255
- padding: 60px 0;
256
- }
257
-
258
- .hero h1 {
259
- font-size: 2.2rem;
260
- }
261
-
262
- .navbar-brand img {
263
- max-height: 50px;
264
- }
265
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/activities.json DELETED
@@ -1,29 +0,0 @@
1
- [
2
- {
3
- "title": "Science Fair",
4
- "description": "Annual showcase of student science projects",
5
- "date": "2025-09-15",
6
- "time": "9:00 AM - 4:00 PM",
7
- "location": "School Hall",
8
- "category": "Academic",
9
- "color": "primary"
10
- },
11
- {
12
- "title": "Cultural Festival",
13
- "description": "Celebration of diverse cultures and traditions",
14
- "date": "2025-10-01",
15
- "time": "10:00 AM - 6:00 PM",
16
- "location": "School Grounds",
17
- "category": "Cultural",
18
- "color": "secondary"
19
- },
20
- {
21
- "title": "Sports Day",
22
- "description": "Inter-house sports competition",
23
- "date": "2025-10-15",
24
- "time": "8:00 AM - 5:00 PM",
25
- "location": "Sports Complex",
26
- "category": "Sports",
27
- "color": "accent"
28
- }
29
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/admissions_process.json DELETED
@@ -1,33 +0,0 @@
1
-
2
- {
3
- "title": "Admissions Process",
4
- "steps": [
5
- {
6
- "title": "Application Submission",
7
- "description": "Submit completed application form with required documents by the deadline.",
8
- "deadline": "2023-11-30"
9
- },
10
- {
11
- "title": "Entrance Examination",
12
- "description": "All applicants must take our entrance examination at the school campus.",
13
- "date": "2023-12-15"
14
- },
15
- {
16
- "title": "Interviews",
17
- "description": "Shortlisted candidates will be invited for an interview with the admissions panel.",
18
- "period": "2024-01-10 to 2024-01-20"
19
- },
20
- {
21
- "title": "Admission Offers",
22
- "description": "Successful candidates will receive admission offers via email and post.",
23
- "date": "2024-02-01"
24
- }
25
- ],
26
- "requirements": [
27
- "Completed application form",
28
- "Birth certificate",
29
- "Passport-size photographs (2)",
30
- "Primary school leaving certificate",
31
- "Medical report"
32
- ]
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/applications.json DELETED
@@ -1,58 +0,0 @@
1
- [
2
- {
3
- "id": "7d8de7f4-a5c9-47c3-81e0-9e95eed94557",
4
- "first_name": "joshua",
5
- "last_name": "john",
6
- "birthdate": "2006-12-28",
7
- "gender": "male",
8
- "nationality": "tanzania",
9
- "current_school": "magu",
10
- "applying_grade": "form1",
11
- "parent_name": "kiki",
12
- "parent_email": "testallinone001@gmail.com",
13
- "parent_phone": "0742901900",
14
- "address": "mwanza\r\nmwanza",
15
- "emergency_contact": "788767868",
16
- "medical_conditions": "no",
17
- "previous_schools": "magu",
18
- "extracurriculars": "no",
19
- "why_join": "coz",
20
- "status": "accepted",
21
- "submission_date": "2025-08-13 23:58",
22
- "birth_certificate": "7d8de7f4-a5c9-47c3-81e0-9e95eed94557_birth_certificate.pdf",
23
- "academic_records": "7d8de7f4-a5c9-47c3-81e0-9e95eed94557_academic_records.pdf",
24
- "recommendation_letter": "7d8de7f4-a5c9-47c3-81e0-9e95eed94557_recommendation_letter.pdf",
25
- "photo": "7d8de7f4-a5c9-47c3-81e0-9e95eed94557_photo.png",
26
- "admin_notes": "",
27
- "review_date": "2025-08-14 01:28",
28
- "reviewed_by": "admin"
29
- },
30
- {
31
- "id": "348f9a45-0184-40ed-8fc4-444829eea40d",
32
- "first_name": "hamida",
33
- "last_name": "kylie",
34
- "birthdate": "2006-12-28",
35
- "gender": "female",
36
- "nationality": "tanzania",
37
- "current_school": "kwao",
38
- "applying_grade": "form4",
39
- "parent_name": "malcom",
40
- "parent_email": "testallinone001@gmail.com",
41
- "parent_phone": "0742901900",
42
- "address": "Kigamboni Dar-es-Salaam\r\n",
43
- "emergency_contact": "123",
44
- "medical_conditions": "n/a",
45
- "previous_schools": "n/a",
46
- "extracurriculars": "no",
47
- "why_join": "coz",
48
- "status": "rejected",
49
- "submission_date": "2025-08-14 01:20",
50
- "birth_certificate": "348f9a45-0184-40ed-8fc4-444829eea40d_birth_certificate.pdf",
51
- "academic_records": "348f9a45-0184-40ed-8fc4-444829eea40d_academic_records.pdf",
52
- "recommendation_letter": "348f9a45-0184-40ed-8fc4-444829eea40d_recommendation_letter.pdf",
53
- "photo": "348f9a45-0184-40ed-8fc4-444829eea40d_photo.png",
54
- "admin_notes": "",
55
- "review_date": "2025-08-14 02:18",
56
- "reviewed_by": "admin"
57
- }
58
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/arts_performing.json DELETED
@@ -1,20 +0,0 @@
1
- [
2
- {
3
- "name": "Drama Club",
4
- "description": "Students explore acting, directing, and theatre production",
5
- "icon": "fas fa-theater-masks",
6
- "upcoming": "Annual School Play - November 2025"
7
- },
8
- {
9
- "name": "Music Ensemble",
10
- "description": "Vocal and instrumental music performances",
11
- "icon": "fas fa-music",
12
- "upcoming": "Winter Concert - December 2025"
13
- },
14
- {
15
- "name": "Dance Troupe",
16
- "description": "Contemporary and traditional dance performances",
17
- "icon": "fas fa-dancing",
18
- "upcoming": "Cultural Festival - October 2025"
19
- }
20
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/arts_visual.json DELETED
@@ -1,20 +0,0 @@
1
- [
2
- {
3
- "name": "Fine Arts Studio",
4
- "description": "Painting, drawing, and sculpture workshops",
5
- "icon": "fas fa-paint-brush",
6
- "exhibition": "Student Exhibition - September 2025"
7
- },
8
- {
9
- "name": "Digital Arts Lab",
10
- "description": "Digital design and multimedia creation",
11
- "icon": "fas fa-desktop",
12
- "exhibition": "Digital Showcase - October 2025"
13
- },
14
- {
15
- "name": "Photography Club",
16
- "description": "Photography techniques and composition",
17
- "icon": "fas fa-camera",
18
- "exhibition": "Photo Gallery - November 2025"
19
- }
20
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/blogs.json DELETED
@@ -1,20 +0,0 @@
1
- [
2
- {
3
- "title": "My Experience in the Robotics Club",
4
- "author": "John Smith",
5
- "date": "2025-08-01",
6
- "excerpt": "How joining the robotics club changed my perspective on technology and teamwork."
7
- },
8
- {
9
- "title": "Art Exhibition Success",
10
- "author": "Maria Johnson",
11
- "date": "2025-07-15",
12
- "excerpt": "Our annual art exhibition showcased incredible talent from students across all grades."
13
- },
14
- {
15
- "title": "Sports Day Highlights",
16
- "author": "David Chen",
17
- "date": "2025-07-01",
18
- "excerpt": "The most memorable moments from this year's inter-house sports competition."
19
- }
20
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/clubs.json DELETED
@@ -1,26 +0,0 @@
1
- [
2
- {
3
- "name": "Science Club",
4
- "description": "Explore scientific experiments and discoveries",
5
- "icon": "fas fa-flask",
6
- "category": "Academic",
7
- "members": 45,
8
- "color": "primary"
9
- },
10
- {
11
- "name": "Debate Club",
12
- "description": "Develop public speaking and critical thinking skills",
13
- "icon": "fas fa-comments",
14
- "category": "Leadership",
15
- "members": 30,
16
- "color": "secondary"
17
- },
18
- {
19
- "name": "Environmental Club",
20
- "description": "Working towards a sustainable future",
21
- "icon": "fas fa-leaf",
22
- "category": "Service",
23
- "members": 38,
24
- "color": "accent"
25
- }
26
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/contact.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "locations": [
3
- {
4
- "name": "Main Campus",
5
- "address": "P.O. Box 1234, Dar es Salaam, Tanzania",
6
- "phone": "+255 22 123 4567",
7
- "email": "info@munishischool.ac.tz",
8
- "map_embed": "<iframe src='https://maps.google.com/maps?q=dar%20es%20salaam&t=&z=13&ie=UTF8&iwloc=&output=embed' width='600' height='450' style='border:0;' allowfullscreen='' loading='lazy'></iframe>"
9
- }
10
- ],
11
- "departments": [
12
- {
13
- "name": "Admissions",
14
- "email": "admissions@munishischool.ac.tz",
15
- "phone": "+255 22 123 4568"
16
- },
17
- {
18
- "name": "Academic Office",
19
- "email": "academics@munishischool.ac.tz",
20
- "phone": "+255 22 123 4569"
21
- }
22
- ],
23
- "office_hours": {
24
- "weekdays": "7:30 AM - 4:30 PM",
25
- "saturday": "9:00 AM - 1:00 PM",
26
- "sunday": "Closed"
27
- }
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/events.js DELETED
@@ -1,22 +0,0 @@
1
- [
2
- {
3
- "id": 1,
4
- "title": "Annual Sports Day",
5
- "slug": "sports-day-2023",
6
- "date": "2023-11-20",
7
- "end_date": "2023-11-21",
8
- "location": "School Grounds",
9
- "description": "Our annual inter-house sports competition featuring athletics, football, and volleyball.",
10
- "image": "sports-day.jpg"
11
- },
12
- {
13
- "id": 2,
14
- "title": "Career Guidance Seminar",
15
- "slug": "career-seminar",
16
- "date": "2023-12-05",
17
- "time": "10:00 AM",
18
- "location": "School Auditorium",
19
- "description": "Guest speakers from various professions will share insights about career opportunities.",
20
- "image": "career-seminar.jpg"
21
- }
22
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/events.json DELETED
@@ -1,14 +0,0 @@
1
- [
2
- {
3
- "title": "Annual Sports Day",
4
- "date": "2025-09-15",
5
- "time": "9:00 AM",
6
- "description": "Join us for our annual sports day celebration"
7
- },
8
- {
9
- "title": "Parent-Teacher Meeting",
10
- "date": "2025-08-30",
11
- "time": "2:00 PM",
12
- "description": "Term 1 parent-teacher consultation"
13
- }
14
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/facilities.json DELETED
@@ -1,38 +0,0 @@
1
- [
2
- {
3
- "name": "Library",
4
- "description": "A well-stocked library with over 10,000 books and digital resources.",
5
- "image": "library.jpg",
6
- "icon": "book",
7
- "features": [
8
- "10,000+ Books",
9
- "Digital Catalog",
10
- "Study Areas",
11
- "Internet Access"
12
- ]
13
- },
14
- {
15
- "name": "Science Laboratories",
16
- "description": "Modern labs for Physics, Chemistry and Biology with the latest equipment.",
17
- "image": "science-lab.jpg",
18
- "icon": "flask",
19
- "features": [
20
- "Physics Lab",
21
- "Chemistry Lab",
22
- "Biology Lab",
23
- "Modern Equipment"
24
- ]
25
- },
26
- {
27
- "name": "Sports Facilities",
28
- "description": "Football field, basketball court, volleyball court, and athletics track.",
29
- "image": "sports-field.jpg",
30
- "icon": "futbol",
31
- "features": [
32
- "Football Field",
33
- "Basketball Court",
34
- "Volleyball Court",
35
- "Athletics Track"
36
- ]
37
- }
38
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/faculty.json DELETED
@@ -1,33 +0,0 @@
1
- {
2
- "stats": {
3
- "teachers": 45,
4
- "degrees": 85,
5
- "training": 120
6
- },
7
- "department_heads": [
8
- {
9
- "name": "Dr. Mary Makamba",
10
- "department": "Sciences",
11
- "qualification": "PhD in Physics",
12
- "initials": "MM"
13
- },
14
- {
15
- "name": "Mr. James Ndosi",
16
- "department": "Languages",
17
- "qualification": "MA in Literature",
18
- "initials": "JN"
19
- },
20
- {
21
- "name": "Ms. Grace Mwanga",
22
- "department": "Mathematics",
23
- "qualification": "MSc in Mathematics",
24
- "initials": "GM"
25
- },
26
- {
27
- "name": "Mr. Peter Kileo",
28
- "department": "Humanities",
29
- "qualification": "MA in History",
30
- "initials": "PK"
31
- }
32
- ]
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/highlights.json DELETED
@@ -1,17 +0,0 @@
1
- [
2
- {
3
- "title": "98% Pass Rate",
4
- "description": "Our 2022 Form 4 class achieved a 98% pass rate in the NECTA examinations.",
5
- "icon": "graduation-cap"
6
- },
7
- {
8
- "title": "New Science Labs",
9
- "description": "Fully equipped laboratories for Physics, Chemistry and Biology.",
10
- "icon": "flask"
11
- },
12
- {
13
- "title": "Sports Champions",
14
- "description": "Regional champions in football and athletics for three consecutive years.",
15
- "icon": "trophy"
16
- }
17
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/history.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "founding": {
3
- "year": 1975,
4
- "description": "Munishi Secondary School was established in 1975 as a government school with just two classrooms and 45 students."
5
- },
6
- "milestones": [
7
- {
8
- "year": 1982,
9
- "event": "First science laboratory built"
10
- },
11
- {
12
- "year": 1995,
13
- "event": "Introduction of Advanced Level studies"
14
- },
15
- {
16
- "year": 2010,
17
- "event": "Computer lab established with internet connectivity"
18
- }
19
- ]
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/leadership.json DELETED
@@ -1,23 +0,0 @@
1
- [
2
- {
3
- "name": "Dr. John Mwakyembe",
4
- "position": "Headmaster",
5
- "bio": "With over 20 years of experience in education, Dr. Mwakyembe has led Munishi School since 2015.",
6
- "photo": "headmaster.jpg",
7
- "email": "headmaster@munishischool.ac.tz"
8
- },
9
- {
10
- "name": "Mrs. Sarah Juma",
11
- "position": "Deputy Head Academics",
12
- "bio": "Specializing in science education, Mrs. Juma oversees our academic programs.",
13
- "photo": "deputy-academics.jpg",
14
- "email": "academics@munishischool.ac.tz"
15
- },
16
- {
17
- "name": "Mr. Robert Mushi",
18
- "position": "Deputy Head Administration",
19
- "bio": "Responsible for school operations and student welfare programs.",
20
- "photo": "deputy-admin.jpg",
21
- "email": "admin@munishischool.ac.tz"
22
- }
23
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/mission.json DELETED
@@ -1,26 +0,0 @@
1
- {
2
- "mission": "To provide quality education that empowers students academically, socially, and morally for national development.",
3
- "vision": "To be a center of excellence in secondary education in Tanzania.",
4
- "values": [
5
- {
6
- "name": "Academic Excellence",
7
- "description": "Striving for the highest standards in education and learning"
8
- },
9
- {
10
- "name": "Integrity",
11
- "description": "Maintaining honesty, ethics, and transparency in all actions"
12
- },
13
- {
14
- "name": "Discipline",
15
- "description": "Fostering self-control, responsibility, and commitment"
16
- },
17
- {
18
- "name": "Innovation",
19
- "description": "Embracing new ideas and approaches to learning"
20
- },
21
- {
22
- "name": "Social Responsibility",
23
- "description": "Contributing positively to our community and society"
24
- }
25
- ]
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/news.js DELETED
@@ -1,33 +0,0 @@
1
- // data/news.json
2
- [
3
- {
4
- "id": 1,
5
- "title": "Munishi Students Win National Science Competition",
6
- "slug": "science-competition-win",
7
- "date": "2023-10-15",
8
- "excerpt": "Our Form 3 students took first place in the National Science Fair with their innovative water purification project.",
9
- "content": "Munishi Secondary School is proud to announce that our Form 3 students emerged as winners in the prestigious National Science Competition held in Dodoma last week...",
10
- "image": "science-fair.jpg",
11
- "category": "Achievements"
12
- },
13
- {
14
- "id": 2,
15
- "title": "New Computer Lab Inauguration",
16
- "slug": "computer-lab-inauguration",
17
- "date": "2023-09-28",
18
- "excerpt": "The school has opened a state-of-the-art computer lab with 40 new computers and high-speed internet.",
19
- "content": "Thanks to a generous donation from our alumni association, Munishi Secondary School has established a new computer laboratory equipped with modern technology...",
20
- "image": "computer-lab.jpg",
21
- "category": "Facilities"
22
- },
23
- {
24
- "id": 3,
25
- "title": "Parent-Teacher Meeting Scheduled",
26
- "slug": "ptm-scheduled",
27
- "date": "2023-10-05",
28
- "excerpt": "The next parent-teacher meeting will be held on October 25th at the school auditorium.",
29
- "content": "We invite all parents and guardians to the upcoming Parent-Teacher Meeting scheduled for October 25th, 2023...",
30
- "image": "ptm.jpg",
31
- "category": "Announcements"
32
- }
33
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/news.json DELETED
@@ -1,18 +0,0 @@
1
- [
2
- {
3
- "title": "New Science Lab Opening",
4
- "date": "2025-08-10",
5
- "category": "Facilities",
6
- "slug": "new-science-lab-opening",
7
- "image": "science-lab.jpg",
8
- "excerpt": "State-of-the-art science laboratory opened to enhance practical learning"
9
- },
10
- {
11
- "title": "National Mathematics Competition Winners",
12
- "date": "2025-08-05",
13
- "category": "Achievements",
14
- "slug": "math-competition-winners",
15
- "image": "math-winners.jpg",
16
- "excerpt": "Our students excel in the National Mathematics Competition"
17
- }
18
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/sports_achievements.json DELETED
@@ -1,20 +0,0 @@
1
- [
2
- {
3
- "title": "Regional Champions",
4
- "description": "Football Team - Regional Tournament Winners",
5
- "date": "2025",
6
- "color": "primary"
7
- },
8
- {
9
- "title": "National Finals",
10
- "description": "Basketball Team - National Tournament Finalists",
11
- "date": "2024",
12
- "color": "secondary"
13
- },
14
- {
15
- "title": "Swimming Record",
16
- "description": "New School Record in 100m Freestyle",
17
- "date": "2025",
18
- "color": "accent"
19
- }
20
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/sports_competitive.json DELETED
@@ -1,18 +0,0 @@
1
- [
2
- {
3
- "name": "Football",
4
- "icon": "fas fa-futbol"
5
- },
6
- {
7
- "name": "Basketball",
8
- "icon": "fas fa-basketball-ball"
9
- },
10
- {
11
- "name": "Athletics",
12
- "icon": "fas fa-running"
13
- },
14
- {
15
- "name": "Swimming",
16
- "icon": "fas fa-swimming-pool"
17
- }
18
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/sports_recreational.json DELETED
@@ -1,18 +0,0 @@
1
- [
2
- {
3
- "name": "Table Tennis",
4
- "icon": "fas fa-table-tennis"
5
- },
6
- {
7
- "name": "Volleyball",
8
- "icon": "fas fa-volleyball-ball"
9
- },
10
- {
11
- "name": "Cricket",
12
- "icon": "fas fa-baseball-ball"
13
- },
14
- {
15
- "name": "Track & Field",
16
- "icon": "fas fa-running"
17
- }
18
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
requirements.txt DELETED
@@ -1,18 +0,0 @@
1
- babel==2.17.0
2
- BareNecessities==0.2.8
3
- blinker==1.9.0
4
- click==8.2.1
5
- colorama==0.4.6
6
- flash==1.0.3
7
- Flask==2.3.3
8
- Flask-Babel==2.0.0
9
- Flask-Mail==0.10.0
10
- flask_helpers==0.1
11
- itsdangerous==2.2.0
12
- Jinja2==3.1.6
13
- Mail==2.1.0
14
- MarkupSafe==3.0.2
15
- python-dotenv==1.1.1
16
- pytz==2025.2
17
- Werkzeug==3.1.3
18
- gunicorn==21.2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
static/css/style.css DELETED
@@ -1,265 +0,0 @@
1
- /* static/css/style.css */
2
- :root {
3
- --primary: #1a4d8c;
4
- --secondary: #f9a826;
5
- --accent: #e74c3c;
6
- --light: #f8f9fa;
7
- --dark: #343a40;
8
- }
9
-
10
- body {
11
- font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
12
- color: #333;
13
- line-height: 1.6;
14
- }
15
-
16
- /* Accessibility enhancements */
17
- a:focus, button:focus {
18
- outline: 3px solid var(--secondary);
19
- outline-offset: 2px;
20
- }
21
-
22
- .skip-link {
23
- position: absolute;
24
- top: -40px;
25
- left: 0;
26
- background: var(--primary);
27
- color: white;
28
- padding: 8px;
29
- z-index: 100;
30
- }
31
-
32
- .skip-link:focus {
33
- top: 0;
34
- }
35
-
36
- /* Header */
37
- .navbar-brand img {
38
- max-height: 70px;
39
- }
40
-
41
- .navbar .nav-link {
42
- font-weight: 500;
43
- padding: 0.5rem 1rem;
44
- transition: all 0.3s;
45
- position: relative;
46
- }
47
-
48
- .navbar .nav-link:hover {
49
- color: var(--primary);
50
- }
51
-
52
- .navbar .nav-link:after {
53
- content: '';
54
- position: absolute;
55
- width: 0;
56
- height: 2px;
57
- bottom: 0;
58
- left: 0;
59
- background-color: var(--secondary);
60
- transition: width 0.3s;
61
- }
62
-
63
- .navbar .nav-link:hover:after,
64
- .navbar .nav-link.active:after {
65
- width: 100%;
66
- }
67
-
68
- /* Hero Section */
69
- .hero {
70
- background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg') center/cover no-repeat;
71
- color: white;
72
- padding: 100px 0;
73
- text-align: center;
74
- }
75
-
76
- .hero h1 {
77
- font-weight: 700;
78
- font-size: 3rem;
79
- text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
80
- }
81
-
82
- .hero p {
83
- font-size: 1.2rem;
84
- max-width: 700px;
85
- margin: 20px auto;
86
- }
87
-
88
- /* Cards */
89
- .card {
90
- border: none;
91
- border-radius: 10px;
92
- overflow: hidden;
93
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
94
- transition: transform 0.3s, box-shadow 0.3s;
95
- height: 100%;
96
- }
97
-
98
- .card:hover {
99
- transform: translateY(-10px);
100
- box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
101
- }
102
-
103
- .card-img-top {
104
- height: 200px;
105
- object-fit: cover;
106
- }
107
-
108
- .card-title {
109
- color: var(--primary);
110
- font-weight: 700;
111
- }
112
-
113
- /* News section */
114
- .news-card .date {
115
- color: var(--secondary);
116
- font-weight: 600;
117
- }
118
-
119
- /* Buttons */
120
- .btn-primary {
121
- background-color: var(--primary);
122
- border-color: var(--primary);
123
- }
124
-
125
- .btn-primary:hover {
126
- background-color: #0d3a6e;
127
- border-color: #0d3a6e;
128
- }
129
-
130
- .btn-secondary {
131
- background-color: var(--secondary);
132
- border-color: var(--secondary);
133
- color: #fff;
134
- }
135
-
136
- .btn-secondary:hover {
137
- background-color: #e59400;
138
- border-color: #e59400;
139
- }
140
-
141
- /* Section titles */
142
- .section-title {
143
- position: relative;
144
- margin-bottom: 40px;
145
- text-align: center;
146
- }
147
-
148
- .section-title:after {
149
- content: '';
150
- display: block;
151
- width: 80px;
152
- height: 4px;
153
- background: var(--secondary);
154
- margin: 15px auto 0;
155
- }
156
-
157
- /* Testimonials */
158
- .testimonial {
159
- background: var(--light);
160
- padding: 30px;
161
- border-radius: 10px;
162
- position: relative;
163
- }
164
-
165
- .testimonial:after {
166
- content: '"';
167
- position: absolute;
168
- top: 20px;
169
- left: 20px;
170
- font-size: 5rem;
171
- color: rgba(0, 0, 0, 0.05);
172
- font-family: Georgia, serif;
173
- }
174
-
175
- .testimonial .author {
176
- font-weight: 600;
177
- color: var(--primary);
178
- margin-top: 20px;
179
- }
180
-
181
- /* Footer */
182
- footer {
183
- background: linear-gradient(to right, #0a3a6d, #1a4d8c);
184
- }
185
-
186
- footer h5 {
187
- position: relative;
188
- padding-bottom: 15px;
189
- }
190
-
191
- footer h5:after {
192
- content: '';
193
- position: absolute;
194
- left: 0;
195
- bottom: 0;
196
- width: 50px;
197
- height: 2px;
198
- background: var(--secondary);
199
- }
200
-
201
- footer a {
202
- color: #ddd;
203
- text-decoration: none;
204
- transition: color 0.3s;
205
- }
206
-
207
- footer a:hover {
208
- color: var(--secondary);
209
- }
210
-
211
- .social-links a {
212
- display: inline-block;
213
- width: 40px;
214
- height: 40px;
215
- background: rgba(255, 255, 255, 0.1);
216
- border-radius: 50%;
217
- text-align: center;
218
- line-height: 40px;
219
- transition: all 0.3s;
220
- }
221
-
222
- .social-links a:hover {
223
- background: var(--secondary);
224
- transform: translateY(-5px);
225
- }
226
-
227
- /* WhatsApp Button */
228
- .whatsapp-button {
229
- position: fixed;
230
- bottom: 30px;
231
- right: 30px;
232
- width: 60px;
233
- height: 60px;
234
- background: #25d366;
235
- border-radius: 50%;
236
- display: flex;
237
- align-items: center;
238
- justify-content: center;
239
- color: white;
240
- font-size: 2rem;
241
- box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
242
- z-index: 1000;
243
- transition: all 0.3s;
244
- }
245
-
246
- .whatsapp-button:hover {
247
- transform: scale(1.1);
248
- box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
249
- color: white;
250
- }
251
-
252
- /* Responsive adjustments */
253
- @media (max-width: 768px) {
254
- .hero {
255
- padding: 60px 0;
256
- }
257
-
258
- .hero h1 {
259
- font-size: 2.2rem;
260
- }
261
-
262
- .navbar-brand img {
263
- max-height: 50px;
264
- }
265
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
static/downloads/admissions/company logo.jpg DELETED
Binary file (41.5 kB)
 
static/downloads/admissions/prospectus.pdf DELETED
Binary file (49.1 kB)
 
static/downloads/general/index.html DELETED
@@ -1,10 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Downloads</title>
5
- </head>
6
- <body>
7
- <h1>Downloads</h1>
8
- <p>Available downloads will be listed here.</p>
9
- </body>
10
- </html>
 
 
 
 
 
 
 
 
 
 
 
static/images/default.jpg DELETED
static/js/main.js DELETED
@@ -1,63 +0,0 @@
1
- // Initialize tooltips
2
- document.addEventListener('DOMContentLoaded', function() {
3
- // Enable Bootstrap tooltips
4
- var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
5
- var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
6
- return new bootstrap.Tooltip(tooltipTriggerEl);
7
- });
8
-
9
- // Handle contact form submission
10
- const contactForm = document.getElementById('contact-form');
11
- if (contactForm) {
12
- contactForm.addEventListener('submit', function(e) {
13
- e.preventDefault();
14
-
15
- // Simple validation
16
- const name = document.getElementById('name').value.trim();
17
- const email = document.getElementById('email').value.trim();
18
- const message = document.getElementById('message').value.trim();
19
-
20
- if (!name || !email || !message) {
21
- alert('Please fill in all fields');
22
- return;
23
- }
24
-
25
- // In a real app, you would send this data to the server
26
- console.log('Form submitted:', { name, email, message });
27
-
28
- // Show success message
29
- alert('Thank you for your message. We will contact you soon.');
30
- contactForm.reset();
31
- });
32
- }
33
-
34
- // Language switcher
35
- const langSwitcher = document.querySelector('.lang-selector');
36
- if (langSwitcher) {
37
- langSwitcher.addEventListener('click', function(e) {
38
- if (e.target.tagName === 'A') {
39
- // In a real app, this would be handled by Flask
40
- localStorage.setItem('preferredLanguage', e.target.dataset.lang);
41
- }
42
- });
43
- }
44
-
45
- // Lazy loading for images
46
- if ('loading' in HTMLImageElement.prototype) {
47
- const images = document.querySelectorAll('img[loading="lazy"]');
48
- images.forEach(img => {
49
- img.src = img.dataset.src;
50
- });
51
- } else {
52
- // Fallback for browsers that don't support lazy loading
53
- const lazyLoadScript = document.createElement('script');
54
- lazyLoadScript.src = 'https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.6.1/dist/lazyload.min.js';
55
- document.body.appendChild(lazyLoadScript);
56
-
57
- lazyLoadScript.onload = function() {
58
- new LazyLoad({
59
- elements_selector: "[loading=lazy]"
60
- });
61
- };
62
- }
63
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
static/uploads/applications/348f9a45-0184-40ed-8fc4-444829eea40d_academic_records.pdf DELETED
Binary file (49.1 kB)
 
static/uploads/applications/348f9a45-0184-40ed-8fc4-444829eea40d_birth_certificate.pdf DELETED
Binary file (49.1 kB)
 
static/uploads/applications/348f9a45-0184-40ed-8fc4-444829eea40d_photo.png DELETED

Git LFS Details

  • SHA256: a7f9a1c6ad1f29779f048aa10235738a811223546459a35aa650b9ffc6ab30d5
  • Pointer size: 131 Bytes
  • Size of remote file: 525 kB
static/uploads/applications/348f9a45-0184-40ed-8fc4-444829eea40d_recommendation_letter.pdf DELETED
Binary file (49.1 kB)
 
static/uploads/applications/7d8de7f4-a5c9-47c3-81e0-9e95eed94557_academic_records.pdf DELETED
Binary file (49.1 kB)
 
static/uploads/applications/7d8de7f4-a5c9-47c3-81e0-9e95eed94557_birth_certificate.pdf DELETED
Binary file (49.1 kB)
 
static/uploads/applications/7d8de7f4-a5c9-47c3-81e0-9e95eed94557_photo.png DELETED

Git LFS Details

  • SHA256: 613ef752dc28674ad72b5814c528043cbaa47ac93484522d1f77441203aa4d71
  • Pointer size: 131 Bytes
  • Size of remote file: 509 kB
static/uploads/applications/7d8de7f4-a5c9-47c3-81e0-9e95eed94557_recommendation_letter.pdf DELETED
Binary file (49.1 kB)
 
templates/404.html DELETED
@@ -1,17 +0,0 @@
1
- {% extends "base.html" %}
2
-
3
- {% block content %}
4
- <section class="container py-20 text-center">
5
- <div class="max-w-2xl mx-auto glass-card p-12">
6
- <div class="text-primary text-6xl mb-6">
7
- <i class="fas fa-exclamation-triangle"></i>
8
- </div>
9
- <h1 class="text-3xl md:text-4xl font-bold mb-6">{{ _('Page Not Found') }}</h1>
10
- <p class="text-xl mb-8">{{ _('The page you are looking for does not exist.') }}</p>
11
- <p class="mb-10 text-dark/80">{{ _('Please check the URL or navigate back to the homepage.') }}</p>
12
- <a href="{{ url_for('home') }}" class="btn-primary inline-block">
13
- {{ _('Return to Homepage') }}
14
- </a>
15
- </div>
16
- </section>
17
- {% endblock %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/about.html DELETED
@@ -1,342 +0,0 @@
1
- {% extends "base.html" %}
2
-
3
- {% block content %}
4
- <!-- Hero Section -->
5
- <section class="relative py-20 bg-gradient-to-r from-primary to-indigo-800 text-white">
6
- <div class="container mx-auto px-4 text-center">
7
- <h1 class="text-4xl md:text-6xl font-bold mb-6">{{ _('About Our School') }}</h1>
8
- <p class="text-xl max-w-2xl mx-auto">{{ _('Discover our rich history, mission, and the dedicated team that makes Munishi School exceptional') }}</p>
9
- </div>
10
- </section>
11
-
12
- <!-- History Section -->
13
- <section class="py-16">
14
- <div class="container mx-auto px-4">
15
- <div class="flex flex-col md:flex-row items-center gap-10">
16
- <div class="md:w-1/2 relative">
17
- <div class="rounded-2xl overflow-hidden shadow-xl">
18
- <div class="aspect-w-16 aspect-h-9 bg-gray-200 rounded-2xl overflow-hidden">
19
- <div class="bg-gradient-to-r from-primary/30 to-secondary/30 w-full h-full flex items-center justify-center">
20
- <i class="fas fa-landmark text-white text-6xl"></i>
21
- </div>
22
- </div>
23
- </div>
24
- <div class="absolute -bottom-6 -right-6 w-40 h-40 bg-accent rounded-2xl z-[-1] animate-float"></div>
25
- </div>
26
-
27
- <div class="md:w-1/2">
28
- <div class="glass-card p-8">
29
- <h2 class="text-3xl font-bold mb-6 text-primary">{{ _('Our History') }}</h2>
30
- <p class="mb-6 text-dark/80">
31
- {{ history.founding.description }}
32
- </p>
33
- <div class="mt-8">
34
- <h3 class="text-xl font-bold mb-4 text-secondary">{{ _('Key Milestones') }}</h3>
35
- <div class="relative pl-8 border-l-2 border-primary/20">
36
- {% for milestone in history.milestones %}
37
- <div class="mb-8 relative">
38
- <div class="absolute -left-11 w-8 h-8 rounded-full bg-primary text-white flex items-center justify-center">
39
- {{ milestone.year }}
40
- </div>
41
- <h4 class="text-lg font-bold">{{ milestone.event }}</h4>
42
- <p class="text-dark/70 mt-2">{{ milestone.description }}</p>
43
- </div>
44
- {% endfor %}
45
- </div>
46
- </div>
47
- </div>
48
- </div>
49
- </div>
50
- </div>
51
- </section>
52
-
53
- <!-- Mission & Vision -->
54
- <section class="py-16 bg-gradient-to-b from-white/20 to-transparent">
55
- <div class="container mx-auto px-4">
56
- <div class="max-w-4xl mx-auto glass-card p-8">
57
- <h2 class="section-title">{{ _('Our Mission & Vision') }}</h2>
58
-
59
- <div class="grid grid-cols-1 md:grid-cols-2 gap-8 mt-8">
60
- <div class="bg-primary/10 p-6 rounded-xl border-l-4 border-primary">
61
- <div class="text-primary text-4xl mb-4">
62
- <i class="fas fa-bullseye"></i>
63
- </div>
64
- <h3 class="text-xl font-bold mb-3 text-primary">{{ _('Mission Statement') }}</h3>
65
- <p>{{ mission.mission }}</p>
66
- </div>
67
-
68
- <div class="bg-secondary/10 p-6 rounded-xl border-l-4 border-secondary">
69
- <div class="text-secondary text-4xl mb-4">
70
- <i class="fas fa-eye"></i>
71
- </div>
72
- <h3 class="text-xl font-bold mb-3 text-secondary">{{ _('Vision Statement') }}</h3>
73
- <p>{{ mission.vision }}</p>
74
- </div>
75
- </div>
76
-
77
- <div class="mt-10">
78
- <h3 class="text-2xl font-bold mb-6 text-center">{{ _('Core Values') }}</h3>
79
- <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
80
- {% for value in mission.get('values', []) %}
81
- <div class="glass-card p-6 text-center transform transition-all duration-300 hover:-translate-y-2">
82
- <div class="w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4">
83
- <i class="fas fa-star text-primary text-2xl"></i>
84
- </div>
85
- <h4 class="text-xl font-bold">{{ value.name }}</h4>
86
- <p class="text-dark/70 mt-2">{{ value.description }}</p>
87
- </div>
88
- {% endfor %}
89
- </div>
90
- </div>
91
- </div>
92
- </div>
93
- </section>
94
-
95
- <!-- Leadership -->
96
- <section class="py-16">
97
- <div class="container mx-auto px-4">
98
- <h2 class="section-title">{{ _('School Leadership') }}</h2>
99
- <p class="text-center max-w-2xl mx-auto mb-12 text-dark/80">
100
- {{ _('Our dedicated leadership team brings decades of educational experience and a passion for student success') }}
101
- </p>
102
-
103
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8 mt-12">
104
- {% for leader in leadership %}
105
- <div class="glass-card overflow-hidden transform transition-all duration-300 hover:-translate-y-2">
106
- <div class="aspect-w-16 aspect-h-12 bg-gray-200">
107
- <div class="bg-gradient-to-r from-primary/30 to-secondary/30 w-full h-full flex items-center justify-center">
108
- <i class="fas fa-user-tie text-white text-5xl"></i>
109
- </div>
110
- </div>
111
- <div class="p-6">
112
- <h3 class="text-xl font-bold">{{ leader.name }}</h3>
113
- <p class="text-primary font-medium mb-4">{{ leader.position }}</p>
114
- <p class="text-dark/70 mb-4">{{ leader.bio }}</p>
115
- <div class="flex items-center text-sm text-dark/80">
116
- <i class="fas fa-envelope mr-2"></i>
117
- <span>{{ leader.email }}</span>
118
- </div>
119
- </div>
120
- </div>
121
- {% endfor %}
122
- </div>
123
- </div>
124
- </section>
125
-
126
- <!-- Faculty -->
127
- <section class="py-16 bg-gradient-to-b from-white/20 to-transparent">
128
- <div class="container mx-auto px-4">
129
- <h2 class="section-title">{{ _('Our Faculty') }}</h2>
130
- <p class="text-center max-w-2xl mx-auto mb-12 text-dark/80">
131
- {{ _('Highly qualified educators committed to academic excellence and student development') }}
132
- </p>
133
-
134
- <div class="glass-card p-8">
135
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
136
- <div class="text-center">
137
- <div class="text-5xl font-bold text-primary mb-2">{{ faculty.stats.teachers }}</div>
138
- <h3 class="text-xl font-bold mb-2">{{ _('Dedicated Teachers') }}</h3>
139
- <p class="text-dark/70">{{ _('Average 15 years teaching experience') }}</p>
140
- </div>
141
-
142
- <div class="text-center">
143
- <div class="text-5xl font-bold text-secondary mb-2">{{ faculty.stats.degrees }}%</div>
144
- <h3 class="text-xl font-bold mb-2">{{ _('Advanced Degrees') }}</h3>
145
- <p class="text-dark/70">{{ _('Masters or PhD qualifications') }}</p>
146
- </div>
147
-
148
- <div class="text-center">
149
- <div class="text-5xl font-bold text-accent mb-2">{{ faculty.stats.training }}</div>
150
- <h3 class="text-xl font-bold mb-2">{{ _('Annual Training Hours') }}</h3>
151
- <p class="text-dark/70">{{ _('Professional development commitment') }}</p>
152
- </div>
153
- </div>
154
-
155
- <div class="mt-12">
156
- <h3 class="text-2xl font-bold mb-6 text-center">{{ _('Department Heads') }}</h3>
157
- <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
158
- {% for head in faculty.department_heads %}
159
- <div class="glass-card p-5 text-center">
160
- <div class="w-20 h-20 rounded-full bg-gradient-to-r from-primary to-secondary mx-auto mb-4 flex items-center justify-center text-white text-2xl font-bold">
161
- {{ head.initials }}
162
- </div>
163
- <h4 class="font-bold">{{ head.name }}</h4>
164
- <p class="text-primary text-sm">{{ head.department }}</p>
165
- <p class="text-dark/70 text-sm mt-2">{{ head.qualification }}</p>
166
- </div>
167
- {% endfor %}
168
- </div>
169
- </div>
170
- </div>
171
- </div>
172
- </section>
173
-
174
- <!-- Facilities -->
175
- <section class="py-16">
176
- <div class="container mx-auto px-4">
177
- <h2 class="section-title">{{ _('Our Facilities') }}</h2>
178
- <p class="text-center max-w-2xl mx-auto mb-12 text-dark/80">
179
- {{ _('Modern learning environments designed to inspire and support academic achievement') }}
180
- </p>
181
-
182
- <div class="grid grid-cols-1 md:grid-cols-2 gap-8 mt-12">
183
- {% for facility in facilities %}
184
- <div class="glass-card overflow-hidden transform transition-all duration-300 hover:-translate-y-2">
185
- <div class="aspect-w-16 aspect-h-9 bg-gray-200">
186
- <div class="bg-gradient-to-r from-primary/30 to-secondary/30 w-full h-full flex items-center justify-center">
187
- <i class="fas fa-{{ facility.icon }} text-white text-5xl"></i>
188
- </div>
189
- </div>
190
- <div class="p-6">
191
- <h3 class="text-xl font-bold mb-2">{{ facility.name }}</h3>
192
- <p class="text-dark/70 mb-4">{{ facility.description }}</p>
193
- <div class="flex flex-wrap gap-2">
194
- {% for feature in facility.features %}
195
- <span class="bg-primary/10 text-primary px-3 py-1 rounded-full text-sm">
196
- {{ feature }}
197
- </span>
198
- {% endfor %}
199
- </div>
200
- </div>
201
- </div>
202
- {% endfor %}
203
- </div>
204
- </div>
205
- </section>
206
-
207
- <!-- Accreditation -->
208
- <section class="py-16 bg-gradient-to-b from-white/20 to-transparent">
209
- <div class="container mx-auto px-4">
210
- <div class="glass-card p-8">
211
- <h2 class="section-title">{{ _('Accreditation & Partnerships') }}</h2>
212
-
213
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8 mt-12">
214
- <div class="text-center">
215
- <div class="bg-white/20 backdrop-blur-sm w-24 h-24 rounded-full flex items-center justify-center mx-auto mb-6">
216
- <i class="fas fa-award text-primary text-4xl"></i>
217
- </div>
218
- <h3 class="text-xl font-bold mb-2">{{ _('Fully Accredited') }}</h3>
219
- <p class="text-dark/70">{{ _('Recognized by the Tanzanian Ministry of Education') }}</p>
220
- </div>
221
-
222
- <div class="text-center">
223
- <div class="bg-white/20 backdrop-blur-sm w-24 h-24 rounded-full flex items-center justify-center mx-auto mb-6">
224
- <i class="fas fa-handshake text-secondary text-4xl"></i>
225
- </div>
226
- <h3 class="text-xl font-bold mb-2">{{ _('Global Partnerships') }}</h3>
227
- <p class="text-dark/70">{{ _('Collaborations with international educational institutions') }}</p>
228
- </div>
229
-
230
- <div class="text-center">
231
- <div class="bg-white/20 backdrop-blur-sm w-24 h-24 rounded-full flex items-center justify-center mx-auto mb-6">
232
- <i class="fas fa-chart-line text-accent text-4xl"></i>
233
- </div>
234
- <h3 class="text-xl font-bold mb-2">{{ _('Quality Assurance') }}</h3>
235
- <p class="text-dark/70">{{ _('Regular evaluations to maintain educational standards') }}</p>
236
- </div>
237
- </div>
238
-
239
- <div class="mt-12">
240
- <h3 class="text-2xl font-bold mb-6 text-center">{{ _('Our Partners') }}</h3>
241
- <div class="grid grid-cols-2 md:grid-cols-4 gap-6">
242
- <div class="glass-card p-6 flex items-center justify-center">
243
- <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16" />
244
- </div>
245
- <div class="glass-card p-6 flex items-center justify-center">
246
- <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16" />
247
- </div>
248
- <div class="glass-card p-6 flex items-center justify-center">
249
- <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16" />
250
- </div>
251
- <div class="glass-card p-6 flex items-center justify-center">
252
- <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16" />
253
- </div>
254
- </div>
255
- </div>
256
- </div>
257
- </div>
258
- </section>
259
-
260
- <!-- Testimonials -->
261
- <section class="py-16">
262
- <div class="container mx-auto px-4">
263
- <h2 class="section-title">{{ _('What Parents & Students Say') }}</h2>
264
-
265
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8 mt-12">
266
- <div class="glass-card p-6 transform transition-all duration-300 hover:-translate-y-2">
267
- <div class="flex items-center mb-4">
268
- <div class="w-12 h-12 rounded-full bg-gradient-to-r from-primary to-secondary flex items-center justify-center text-white font-bold">A</div>
269
- <div class="ml-4">
270
- <h4 class="font-bold">Amina Juma</h4>
271
- <p class="text-dark/70 text-sm">{{ _('Parent') }}</p>
272
- </div>
273
- </div>
274
- <p class="text-dark/80 italic">"{{ _('The transformation in my daughter since joining Munishi has been remarkable. She\'s more confident and passionate about learning.') }}"</p>
275
- <div class="flex text-yellow-400 mt-4">
276
- <i class="fas fa-star"></i>
277
- <i class="fas fa-star"></i>
278
- <i class="fas fa-star"></i>
279
- <i class="fas fa-star"></i>
280
- <i class="fas fa-star"></i>
281
- </div>
282
- </div>
283
-
284
- <div class="glass-card p-6 transform transition-all duration-300 hover:-translate-y-2">
285
- <div class="flex items-center mb-4">
286
- <div class="w-12 h-12 rounded-full bg-gradient-to-r from-secondary to-accent flex items-center justify-center text-white font-bold">D</div>
287
- <div class="ml-4">
288
- <h4 class="font-bold">David Omondi</h4>
289
- <p class="text-dark/70 text-sm">{{ _('Alumni') }}</p>
290
- </div>
291
- </div>
292
- <p class="text-dark/80 italic">"{{ _('Munishi prepared me not just academically, but for life. The leadership opportunities I had shaped my career path.') }}"</p>
293
- <div class="flex text-yellow-400 mt-4">
294
- <i class="fas fa-star"></i>
295
- <i class="fas fa-star"></i>
296
- <i class="fas fa-star"></i>
297
- <i class="fas fa-star"></i>
298
- <i class="fas fa-star"></i>
299
- </div>
300
- </div>
301
-
302
- <div class="glass-card p-6 transform transition-all duration-300 hover:-translate-y-2">
303
- <div class="flex items-center mb-4">
304
- <div class="w-12 h-12 rounded-full bg-gradient-to-r from-accent to-primary flex items-center justify-center text-white font-bold">J</div>
305
- <div class="ml-4">
306
- <h4 class="font-bold">John Mwamba</h4>
307
- <p class="text-dark/70 text-sm">{{ _('Student') }}</p>
308
- </div>
309
- </div>
310
- <p class="text-dark/80 italic">"{{ _('I love the balance between academics and extracurriculars. The robotics club has been life-changing for me!') }}"</p>
311
- <div class="flex text-yellow-400 mt-4">
312
- <i class="fas fa-star"></i>
313
- <i class="fas fa-star"></i>
314
- <i class="fas fa-star"></i>
315
- <i class="fas fa-star"></i>
316
- <i class="fas fa-star"></i>
317
- </div>
318
- </div>
319
- </div>
320
- </div>
321
- </section>
322
-
323
- <!-- CTA Section -->
324
- <section class="py-16 bg-gradient-to-r from-primary to-secondary">
325
- <div class="container mx-auto px-4">
326
- <div class="max-w-4xl mx-auto text-center">
327
- <h2 class="text-3xl md:text-4xl font-bold text-white mb-6">{{ _('Experience Munishi School') }}</h2>
328
- <p class="text-white/90 text-xl mb-10 max-w-2xl mx-auto">
329
- {{ _('Schedule a campus tour and discover why Munishi is the right choice for your child\'s education') }}
330
- </p>
331
- <div class="flex flex-col sm:flex-row items-center justify-center space-y-4 sm:space-y-0 sm:space-x-6">
332
- <a href="{{ url_for('contact') }}" class="bg-white text-primary px-8 py-4 rounded-full font-bold transition-all duration-300 hover:bg-gray-100 hover:scale-105">
333
- {{ _('Schedule a Tour') }}
334
- </a>
335
- <a href="{{ url_for('admissions') }}" class="bg-transparent border-2 border-white text-white px-8 py-4 rounded-full font-bold transition-all duration-300 hover:bg-white/10">
336
- {{ _('Apply Now') }}
337
- </a>
338
- </div>
339
- </div>
340
- </div>
341
- </section>
342
- {% endblock %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/academics.html DELETED
@@ -1,314 +0,0 @@
1
- {% extends "base.html" %}
2
-
3
- {% block content %}
4
- <!-- Hero Section -->
5
- <section class="relative py-20 bg-gradient-to-r from-primary to-secondary text-white">
6
- <div class="container mx-auto px-4 text-center">
7
- <h1 class="text-4xl md:text-6xl font-bold mb-6">{{ _('Academic Excellence') }}</h1>
8
- <p class="text-xl max-w-2xl mx-auto">{{ _('Rigorous academic programs designed to prepare students for university and beyond') }}</p>
9
- </div>
10
- </section>
11
-
12
- <!-- Academic Performance -->
13
- <section class="py-16">
14
- <div class="container mx-auto px-4">
15
- <div class="glass-card p-8">
16
- <h2 class="section-title">{{ _('Academic Performance') }}</h2>
17
-
18
- <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mt-12">
19
- <div class="glass-card p-6 text-center transform transition-all duration-300 hover:-translate-y-2">
20
- <div class="text-5xl font-bold text-primary mb-3">{{ results.pass_rate }}%</div>
21
- <h3 class="text-xl font-bold mb-2">{{ _('Pass Rate') }}</h3>
22
- <p class="text-dark/70">{{ _('Consistent outstanding results in national examinations') }}</p>
23
- </div>
24
-
25
- <div class="glass-card p-6 text-center transform transition-all duration-300 hover:-translate-y-2">
26
- <div class="text-5xl font-bold text-secondary mb-3">{{ results.university_admission }}%</div>
27
- <h3 class="text-xl font-bold mb-2">{{ _('University Admission') }}</h3>
28
- <p class="text-dark/70">{{ _('Students admitted to top universities worldwide') }}</p>
29
- </div>
30
-
31
- <div class="glass-card p-6 text-center transform transition-all duration-300 hover:-translate-y-2">
32
- <div class="text-5xl font-bold text-accent mb-3">{{ subjects|length }}</div>
33
- <h3 class="text-xl font-bold mb-2">{{ _('Subjects Offered') }}</h3>
34
- <p class="text-dark/70">{{ _('Comprehensive range of academic disciplines') }}</p>
35
- </div>
36
-
37
- <div class="glass-card p-6 text-center transform transition-all duration-300 hover:-translate-y-2">
38
- <div class="text-5xl font-bold text-primary mb-3">{{ results.teacher_ratio }}</div>
39
- <h3 class="text-xl font-bold mb-2">{{ _('Teacher-Student Ratio') }}</h3>
40
- <p class="text-dark/70">{{ _('Personalized attention for every learner') }}</p>
41
- </div>
42
- </div>
43
-
44
- <!-- Performance Chart -->
45
- <div class="mt-16">
46
- <h3 class="text-2xl font-bold mb-6 text-center">{{ _('5-Year NECTA Performance') }}</h3>
47
- <div class="bg-white/30 backdrop-blur-sm rounded-xl p-6">
48
- <div class="flex justify-between mb-4">
49
- <div class="text-center">
50
- <div class="text-lg font-bold">{{ results.current_year }}</div>
51
- <div class="text-3xl font-bold text-primary">{{ results.current_pass_rate }}%</div>
52
- </div>
53
- <div class="flex items-center">
54
- <div class="text-green-500 font-bold mr-2">
55
- <i class="fas fa-arrow-up mr-1"></i> {{ results.improvement }}%
56
- </div>
57
- <div>{{ _('improvement since') }} {{ results.start_year }}</div>
58
- </div>
59
- </div>
60
-
61
- <div class="grid grid-cols-5 gap-4 h-48 items-end mt-8">
62
- {% for year in results.years %}
63
- <div class="flex flex-col items-center">
64
- <div class="text-center mb-2">{{ year.year }}</div>
65
- <div
66
- class="w-full bg-gradient-to-t from-primary to-secondary rounded-t-lg transition-all duration-500"
67
- style="height: {{ year.pass_rate * 0.4 }}%"
68
- ></div>
69
- <div class="mt-2 font-bold">{{ year.pass_rate }}%</div>
70
- </div>
71
- {% endfor %}
72
- </div>
73
- </div>
74
- </div>
75
- </div>
76
- </div>
77
- </section>
78
-
79
- <!-- Academic Departments -->
80
- <section class="py-16 bg-gradient-to-b from-white/20 to-transparent">
81
- <div class="container mx-auto px-4">
82
- <h2 class="section-title">{{ _('Academic Departments') }}</h2>
83
- <p class="text-center max-w-2xl mx-auto mb-12 text-dark/80">
84
- {{ _('Our comprehensive curriculum is organized into specialized departments, each with expert faculty and modern facilities') }}
85
- </p>
86
-
87
- <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
88
- {% for department in subjects %}
89
- <div class="glass-card p-6 transform transition-all duration-300 hover:-translate-y-2">
90
- <div class="flex items-center mb-4">
91
- <div class="w-12 h-12 rounded-full bg-{{ department.color }}/10 flex items-center justify-center mr-4">
92
- <i class="{{ department.icon }} text-{{ department.color }} text-xl"></i>
93
- </div>
94
- <h3 class="text-xl font-bold">{{ department.name }}</h3>
95
- </div>
96
-
97
- <ul class="space-y-2 mt-4">
98
- {% for subject in department.subjects %}
99
- <li class="flex items-center">
100
- <i class="fas fa-book text-{{ department.color }}/70 mr-2"></i>
101
- <span>{{ subject }}</span>
102
- </li>
103
- {% endfor %}
104
- </ul>
105
-
106
- <div class="mt-6">
107
- <h4 class="font-bold mb-2">{{ _('Department Head') }}:</h4>
108
- <div class="flex items-center">
109
- <div class="w-8 h-8 rounded-full bg-{{ department.color }}/20 flex items-center justify-center mr-2">
110
- <i class="fas fa-user text-{{ department.color }}"></i>
111
- </div>
112
- <span>{{ department.head }}</span>
113
- </div>
114
- </div>
115
- </div>
116
- {% endfor %}
117
- </div>
118
- </div>
119
- </section>
120
-
121
- <!-- Curriculum & Programs -->
122
- <section class="py-16">
123
- <div class="container mx-auto px-4">
124
- <div class="glass-card p-8">
125
- <h2 class="section-title">{{ _('Curriculum & Programs') }}</h2>
126
-
127
- <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mt-12">
128
- <div>
129
- <h3 class="text-2xl font-bold mb-6 text-primary">{{ _('Form 1-4 Curriculum') }}</h3>
130
- <p class="text-dark/80 mb-6">
131
- {{ _('Our comprehensive curriculum follows the Tanzanian National Curriculum while incorporating international best practices:') }}
132
- </p>
133
-
134
- <ul class="space-y-4">
135
- <li class="flex">
136
- <div class="bg-primary/10 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
137
- <i class="fas fa-check text-primary"></i>
138
- </div>
139
- <span>{{ _('Core subjects in Mathematics, Sciences, Languages, and Social Sciences') }}</span>
140
- </li>
141
- <li class="flex">
142
- <div class="bg-primary/10 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
143
- <i class="fas fa-check text-primary"></i>
144
- </div>
145
- <span>{{ _('Practical skills development through ICT, Entrepreneurship, and Life Skills') }}</span>
146
- </li>
147
- <li class="flex">
148
- <div class="bg-primary/10 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
149
- <i class="fas fa-check text-primary"></i>
150
- </div>
151
- <span>{{ _('Project-based learning and research opportunities') }}</span>
152
- </li>
153
- <li class="flex">
154
- <div class="bg-primary/10 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
155
- <i class="fas fa-check text-primary"></i>
156
- </div>
157
- <span>{{ _('Career guidance and university preparation programs') }}</span>
158
- </li>
159
- </ul>
160
-
161
- <a href="{{ url_for('download_file', category='academics', filename='curriculum-overview.pdf') }}" class="btn-primary mt-8 inline-block">
162
- {{ _('Download Curriculum Guide') }}
163
- </a>
164
- </div>
165
-
166
- <div>
167
- <h3 class="text-2xl font-bold mb-6 text-secondary">{{ _('Special Programs') }}</h3>
168
-
169
- <div class="space-y-6">
170
- <div class="glass-card p-6">
171
- <div class="flex items-center">
172
- <div class="bg-secondary/10 w-12 h-12 rounded-full flex items-center justify-center mr-4">
173
- <i class="fas fa-microscope text-secondary text-xl"></i>
174
- </div>
175
- <h4 class="text-lg font-bold">{{ _('STEM Program') }}</h4>
176
- </div>
177
- <p class="mt-3 text-dark/70">
178
- {{ _('Advanced studies in Science, Technology, Engineering, and Mathematics with specialized labs and competitions') }}
179
- </p>
180
- </div>
181
-
182
- <div class="glass-card p-6">
183
- <div class="flex items-center">
184
- <div class="bg-accent/10 w-12 h-12 rounded-full flex items-center justify-center mr-4">
185
- <i class="fas fa-globe-africa text-accent text-xl"></i>
186
- </div>
187
- <h4 class="text-lg font-bold">{{ _('Global Citizenship') }}</h4>
188
- </div>
189
- <p class="mt-3 text-dark/70">
190
- {{ _('International exchange programs, Model UN, and global awareness curriculum') }}
191
- </p>
192
- </div>
193
-
194
- <div class="glass-card p-6">
195
- <div class="flex items-center">
196
- <div class="bg-primary/10 w-12 h-12 rounded-full flex items-center justify-center mr-4">
197
- <i class="fas fa-laptop-code text-primary text-xl"></i>
198
- </div>
199
- <h4 class="text-lg font-bold">{{ _('Digital Literacy') }}</h4>
200
- </div>
201
- <p class="mt-3 text-dark/70">
202
- {{ _('Comprehensive ICT education with coding, robotics, and digital creativity courses') }}
203
- </p>
204
- </div>
205
- </div>
206
- </div>
207
- </div>
208
- </div>
209
- </div>
210
- </section>
211
-
212
- <!-- Academic Calendar -->
213
- <section class="py-16 bg-gradient-to-b from-white/20 to-transparent">
214
- <div class="container mx-auto px-4">
215
- <div class="flex flex-col md:flex-row justify-between items-center mb-12">
216
- <h2 class="section-title">{{ _('Academic Calendar') }}</h2>
217
- <a href="{{ url_for('download_file', category='academics', filename='academic-calendar-2023.pdf') }}" class="btn-secondary mt-4 md:mt-0">
218
- {{ _('Download Full Calendar') }}
219
- </a>
220
- </div>
221
-
222
- <div class="glass-card p-6 overflow-x-auto">
223
- <table class="min-w-full">
224
- <thead>
225
- <tr class="bg-primary/10">
226
- <th class="py-3 px-4 text-left">{{ _('Term') }}</th>
227
- <th class="py-3 px-4 text-left">{{ _('Start Date') }}</th>
228
- <th class="py-3 px-4 text-left">{{ _('End Date') }}</th>
229
- <th class="py-3 px-4 text-left">{{ _('Key Events') }}</th>
230
- </tr>
231
- </thead>
232
- <tbody>
233
- {% for term in calendar %}
234
- <tr class="border-b border-white/20">
235
- <td class="py-3 px-4 font-bold">{{ term.name }}</td>
236
- <td class="py-3 px-4">{{ term.start_date|format_date }}</td>
237
- <td class="py-3 px-4">{{ term.end_date|format_date }}</td>
238
- <td class="py-3 px-4">
239
- <ul class="list-disc pl-5">
240
- {% for event in term.events %}
241
- <li>{{ event }}</li>
242
- {% endfor %}
243
- </ul>
244
- </td>
245
- </tr>
246
- {% endfor %}
247
- </tbody>
248
- </table>
249
- </div>
250
-
251
- <div class="mt-12 glass-card p-6">
252
- <h3 class="text-2xl font-bold mb-6 text-center">{{ _('Upcoming Academic Events') }}</h3>
253
-
254
- <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
255
- {% for event in upcoming_events %}
256
- <div class="glass-card p-4">
257
- <div class="flex items-center justify-between mb-3">
258
- <span class="bg-{{ event.color }}/10 text-{{ event.color }} px-3 py-1 rounded-full text-sm">{{ event.term }}</span>
259
- <span class="text-sm text-dark/70">{{ event.date|format_date }}</span>
260
- </div>
261
- <h4 class="font-bold text-lg">{{ event.title }}</h4>
262
- <p class="text-dark/70 mt-2">{{ event.description }}</p>
263
- </div>
264
- {% endfor %}
265
- </div>
266
- </div>
267
- </div>
268
- </section>
269
-
270
- <!-- Resources & Downloads -->
271
- <section class="py-16">
272
- <div class="container mx-auto px-4">
273
- <h2 class="section-title">{{ _('Learning Resources') }}</h2>
274
-
275
- <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mt-12">
276
- <div class="glass-card p-6 text-center transform transition-all duration-300 hover:-translate-y-2">
277
- <div class="text-5xl text-primary mb-4">
278
- <i class="fas fa-book-open"></i>
279
- </div>
280
- <h3 class="text-xl font-bold mb-3">{{ _('Syllabus Guides') }}</h3>
281
- <p class="text-dark/70 mb-4">{{ _('Detailed subject syllabi and learning objectives') }}</p>
282
- <a href="#" class="btn-secondary">{{ _('View Resources') }}</a>
283
- </div>
284
-
285
- <div class="glass-card p-6 text-center transform transition-all duration-300 hover:-translate-y-2">
286
- <div class="text-5xl text-secondary mb-4">
287
- <i class="fas fa-laptop"></i>
288
- </div>
289
- <h3 class="text-xl font-bold mb-3">{{ _('E-Learning Portal') }}</h3>
290
- <p class="text-dark/70 mb-4">{{ _('Access to online courses, materials, and assignments') }}</p>
291
- <a href="#" class="btn-secondary">{{ _('Login to Portal') }}</a>
292
- </div>
293
-
294
- <div class="glass-card p-6 text-center transform transition-all duration-300 hover:-translate-y-2">
295
- <div class="text-5xl text-accent mb-4">
296
- <i class="fas fa-graduation-cap"></i>
297
- </div>
298
- <h3 class="text-xl font-bold mb-3">{{ _('University Prep') }}</h3>
299
- <p class="text-dark/70 mb-4">{{ _('Resources for university applications and scholarships') }}</p>
300
- <a href="#" class="btn-secondary">{{ _('Explore Options') }}</a>
301
- </div>
302
-
303
- <div class="glass-card p-6 text-center transform transition-all duration-300 hover:-translate-y-2">
304
- <div class="text-5xl text-primary mb-4">
305
- <i class="fas fa-download"></i>
306
- </div>
307
- <h3 class="text-xl font-bold mb-3">{{ _('Download Center') }}</h3>
308
- <p class="text-dark/70 mb-4">{{ _('Timetables, syllabi, and academic forms') }}</p>
309
- <a href="#" class="btn-secondary">{{ _('Browse Files') }}</a>
310
- </div>
311
- </div>
312
- </div>
313
- </section>
314
- {% endblock %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/admin/application_detail.html DELETED
@@ -1,290 +0,0 @@
1
- <!-- templates/admin/application_detail.html -->
2
- {% extends "admin/base.html" %}
3
-
4
- {% block admin_title %}{{ _('Application') }} #{{ application.id|truncate(8) }}{% endblock %}
5
-
6
- {% block admin_content %}
7
- <div class="bg-white rounded-lg shadow overflow-hidden">
8
- <!-- Application Header -->
9
- <div class="px-6 py-4 border-b border-gray-200 bg-gray-50 flex justify-between items-center">
10
- <div>
11
- <h3 class="text-lg font-medium text-gray-900">
12
- {{ application.first_name }} {{ application.last_name }}
13
- <span class="ml-2 px-2 inline-flex text-xs leading-5 font-semibold rounded-full
14
- {% if application.status == 'submitted' %}bg-yellow-100 text-yellow-800
15
- {% elif application.status == 'accepted' %}bg-green-100 text-green-800
16
- {% elif application.status == 'rejected' %}bg-red-100 text-red-800
17
- {% else %}bg-gray-100 text-gray-800{% endif %}">
18
- {{ application.status|title }}
19
- </span>
20
- </h3>
21
- <p class="text-sm text-gray-500">
22
- {{ _('Applying for') }}: {{ application.applying_grade }} •
23
- {{ _('Submitted on') }}: {{ application.submission_date|format_date('full') }}
24
- </p>
25
- </div>
26
- <div class="flex space-x-3">
27
- <a href="#" class="inline-flex items-center px-3 py-1 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
28
- <i class="fas fa-download mr-2"></i> {{ _('Download') }}
29
- </a>
30
- </div>
31
- </div>
32
-
33
- <div class="px-6 py-4">
34
- <!-- Status Update Form -->
35
- <form method="POST" enctype="multipart/form-data" class="mb-8">
36
- <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
37
- <div>
38
- <label for="status" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Update Status') }}</label>
39
- <select id="status" name="status" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
40
- <option value="submitted" {% if application.status == 'submitted' %}selected{% endif %}>{{ _('Submitted') }}</option>
41
- <option value="reviewed" {% if application.status == 'reviewed' %}selected{% endif %}>{{ _('Reviewed') }}</option>
42
- <option value="accepted" {% if application.status == 'accepted' %}selected{% endif %}>{{ _('Accepted') }}</option>
43
- <option value="rejected" {% if application.status == 'rejected' %}selected{% endif %}>{{ _('Rejected') }}</option>
44
- <option value="waitlisted" {% if application.status == 'waitlisted' %}selected{% endif %}>{{ _('Waitlisted') }}</option>
45
- </select>
46
- </div>
47
-
48
- <div class="md:col-span-2">
49
- <label for="admin_notes" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Admin Notes') }}</label>
50
- <textarea id="admin_notes" name="admin_notes" rows="1" class="shadow-sm focus:ring-blue-500 focus:border-blue-500 block w-full sm:text-sm border-gray-300 rounded-md">{{ application.admin_notes or '' }}</textarea>
51
- </div>
52
- </div>
53
-
54
- <div class="mt-4">
55
- <label class="block text-sm font-medium text-gray-700 mb-1">{{ _('Upload Additional Documents') }}</label>
56
- <div class="mt-1 flex items-center">
57
- <input type="file" name="additional_docs" id="additional_docs" class="p-2 block w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 cursor-pointer focus:outline-none">
58
- </div>
59
- </div>
60
-
61
- <div class="mt-6 flex justify-end">
62
- <button type="submit" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
63
- {{ _('Update Application') }}
64
- </button>
65
- </div>
66
- </form>
67
-
68
- <!-- Application Details Tabs -->
69
- <div>
70
- <div class="border-b border-gray-200">
71
- <nav class="-mb-px flex space-x-8" id="applicationTabs">
72
- <a href="#" data-tab="student" class="tab-link border-blue-500 text-blue-600 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm">{{ _('Student Information') }}</a>
73
- <a href="#" data-tab="parent" class="tab-link border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm">{{ _('Parent Information') }}</a>
74
- <a href="#" data-tab="documents" class="tab-link border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm">{{ _('Documents') }}</a>
75
- <a href="#" data-tab="additional" class="tab-link border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm">{{ _('Additional Info') }}</a>
76
- </nav>
77
- </div>
78
-
79
- <!-- Student Information -->
80
- <div id="studentTab" class="tab-content py-6">
81
- <h4 class="text-lg font-medium text-gray-900 mb-4">{{ _('Student Details') }}</h4>
82
-
83
- <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
84
- <div>
85
- <p class="text-sm text-gray-500">{{ _('Full Name') }}</p>
86
- <p class="mt-1 text-sm font-medium text-gray-900">{{ application.first_name }} {{ application.last_name }}</p>
87
- </div>
88
-
89
- <div>
90
- <p class="text-sm text-gray-500">{{ _('Date of Birth') }}</p>
91
- <p class="mt-1 text-sm font-medium text-gray-900">{{ application.birthdate|format_date('full') }}</p>
92
- </div>
93
-
94
- <div>
95
- <p class="text-sm text-gray-500">{{ _('Gender') }}</p>
96
- <p class="mt-1 text-sm font-medium text-gray-900">{{ application.gender|title }}</p>
97
- </div>
98
-
99
- <div>
100
- <p class="text-sm text-gray-500">{{ _('Nationality') }}</p>
101
- <p class="mt-1 text-sm font-medium text-gray-900">{{ application.nationality or 'N/A' }}</p>
102
- </div>
103
-
104
- <div>
105
- <p class="text-sm text-gray-500">{{ _('Current School') }}</p>
106
- <p class="mt-1 text-sm font-medium text-gray-900">{{ application.current_school or 'N/A' }}</p>
107
- </div>
108
-
109
- <div>
110
- <p class="text-sm text-gray-500">{{ _('Applying for Grade') }}</p>
111
- <p class="mt-1 text-sm font-medium text-gray-900">{{ application.applying_grade or 'N/A' }}</p>
112
- </div>
113
- </div>
114
- </div>
115
-
116
- <!-- Parent Information -->
117
- <div id="parentTab" class="tab-content py-6 hidden">
118
- <h4 class="text-lg font-medium text-gray-900 mb-4">{{ _('Parent/Guardian Details') }}</h4>
119
-
120
- <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
121
- <div>
122
- <p class="text-sm text-gray-500">{{ _('Parent/Guardian Name') }}</p>
123
- <p class="mt-1 text-sm font-medium text-gray-900">{{ application.parent_name or 'N/A' }}</p>
124
- </div>
125
-
126
- <div>
127
- <p class="text-sm text-gray-500">{{ _('Email') }}</p>
128
- <p class="mt-1 text-sm font-medium text-gray-900">{{ application.parent_email or 'N/A' }}</p>
129
- </div>
130
-
131
- <div>
132
- <p class="text-sm text-gray-500">{{ _('Phone Number') }}</p>
133
- <p class="mt-1 text-sm font-medium text-gray-900">{{ application.parent_phone or 'N/A' }}</p>
134
- </div>
135
-
136
- <div>
137
- <p class="text-sm text-gray-500">{{ _('Emergency Contact') }}</p>
138
- <p class="mt-1 text-sm font-medium text-gray-900">{{ application.emergency_contact or 'N/A' }}</p>
139
- </div>
140
-
141
- <div class="md:col-span-2">
142
- <p class="text-sm text-gray-500">{{ _('Address') }}</p>
143
- <p class="mt-1 text-sm font-medium text-gray-900">{{ application.address or 'N/A' }}</p>
144
- </div>
145
- </div>
146
- </div>
147
-
148
- <!-- Documents -->
149
- <div id="documentsTab" class="tab-content py-6 hidden">
150
- <h4 class="text-lg font-medium text-gray-900 mb-4">{{ _('Application Documents') }}</h4>
151
-
152
- <!-- Applicant Documents -->
153
- <div class="mb-8">
154
- <h5 class="text-md font-medium text-gray-700 mb-3">{{ _('Applicant Submitted Documents') }}</h5>
155
- {% if documents %}
156
- <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
157
- {% for doc in documents %}
158
- <div class="border rounded-md p-4 bg-gray-50">
159
- <div class="flex justify-between items-start">
160
- <div>
161
- <p class="text-sm font-medium text-gray-900">{{ doc.name }}</p>
162
- <p class="text-xs text-gray-500 truncate">{{ doc.filename }}</p>
163
- </div>
164
- <a href="{{ doc.path }}"
165
- class="text-blue-600 hover:text-blue-800 text-sm font-medium">
166
- {{ _('Download') }}
167
- </a>
168
- </div>
169
- </div>
170
- {% endfor %}
171
- </div>
172
- {% else %}
173
- <p class="text-sm text-gray-500 italic">{{ _('No documents uploaded by applicant') }}</p>
174
- {% endif %}
175
- </div>
176
-
177
- <!-- Admin Uploaded Documents -->
178
- <div>
179
- <h5 class="text-md font-medium text-gray-700 mb-3">{{ _('Admin Uploaded Documents') }}</h5>
180
- {% if admin_documents %}
181
- <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
182
- {% for doc in admin_documents %}
183
- <div class="border rounded-md p-4 bg-blue-50">
184
- <div class="flex justify-between items-start">
185
- <div>
186
- <p class="text-sm font-medium text-gray-900">{{ doc.name }}</p>
187
- <p class="text-xs text-gray-500">
188
- {{ _('Uploaded by') }}: {{ doc.uploaded_by }}<br>
189
- {{ _('on') }}: {{ doc.upload_date }}
190
- </p>
191
- </div>
192
- <a href="{{ doc.path }}"
193
- class="text-blue-600 hover:text-blue-800 text-sm font-medium">
194
- {{ _('Download') }}
195
- </a>
196
- </div>
197
- </div>
198
- {% endfor %}
199
- </div>
200
- {% else %}
201
- <p class="text-sm text-gray-500 italic">{{ _('No additional documents uploaded by admin') }}</p>
202
- {% endif %}
203
- </div>
204
- </div>
205
-
206
- <!-- Additional Information -->
207
- <div id="additionalTab" class="tab-content py-6 hidden">
208
- <h4 class="text-lg font-medium text-gray-900 mb-4">{{ _('Additional Information') }}</h4>
209
-
210
- <div class="grid grid-cols-1 gap-6">
211
- <div>
212
- <p class="text-sm text-gray-500">{{ _('Medical Conditions') }}</p>
213
- <p class="mt-1 text-sm text-gray-900 bg-gray-50 p-3 rounded-md">
214
- {{ application.medical_conditions or 'None reported' }}
215
- </p>
216
- </div>
217
-
218
- <div>
219
- <p class="text-sm text-gray-500">{{ _('Previous Schools') }}</p>
220
- <p class="mt-1 text-sm text-gray-900 bg-gray-50 p-3 rounded-md">
221
- {{ application.previous_schools or 'None specified' }}
222
- </p>
223
- </div>
224
-
225
- <div>
226
- <p class="text-sm text-gray-500">{{ _('Extracurricular Activities') }}</p>
227
- <p class="mt-1 text-sm text-gray-900 bg-gray-50 p-3 rounded-md">
228
- {{ application.extracurriculars or 'None specified' }}
229
- </p>
230
- </div>
231
-
232
- <div>
233
- <p class="text-sm text-gray-500">{{ _('Why do you want to join our school?') }}</p>
234
- <p class="mt-1 text-sm text-gray-900 bg-gray-50 p-3 rounded-md">
235
- {{ application.why_join or 'No response' }}
236
- </p>
237
- </div>
238
- </div>
239
- </div>
240
- </div>
241
- </div>
242
- </div>
243
-
244
- <script>
245
- document.addEventListener('DOMContentLoaded', function() {
246
- // Tab switching functionality
247
- const tabs = document.querySelectorAll('.tab-link');
248
- const tabContents = document.querySelectorAll('.tab-content');
249
-
250
- // Show first tab by default
251
- if (tabs.length > 0 && tabContents.length > 0) {
252
- tabs[0].classList.add('border-blue-500', 'text-blue-600');
253
- tabs[0].classList.remove('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
254
- tabContents[0].classList.remove('hidden');
255
- }
256
-
257
- tabs.forEach(tab => {
258
- tab.addEventListener('click', function(e) {
259
- e.preventDefault();
260
-
261
- // Hide all tab contents
262
- tabContents.forEach(content => {
263
- content.classList.add('hidden');
264
- });
265
-
266
- // Remove active styles from all tabs
267
- tabs.forEach(t => {
268
- t.classList.remove('border-blue-500', 'text-blue-600');
269
- t.classList.add('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
270
- });
271
-
272
- // Add active styles to clicked tab
273
- this.classList.remove('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
274
- this.classList.add('border-blue-500', 'text-blue-600');
275
-
276
- // Show corresponding content
277
- const tabName = this.getAttribute('data-tab');
278
- document.getElementById(`${tabName}Tab`).classList.remove('hidden');
279
- });
280
- });
281
- });
282
- </script>
283
-
284
- <style>
285
- .tab-link {
286
- transition: all 0.2s ease;
287
- cursor: pointer;
288
- }
289
- </style>
290
- {% endblock %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/admin/applications.html DELETED
@@ -1,146 +0,0 @@
1
- <!-- admin/applications.html -->
2
- {% extends "admin/base.html" %}
3
-
4
- {% block admin_title %}{{ _('Applications') }}{% endblock %}
5
-
6
- {% block admin_content %}
7
- <div class="bg-white p-6 rounded-lg shadow mb-6">
8
- <div class="flex flex-col md:flex-row md:items-center md:justify-between mb-6">
9
- <h2 class="text-xl font-semibold mb-4 md:mb-0">{{ _('Manage Applications') }}</h2>
10
-
11
- <div class="flex space-x-2">
12
- <div class="relative">
13
- <select id="status-filter" class="appearance-none bg-gray-100 border border-gray-300 rounded-md pl-3 pr-8 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
14
- <option value="all" {% if status_filter == 'all' %}selected{% endif %}>{{ _('All Statuses') }}</option>
15
- <option value="submitted" {% if status_filter == 'submitted' %}selected{% endif %}>{{ _('Submitted') }}</option>
16
- <option value="reviewed" {% if status_filter == 'reviewed' %}selected{% endif %}>{{ _('Reviewed') }}</option>
17
- <option value="accepted" {% if status_filter == 'accepted' %}selected{% endif %}>{{ _('Accepted') }}</option>
18
- <option value="rejected" {% if status_filter == 'rejected' %}selected{% endif %}>{{ _('Rejected') }}</option>
19
- </select>
20
- <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
21
- <i class="fas fa-chevron-down text-xs"></i>
22
- </div>
23
- </div>
24
-
25
- <div class="relative">
26
- <input type="text" id="search-input" placeholder="{{ _('Search...') }}"
27
- value="{{ search_query }}" class="bg-gray-100 border border-gray-300 rounded-md pl-3 pr-8 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
28
- <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
29
- <i class="fas fa-search"></i>
30
- </div>
31
- </div>
32
- </div>
33
- </div>
34
-
35
- {% if applications %}
36
- <div class="overflow-x-auto">
37
- <table class="min-w-full divide-y divide-gray-200">
38
- <thead class="bg-gray-50">
39
- <tr>
40
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">{{ _('ID') }}</th>
41
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">{{ _('Name') }}</th>
42
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">{{ _('Parent') }}</th>
43
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">{{ _('Grade') }}</th>
44
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">{{ _('Status') }}</th>
45
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">{{ _('Submitted') }}</th>
46
- <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase">{{ _('Actions') }}</th>
47
- </tr>
48
- </thead>
49
- <tbody class="bg-white divide-y divide-gray-200">
50
- {% for app in applications %}
51
- <tr class="hover:bg-gray-50">
52
- <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
53
- {{ app.id|truncate(8) }}
54
- </td>
55
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
56
- {{ app.first_name }} {{ app.last_name }}
57
- </td>
58
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
59
- {{ app.parent_name }}<br>
60
- <span class="text-xs text-gray-400">{{ app.parent_email }}</span>
61
- </td>
62
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
63
- {{ app.applying_grade }}
64
- </td>
65
- <td class="px-6 py-4 whitespace-nowrap">
66
- <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full
67
- {% if app.status == 'submitted' %}bg-yellow-100 text-yellow-800
68
- {% elif app.status == 'accepted' %}bg-green-100 text-green-800
69
- {% elif app.status == 'rejected' %}bg-red-100 text-red-800
70
- {% else %}bg-gray-100 text-gray-800{% endif %}">
71
- {{ app.status|title }}
72
- </span>
73
- </td>
74
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
75
- {{ app.submission_date|format_date('medium') }}
76
- </td>
77
- <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
78
- <a href="{{ url_for('admin_application_detail', application_id=app.id) }}" class="text-blue-600 hover:text-blue-900 mr-3">
79
- <i class="fas fa-eye"></i>
80
- </a>
81
- <a href="#" class="text-gray-600 hover:text-gray-900">
82
- <i class="fas fa-download"></i>
83
- </a>
84
- </td>
85
- </tr>
86
- {% endfor %}
87
- </tbody>
88
- </table>
89
- </div>
90
-
91
- {% if total_pages > 1 %}
92
- <div class="flex items-center justify-between mt-6">
93
- <div class="text-sm text-gray-700">
94
- {{ _('Showing') }} <span class="font-medium">{{ (current_page-1)*APPLICATIONS_PER_PAGE + 1 }}</span>
95
- {{ _('to') }} <span class="font-medium">{{ min(current_page*APPLICATIONS_PER_PAGE, (applications|length)) }}</span>
96
- {{ _('of') }} <span class="font-medium">{{ applications|length }}</span> {{ _('results') }}
97
- </div>
98
- <div class="flex space-x-2">
99
- {% if current_page > 1 %}
100
- <a href="{{ url_for('admin_applications', page=current_page-1, status=status_filter, search=search_query) }}"
101
- class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50">
102
- {{ _('Previous') }}
103
- </a>
104
- {% endif %}
105
-
106
- {% for page_num in range(1, total_pages+1) %}
107
- <a href="{{ url_for('admin_applications', page=page_num, status=status_filter, search=search_query) }}"
108
- class="px-3 py-1 border rounded-md text-sm font-medium {% if page_num == current_page %}bg-blue-600 text-white border-blue-600{% else %}border-gray-300 text-gray-700 hover:bg-gray-50{% endif %}">
109
- {{ page_num }}
110
- </a>
111
- {% endfor %}
112
-
113
- {% if current_page < total_pages %}
114
- <a href="{{ url_for('admin_applications', page=current_page+1, status=status_filter, search=search_query) }}"
115
- class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50">
116
- {{ _('Next') }}
117
- </a>
118
- {% endif %}
119
- </div>
120
- </div>
121
- {% endif %}
122
- {% else %}
123
- <div class="text-center py-12">
124
- <i class="fas fa-file-alt text-4xl text-gray-300 mb-4"></i>
125
- <h3 class="text-lg font-medium text-gray-900">{{ _('No applications found') }}</h3>
126
- <p class="mt-1 text-sm text-gray-500">{{ _('Try changing your filters or search criteria') }}</p>
127
- </div>
128
- {% endif %}
129
- </div>
130
-
131
- <script>
132
- document.getElementById('status-filter').addEventListener('change', function() {
133
- const status = this.value;
134
- const search = document.getElementById('search-input').value;
135
- window.location.href = `{{ url_for('admin_applications') }}?status=${status}&search=${encodeURIComponent(search)}`;
136
- });
137
-
138
- document.getElementById('search-input').addEventListener('keyup', function(e) {
139
- if (e.key === 'Enter') {
140
- const status = document.getElementById('status-filter').value;
141
- const search = this.value;
142
- window.location.href = `{{ url_for('admin_applications') }}?status=${status}&search=${encodeURIComponent(search)}`;
143
- }
144
- });
145
- </script>
146
- {% endblock %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/admin/base.html DELETED
@@ -1,60 +0,0 @@
1
- <!-- admin/base.html -->
2
- <!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>{{ _('Admin Panel') }} | {{ school_name }}</title>
8
- <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
9
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
10
- </head>
11
- <body class="bg-gray-100">
12
- <div class="flex h-screen">
13
- <!-- Sidebar -->
14
- <div class="bg-blue-800 text-white w-64 flex-shrink-0">
15
- <div class="p-4 border-b border-blue-700">
16
- <h1 class="text-xl font-bold">{{ _('Admin Panel') }}</h1>
17
- <p class="text-sm text-blue-200">{{ school_name }}</p>
18
- </div>
19
- <nav class="p-2">
20
- <a href="{{ url_for('admin_dashboard') }}" class="block py-2 px-4 rounded hover:bg-blue-700 {{ 'bg-blue-700' if request.endpoint == 'admin_dashboard' }}">
21
- <i class="fas fa-tachometer-alt mr-2"></i> {{ _('Dashboard') }}
22
- </a>
23
- <a href="{{ url_for('admin_applications') }}" class="block py-2 px-4 rounded hover:bg-blue-700 {{ 'bg-blue-700' if request.endpoint.startswith('admin_application') }}">
24
- <i class="fas fa-file-alt mr-2"></i> {{ _('Applications') }}
25
- </a>
26
- <a href="{{ url_for('admin_settings') }}" class="block py-2 px-4 rounded hover:bg-blue-700 {{ 'bg-blue-700' if request.endpoint == 'admin_settings' }}">
27
- <i class="fas fa-cog mr-2"></i> {{ _('Settings') }}
28
- </a>
29
- <a href="{{ url_for('admin_logout') }}" class="block py-2 px-4 rounded hover:bg-blue-700 text-red-200 hover:text-white">
30
- <i class="fas fa-sign-out-alt mr-2"></i> {{ _('Logout') }}
31
- </a>
32
- </nav>
33
- </div>
34
-
35
- <!-- Main Content -->
36
- <div class="flex-1 overflow-auto">
37
- <header class="bg-white shadow-sm p-4 flex justify-between items-center">
38
- <h2 class="text-xl font-semibold text-gray-800">{% block admin_title %}{% endblock %}</h2>
39
- <div class="text-sm text-gray-600">
40
- {{ _('Logged in as') }} <span class="font-medium">admin</span>
41
- </div>
42
- </header>
43
-
44
- <main class="p-6">
45
- {% with messages = get_flashed_messages(with_categories=true) %}
46
- {% if messages %}
47
- {% for category, message in messages %}
48
- <div class="mb-4 p-4 rounded {% if category == 'error' %}bg-red-100 text-red-800{% else %}bg-green-100 text-green-800{% endif %}">
49
- {{ message }}
50
- </div>
51
- {% endfor %}
52
- {% endif %}
53
- {% endwith %}
54
-
55
- {% block admin_content %}{% endblock %}
56
- </main>
57
- </div>
58
- </div>
59
- </body>
60
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/admin/content.html DELETED
@@ -1 +0,0 @@
1
- <!-- admin/content.html -->
 
 
templates/admin/dashboard.html DELETED
@@ -1,76 +0,0 @@
1
- <!-- admin/dashboard.html -->
2
- {% extends "admin/base.html" %}
3
-
4
- {% block admin_title %}{{ _('Dashboard') }}{% endblock %}
5
-
6
- {% block admin_content %}
7
- <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
8
- <div class="bg-white p-6 rounded-lg shadow">
9
- <h3 class="text-gray-500 text-sm font-medium">{{ _('Total Applications') }}</h3>
10
- <p class="text-3xl font-bold text-blue-600">{{ stats.total }}</p>
11
- </div>
12
- <div class="bg-white p-6 rounded-lg shadow">
13
- <h3 class="text-gray-500 text-sm font-medium">{{ _('Submitted') }}</h3>
14
- <p class="text-3xl font-bold text-yellow-600">{{ stats.submitted }}</p>
15
- </div>
16
- <div class="bg-white p-6 rounded-lg shadow">
17
- <h3 class="text-gray-500 text-sm font-medium">{{ _('Accepted') }}</h3>
18
- <p class="text-3xl font-bold text-green-600">{{ stats.accepted }}</p>
19
- </div>
20
- <div class="bg-white p-6 rounded-lg shadow">
21
- <h3 class="text-gray-500 text-sm font-medium">{{ _('Rejected') }}</h3>
22
- <p class="text-3xl font-bold text-red-600">{{ stats.rejected }}</p>
23
- </div>
24
- </div>
25
-
26
- <div class="bg-white p-6 rounded-lg shadow">
27
- <h3 class="text-lg font-semibold mb-4">{{ _('Recent Applications') }}</h3>
28
- {% set recent_apps = load_data('applications')|sort(attribute='submission_date', reverse=True)|slice(5) %}
29
- {% if recent_apps %}
30
- <div class="overflow-x-auto">
31
- <table class="min-w-full divide-y divide-gray-200">
32
- <thead class="bg-gray-50">
33
- <tr>
34
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">{{ _('ID') }}</th>
35
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">{{ _('Name') }}</th>
36
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">{{ _('Grade') }}</th>
37
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">{{ _('Status') }}</th>
38
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">{{ _('Date') }}</th>
39
- </tr>
40
- </thead>
41
- <tbody class="bg-white divide-y divide-gray-200">
42
- {% for app in recent_apps %}
43
- <tr class="hover:bg-gray-50">
44
- <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
45
- <a href="{{ url_for('admin_application_detail', application_id=app.id) }}" class="text-blue-600 hover:underline">
46
- {{ app.id|truncate(8) }}
47
- </a>
48
- </td>
49
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
50
- {{ app.first_name }} {{ app.last_name }}
51
- </td>
52
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
53
- {{ app.applying_grade }}
54
- </td>
55
- <td class="px-6 py-4 whitespace-nowrap">
56
- <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full
57
- {% if app.status == 'submitted' %}bg-yellow-100 text-yellow-800
58
- {% elif app.status == 'accepted' %}bg-green-100 text-green-800
59
- {% elif app.status == 'rejected' %}bg-red-100 text-red-800
60
- {% else %}bg-gray-100 text-gray-800{% endif %}">
61
- {{ app.status|title }}
62
- </span>
63
- </td>
64
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
65
- {{ app.submission_date|format_date('medium') }}
66
- </td>
67
- </tr>
68
- {% endfor %}
69
- </tbody>
70
- </table>
71
- </div>
72
- {% else %}
73
- <p class="text-gray-500">{{ _('No applications found') }}</p>
74
- {% endif %}
75
- </div>
76
- {% endblock %}