├── .gitignore
├── README.md
├── abayayhsgs.php
├── admin
├── delete_It.php
├── index.php
├── submissions.php
├── superadmin.php
├── task
│ ├── addnewtask.php
│ ├── delete.php
│ ├── edit_task.php
│ ├── index.php
│ ├── super.php
│ └── task.php
└── view.php
├── assets
├── css
│ ├── form.css
│ ├── index.css
│ ├── profile.css
│ ├── responsive.css
│ ├── style.css
│ └── submissions.css
├── img
│ ├── Debuggerfrontend.png
│ ├── add.png
│ ├── allTsk.png
│ ├── cert.png
│ ├── code_paper.svg
│ ├── favicon.png
│ ├── feedback.png
│ ├── lbs.png
│ ├── lead.png
│ ├── lock.png
│ ├── medal.png
│ ├── podium.png
│ ├── profile.png
│ ├── profileWT.png
│ ├── programmer.svg
│ ├── programmer2.svg
│ ├── submissions.png
│ ├── submsn.png
│ ├── task.png
│ ├── tweet.png
│ ├── twitter.png
│ ├── wa.png
│ └── whatsapp.png
└── js
│ ├── app.js
│ └── jquery-3.4.1.js
├── certificate
├── README.md
├── app.py
├── certificates
│ ├── average performace.jpg
│ ├── good performance.jpg
│ ├── mentor.jpg
│ ├── outstanding.jpg
│ └── participated.jpg
├── fonts
│ ├── LeagueSpartan-Bold.otf
│ └── PTSans-Bold.ttf
└── requirements.txt
├── check.js
├── config
├── conn.php
├── connect.php
├── core.php
├── session.php
└── taskday.php
├── error
├── 200.html
├── error.css
├── scripts.js
└── styles.css
├── forgot.php
├── hash.php
├── index.css
├── index.html
├── leaderboard
├── award.js
├── award.php
├── index.css
├── index.php
├── leaderboard0.php
├── leaderboard1.js
├── results.json
├── track.js
└── track.php
├── logout.php
├── mailer
├── README.md
├── app.py
└── templates
│ └── body.html
├── mentors.md
├── new_password.php
├── sign_in.php
├── sign_up.php
├── submission_guide.md
└── user
├── editsubmission.php
├── feedback.php
├── index.php
├── newsubmit.php
├── py_submit.php
├── submissions.php
├── submit.php
├── task.php
├── taskday.php
└── update.php
/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/.gitignore
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Leaderboard
2 |
3 | Check [SOLUTION](https://github.com/geektutor/Leaderboard/tree/solution) Branch for final solution for Solution Challenge
4 |
5 | HOW TO SET UP THIS PROJECT LOCALLY
6 |
7 | 1. You must have local developer server installed on your machine like XAMPP, WAMP, LAMP
8 |
9 | 2. Clone the repository to your local machine:
10 |
11 | git clone https://github.com/geektutor/Leaderboard.git
12 |
13 | 3. Move the cloned folder to:
14 |
15 | a. for XAMPP: htdocs folder
16 |
17 | b. for WAMP: www folder
18 |
19 | 4. Create a database and name it anything you like. Just make sure you edit the config/connect.php and change the db_name to your database name
20 |
21 | 5. Start your local developer server
22 |
23 | 6. The project will be available at localhost/Leaderboard
24 |
25 | # DEPLOYMENT
26 |
27 | HOW TO SET UP THIS PROJECT ONLINE (USING CPANEL)
28 |
29 | 1. Download the project files
30 |
31 | 2. Upload the project files with file manager in Cpanel
32 |
33 | 3. Create a mysql database and put the configurations in config/connect.php
34 |
35 | 4. The project will be live at yourdomain.com
36 |
--------------------------------------------------------------------------------
/abayayhsgs.php:
--------------------------------------------------------------------------------
1 | 0";
5 | $reset = mysqli_query($conn, $first);
6 | $sql = "SELECT email FROM user";
7 | $result = mysqli_query($conn, $sql);
8 | $count = mysqli_num_rows($result);
9 | if ($count > 0) {
10 | while($row = mysqli_fetch_assoc($result)) {
11 | $particular_user = $row['email'];
12 | $up = total_score($particular_user);
13 | update_total($particular_user, $up);
14 | }
15 | }
16 |
17 |
18 | function total_score($email){
19 | global $conn;
20 | $queryURL = "SELECT `points` FROM submissions WHERE `user` = '$email' ";
21 | $resultURL = mysqli_query($conn, $queryURL);
22 | $countURL = mysqli_num_rows($resultURL);
23 | $total = 0;
24 | if ($countURL > 0) {
25 | while($row = mysqli_fetch_assoc($resultURL)) {
26 | $total += $row['points'];
27 | }
28 | return $total;
29 | }else{
30 | return $total;
31 | }
32 | }
33 | function update_total($email, $total){
34 | global $conn;
35 | $query = "UPDATE user SET score = $total WHERE `email` = '$email' ";
36 | $result = mysqli_query($conn, $query);
37 | if($conn->query($query)){
38 | return 1;
39 | }else{
40 | return 0;
41 | }
42 | }
43 | // $email = $_SESSION['login_user'];
44 | // $total = total_score($email);
45 | // $sql = "UPDATE user SET `score` = '$total' WHERE `email` = '$email'";
46 | // if(mysqli_query($conn, $sql)){
47 | // echo 'successful';
48 | // }
49 | // else {
50 | // echo 'error';
51 | // }
52 |
53 | // function totalRun($email){
54 | // global $conn;
55 | // $queryURL = "SELECT `user` FROM user WHERE isAdmin = 0";
56 | // $resultURL = mysqli_query($conn, $queryURL);
57 | // $countURL = mysqli_num_rows($resultURL);
58 | // $total = 0;
59 | // if ($countURL > 0) {
60 | // while ($row=$resul->fetch_assoc()) {
61 | // total_score($row['user']);
62 | // }
63 | // }
64 | // }
65 | /*
66 | SELECT email, COUNT(email) FROM user GROUP BY email HAVING COUNT(email) > 1
67 |
68 | INSERT INTO `submissions` (`id`, `user`, `track`, `url`, `task_day`, `comments`, `points`, `sub_date`, `feedback`) VALUES (NULL, 'onigemotosin@gmail.com', 'frontend', 'Twitter Points', 'March 28', 'Twitter Points', '5', 'March 28', 'GIVEN');
69 | INSERT INTO `submissions` (`id`, `user`, `track`, `url`, `task_day`, `comments`, `points`, `sub_date`, `feedback`) VALUES (NULL, 'feleolaife@gmail.com', 'frontend', 'Twitter Points', 'March 28', 'Twitter Points', '5', 'March 28', 'GIVEN');
70 | INSERT INTO `submissions` (`id`, `user`, `track`, `url`, `task_day`, `comments`, `points`, `sub_date`, `feedback`) VALUES (NULL, 'hassanatsubomi@gmail.com', 'frontend', 'Twitter Points', 'March 28', 'Twitter Points', '5', 'March 28', 'GIVEN');
71 | INSERT INTO `submissions` (`id`, `user`, `track`, `url`, `task_day`, `comments`, `points`, `sub_date`, `feedback`) VALUES (NULL, 'olotonjoshua@gmail.com', 'python', 'Twitter Points', 'March 28', 'Twitter Points', '5', 'March 28', 'GIVEN');
72 | */
73 | ?>
--------------------------------------------------------------------------------
/admin/delete_It.php:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | Dashboard - 30 Days Of Code
23 |
24 |
25 |
26 | #30DaysOfCode
27 |
28 |
29 |
32 |
33 |
34 |
35 |
36 |
41 |
42 |
74 |
=$_SESSION['login_user'];?>
75 |
76 |
77 |
78 |
79 |
80 |
81 | Update profile
82 |
87 |
88 |
89 | ';
101 | echo '
'.$first. ' ' .$last.'
';
102 | echo '
'.$user_nickname.'
';
103 | }
104 | ?>
105 |
106 |
107 |
108 |
109 | 'Backend',
114 | 'Frontend' => 'Frontend',
115 | 'Mobile' => 'Mobile',
116 | 'ML' => 'ML',
117 | 'GIS' => 'GIS'
118 | ];
119 | foreach ($tracks as $track) {
120 | $track_submission = "SELECT * FROM submissions WHERE track = '$track' AND points = 0 ORDER BY track";
121 | $result = mysqli_query($conn, $track_submission);
122 | $count = mysqli_num_rows($result);
123 | echo '
';
124 | echo '
';
125 | echo '
'.$track.'
';
126 | echo '
Unmarked: '.$count++.'
';
127 | echo '
';
128 | }
129 |
130 | ?>
131 |
132 |
133 |
134 |
135 |
136 | Copyright © 30DaysOfCode 2020
137 |
140 |
141 |
142 |
143 |
144 |
149 |
150 |
151 |
--------------------------------------------------------------------------------
/admin/submissions.php:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Dashboard - 30 Days Of Code
19 |
20 |
21 |
22 | #30DaysOfCode
23 |
24 |
25 |
28 |
29 |
30 |
31 |
32 |
37 |
38 |
70 |
=$_SESSION['login_user'];?>
71 |
72 |
73 |
74 |
75 |
118 |
119 |
162 |
163 |
Copyright © 30DaysOfCode 2020
164 |
165 |
166 |
171 |
172 |
173 |
178 |
--------------------------------------------------------------------------------
/admin/superadmin.php:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | Dashboard - 30 Days Of Code
20 |
21 |
22 |
23 | #30DaysOfCode
24 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
38 |
39 |
69 |
=$_SESSION['login_user'];?>
70 |
71 |
72 |
73 |
74 |
120 |
121 |
Copyright © 30DaysOfCode 2020
122 |
123 |
124 |
125 |
152 |
153 |
154 |
157 | document.write('you do not have access to this page, redirecting to login page ...');
158 | setTimeout(()=>{
159 | window.location.href = '../../sign_in.php'
160 | },2000)
161 | ";
162 | }
163 | ?>
--------------------------------------------------------------------------------
/admin/task/addnewtask.php:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Dashboard - 30 Days Of Code
19 |
20 |
26 |
27 |
28 |
29 | #30DaysOfCode
30 |
31 |
32 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
77 |
=$_SESSION['login_user'];?>
78 |
79 |
80 |
81 |
82 |
97 |
98 |
134 |
Copyright © 30DaysOfCode 2020
135 |
136 |
137 |
138 |
143 |
144 |
145 |
150 |
--------------------------------------------------------------------------------
/admin/task/delete.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/admin/task/edit_task.php:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | Dashboard - 30 Days Of Code
22 |
23 |
29 |
30 |
31 |
32 | #30DaysOfCode
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
47 |
48 |
78 |
=$_SESSION['login_user'];?>
79 |
80 |
81 |
82 |
83 | query($sql)) {
92 | $error = "Updated successfully";
93 |
94 | }
95 | }
96 | ?>
97 |
98 |
99 | Edit Task
100 |
101 |
102 | = $error; ?>
103 |
104 |
105 |
106 |
107 |
Current Task Details
108 |
Day - | Track -
109 |
110 |
111 |
Day
112 |
113 |
Enter the day e.g 1,2,3,4,5,6
114 |
115 |
116 | Track
117 |
118 | Frontend
119 | Backend
120 | Mobile
121 | Machine Learning
122 |
123 |
124 |
125 | Task
126 |
127 |
128 |
Submit task
129 |
130 |
131 | Nothing yet`;
134 | }
135 | ?>
136 |
137 |
138 |
Copyright © 30DaysOfCode 2020
139 |
140 |
141 |
142 |
147 |
148 |
149 |
--------------------------------------------------------------------------------
/admin/task/index.php:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | Dashboard - 30 Days Of Code
22 |
23 |
24 |
25 | #30DaysOfCode
26 |
27 |
28 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
71 |
=$_SESSION['login_user'];?>
72 |
73 |
74 |
75 |
76 |
77 | Tasks
78 |
79 |
80 | Track
81 |
82 | Backend
83 | Frontend
84 | Mobile
85 | Machine Learning
86 |
87 |
88 |
Submit
89 |
90 |
91 |
92 |
93 |
94 |
Copyright © 30DaysOfCode 2020
95 |
96 |
97 |
98 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/admin/task/super.php:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Dashboard - 30 Days Of Code
19 |
20 |
21 |
22 | #30DaysOfCode
23 |
24 |
25 |
28 |
29 |
30 |
31 |
32 |
37 |
38 |
68 |
=$_SESSION['login_user'];?>
69 |
70 |
71 |
72 |
73 |
74 | Tasks Add new
75 |
83 |
84 |
85 |
86 |
87 | S/N
88 | Day
89 | Track
90 | Task
91 | Action
92 |
93 |
94 |
95 | 0){
97 | $j =1;
98 | while($row = mysqli_fetch_assoc($result)) {
99 | ?>
100 |
101 |
102 | = $row['task_day']; ?>
103 | = $row['track'];?>
104 | = $row['task'];?>
105 | Edit | Delete
106 |
107 | No tasks yet`;
111 | }
112 | ?>
113 |
114 |
115 |
116 |
117 |
118 |
Copyright © 30DaysOfCode 2020
119 |
120 |
121 |
122 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/admin/task/task.php:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | Dashboard - 30 Days Of Code
20 |
21 |
22 |
23 | #30DaysOfCode
24 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
38 |
39 |
69 |
=$_SESSION['login_user'];?>
70 |
71 |
72 |
73 |
74 |
75 | Tasks Add new
76 |
82 |
83 |
84 |
85 |
86 | S/N
87 | Day
88 | Track
89 | Task
90 | Action
91 |
92 |
93 |
94 | 0){
96 | $j =0;
97 | while($row = mysqli_fetch_assoc($result)) {
98 | ?>
99 |
100 |
101 | = $row['task_day']; ?>
102 | = $row['track'];?>
103 | = $row['task'];?>
104 | Edit | Delete
105 |
106 | No tasks yet`;
110 | }
111 | ?>
112 |
113 |
114 |
115 |
116 |
117 |
Copyright © 30DaysOfCode 2020
118 |
119 |
120 |
121 |
126 |
127 |
128 |
--------------------------------------------------------------------------------
/admin/view.php:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | Dashboard - 30 Days Of Code
22 |
23 |
24 |
25 | #30DaysOfCode
26 |
27 |
28 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
71 |
=$_SESSION['login_user'];?>
72 |
73 |
74 |
75 |
76 | 0){
79 | while($row = $result->fetch_assoc()) {
80 | if (isset($_POST['submit'])) {
81 | $u = $_POST['user'];
82 | $point = $_POST['point'];
83 | $track = $row['track'];
84 | $level = $row['level'];
85 | $feedback = mysqli_real_escape_string($conn, $_POST['feedback']);
86 | if ($feedback == '') {
87 | $feedback = "Marked";
88 | }
89 | $sql = "UPDATE submissions SET points = '$point', feedback = '$feedback' WHERE id = '$id'";
90 | $result = mysqli_query($conn, $sql);
91 | if($result){
92 | $us = $row['user'];
93 | $sql_check = "SELECT * FROM leaderboard WHERE email = '$u' AND track = '$track' AND level = '$level'";
94 | $result_check = mysqli_query($conn, $sql_check);
95 | $count_check = mysqli_num_rows($result_check);
96 | $row_check = mysqli_fetch_array($result_check,MYSQLI_ASSOC);
97 | $total = intval($point) + intval($row_check['score']);
98 | $LId = $row_check['id'];
99 | if ($count_check > 0) {
100 | $sql_up = "UPDATE leaderboard SET score = '$total' WHERE id = '$LId' ";
101 | $result_up = mysqli_query($conn, $sql_up);
102 | // $count_up = mysqli_num_rows($result_up);
103 | }else{
104 | $sql_nick = "SELECT * FROM user WHERE email = '$us'";
105 | $result_nick = mysqli_query($conn, $sql_nick);
106 | $row_nick = mysqli_fetch_array($result_nick,MYSQLI_ASSOC);
107 | $nickname = $row_nick['nickname'];
108 | $sql_up = "INSERT INTO leaderboard(nickname, email, track, level, score) VALUES('$nickname', '$u', '$track', '$level', '$point')";
109 | $result_up = mysqli_query($conn, $sql_up);
110 | $count_up = mysqli_num_rows($result_up);
111 | }
112 | if($result_up){
113 | $error = "Submission Successfully Graded";
114 | header("refresh: 2; url=./submissions.php?track=$track&level=$level");
115 | }else{
116 | $error = "Could not update user";
117 | }
118 | } else {
119 | $error = "Could not update sub";
120 | }
121 | }
122 | ?>
123 |
124 |
125 | Submission
126 |
127 |
128 | = $error?>
129 |
130 |
131 |
132 |
136 |
137 | Comments?
138 | = $row['comments'];?>
139 |
140 |
141 | Point
142 |
143 |
144 |
145 | User
146 |
147 |
148 |
149 | Feedback?
150 |
151 |
152 |
Submit task
153 |
154 |
155 | No Submissions yet`;
158 | }
159 | ?>
160 |
161 |
Copyright © 30DaysOfCode 2020
162 |
163 |
164 |
165 |
166 |
167 |
--------------------------------------------------------------------------------
/assets/css/form.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | -webkit-box-sizing: border-box;
5 | box-sizing: border-box;
6 | font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
7 | }
8 | .flex {
9 | display: -webkit-box;
10 | display: -ms-flexbox;
11 | display: flex;
12 | }
13 | .cnt {
14 | -webkit-box-align: center;
15 | -ms-flex-align: center;
16 | align-items: center;
17 | -webkit-box-pack: center;
18 | -ms-flex-pack: center;
19 | justify-content: center;
20 | }
21 | .row {
22 | -webkit-box-orient: horizontal;
23 | -webkit-box-direction: normal;
24 | -ms-flex-direction: row;
25 | flex-direction: row;
26 | }
27 | .col {
28 | -webkit-box-orient: vertical;
29 | -webkit-box-direction: normal;
30 | -ms-flex-direction: column;
31 | flex-direction: column;
32 | }
33 | body {
34 | background-color: #283556;
35 | background-image: url(/assets/img/code_paper.svg), url(/assets/img/programmer.svg);
36 | background-position: left bottom, right bottom;
37 | background-repeat: no-repeat, no-repeat;
38 | min-height: 100vh;
39 | }
40 | .body-content {
41 | min-height: 100vh;
42 | width: 100%;
43 | -webkit-box-align: center;
44 | -ms-flex-align: center;
45 | align-items: center;
46 | }
47 | h1 {
48 | padding: 0 8px 0 8px;
49 | text-align: center;
50 | color: #EFEFFE;
51 | font-size: 30px;
52 | font-weight: 800;
53 | margin-top: 80px;
54 | cursor: pointer;
55 | }
56 | form {
57 | margin: 30px 0 40px 0;
58 | width: 420px;
59 | height: -webkit-fit-content;
60 | height: -moz-fit-content;
61 | height: fit-content;
62 | padding: 0 40px 40px 40px;
63 | background-color: white;
64 | }
65 | fieldset {
66 | border: none;
67 | width: 100%;
68 | }
69 | legend {
70 | text-align: left;
71 | color: #495770;
72 | color: #3f557a;
73 | width: 100%;
74 | font-size: 25px;
75 | font-weight: 800;
76 | padding: 25px 0 15px 0;
77 | }
78 | .notify p {
79 | width: 100%;
80 | height: -webkit-fit-content;
81 | height: -moz-fit-content;
82 | height: fit-content;
83 | padding: 10px;
84 | border: 1px solid #0ea5d3;
85 | background-color: #5bc0de;
86 | color: #151718;
87 | border-radius: 3px;
88 | font-weight: 600;
89 | margin-bottom: 10px;
90 | }
91 | .field {
92 | margin-bottom: 15px;
93 | }
94 | input, select {
95 | color: black;
96 | background-color: white;
97 | margin-top: 10px;
98 | font-size: 15px;
99 | font-weight: 400;
100 | padding: 10px;
101 | border: 0.5px solid rgb(164, 161, 167);
102 | }
103 | input:focus, select:active {
104 | outline: none;
105 | -webkit-transition-duration: 300ms;
106 | -o-transition-duration: 300ms;
107 | transition-duration: 300ms;
108 | -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.76);
109 | box-shadow: 0 0 3px rgba(0, 0, 0, 0.76);
110 | }
111 | button {
112 | color: white;
113 | font-size: 16px;
114 | font-weight: 600;
115 | margin: 20px 0 30px 0;
116 | width: 100%;
117 | height: 45px;
118 | border: none;
119 | border-radius: 5px;
120 | -webkit-box-align: center;
121 | -ms-flex-align: center;
122 | align-items: center;
123 | -webkit-box-pack: center;
124 | -ms-flex-pack: center;
125 | justify-content: center;
126 | background-color: rgb(79, 177, 190);
127 | }
128 | button:hover {
129 | cursor: pointer;
130 | -webkit-box-shadow: 0 2px 10px rgb(99, 97, 97);
131 | box-shadow: 0 2px 10px rgb(99, 97, 97);
132 | cursor: pointer;
133 | }
134 | .links p {
135 | color: black;
136 | font-size: 16px;
137 | margin-bottom: 1px;
138 | }
139 | .links a {
140 | text-decoration: none;
141 | font-weight: 600;
142 | color: rgb(6, 89, 167);
143 | }
144 | @media only screen and (max-width: 900px) {
145 | body {
146 | background-size: 180px auto, 120px auto;
147 | }
148 | }
149 | @media only screen and (max-width: 450px){
150 | h1 {
151 | font-size: 26px;
152 | margin-top: 40px;
153 | }
154 | form {
155 | width: 90%;
156 | padding: 20px;
157 | }
158 | .links p {
159 | font-size: 15px;
160 | }
161 | }
--------------------------------------------------------------------------------
/assets/css/index.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | -webkit-box-sizing: border-box;
5 | box-sizing: border-box;
6 | font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
7 | text-align: center;
8 | }
9 | .flex {
10 | display: -webkit-box;
11 | display: -ms-flexbox;
12 | display: flex;
13 | }
14 | .cnt {
15 | -webkit-box-align: center;
16 | -ms-flex-align: center;
17 | align-items: center;
18 | -webkit-box-pack: center;
19 | -ms-flex-pack: center;
20 | justify-content: center;
21 | }
22 | .row {
23 | -webkit-box-orient: horizontal;
24 | -webkit-box-direction: normal;
25 | -ms-flex-direction: row;
26 | flex-direction: row;
27 | }
28 | .col {
29 | -webkit-box-orient: vertical;
30 | -webkit-box-direction: normal;
31 | -ms-flex-direction: column;
32 | flex-direction: column;
33 | }
34 | body {
35 | background-color: #283556;
36 | background-image: url(/assets/img/code_paper.svg), url(/assets/img/programmer.svg);
37 | background-position: left bottom, right bottom;
38 | background-repeat: no-repeat, no-repeat;
39 | min-height: 100vh;
40 | }
41 | .body-content {
42 | min-height: 100vh;
43 | width: 100%;
44 | -webkit-box-align: center;
45 | -ms-flex-align: center;
46 | align-items: center;
47 | }
48 | header {
49 | width: -webkit-fit-content;
50 | width: -moz-fit-content;
51 | width: fit-content;
52 | -ms-flex-item-align: end;
53 | align-self: flex-end;
54 | margin: 20px 30px 0 0;
55 | }
56 | nav {
57 | width: -webkit-fit-content;
58 | width: -moz-fit-content;
59 | width: fit-content;
60 | }
61 | #sign-in-btn {
62 | border: 4px solid #7195F0;
63 | background: none;
64 | height: 48px;
65 | width: 146px;
66 | border-radius: 40px;
67 | outline: none;
68 | font-weight: 600;
69 | outline: none;
70 | }
71 | #sign-in-btn:hover {
72 | cursor: pointer;
73 | background-color: #7195F0;
74 | }
75 | nav a {
76 | text-decoration: none;
77 | color: #FEFEFE;
78 | font-size: 16px;
79 | }
80 | .stretch {
81 | width: 100%;
82 | -webkit-box-flex: 1;
83 | -ms-flex: 1;
84 | flex: 1;
85 | -webkit-box-align: center;
86 | -ms-flex-align: center;
87 | align-items: center;
88 | -webkit-box-pack: justify;
89 | -ms-flex-pack: justify;
90 | justify-content: space-between;
91 | }
92 | .main-content {
93 | width: -webkit-fit-content;
94 | width: -moz-fit-content;
95 | width: fit-content;
96 | -webkit-box-align: center;
97 | -ms-flex-align: center;
98 | align-items: center;
99 | }
100 | .main-content h1 {
101 | color: #EFEFFE;
102 | font-size: 40px;
103 | margin-top: 58px;
104 | margin-bottom: 12px;
105 | font-weight: 800;
106 | }
107 | .main-content img {
108 | margin-bottom: 50px;
109 | }
110 | .main-content p {
111 | color: #DEDEF2;
112 | font-size: 22px;
113 | width: 328px;
114 | margin-bottom: 50px;
115 | line-height: 150%;
116 | font-weight: 400;
117 | text-shadow: 0 3px 5px rgba(0, 0, 0, 0);
118 | }
119 | #sign-up-btn {
120 | outline: none;
121 | height: 48px;
122 | width: 240px;
123 | border-radius: 22px;
124 | font-weight: 800;
125 | background-color: #65E4F1;
126 | border: none;
127 | -webkit-box-shadow: 2px 3px 3px black;
128 | box-shadow: 2px 3px 3px black;
129 | margin-bottom: 40px;
130 | }
131 | #sign-up-btn a {
132 | color: #145259;
133 | text-decoration: none;
134 | font-size: 15px;
135 | }
136 | #sign-up-btn:hover {
137 | -webkit-transform: scale(1.08);
138 | -ms-transform: scale(1.08);
139 | transform: scale(1.08);
140 | -webkit-box-shadow: 0 4px 6px black;
141 | box-shadow: 0 4px 6px black;
142 | cursor: pointer;
143 | }
144 | footer {
145 | width: 100%;
146 | -webkit-box-align: center;
147 | -ms-flex-align: center;
148 | align-items: center;
149 | }
150 | footer ul {
151 | margin: 10px 0 10px 0;
152 | width: 420px;
153 | -webkit-box-pack: justify;
154 | -ms-flex-pack: justify;
155 | justify-content: space-between;
156 | }
157 | footer li {
158 | list-style-type: none;
159 | color: #a5b7e9b2;
160 | }
161 | footer p, footer li {
162 | font-size: 16px;
163 | font-weight: 600;
164 | }
165 | footer .track {
166 | color: #667a97;
167 | position: relative;
168 | font-weight: 800;
169 | }
170 | .copy {
171 | font-size: 14px;
172 | color: rgb(87, 152, 243);
173 | margin-bottom: 5px;
174 | }
175 | @media only screen and (max-width: 900px) {
176 | body {
177 | background-size: 250px auto, 180px auto;
178 | }
179 | header {
180 | margin: 12px 12px 0 0;;
181 | }
182 | .main-content h1 {
183 | font-size: 26px;
184 | margin-top: 30px;
185 | }
186 | .main-content img {
187 | margin-bottom: 50px;
188 | }
189 | .main-content p {
190 | font-size: 18px;
191 | margin-bottom: 50px;
192 | }
193 | #sign-in-btn, #sign-up-btn {
194 | height: 40px;
195 | font-size: 14px;
196 | }
197 | }
198 | @media only screen and (max-width: 520px) {
199 | body {
200 | background-size: 180px auto, 120px auto;
201 | }
202 | .main-content h1 {
203 | font-size: 23px;
204 | }
205 | .main-content img {
206 | margin-bottom: 35px;
207 | }
208 | .main-content {
209 | width: 80%;
210 | }
211 | .main-content p {
212 | width: 100%;
213 | font-size: 16px;
214 | margin-bottom: 40px;
215 | }
216 | footer ul.row {
217 | width: 100%;
218 | -webkit-box-orient: vertical;
219 | -webkit-box-direction: normal;
220 | -ms-flex-direction: column;
221 | flex-direction: column;
222 | }
223 | footer li, footer p {
224 | font-size: 15px;
225 | }
226 | }
227 |
--------------------------------------------------------------------------------
/assets/css/profile.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-image: none;
3 | }
4 | main {
5 | -webkit-box-align: center;
6 | -ms-flex-align: center;
7 | align-items: center;
8 | -webkit-box-flex: 1;
9 | -ms-flex: 1;
10 | flex: 1;
11 | }
12 | .banner {
13 | width: 100%;
14 | height: 285px;
15 | background-color: #2B3E70;
16 | -webkit-box-align: center;
17 | -ms-flex-align: center;
18 | align-items: center;
19 | position: relative;
20 | }
21 | .whiteBtn {
22 | -ms-flex-item-align: end;
23 | align-self: flex-end;
24 | position: relative;
25 | top: 0;
26 | height: 38px;
27 | width: 130px;
28 | background-color: rgba(0, 0, 0, 0);
29 | border: 1.5px solid #ffffff;
30 | border-radius: 20px;
31 | margin: 10px 10px 0 0;
32 | cursor: pointer;
33 | }
34 | .whiteBtn:hover {
35 | background-color: rgba(255, 255, 255, 0.2);
36 | }
37 | .whiteBtn a {
38 | color: white;
39 | text-decoration: none;
40 | }
41 | .profile-details {
42 | -webkit-box-align: center;
43 | -ms-flex-align: center;
44 | align-items: center;
45 | }
46 | .banner .avatar {
47 | border-radius: 50%;
48 | height: 145px;
49 | width: 145px;
50 | background-color: #697699;
51 | margin-bottom: 10px;
52 | }
53 | .profile-details .name {
54 | color: white;
55 | font-size: 24px;
56 | text-align: center;
57 | margin-bottom: 6px;
58 | }
59 | .profile-details .user {
60 | color: #DADDE6;
61 | font-size: 16px;
62 | text-align: center;
63 | }
64 | .scores-card {
65 | padding-top: 30px;
66 | -webkit-box-flex: 1;
67 | -ms-flex: 1;
68 | flex: 1;
69 | -ms-flex-wrap: wrap;
70 | flex-wrap: wrap;
71 | width: 80%;
72 | border-radius: 5px;
73 | -webkit-box-pack: center;
74 | -ms-flex-pack: center;
75 | justify-content: center;
76 | }
77 | .scores-card .group {
78 | box-sizing: content-box;
79 | background-color: white;
80 | width: 200px;
81 | height: -webkit-fit-content;
82 | height: -moz-fit-content;
83 | height: fit-content;
84 | padding: 25px 10px;
85 | border-radius: 10px;
86 | margin: 20px;
87 | -webkit-box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.151);
88 | box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.1);
89 | }
90 | .scores-card .group:hover {
91 | cursor: pointer;
92 | -webkit-box-shadow: 0 0 30px 0px rgba(0, 0, 0, 0.18);
93 | box-shadow: 0 0 30px 0px rgba(0, 0, 0, 0.18);
94 | transform: scale(1.05);
95 | }
96 | .group .rank {
97 | margin-top: 5px;
98 | color: #071733;
99 | font-weight: 800;
100 | font-size: 18px;
101 | }
102 | .group .track {
103 | font-size: 25px;
104 | margin-bottom: 12px;
105 | text-transform: capitalize;
106 | }
107 | .Frontend .track {
108 | color: #1486C2;
109 | }
110 | .Backend .track {
111 | color: #C26D00;
112 | }
113 | .ML .track {
114 | color: #BC27C2;
115 | }
116 | .Mobile .track {
117 | color: #2E345C;
118 | }
119 | .GIS .track {
120 | color: #53C20A;
121 | }
122 | .group .level {
123 | color: white;
124 | text-transform: uppercase;
125 | border-radius: 5px;
126 | padding: 12px 30px;
127 | font-size: 14px;
128 | margin-bottom: 14px;
129 | }
130 | .group .level a {
131 | color: white;
132 | }
133 | .group .points {
134 | color: #071733;
135 | font-size: 16px;
136 | font-weight: 800;
137 | }
138 | .Frontend .level {
139 | background-color: #1486C2;
140 | }
141 | .Backend .level {
142 | background-color: #C26D00;
143 | }
144 | .ML .level {
145 | background-color: #BC27C2;
146 | }
147 | .Mobile .level {
148 | background-color: #2E345C;
149 | }
150 | .GIS .level {
151 | background-color: #53C20A;
152 | }
153 |
154 | .unmarked-card {
155 | margin: 20px 0;
156 | background-color: white;
157 | width: 460px;
158 | box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.12);
159 | padding: 0s;
160 | border-radius: 10px;
161 | }
162 | .unmarked-card table {
163 | width: 100%;
164 | border-collapse: collapse;
165 | text-align: center;
166 | }
167 | .unmarked-card td, .unmarked-card th {
168 | padding: 10px 0;
169 | color: #353434;
170 | font-size: 14px;
171 | }
172 |
173 | .unmarked-card th {
174 | font-size: 13px;
175 | padding-top: 12px;
176 | padding-bottom: 12px;
177 | background-color: #5b5d67;
178 | color: white;
179 | }
180 | .unmarked-card tr:nth-child(even){
181 | background-color: #f2f2f2;
182 | }
183 | .unmarked-card tr:hover {
184 | background-color: #cfd3d4;
185 | }
186 |
--------------------------------------------------------------------------------
/assets/css/responsive.css:
--------------------------------------------------------------------------------
1 | @media only screen and (max-width: 800px) {
2 | nav {
3 | -webkit-transition-duration: 400ms;
4 | -o-transition-duration: 400ms;
5 | transition-duration: 400ms;
6 | z-index: 3;
7 | height: inherit;
8 | position: absolute;
9 | -webkit-transform: translateX(-100%);
10 | -ms-transform: translateX(-100%);
11 | transform: translateX(-100%);
12 |
13 | }
14 | nav.open {
15 | -webkit-transform: translateX(0%);
16 | -ms-transform: translateX(0%);
17 | transform: translateX(0%);
18 | }
19 | #hamburger {
20 | -webkit-transition-duration: 350ms;
21 | -o-transition-duration: 350ms;
22 | transition-duration: 350ms;
23 | display: -webkit-box;
24 | display: -ms-flexbox;
25 | display: flex;
26 | -webkit-box-sizing: content-box;
27 | box-sizing: content-box;
28 | position: absolute;
29 | right: 0;
30 | height: 30px;
31 | width: 35px;
32 | -webkit-box-align: start;
33 | -ms-flex-align: start;
34 | align-items: flex-start;
35 | -ms-flex-pack: distribute;
36 | justify-content: space-around;
37 | cursor: pointer;
38 | outline: none;
39 | padding: 15px;
40 | -webkit-transform: translateX(100%);
41 | -ms-transform: translateX(100%);
42 | transform: translateX(100%);
43 | }
44 | .open #hamburger {
45 | -webkit-transform: translateX(0);
46 | -ms-transform: translateX(0);
47 | transform: translateX(0);
48 | }
49 | .open #hamburger div {
50 | background-color: white;
51 | }
52 | #hamburger div {
53 | -webkit-transition-duration: 500ms;
54 | -o-transition-duration: 500ms;
55 | transition-duration: 500ms;
56 | -webkit-transform-origin: center;
57 | -ms-transform-origin: center;
58 | transform-origin: center;
59 | height: 4px;
60 | border-radius: 4px;
61 | background-color: rgb(29, 8, 122);
62 | }
63 | #hamburger div.a {
64 | width: 35px;
65 | }
66 | .open #hamburger div.a {
67 | -webkit-transform: rotateZ(45deg) translateY(10px) translateX(5px) ;
68 | -ms-transform: rotate(45deg) translateY(10px) translateX(5px);
69 | transform: rotateZ(45deg) translateY(10px) translateX(5px) ;
70 | }
71 | #hamburger div.b {
72 | width: 25px;
73 | }
74 | .open #hamburger div.b {
75 | -webkit-transform: rotateZ(-45deg) translateY(2px) translateX(5px);
76 | -ms-transform: rotate(-45deg) translateY(2px) translateX(5px);
77 | transform: rotateZ(-45deg) translateY(2px) translateX(5px);
78 | border-radius: 0 4px 4px 0;
79 | }
80 | #hamburger div.c {
81 | width: 10px;
82 | }
83 | .open #hamburger div.c {
84 | border-radius: 4px 0 0 4px;
85 | -webkit-transform: rotateZ(-45deg) translateX(1px) translateY(0px);
86 | -ms-transform: rotate(-45deg) translateX(1px) translateY(0px);
87 | transform: rotateZ(-45deg) translateX(1px) translateY(0px);
88 | }
89 | form {
90 | margin: 40px 0;
91 | -ms-flex-item-align: center;
92 | -ms-grid-row-align: center;
93 | align-self: center;
94 | width: 65%;
95 | }
96 | }
97 | @media only screen and (max-width: 500px) {
98 | header {
99 | padding: 0 30px;
100 | }
101 | .banner .avatar {
102 | margin-top: 25px;
103 | height: 120px;
104 | width: 120px;
105 | }
106 | .banner .name {
107 | font-size: 18px;
108 | }
109 | .whiteBtn {
110 | width: 110px;
111 | }
112 | .scores-card {
113 | padding-top: 5px;
114 | }
115 | .scores-card .group {
116 | margin-bottom: 15px;
117 | }
118 | form {
119 | margin: 65px 0;
120 | width: 90%;
121 | }
122 | .unmarked-card {
123 | width: 90%;
124 | }
125 | }
126 | @media only screen and (max-width: 450px) {
127 | legend a {
128 | float: none;
129 | }
130 | legend .generic {
131 | display: block;
132 | height: 5px;
133 | }
134 | }
--------------------------------------------------------------------------------
/assets/css/submissions.css:
--------------------------------------------------------------------------------
1 | main #newBtn {
2 | margin-left: 12px;
3 | font-size: 14px;
4 | font-weight: normal;
5 | border: none;
6 | color: rgba(255, 255, 255, 0.952);
7 | border-radius: 3px;
8 | padding: 8px 12px 8px 12px;
9 | background-color: #6868fd;
10 | cursor: pointer;
11 | }
12 | main #newBtn:hover {
13 | background-color: #8e8eee;
14 | }
15 | form{
16 | -ms-flex-item-align: center;
17 | -ms-grid-row-align: center;
18 | align-self: center;
19 | margin: 80px 0px !important;
20 | width: 95% !important;
21 | }
22 | table {
23 | color: rgb(60, 60, 63);
24 | border: 1px solid #ccc;
25 | border-collapse: collapse;
26 | margin: 0;
27 | padding: 0;
28 | width: 100%;
29 | }
30 | table thead {
31 | width: 100%;
32 | }
33 | table tr {
34 | background-color: #f8f8f8;
35 | border: 1px solid #ddd;
36 | padding: .35em;
37 | }
38 |
39 | table th,
40 | table td {
41 | min-height: 20px;
42 | padding: .625em;
43 | text-align: left;
44 | }
45 |
46 | table th {
47 | font-size: .85em;
48 | letter-spacing: .1em;
49 | text-transform: uppercase;
50 | }
51 | @media screen and (max-width: 600px) {
52 | table {
53 | border: 0;
54 | }
55 | table caption {
56 | font-size: 1.3em;
57 | }
58 |
59 | table thead {
60 | border: none;
61 | clip: rect(0 0 0 0);
62 | height: 1px;
63 | margin: -1px;
64 | overflow: hidden;
65 | padding: 0;
66 | position: absolute;
67 | width: 1px;
68 | }
69 |
70 | table tr {
71 | border-bottom: 3px solid #ddd;
72 | display: block;
73 | margin-bottom: .625em;
74 | }
75 |
76 | table td {
77 | border-bottom: 1px solid #ddd;
78 | display: block;
79 | font-size: .8em;
80 | text-align: right;
81 | }
82 | table td::before {
83 | content: attr(data-label);
84 | float: left;
85 | font-weight: bold;
86 | text-transform: uppercase;
87 | }
88 |
89 | table td:last-child {
90 | border-bottom: 0;
91 | }
92 | }
--------------------------------------------------------------------------------
/assets/img/Debuggerfrontend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/Debuggerfrontend.png
--------------------------------------------------------------------------------
/assets/img/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/add.png
--------------------------------------------------------------------------------
/assets/img/allTsk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/allTsk.png
--------------------------------------------------------------------------------
/assets/img/cert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/cert.png
--------------------------------------------------------------------------------
/assets/img/code_paper.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/assets/img/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/favicon.png
--------------------------------------------------------------------------------
/assets/img/feedback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/feedback.png
--------------------------------------------------------------------------------
/assets/img/lbs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/lbs.png
--------------------------------------------------------------------------------
/assets/img/lead.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/lead.png
--------------------------------------------------------------------------------
/assets/img/lock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/lock.png
--------------------------------------------------------------------------------
/assets/img/medal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/medal.png
--------------------------------------------------------------------------------
/assets/img/podium.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/podium.png
--------------------------------------------------------------------------------
/assets/img/profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/profile.png
--------------------------------------------------------------------------------
/assets/img/profileWT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/profileWT.png
--------------------------------------------------------------------------------
/assets/img/programmer.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/assets/img/programmer2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/img/submissions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/submissions.png
--------------------------------------------------------------------------------
/assets/img/submsn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/submsn.png
--------------------------------------------------------------------------------
/assets/img/task.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/task.png
--------------------------------------------------------------------------------
/assets/img/tweet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/tweet.png
--------------------------------------------------------------------------------
/assets/img/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/twitter.png
--------------------------------------------------------------------------------
/assets/img/wa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/wa.png
--------------------------------------------------------------------------------
/assets/img/whatsapp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/assets/img/whatsapp.png
--------------------------------------------------------------------------------
/assets/js/app.js:
--------------------------------------------------------------------------------
1 | var hamBurger = document.getElementById("hamburger");
2 | var navPane = document.getElementById("navPane");
3 |
4 | hamBurger.addEventListener("click", function(){
5 | navPane.classList.toggle("open")
6 | })
7 |
8 | navPane.addEventListener("click", function(e){
9 | if(e.target.tagName == "LI") {
10 | window.location.href = e.target.children[1].href
11 | }
12 | })
13 |
14 | Array.from(document.getElementsByClassName("dismiss")).forEach(function(elm){
15 | elm.addEventListener("click", function(e){
16 | e.target.parentElement.remove()
17 | })
18 | })
19 |
20 | //remove WYSIWYG inline styling
21 | var notice = Array.from(document.getElementsByClassName("notice"))
22 | if (notice.length > 0) {
23 | notice.forEach(function(a){
24 | Array.from(a.children).forEach(function (e) {
25 | e.removeAttribute("style");
26 | if (e.firstElementChild) {
27 | Array.from(e.children).forEach(function (c) {
28 | c.removeAttribute("style");
29 | if (c.firstElementChild) {
30 | Array.from(c.children).forEach(function (d) {
31 | d.removeAttribute("style");
32 | });
33 | }
34 | });
35 | }
36 | });
37 | })
38 | }
39 | /* window.onresize = resizeEvent;
40 | resizeEvent() */
41 |
--------------------------------------------------------------------------------
/certificate/README.md:
--------------------------------------------------------------------------------
1 | # FLASK CERT GEN
2 |
3 | Call the /generate endpoint with a GET request
4 | * first_name - user First Name
5 | * last_name - user Last Name
6 | * track - programming Track
7 | * type - certificate type
8 |
9 | ## Certificate types
10 | * 1 - Average performace
11 | * 2 - Good performace
12 | * 3 - Outstanding performace
13 | * 4 - Participating certificate
14 | * 5 - Mentor certificate
15 |
--------------------------------------------------------------------------------
/certificate/app.py:
--------------------------------------------------------------------------------
1 | import os
2 | from PIL import Image, ImageFont, ImageDraw
3 | from flask import Flask, request
4 |
5 | app = Flask(__name__)
6 |
7 |
8 | @app.route("/")
9 | def index():
10 | return "Hello World"
11 |
12 |
13 | @app.route("/generate/")
14 | def generate():
15 | certificate = make_certificate(**request.args)
16 | return certificate
17 |
18 |
19 | def make_certificate(first_name, last_name, type, track=None):
20 | def draw_text(filename, type, first_name, last_name, track=None):
21 | font = "PTSans-Bold.ttf"
22 | color = "#ff0000"
23 | size = 50
24 | track_color = "#000000"
25 | track_size = 20
26 | y = 350
27 | x = 0
28 | text = "{} {}".format(first_name, last_name).upper()
29 | if type == "2":
30 | font = "LeagueSpartan-Bold.otf"
31 | size = 60
32 | color = "#e05a47"
33 | y = 175
34 | x = 88
35 | text = "{}\n{}".format(first_name, last_name).upper()
36 | raw_img = Image.open(os.path.join("certificates", filename))
37 | img = raw_img.copy()
38 | draw = ImageDraw.Draw(img)
39 |
40 | # draw name
41 | PIL_font = ImageFont.truetype(os.path.join("fonts", font), size)
42 | w, h = draw.textsize(text, font=PIL_font)
43 | W, H = img.size
44 | x = (W - w) / 2 if x == 0 else x
45 | draw.text((x, y), text, fill=color, font=PIL_font)
46 |
47 | # draw track
48 | if track:
49 | PIL_font = ImageFont.truetype(os.path.join("fonts", font), track_size)
50 | w, h = draw.textsize(track, font=PIL_font)
51 | x, y = 183, 450
52 | draw.text((x, y), track, fill=track_color, font=PIL_font)
53 | img_url = os.path.join("static", "{}-{}-{}-30daysofcode.png".format(first_name, last_name, type))
54 | img.save(img_url)
55 | return request.host_url + img_url
56 |
57 | tracks = {"frontend": "Front-End Web Development", "backend": "Back-End Web Development", "python": "Python Programming", "android": "Mobile Development", "ui": "UI/UX Design", "design": "Engineering Design"}
58 | track = tracks.get(track, None)
59 | if type == "3":
60 | base_64 = draw_text("average performace.jpg", type, first_name, last_name, track)
61 | if type == "4":
62 | base_64 = draw_text("good performance.jpg", type, first_name, last_name, track)
63 | if type == "5":
64 | base_64 = draw_text("outstanding.jpg", type, first_name, last_name, track)
65 | if type == "1":
66 | base_64 = draw_text("participated.jpg", type, first_name, last_name)
67 | if type == "2":
68 | base_64 = draw_text("mentor.jpg", type, first_name, last_name)
69 | return base_64
70 |
71 |
72 | if __name__ == "__main__":
73 | app.run(debug=True)
74 |
--------------------------------------------------------------------------------
/certificate/certificates/average performace.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/certificate/certificates/average performace.jpg
--------------------------------------------------------------------------------
/certificate/certificates/good performance.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/certificate/certificates/good performance.jpg
--------------------------------------------------------------------------------
/certificate/certificates/mentor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/certificate/certificates/mentor.jpg
--------------------------------------------------------------------------------
/certificate/certificates/outstanding.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/certificate/certificates/outstanding.jpg
--------------------------------------------------------------------------------
/certificate/certificates/participated.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/certificate/certificates/participated.jpg
--------------------------------------------------------------------------------
/certificate/fonts/LeagueSpartan-Bold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/certificate/fonts/LeagueSpartan-Bold.otf
--------------------------------------------------------------------------------
/certificate/fonts/PTSans-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geektutor/Leaderboard/9addf8bca578fedf5a063ff8606bf0d216808529/certificate/fonts/PTSans-Bold.ttf
--------------------------------------------------------------------------------
/certificate/requirements.txt:
--------------------------------------------------------------------------------
1 | Flask==1.1.1
2 | Pillow==7.1.1
3 |
--------------------------------------------------------------------------------
/check.js:
--------------------------------------------------------------------------------
1 | var password = document.getElementById('password');
2 | var cpassword = document.getElementById('cpassword');
3 | var response = document.getElementById('response')
4 | var button = document.getElementById('btn');
5 |
6 | cpassword.onkeyup=(event)=>{
7 | if (password.value == '' || password.value != cpassword.value) {
8 | response.textContent = 'passwords do not match';
9 | button.disabled = true;
10 | }else{
11 | response.textContent = 'passwords match';
12 | button.disabled = false;
13 | }
14 | }
15 |
16 | button.onclick = ()=>{
17 | if(event.target.disabled == true){
18 | response.textContent = 'passwords do not match';
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/config/conn.php:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/config/connect.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/config/core.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/config/session.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/config/taskday.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 404 Error - 30DaysOfCode
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
404
22 |
Starting 02.06.2020
23 |
30DaysOfCode will return. Coders assemble!
24 |
Go to Dashboard
25 |
26 |
27 |
28 |
29 |
30 |
31 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/error/scripts.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Start Bootstrap - SB Admin v6.0.0 (https://startbootstrap.com/templates/sb-admin)
3 | * Copyright 2013-2020 Start Bootstrap
4 | * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-sb-admin/blob/master/LICENSE)
5 | */
6 | (function($) {
7 | "use strict";
8 |
9 | // Add active state to sidbar nav links
10 | var path = window.location.href; // because the 'href' property of the DOM element is the absolute path
11 | $("#layoutSidenav_nav .sb-sidenav a.nav-link").each(function() {
12 | if (this.href === path) {
13 | $(this).addClass("active");
14 | }
15 | });
16 |
17 | // Toggle the side navigation
18 | $("#sidebarToggle").on("click", function(e) {
19 | e.preventDefault();
20 | $("body").toggleClass("sb-sidenav-toggled");
21 | });
22 | })(jQuery);
23 |
--------------------------------------------------------------------------------
/forgot.php:
--------------------------------------------------------------------------------
1 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | Reset password - 30 Days of Code
27 |
28 |
29 |
30 |
31 |
32 | 30 DAYS OF CODE & DESIGN
33 |
34 |
35 |
36 | Reset password
37 |
38 |
39 | Email
40 |
41 |
42 |
43 | Nickname
44 |
45 |
46 |
47 | Phone
48 |
49 |
50 |
51 | REQUEST RESET
52 |
56 |
57 |
58 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/hash.php:
--------------------------------------------------------------------------------
1 | query($sql);
15 | $rows = mysqli_num_rows($result);
16 | $row = mysqli_fetch_array($result,MYSQLI_ASSOC);
17 | //if the user actually exist, and his paasword has not been hashed then hash it
18 | if($rows > 0 && !password_is_hash($row['password'])){
19 | $hash_password = $hashed_password = password_hash($row['password'],PASSWORD_DEFAULT,array('cost'=>12));
20 | $sql ="UPDATE user SET password ='$hash_password' WHERE user.id=".$row['id'].";";
21 | $result = $conn->query($sql);
22 | if(!$result){
23 | echo "hashing not successfull".$conn->error;
24 | }
25 | }
26 |
27 | }
28 | }
29 | }
30 | $sql = "SELECT * FROM `user`";
31 | $result = $conn->query($sql);
32 | $count = mysqli_num_rows($result);
33 | ?>
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | Hashed
42 |
127 |
128 |
129 |
130 |
'>
131 |
132 |
133 | Bulk Actions
134 | Hash
135 |
136 | Apply
137 |
138 |
164 |
165 |
166 |
209 |
210 |
--------------------------------------------------------------------------------
/index.css:
--------------------------------------------------------------------------------
1 | *{
2 | margin: 0;
3 | padding: 0;
4 | -webkit-box-sizing: border-box;
5 | box-sizing: border-box;
6 | color: #4d4b4b;
7 | font-family: Arial, Helvetica, sans-serif;
8 | }
9 | body{
10 | display: -webkit-box;
11 | display: -ms-flexbox;
12 | display: flex;
13 | -webkit-box-pack: center;
14 | -ms-flex-pack: center;
15 | justify-content: center;
16 | -webkit-box-align: center;
17 | -ms-flex-align: center;
18 | align-items: center;
19 | min-height: 100vh;
20 | width: 100vw;
21 | background-color: #e5e7e8;
22 | }
23 | .login{
24 | text-align: center;
25 | position: relative;
26 | width: 400px;
27 | background-color: white;
28 | border: 5px solid white;
29 | border-radius: 6px;
30 | -webkit-box-shadow: white;
31 | box-shadow: white;
32 | padding: 20px 25px 10px 25px;
33 | -webkit-box-shadow: 0px 0px 19px 0px rgba(0,0,0,0.45);
34 | box-shadow: 0px 0px 19px 0px rgba(0,0,0,0.45);
35 | display: -webkit-box;
36 | display: -ms-flexbox;
37 | display: flex;
38 | -webkit-box-orient: vertical;
39 | -webkit-box-direction: normal;
40 | -ms-flex-direction: column;
41 | flex-direction: column;
42 | -webkit-box-align: center;
43 | -ms-flex-align: center;
44 | align-items: center;
45 | }
46 |
47 | .group{
48 | width: 100%;
49 | margin-bottom: 10px;
50 | position: relative;
51 | }
52 | .group i, select i{
53 | position: absolute;
54 | top: 20px;
55 | right: 10px;
56 | }
57 | input:focus, button:focus{
58 | outline-color: none;
59 | }
60 |
61 | input, select{
62 | background-color: #e8f0fe;;
63 | width: 100%;
64 | -webkit-box-sizing: border-box;
65 | box-sizing: border-box;
66 | padding: 12px 5px;
67 | border-radius: 9px;
68 | border: 0.5px solid #b9a7a7;
69 | margin: 5px 0 5px 0;
70 | letter-spacing: 0.5px;
71 | font-size: 14px;
72 | font-weight: 400;
73 | outline: none;
74 | padding: 12px 40px 12px 20px;
75 | }
76 | select {
77 | margin-bottom: 10px;;
78 | }
79 | input:focus::-webkit-input-placeholder{
80 | color: #53bde2;
81 | }
82 | input:focus::-moz-placeholder{
83 | color: #53bde2;
84 | }
85 | input:focus:-ms-input-placeholder{
86 | color: #53bde2;
87 | }
88 | input:focus::-ms-input-placeholder{
89 | color: #53bde2;
90 | }
91 | input:focus, input:focus::placeholder,input:focus+i{
92 | color: #53bde2;
93 | }
94 | .group i, select i, p, a{
95 | font-weight: normal;
96 | font-size: 14px
97 | }
98 |
99 | button{
100 | font-weight: bold;
101 | font-size: 18px;
102 | -webkit-box-sizing: border-box;
103 | box-sizing: border-box;
104 | width: 100%;
105 | border: 0;
106 | border-radius: 4px;
107 | padding: 12px;
108 | background-color: #527797;
109 | margin-top: 30px;
110 | margin-bottom: 20px;
111 | background-color: 527797;
112 | cursor: pointer;
113 | }
114 | button, button i{
115 | color: #fff;
116 | }
117 | button i{
118 | margin-right: 10px;
119 | }
120 | button:hover{
121 | -webkit-transition-duration: 150ms;
122 | -o-transition-duration: 150ms;
123 | transition-duration: 150ms;
124 | -webkit-transform: translateY(-3px);
125 | -ms-transform: translateY(-3px);
126 | transform: translateY(-3px);
127 | }
128 | p{
129 | margin-bottom: 20px;
130 | }
131 | h2
132 | {
133 | text-align: left;
134 | font-size: 25px;
135 | font-weight: 600;
136 | margin-right: auto;
137 | margin-bottom: 30px;
138 | color: #424e5c;
139 | }
140 | .wrap{
141 | text-align: center;
142 | position: relative;
143 | display: -webkit-box;
144 | display: -ms-flexbox;
145 | display: flex;
146 | -webkit-box-orient: vertical;
147 | -webkit-box-direction: normal;
148 | -ms-flex-direction: column;
149 | flex-direction: column;
150 | width: 400px;
151 | border-radius: 10px;
152 | margin: auto;
153 | background: white;
154 | border: 5px solid white;
155 | -webkit-box-sizing: border-box;
156 | box-sizing: border-box;
157 | padding: 40px;
158 | margin-top: 40px;
159 | margin-bottom: 40px;
160 | padding: 30px 25px 10px 25px;
161 | -webkit-box-shadow: 0px 0px 19px 0px rgba(0,0,0,0.45);
162 | box-shadow: 0px 0px 19px 0px rgba(0,0,0,0.45);
163 | }
164 | p {
165 | font-size: 14px;
166 | color: #484545;
167 | }
168 | a
169 | {
170 | font-size: 14px;
171 | color: #5a789a;
172 | }
173 | .devImg {
174 | -ms-flex-item-align: start;
175 | align-self: flex-start;
176 | -webkit-transform: scale(0.85);
177 | -ms-transform: scale(0.85);
178 | transform: scale(0.85);
179 | margin-bottom: 10px;
180 | }
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 30 Days of Code
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | SIGN IN
26 |
27 |
28 |
29 |
30 |
31 | 30 DAYS OF CODE & DESIGN
32 |
33 |
34 |
35 | 30 days of code is a platform to help developers grow and improve in their field through consistent practice and problem solving.
36 | Solve daily challenges and get graded!
37 |
38 |
39 |
40 | SIGN UP TO PARTICIPATE
41 |
42 |
43 |
44 | TRACKS
45 |
46 | FRONTEND
47 | BACKEND
48 | ML
49 | MOBILE
50 |
51 | © 30 Days of Code 2020
52 |
53 |
54 |
55 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/leaderboard/award.js:
--------------------------------------------------------------------------------
1 | function getOverallRanking(){
2 | $.ajax({
3 | url : "./results.json",
4 | success : function(result) {
5 | updateRankings(result);
6 | },
7 | })
8 | }
9 | function trim(url){
10 | return url.split(' ').join('');
11 | }
12 | function updateRankings(ranks) {
13 | //update first position
14 | var first = ranks[0];
15 | $('.first .name').text(first.nickname);
16 | $('.first .top-avatar').attr("src", `https://robohash.org/${trim(first.nickname+first.track)}`)
17 | $('.first .track').text(first.track);
18 | $('.first .points').text(first.score + ' points');
19 | // $('div.one').addClass(first.track);
20 |
21 | //update second Position
22 | var second = ranks[1];
23 | $('.second .name').text(second.nickname);
24 | $('.second .top-avatar').attr("src", `https://robohash.org/${trim(second.nickname+second.track)}`)
25 | $('.second .track').text(second.track);
26 | $('.second .points').text(second.score + ' points');
27 | // $('div.two').addClass(second.track);
28 |
29 | //update third position
30 | var third = ranks[2];
31 | $('.third .name').text(third.nickname);
32 | $('.third .top-avatar').attr("src", `https://robohash.org/${trim(third.nickname+third.track)}`)
33 | $('.third .track').text(third.track);
34 | $('.third .points').text(third.score + ' points');
35 | // $('div.three').addClass(third.track);
36 |
37 | //update the rest
38 | var starter = 4
39 | for (let i = 3; i < ranks.length; i++) {
40 | var markup =`
41 |
${starter}
42 |
43 |
44 |
${ranks[i].nickname}
45 |
${ranks[i].track}
46 |
47 |
${ranks[i].score} points
48 |
`
49 | $('.theRest').append(markup);
50 | starter++
51 | }
52 | var animationStyle = document.createElement('style');
53 | animationStyle.innerHTML = `
54 | @-webkit-keyframes podium_up {
55 | from {
56 | -webkit-transform: translateY(100%);
57 | transform: translateY(100%);
58 | }
59 | to {
60 | -webkit-transform: translateY(0);
61 | transform: translateY(0);
62 | }
63 | }
64 |
65 | @keyframes podium_up {
66 | from {
67 | -webkit-transform: translateY(100%);
68 | transform: translateY(100%);
69 | }
70 | to {
71 | -webkit-transform: translateY(0);
72 | transform: translateY(0);
73 | }
74 | }
75 | @-webkit-keyframes quickFade {
76 | from {
77 | opacity: 0;
78 | -webkit-transform: scale(1.3);
79 | transform: scale(1.3);
80 | }
81 | to {
82 | opacity: 1;
83 | -webkit-transform: scale(1);
84 | transform: scale(1);
85 | }
86 | }
87 | @keyframes quickFade {
88 | from {
89 | opacity: 0;
90 | -webkit-transform: scale(1.3);
91 | transform: scale(1.3);
92 | }
93 | to {
94 | opacity: 1;
95 | -webkit-transform: scale(1);
96 | transform: scale(1);
97 | }
98 | }
99 | @-webkit-keyframes normalFade {
100 | from {
101 | opacity: 0;
102 | }
103 | to {
104 | opacity: 1;
105 | }
106 | }
107 | @keyframes normalFade {
108 | from {
109 | opacity: 0;
110 | }
111 | to {
112 | opacity: 1;
113 | }
114 | }
115 | @-webkit-keyframes quickSpin {
116 | from {
117 | -webkit-transform: rotateZ(720deg);
118 | transform: rotateZ(720deg);
119 | opacity: 0;
120 | }
121 | to {
122 | opacity: 1;
123 | -webkit-transform: rotateZ(0deg);
124 | transform: rotateZ(0deg);
125 | }
126 | }
127 | @keyframes quickSpin {
128 | from {
129 | -webkit-transform: rotateZ(720deg);
130 | transform: rotateZ(720deg);
131 | opacity: 0;
132 | }
133 | to {
134 | opaci
135 | ty: 1;
136 | -webkit-transform: rotateZ(0deg);
137 | transform: rotateZ(0deg);
138 | }
139 | }
140 | `
141 | document.getElementById('startAnimate').appendChild(animationStyle)
142 | }
143 | getOverallRanking();
144 | //Rankings Array
145 | let ranks = JSON.parse(localStorage.getItem('ranks'));
146 | localStorage.removeItem('ranks');
147 |
148 | function filterRanks(filter) {
149 | const newRanks = ranks.filter(obj => obj.track == filter)
150 |
151 | console.log(newRanks);
152 | //updateRankings(newRanks);
153 | }
154 | document.getElementById('filterform').onsubmit = (e)=>{
155 | e.preventDefault();
156 | let filter = document.getElementById('filter').value.split(' ').join('+');
157 | let completePageURL = window.location.href.split('?'),
158 | actualURL = completePageURL[0];
159 | if (window.location.href === `${actualURL}?filter=${filter}`) {
160 | return true;
161 | } else{
162 | window.location.href = `award.php?filter=${filter}`
163 | }
164 | }
165 |
166 | const queryParam = new URLSearchParams(window.location.search).toString().split('=').pop();
167 | const id = queryParam.split('+').join(' ');
168 | const test = id;
169 |
170 | // document.getElementById(test).selected = true; n
171 |
--------------------------------------------------------------------------------
/leaderboard/index.css:
--------------------------------------------------------------------------------
1 | @import url("https://fonts.googleapis.com/css?family=Red+Hat+Display:400,900&display=swap");
2 | body, html {
3 | align-items: center;
4 | height: 100%;
5 | width: 100%;
6 | overflow-x: hidden !important;
7 | margin: 0px;
8 | background: #302f33;
9 | color: #333;
10 | display: flex;
11 | flex-direction: column;
12 | }
13 |
14 | div.filter{
15 | /* position: absolute; */
16 | /* top: 3%; */
17 | /* left: 25%; */
18 | width: fit-content;
19 | margin-top: 30px;
20 | }
21 | #filterform {
22 | display: flex;
23 | flex-direction: row;
24 | align-items: center;
25 | justify-content: space-between;
26 | }
27 | div.filter select{
28 | width: 270px;
29 | display: inline;
30 | padding: 3px;
31 | font-family: 'Red Hat Display';
32 | background: lightsteelblue;
33 | }
34 | div.filter .btn{
35 | width: 60px;
36 | margin-left: 5px;
37 | }
38 | div.filter .btn:nth-child(3) {
39 | border: none;
40 | background-color: #efef13;
41 | width: fit-content;
42 | color: black;
43 | padding: 7px 16px;
44 | text-decoration: none;
45 | margin: 4px 2px;
46 | cursor: pointer;
47 | border-radius: 20px;
48 | }
49 |
50 | button.btn.btn-warning:hover {
51 | background: white;
52 | border: #efef13;
53 |
54 | }
55 |
56 | button.btn.btn-warning:hover {
57 | background: white;
58 | }
59 | .center {
60 | /* position: absolute; */
61 | /* top:25% !important; */
62 | /* left: 25%; */
63 | margin-top: 60px;
64 | width: 50%;
65 | font-family: 'Red Hat Display', sans-serif;
66 | }
67 |
68 | .top3 {
69 | display: -webkit-box;
70 | display: flex;
71 | -webkit-box-pack: center;
72 | justify-content: center;
73 | -webkit-box-align: end;
74 | align-items: flex-end;
75 | color: #4B4168;
76 | }
77 | .top3 .item {
78 | box-sizing: border-box;
79 | position: relative;
80 | background: white;
81 | width: 9rem;
82 | height: 12rem;
83 | text-align: center;
84 | padding: 2.8rem 0 0;
85 | margin: 1rem 1rem 2rem;
86 | border-radius: 0.5rem;
87 | -webkit-transform-origin: bottom;
88 | transform-origin: bottom;
89 | cursor: pointer;
90 | -webkit-transition: -webkit-transform 200ms ease-in-out;
91 | transition: -webkit-transform 200ms ease-in-out;
92 | transition: transform 200ms ease-in-out;
93 | transition: transform 200ms ease-in-out, -webkit-transform 200ms ease-in-out;
94 | box-shadow: 0 0 4rem 0 rgba(0, 0, 0, 0.1), 0 1rem 2rem -1rem rgba(0, 0, 0, 0.3);
95 | }
96 | .top3 .item .pic {
97 | position: absolute;
98 | top: -2rem;
99 | left: 2.5rem;
100 | width: 4rem;
101 | height: 4rem;
102 | border-radius: 50%;
103 | background-size: cover;
104 | background-position: center;
105 | margin-right: 1rem;
106 | box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.2), 0 1rem 1rem -0.5rem rgba(0, 0, 0, 0.3);
107 | }
108 | .top3 .item .pos {
109 | font-weight: 900;
110 | font-size: 1.5rem;
111 | margin-bottom: 0.5rem;
112 | }
113 | .top3 .item .name {
114 | font-size: 1.1rem;
115 | margin-bottom: 0.5rem;
116 | }
117 | .top3 .item .score {
118 | opacity: 0.5;
119 | }
120 | .top3 .item .score:after {
121 | display: block;
122 | content: 'points';
123 | opacity: 0.5;
124 | }
125 | .top3 .item.one {
126 | width: 10rem;
127 | height: 13rem;
128 | padding-top: 3.5rem;
129 | }
130 | .top3 .item.one .pic {
131 | width: 5rem;
132 | height: 5rem;
133 | left: 2.5rem;
134 | }
135 | .top3 .item:hover {
136 | -webkit-transform: scale(1.05);
137 | transform: scale(1.05);
138 | }
139 |
140 | .list {
141 | width: 85%;
142 | padding-left: 2rem;
143 | margin: 0 auto;
144 | }
145 | .list .item {
146 | position: relative;
147 | display: -webkit-box;
148 | display: flex;
149 | flex-direction: row;
150 | -webkit-box-align: center;
151 | align-items: center;
152 | height: 3rem;
153 | border-radius: 4rem;
154 | margin-bottom: 2rem;
155 | -webkit-transform-origin: left;
156 | transform-origin: left;
157 | cursor: pointer;
158 | -webkit-transition: -webkit-transform 200ms ease-in-out;
159 | transition: -webkit-transform 200ms ease-in-out;
160 | transition: transform 200ms ease-in-out;
161 | transition: transform 200ms ease-in-out, -webkit-transform 200ms ease-in-out;
162 | box-shadow: 0 0 4rem 0 rgba(0, 0, 0, 0.1), 0 1rem 2rem -1rem rgba(0, 0, 0, 0.3);
163 | }
164 | .list .item .pos {
165 | font-weight: 900;
166 | position: absolute;
167 | left: -2rem;
168 | text-align: center;
169 | font-size: 1.25rem;
170 | width: 1.5rem;
171 | color: white;
172 | opacity: 0.6;
173 | -webkit-transition: opacity 200ms ease-in-out;
174 | transition: opacity 200ms ease-in-out;
175 | }
176 | .list .item .pic {
177 | width: 4rem;
178 | height: 4rem;
179 | border-radius: 50%;
180 | background-size: cover;
181 | background-position: center;
182 | margin-right: 1rem;
183 | box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.2), 0 1rem 1rem -0.5rem rgba(0, 0, 0, 0.3);
184 | }
185 | .list .item .name {
186 | -webkit-box-flex: 2;
187 | flex-grow: 2;
188 | flex-basis: 10rem;
189 | font-size: 1.1rem;
190 | }
191 | .list .item .score {
192 | margin-right: 1.5rem;
193 | opacity: 0.5;
194 | }
195 | .list .item .score:after {
196 | margin-right: 1rem;
197 | content: 'points';
198 | opacity: 0.5;
199 | }
200 | .list .item:hover {
201 | -webkit-transform: scale(1.05);
202 | transform: scale(1.05);
203 | -webkit-box-shadow: 0 0 0.1vw 0.1vw #fff7f7,
204 | 0 0 5px 5px rgba(0,123,255,.5),
205 | 0 0 2px 1px rgba(0,123,255,.25),
206 | inset 0 0 0.1vw 0.1vw #0062cc,
207 | inset 0 0 0.1vw 0.1vw #e97272,
208 | inset 0 0 0.1vw 0.1vw #fff7f7;
209 | box-shadow: 0 0 0.1vw 0.1vw #fff7f7,
210 | 0 0 5px 5px rgba(0,123,255,.5),
211 | 0 0 2px 1px rgba(0,123,255,.25),
212 | inset 0 0 0.1vw 0.1vw #0062cc,
213 | inset 0 0 0.1vw 0.1vw #e97272,
214 | inset 0 0 0.1vw 0.1vw #fff7f7;
215 |
216 | }
217 | .list .item:hover .pos {
218 | opacity: 0.8;
219 | }
220 |
221 | .others .track{
222 | position: absolute;
223 | left: 50%;
224 | }
225 |
226 | .python{
227 | background: #333 !important;
228 | color:#fff;
229 | }
230 | .ui{
231 | background: #fe413c !important;
232 | color:#fff;
233 | }
234 | .mobile{
235 | background: #a4c639 !important;
236 | color:#fff;
237 | }
238 | .backend{
239 | background: #a4d !important;
240 | color:#fff;
241 | }
242 | .frontend{
243 | background: #26a8fe !important;
244 | color:#fff;
245 | }
246 | .design{
247 | background: #feaf30 !important;
248 | color:#fff;
249 | }
--------------------------------------------------------------------------------
/leaderboard/index.php:
--------------------------------------------------------------------------------
1 | nickname = $nickname;
14 | $this->track = $track;
15 | $this->level = $level;
16 | $this->score = $score;
17 | }
18 | }
19 | function makeSQL($track,$level){
20 | if (($level == 'beginner' || $level == 'intermediate') and ($track !== 'general' and $level !== 'general')) {
21 | $sql = "SELECT * FROM leaderboard WHERE `track` = '$track' AND `level`='$level' ORDER BY `score` DESC LIMIT 20";
22 | }elseif ($track == 'general' and $level !== 'general') {
23 | $sql = "SELECT * FROM leaderboard WHERE `level`='$level' ORDER BY `score` DESC LIMIT 20";
24 | }elseif ($level == 'general' and $track !== 'general') {
25 | $sql = "SELECT * FROM leaderboard WHERE `track` = '$track' ORDER BY `score` DESC LIMIT 20";
26 | }else {
27 | $sql = "SELECT * FROM leaderboard ORDER BY `score` DESC LIMIT 20";
28 | }
29 |
30 | return $sql;
31 | }
32 | //categories for filter
33 | if (isset($_GET['track']) and isset($_GET['level'])) {
34 | $track = $_GET['track'];
35 | $level = $_GET['level'];
36 |
37 | if ($track == 'backend' || $track == 'frontend' || $track == 'mobile' || $track == 'python' || $track == 'ui') {
38 | $sql = makeSQL($track,$level);
39 | }elseif($track == 'general'){
40 | $sql = makeSQL('general',$level);
41 | }else {
42 | $sql = makeSQL('general','general');
43 | }
44 |
45 | }else{
46 | $sql = makeSQL('general','general');
47 | }
48 | $result = mysqli_query($conn,$sql);
49 | if ($result) {
50 | while ($row = mysqli_fetch_assoc($result)) {
51 | $nickname = $row['nickname'];
52 | $track = $row['track'];
53 | $level = $row['level'];
54 | $score = $row['score'];
55 | $user = new User($nickname,$track,$level,$score);
56 | array_push($userRanking,$user);
57 | }
58 | }else{
59 | die('error fetching rankings please try again later');
60 | }
61 | $res =json_encode($userRanking);
62 | $file = fopen('results.json','w') or die('error creating file');
63 | fwrite($file,$res);
64 |
65 | ?>
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | General";
83 | while ($row = mysqli_fetch_assoc($result)) {
84 | echo "".$row['track']." ";
85 | }
86 | }
87 | ?>
88 |
89 |
90 | General
91 | Beginner
92 | Intermediate
93 |
94 | Filter
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
--------------------------------------------------------------------------------
/leaderboard/leaderboard0.php:
--------------------------------------------------------------------------------
1 | nickname = $nickname;
16 | $this->track = $track;
17 | $this->score = $score;
18 | }
19 | }
20 |
21 | if (isset($_GET['filter']) && !empty($_GET['filter'])) {
22 | //preparing the query parameter
23 | $filter = $_GET['filter'];
24 | $filter = explode('+',$filter);
25 | function myfunction($v1,$v2)
26 | {
27 | return $v1 . " " . $v2;
28 | }
29 | $filter = array_reduce($filter,"myfunction");
30 | $filter = trim($filter);
31 |
32 |
33 | switch ($filter) {
34 | case 'General':
35 | $val = '';
36 | $sql = "SELECT * FROM user WHERE `isAdmin` = 0 And `university`='$val' ORDER BY `score` DESC LIMIT 20";
37 | break;
38 |
39 | default:
40 | $sql = "SELECT * FROM user WHERE `isAdmin` = 0 AND `university` ='$filter' ORDER BY `score` DESC LIMIT 20";
41 | break;
42 | }
43 | }else{
44 | $val = '';
45 | $sql = "SELECT * FROM user WHERE `isAdmin` = 0 And `university` = '$val' ORDER BY `score` DESC LIMIT 20";
46 | }
47 | $result = mysqli_query($conn,$sql);
48 | if ($result) {
49 | echo "worked";
50 | }
51 | if (mysqli_num_rows($result) > 0) {
52 | while ($row = mysqli_fetch_assoc($result)) {
53 | $nickname = $row['nickname'];
54 | $track = $row['track'];
55 | $score = $row['score'];
56 | $user = new User($nickname,$track,$score);
57 | array_push($fetched_array,$user);
58 | }
59 | }
60 | $res =json_encode($fetched_array);
61 | $file = fopen('results.json','w') or die('error creating file');
62 | fwrite($file,$res);
63 | }
64 | getUSerRankings($userRanking);
65 | ?>
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | 0) {
82 | while ($row = mysqli_fetch_assoc($result)) {
83 | $row['university'] == ''?$row['university'] = 'General' : true;
84 | echo "".$row['university']." ";
85 | }
86 | }
87 | ?>
88 |
89 | Filter
90 | Filter By Track
91 |
92 |
93 |
94 |
95 |
96 |
97 | 2
98 |
99 |
100 |
101 | Ifihan Olusheye
102 |
103 |
empty
104 |
105 | 30
106 |
107 |
108 |
109 |
110 | 1
111 |
112 |
113 |
114 | Geektutor
115 |
116 |
117 |
118 | 10
119 |
120 |
121 |
122 |
123 | 3
124 |
125 |
126 |
127 | Akin Aguda
128 |
129 |
130 |
131 | 50
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/leaderboard/leaderboard1.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function(){
2 | function getOverallRanking(){
3 | $.ajax({
4 | url : "./results.json",
5 | success : function(result) {
6 | //result)
7 | updateRankings(result);
8 | },
9 | })
10 | }
11 |
12 | getOverallRanking();
13 | function updateRankings(ranks) {
14 | function trim(url){
15 | return url.split(' ').join('');
16 | }
17 | //update first position
18 | var first = ranks[0];
19 | $('div.one .name').text(first.nickname);
20 | $('div.one .pic').css({"background-image": `url(https://robohash.org/${trim(first.nickname+first.track)})`});
21 | $('div.one .track').text(first.track);
22 | $('div.one .score').text(first.score);
23 | $('div.one').addClass(first.track);
24 |
25 | //update second Position
26 | var second = ranks[1];
27 | $('div.two .name').text(second.nickname);
28 | $('div.two .pic').css({"background-image": `url(https://robohash.org/${trim(second.nickname+second.track)})`});
29 | $('div.two .track').text(second.track);
30 | $('div.two .score').text(second.score);
31 | $('div.two').addClass(second.track);
32 |
33 | //update third position
34 | var third = ranks[2];
35 | $('div.three .name').text(third.nickname);
36 | $('div.three .pic').css({"background-image": `url(https://robohash.org/${trim(third.nickname+third.track)})`});
37 | $('div.three .track').text(third.track);
38 | $('div.three .score').text(third.score);
39 | $('div.three').addClass(third.track);
40 |
41 | //update the rest
42 | var starter = 4
43 | for (let i = 3; i < ranks.length; i++) {
44 | var markup =`
45 |
46 |
47 | ${starter}
48 |
49 |
50 |
51 | ${ranks[i].nickname}
52 |
53 |
54 | ${ranks[i].score}
55 |
56 |
`;
57 | $('div.list').append(markup);
58 | starter++
59 | }
60 | }
61 | //Rankings Array
62 | let ranks = JSON.parse(localStorage.getItem('ranks'));
63 | localStorage.removeItem('ranks');
64 |
65 | function filterRanks(filter) {
66 | const newRanks = ranks.filter(obj => obj.track == filter)
67 |
68 | console.log(newRanks);
69 | //updateRankings(newRanks);
70 | }
71 |
72 | // document.getElementById('filterform').onsubmit = (e)=>{
73 | // e.preventDefault();
74 | // let filter = document.getElementById('filter').value.split(' ').join('+');
75 | // let completePageURL = window.location.href.split('?'),
76 | // actualURL = completePageURL[0];
77 | // if (window.location.href === `${actualURL}?filter=${filter}`) {
78 | // return true;
79 | // } else{
80 | // window.location.href = `index.php?filter=${filter}`
81 | // }
82 | // }
83 |
84 |
85 |
86 | var url = window.location.href;
87 | if (url.endsWith('#')) {
88 | const hashpoint = url.indexOf('#');
89 | url = url.split('').slice(0,hashpoint)
90 | var newUrl = url.join('');
91 | url = newUrl;
92 | }
93 | // var splitPoint = url.indexOf('?');
94 | // var search = url.slice(splitPoint);
95 |
96 | // var params = new URLSearchParams(search);
97 | // var paramsObj = {};
98 |
99 | // for (const value of params.keys()) {
100 | // paramsObj[value] = params.get[value]
101 | // }
102 | const params = url.split('?')
103 |
104 | if (params.length > 1) {
105 | const query = params[1].split('&');
106 |
107 | const paramsObj = {}
108 |
109 | paramsObj.track =query[0].split('=')[1]
110 | paramsObj.level =query[1].split('=')[1]
111 |
112 | if(paramsObj.track == 'general'){paramsObj.track = 'trackNull'}
113 | if(paramsObj.level == 'general'){paramsObj.level = 'levelNull'}
114 |
115 | document.getElementById(paramsObj.track).selected = true;
116 | document.getElementById(paramsObj.level).selected = true;
117 |
118 | }
119 |
120 | });
121 |
122 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/leaderboard/results.json:
--------------------------------------------------------------------------------
1 | [{"nickname":"leee","track":"backend","level":"intermediate","score":"33"},{"nickname":"efe","track":"backend","level":"intermediate","score":"20"},{"nickname":"kruse","track":"backend","level":"intermediate","score":"10"}]
--------------------------------------------------------------------------------
/leaderboard/track.js:
--------------------------------------------------------------------------------
1 | function getOverallRanking(){
2 | $.ajax({
3 | url : "./trackresults.json",
4 | success : function(result) {
5 | //result)
6 | updateRankings(result);
7 | },
8 | })
9 | }
10 | getOverallRanking();
11 | function updateRankings(ranks) {
12 | function trim(url){
13 | return url.split(' ').join('');
14 | }
15 | //update first position
16 | var first = ranks[0];
17 | $('div.one .name').text(first.nickname);
18 | $('div.one .pic').css({"background-image": `url(https://robohash.org/${trim(first.nickname+first.track)})`});
19 | $('div.one .track').text(first.track);
20 | $('div.one .score').text(first.score);
21 | $('div.one').addClass(first.track);
22 |
23 | //update second Position
24 | var second = ranks[1];
25 | $('div.two .name').text(second.nickname);
26 | $('div.two .pic').css({"background-image": `url(https://robohash.org/${trim(second.nickname+second.track)})`});
27 | $('div.two .track').text(second.track);
28 | $('div.two .score').text(second.score);
29 | $('div.two').addClass(second.track);
30 |
31 | //update third position
32 | var third = ranks[2];
33 | $('div.three .name').text(third.nickname);
34 | $('div.three .pic').css({"background-image": `url(https://robohash.org/${trim(third.nickname+third.track)})`});
35 | $('div.three .track').text(third.track);
36 | $('div.three .score').text(third.score);
37 | $('div.three').addClass(third.track);
38 |
39 | //update the rest
40 | var starter = 4
41 | for (let i = 3; i < ranks.length; i++) {
42 | var markup =`
43 |
44 |
45 | ${starter}
46 |
47 |
48 |
49 | ${ranks[i].nickname}
50 |
51 |
52 | ${ranks[i].score}
53 |
54 |
`;
55 | $('div.list').append(markup);
56 | starter++
57 | }
58 | }
59 | //Rankings Array
60 | let ranks = JSON.parse(localStorage.getItem('ranks'));
61 | localStorage.removeItem('ranks');
62 |
63 | function filterRanks(filter) {
64 | const newRanks = ranks.filter(obj => obj.track == filter)
65 |
66 | console.log(newRanks);
67 | //updateRankings(newRanks);
68 | }
69 |
70 | document.getElementById('filterform').onsubmit = (e)=>{
71 | e.preventDefault();
72 | let filter = document.getElementById('filter').value.split(' ').join('+');
73 | let completePageURL = window.location.href.split('?'),
74 | actualURL = completePageURL[0];
75 | if (window.location.href === `${actualURL}?filter=${filter}`) {
76 | return true;
77 | } else{
78 | window.location.href = `track.php?filter=${filter}`
79 | }
80 | }
81 |
82 | const queryParam = new URLSearchParams(window.location.search).toString().split('=').pop();
83 | const id = queryParam.split('+').join(' ');
84 | const test = id;
85 | document.getElementById(test).selected = true;
86 |
--------------------------------------------------------------------------------
/leaderboard/track.php:
--------------------------------------------------------------------------------
1 | nickname = $nickname;
16 | $this->track = $track;
17 | $this->score = $score;
18 | }
19 | }
20 |
21 | if (isset($_GET['filter']) && !empty($_GET['filter'])) {
22 | $filter = $_GET['filter'];
23 | switch ($filter) {
24 | case 'overall':
25 | $sql = "SELECT * FROM user WHERE `isAdmin` = 0 ORDER BY `score` DESC LIMIT 20";
26 | break;
27 |
28 | default:
29 | $sql = "SELECT * FROM user WHERE `isAdmin` = 0 AND `track` ='$filter' ORDER BY `score` DESC LIMIT 20";
30 | break;
31 | }
32 | }else{
33 | $sql = "SELECT * FROM user WHERE `isAdmin` = 0 ORDER BY `score` DESC LIMIT 20";
34 | }
35 | $result = mysqli_query($conn,$sql);
36 | if (mysqli_num_rows($result) > 0) {
37 | while ($row = mysqli_fetch_assoc($result)) {
38 | $nickname = $row['nickname'];
39 | $track = $row['track'];
40 | $score = $row['score'];
41 | $user = new User($nickname,$track,$score);
42 | array_push($fetched_array,$user);
43 | }
44 | }
45 | $res =json_encode($fetched_array);
46 | $file = fopen('trackresults.json','w') or die('error creating file');
47 | fwrite($file,$res);
48 | }
49 | getUSerRankings($userRanking);
50 | ?>
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | Overall Rankings
63 | Frontend
64 | Backend
65 | Engineering Design
66 | UI/UX
67 | Python
68 | Android
69 |
70 | Filter
71 |
72 |
73 |
74 |
75 |
76 |
77 | 2
78 |
79 |
80 |
81 | Ifihan Olusheye
82 |
83 |
empty
84 |
85 | 30
86 |
87 |
88 |
89 |
90 | 1
91 |
92 |
93 |
94 | Geektutor
95 |
96 |
97 |
98 | 10
99 |
100 |
101 |
102 |
103 | 3
104 |
105 |
106 |
107 | Akin Aguda
108 |
109 |
110 |
111 | 50
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
--------------------------------------------------------------------------------
/logout.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mailer/README.md:
--------------------------------------------------------------------------------
1 | # FLASK MAILER
2 |
3 | Call the /mail/ endpoint with a GET request of the format below
4 | * domain_half/mail/?users={"users": {email:username, ...}, "track": trackname}
5 | * e.g xyz.xyz/mail/?users={"users": {"abc@gmail.com": "ABCode", "sodiq.akinjobi@gmail.com": "Geektutor", "wow@gmail.com": "Lolmao"}, "track": "python"}
6 |
7 | ## Return Values
8 | * "Sent." - Mails successfully sent to all members of track
9 | * "Failed." - Refresh and retry
10 |
--------------------------------------------------------------------------------
/mailer/app.py:
--------------------------------------------------------------------------------
1 | from flask import Flask, request, render_template
2 | import smtplib
3 | import datetime as dt
4 | from email.utils import formatdate
5 | import json
6 | from email.mime.text import MIMEText
7 | from email.mime.multipart import MIMEMultipart
8 |
9 | app = Flask(__name__)
10 |
11 |
12 | @app.route("/")
13 | def index():
14 | return "Hello World"
15 |
16 |
17 | @app.route("/mail", methods=['GET', 'POST'])
18 | def mailed():
19 | req = json.loads(request.args['users'])
20 | print(req)
21 | for i in req['users']:
22 | email, username = i, req['users'][i]
23 | done = xender(email, username, req['track'])
24 | return "Sent." if done else "Failed."
25 |
26 |
27 | def xender(email, username, track):
28 | def today():
29 | return formatdate(localtime=True).split(' 2020 ')[0].split(', ')[1].split(' ')[0]
30 | day = int(today()) - 1
31 | msg = MIMEMultipart('alternative')
32 | msg['Subject'] = "New Task Uploaded"
33 | msg['From'] = "owoeyepo@gmail.com"
34 | msg['To'] = username + ' <' + email + '>'
35 | msg['Cc'] = ''
36 | msg['Bcc'] = ''
37 | msg['Date'] = formatdate(localtime=True)
38 | rcpt = [msg['Cc']] + [msg['Bcc']] + [msg['To']]
39 | text = "Good Morning, " + username + "!"
40 | html = render_template(
41 | "body.html", username=username, track=track, day=day)
42 | part1 = MIMEText(text, 'plain')
43 | part2 = MIMEText(html, 'html')
44 | msg.attach(part1)
45 | msg.attach(part2)
46 | s = smtplib.SMTP('smtp.gmail.com:587')
47 | s.starttls()
48 | s.login(msg['From'], """tqgtemgyovpqbaup""")
49 | s.sendmail(msg['From'], rcpt, msg.as_string())
50 | s.quit()
51 |
52 | dt.datetime.now().strftime("%d %B %Y")
53 | return True
54 |
55 |
56 | # 30days.autocaps.xyz/mail/?users={"users": {"speedstxrspxxd@gmail.com": "redditor","sodiq.akinjobi@gmail.com": "Geektutor","dosolomon5@gmail.com": "LordGhostX"},"track": "python"}
57 |
58 | if __name__ == "__main__":
59 | app.run(debug=True)
60 |
61 |
--------------------------------------------------------------------------------
/mentors.md:
--------------------------------------------------------------------------------
1 | #### Python
2 |
3 | Agunbiade Sodiq (Beginner) - S
4 | [Babatunde Koiki](https://twitter.com/bkoiki950) (Intermediate) - B
5 | Osemudiamen Itua (Intermediate) - I
6 | Fortune Adekogbe (Intermediate) - F
7 | [Agunbiade Sodiq](https://twitter.com/sodiq_dev) (Beginner) - S
8 | Babatunde Koiki (Intermediate) - B
9 | Osemudiamen Itua (Intermediate) - I
10 | Fortune Adekogbe (Intermediate) - F
11 | Oluwajoba Fashogbon - O
12 | (Intermediate)
13 | Philip Owoeye(intermediate) - P
14 |
15 | #### Backend
16 |
17 | a. Zubair Idris Aweda (Beginner) - PHP
19 | c. [Akinwande Bolu](https://twitter.com/Bolu Akinwande) (intermediate) - Nodejs - B
20 |
21 | #### Mobile
22 |
23 | a Samuel Abada - S
24 |
25 | #### FrontEnd
26 |
27 | a Bami Ogunfemi ( intermediate) - B
28 | b Kazeem Asiwaju-Bello - K (intermediate)
29 | c Fele Omolola (beginner) - F
30 | d Igbinosa Iwinosa (beginner) - I
31 | e Abdullahi Abdulkabir (b) - C
32 | f Akinwunmi Aguda (intermediate) - A
33 | g. Raji mustapha (begginer) - R
34 |
--------------------------------------------------------------------------------
/new_password.php:
--------------------------------------------------------------------------------
1 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | Set new password - 30 Days of Code
26 |
27 |
28 |
29 |
30 |
31 | 30 DAYS OF CODE & DESIGN
32 |
33 |
34 |
35 | Set new passowrd
36 | Reset password for:
37 |
38 | New password
39 |
40 |
41 |
42 | Confirm password
43 |
44 |
45 |
46 | RESET
47 |
48 |
49 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/sign_in.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Sign in - 30 Days of Code
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
61 |
62 |
63 | 30 DAYS OF CODE & DESIGN
64 |
65 |
66 |
67 | Sign in
68 | Registration Successful
";
74 | }
75 | if (@$_GET['message'] == 'update' && $upd == 'update.php') {
76 | echo "";
77 | }
78 | if (@$_GET['message'] == 'success' && $resetPassword == 'new_password.php') {
79 | echo "Password reset successful. Kindly log into your account.
";
80 | }
81 | ?>
82 |
83 |
84 |
85 | = $error?>
86 |
87 |
88 |
89 |
90 | Email
91 |
92 |
93 |
94 | Password
95 |
96 |
97 |
98 | SIGN IN
99 |
103 |
104 |
105 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/sign_up.php:
--------------------------------------------------------------------------------
1 | 0) {
14 | keys();
15 | }else{
16 | return $tokens;
17 | }
18 | }
19 | if(isset($_POST['submit'])){
20 | $user_id = keys();
21 | $nick = $_POST['nick'];
22 | $first = $_POST['first'];
23 | $last = $_POST['last'];
24 | $email = $_POST['email'];
25 | $password = password_hash($_POST['password'], PASSWORD_DEFAULT);
26 | $phone = $_POST['phone'];
27 |
28 | function check($email){
29 | global $conn;
30 | $queryURL = "SELECT email FROM user WHERE email = '$email'";
31 | $resultURL = mysqli_query($conn, $queryURL);
32 | $countURL = mysqli_num_rows($resultURL);
33 | if ($countURL == 0) {
34 | return 1;
35 | }else{
36 | return 0;
37 | }
38 | }
39 | $checkIt = check($email);
40 | if($checkIt){
41 | $sql = "INSERT INTO user(`user_id`, `first_name`, `last_name`, `nickname`, `email`, `password`, `phone`)
42 | VALUES('$user_id', '$first', '$last', '$nick', '$email', '$password', '$phone')";
43 | if($conn->query($sql)){
44 | header("location:sign_in.php?message=success");
45 | }else{
46 | die('could not enter data: '. $conn->error);
47 | }
48 | }else{
49 | $error = "User already exist";
50 | }
51 | }
52 | ?>
53 |
54 |
55 |
56 |
57 |
58 |
59 | Sign up - 30 Days of Code
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | = $error?>
74 |
75 |
76 |
77 |
78 | 30 DAYS OF CODE & DESIGN
79 |
80 |
81 |
82 | Sign up
83 |
84 | First Name
85 |
86 |
87 |
88 | Last Name
89 |
90 |
91 |
92 | Email
93 |
94 |
95 |
96 | Nickname
97 |
98 |
99 |
100 | Password
101 |
102 |
103 |
104 | Phone
105 |
106 |
107 |
108 |
109 | SIGN UP
110 |
111 |
Already a user? Sign in
112 |
113 |
114 |
115 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/submission_guide.md:
--------------------------------------------------------------------------------
1 | ### General Submission Guidelines
2 |
3 | `0` means unmarked
4 |
5 | `1` means you didnt follow the submission instructions and score won't be changed
6 |
7 | ### Python Track
8 |
9 | An acceptable submission is a [repl.it](https://repl.it) link containing the program preferrably in the `main.py` file on the site.
10 |
11 | **How to submit:**
12 |
13 | 1. Create an account on repl.it and open a new repl.
14 |
15 | 2. Write your code in the main.py file already opened and test that it works.
16 |
17 | 3. Copy the link to that repl from your browser and submit at [30daysofcode.xyz](https://30daysofcode.xyz)
18 |
19 | [Step by step guide with images](https://github.com/Senseiuc/pythonguide/blob/master/README.md)
20 |
21 | #### Tips to get high grades:
22 | 1. Follow instructions.
23 | 2. Ensure that your functions only take in the right input types.
24 | 3. Include documentation strings.
25 |
26 | ### Backend
27 | FOR ALL BACKEND TASKS, UNLESS STATED OTHERWISE, ALL SUBMISSIONS SHOULD BE THE GITHUB LINK TO THE README.MD FILE OF THE REPOSITORY CONTAINING YOUR SERVER SIDE CODE. THE README SHOULD CONTAIN THE LINK TO THE ENDPOINT OF WHERE YOUR SERVER SIDE SCRIPT IS RUNNING, AND ANY OTHER INFORMATION SPECIFICALLY ASKED FOR.
28 |
29 |
30 | #### Accepted Languages
31 | 1. Nodejs
32 | 2. PHP / Laravel
33 | 3. Python(Django or Flask)
34 |
35 | ### Frontend Track
36 |
37 | An acceptable submission is a github link containing the the code with a link to the hosted project in the `readme.md` or a link to [codepen](https://codepen.io)/[codesandbox](https://codesandbox.io).
38 |
39 | **How to submit:**
40 | 1. Create an account on github and open a new repo with the name 30DaysOfCode
41 | 2. Create a repo per task or a repo for all the tasks with different folders named after the day Example: "Day 1", "Day One", etc. with the link for each day posted in the readme.
42 | 3. Copy the link to that repo from your browser and submit at 30daysofcode.xyz
43 |
44 | **Tips :**
45 | 1. Follow instructions.
46 | 2. A submission that is not hosted is considered null and would not be marked.
47 | 3. A submission without the hosted link provided in the readme is considered null.
48 | 4. A bootstrap submission is considered null unless stated in the instructions that you can use it.
49 | 5. Multiple submission are considered void.
50 | 6. Be creative with the use of colors, Use external styling and ensure your site is responsive.
51 |
52 | #### Extra tip for Front End Beginners.
53 |
54 | When ever you are given an example, it doesn't mean you should implement exactly what is In the example, it is just a guideline for how yours should look like.
55 |
56 | Don't try to implement examples and mess up your job.
57 |
58 | If you are to implement the design it will be added to the task description.
59 |
60 | [A guide on hosting with GitHub](https://steph-crown.github.io/a-guide-on-hosting/)
61 |
62 | ### Mobile Track
63 |
64 | #### Accepted Tech Stack
65 |
66 | 1. Dart
67 | 2. Flutter
68 |
69 | #### Beginner
70 |
71 | An acceptable submission is a [dartpad link](https://dartpad.dev). Codepen won't be accepted, submitting a link to a Github repo is not welcomed unless stated otherwise.
72 |
73 | #### Intermediate
74 |
75 | An acceptable submission is a dartpad link for UI implementations. Codepen won't be accepted unless stated otherwise in the task. For functional apps, a GitHub link containing the code with images of your app in the readme is enough. Otherwise stated, an apk of your app is not compulsory.
76 |
77 | **How to submit:**
78 |
79 | 1. Create a [GitHub gist](https://gist.github.com) for all tasks named after the day in the format: `dayN30.dart` where `N` is the day of challenge Example: `day130.dart`, `day230.dart` etc.
80 |
81 | 2. On successfully creating the gist, the URL should be in the format https://gist.github.com/username/{gistID} Example:https://gist.github.com/username/o1e04c81d63fa5481fedab44f5243fd3
82 |
83 | 3. Logon to dartpad.dev/{gistID} to confirm the code/view
84 |
85 | 4. Copy the dartpad link from your browser and submit at 30daysofcode.xyz
86 |
87 | #### Tips
88 |
89 | 1. Follow instructions.
90 | 2. Be creative with colours and images(UI implementations).
91 | 3. A submission without following the pattern described in “How to submit” is null and void.
92 | 4. Multiple submissions are considered void.
93 |
94 |
95 | ### Machine Learning
96 | You are free to use any IDE or notebook but most prefarably
97 | - Jupyter Notebook
98 | - Google Colab
99 |
100 | They make working with data very easy and interactive
101 |
102 | For submission you will be submitting a link to your work
103 | If you used **Jupyter Notebook** for your task:
104 | - Create a **GitHub repository**
105 | - Upload you **ipynb file** to your newly created GitHub repository
106 | - Submit the **url of your Github repository**
107 | - Follow [This link](https://jupyter.readthedocs.io/en/latest/install.html) to install Jupyter on your system
108 |
109 | ***Note that you'll create a new repository for each task***
110 |
111 | If you're using **Google Colab**:
112 | - Submit the **url** to your project
113 |
114 |
--------------------------------------------------------------------------------
/user/editsubmission.php:
--------------------------------------------------------------------------------
1 |
7 |
13 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Edit Submission - 30 Days Of Code
60 |
61 |
62 |
63 | #30DaysOfCode
64 |
70 |
71 |
72 |
75 |
76 |
77 |
78 |
79 |
84 |
85 | ';
95 | echo '
'.$user_nickname.'
';
96 | }
97 | ?>
98 |
132 |
133 | =$_SESSION['login_user'];?>
134 |
135 |
136 |
137 |
138 |
139 |
140 | Edit submission
141 |
142 |
143 |
URL
144 |
145 |
Python - Repl.it Url, Backend - Github repo Url, Frontend - Github repo Url(put link to your Github Pages in the readme), UI/UX - Figma/Adobe XD Url
146 |
147 |
148 |
149 | Track
150 |
151 | >Backend
152 | >Frontend
153 | >Mobile
154 | >ML
155 |
156 |
157 |
158 | Comments?
159 | =$rw['comments']; ?>
160 |
161 |
Submit task
162 |
163 |
164 |
165 |
Copyright © 30DaysOfCode 2020
166 |
167 |
168 |
169 |
170 |
171 |
174 |
--------------------------------------------------------------------------------
/user/feedback.php:
--------------------------------------------------------------------------------
1 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Feedback - 30 Days Of Code
25 |
26 |
27 |
28 | #30DaysOfCode
29 |
30 |
31 |
34 |
35 |
36 |
37 |
38 |
43 |
44 | ';
54 | echo '
'.$user_nickname.'
';
55 | }
56 | ?>
57 |
92 |
93 | =$_SESSION['login_user'];?>
94 |
95 |
96 |
97 |
98 |
99 | query($sql)){
106 | $error = "Submitted Successfully";
107 | $submit = 1;
108 | }
109 | else{
110 | die('could not enter data: '. $conn->error);
111 | }
112 | }
113 | ?>
114 |
115 |
126 |
127 |
128 | Submit feedback
129 |
130 |
131 | Anonymous Feedback?
132 |
133 |
134 |
Submit Feedback
135 |
136 |
137 |
138 |
Copyright © 30DaysOfCode 2020
139 |
140 |
141 |
142 |
143 |