Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ get_random_secret_key()
** **
* Now open TWT/settings.py and turn `DEBUG = True`

* Open TWT/discord.py and edit the guild_id in lines 79, 82, 85 according to your server
* edit all the role ids in lines 89-95
* Open TWT/discord.py and edit the guild_id in lines 101, 104, 110 according to your server
* edit all the role ids in lines 118-123

** **
* `Now run python manage.py makemigrations`
Expand All @@ -49,4 +49,4 @@ get_random_secret_key()
![sc](https://cdn.discordapp.com/attachments/759043214153089043/761866434627895296/unknown.png)
##### You should select them and transfer

If you have problems in setting up please post in [#Code-jam-website](https://discordapp.com/channels/501090983539245061/763445637441519646/)
If you have problems in setting up please post in [#contrib-general](https://discord.com/channels/501090983539245061/795982206085890078)
15 changes: 13 additions & 2 deletions TWT/apps/timathon/views/view_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.views import View
from random import randint
from TWT.apps.challenges.models import Challenge
from TWT.apps.timathon.models import Team
from TWT.apps.timathon.models import Team, Vote
from TWT.context import get_discord_context
from ..models import Submission

Expand Down Expand Up @@ -45,9 +45,20 @@ def get_context(self, request: WSGIRequest, team_ID) -> dict:
context["challenge"] = team.challenge
if team.submitted:
try:
context["submission"] = Submission.objects.get(
team_submission = Submission.objects.get(
team=team, challenge=team.challenge
)
context["submission"] = team_submission

votes = Vote.objects.filter(submission=team_submission)

context['avg_1'] = sum(map(lambda x: x.c1, votes)) / len(votes)
context['avg_2'] = sum(map(lambda x: x.c2, votes)) / len(votes)
context['avg_3'] = sum(map(lambda x: x.c3, votes)) / len(votes)
context['avg_4'] = sum(map(lambda x: x.c4, votes)) / len(votes)

context['total_score'] = context['avg_1'] + context['avg_2'] + context['avg_3'] + context['avg_4']
context['votes'] = votes
except:
pass
print(context["challenge"].submissions_status)
Expand Down
15 changes: 14 additions & 1 deletion TWT/static/css/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import url('https://fonts.googleapis.com/css2?family=Rubik&display=swap');
.navigation-clean-button.navbar-light .navbar-nav .nav-link:hover {
color: #fff;
}
Expand All @@ -7,7 +8,19 @@
background-color: #fff;
margin-top: 100px;
}

strong{
color: #FF7746;
font-weight: bold;
}
.fill-button{
box-shadow: inset 0 0 0 0 #FF7746;
-webkit-transition: ease-out 0.4s;
-moz-transition: ease-out 0.4s;
transition: ease-out 0.4s;
}
.fill-button:hover{
box-shadow: inset 400px 0 0 0 #FF7746
}
.brands a {
display: block;
text-align: center;
Expand Down
33 changes: 32 additions & 1 deletion TWT/static/css/timathonTeam.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@




.team-container {
color:#F9F9FA;
font-family:Roboto;
Expand Down Expand Up @@ -114,6 +116,36 @@ padding: 10px;
height:auto;
}

table{
color: white;
border: 2px solid red;
margin-left: auto;
margin-right: auto;
border-radius: .5rem;
width: 70vw;
}

tr{
border: 2px solid orange;

}

th{
border: 4px solid orange;
font-size: 1.5rem;
text-align: center;
padding: .5rem;
}

td{
border: 4px solid orange;
font-size: 1.1rem;
text-align: center;
padding: .5rem;
word-wrap: break-word;
}


@media screen and (max-width: 768px){
.members-card{
flex: 1;
Expand All @@ -130,4 +162,3 @@ padding: 10px;
}



6 changes: 3 additions & 3 deletions TWT/templates/challenges/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
<div class="col d-flex flex-column justify-content-center" style="margin-top: 23px;padding-bottom: 20px;">
<h1 class="text-center" style="color: rgb(255,255,255);font-family: 'Borsok Regular', Anton;font-size: 61.88px;">Timathon</h1>
<h1 class="text-center" style="color: rgb(255,255,255);font-family: 'Lovelo Black', Actor, sans-serif;font-size: 46.88px;opacity: 0.20;margin-top: -21px;text-align: center;padding-top: 0;">CODE JAMS</h1>
<h1 class="mb-5" style="font-size: 21.880000000000003px;color: rgb(255,255,255);font-weight: normal;font-family: Actor, sans-serif;"><br>Timathon is a code jam hosted every <strong>2 months</strong>, each consisting of a different theme and allowing yourself to put your skills to the test.<br><br><br><strong>Prizes</strong>:<br>For our code jams, you're in for a chance to win&nbsp;<strong>real cash prizes</strong>.<br>(USD)&nbsp;<strong>$150</strong>,&nbsp;<strong>$100</strong>&nbsp;and&nbsp;<strong>$50</strong>&nbsp;will be split amongst the winning teams.<br><br>All top 5 teams, along with the winner and runner up of the category "Best project hosted on replit", will receive a <strong>3 month Replit hacker plan</strong> (for the whole team)!</h1>
<h1 class="mb-5" style="font-size: 21.880000000000003px;color: rgb(255,255,255);font-weight: normal;font-family: 'Rubik', sans-serif;"><br>Timathon is a code jam hosted every <strong>2 months</strong>, each consisting of a different theme and allowing yourself to put your skills to the test.<br><br><br><strong>Prizes</strong>:<br>For our code jams, you're in for a chance to win&nbsp;<strong>real cash prizes</strong>.<br><BR>(USD)&nbsp;<strong>$150</strong>,&nbsp;<strong>$100</strong>&nbsp;and&nbsp;<strong>$50</strong>&nbsp;will be split amongst the winning teams.<br><br>All top 5 teams, along with the winner and runner up of the category "Best project hosted on replit", will receive a <strong>3 month Replit hacker plan</strong> (for the whole team)!</h1>
<div class="text-center d-lg-flex justify-content-lg-center" style="margin-top: -15px;">
<a class="btn action-button default-btn" type="button" href="{% url 'timathon:Home' %}">View Timathon</a>
<a class="btn action-button outline-default-btn" type="button" style="margin-left: 10px;" href="{% url 'timathon:History' %}">Timathon History</a>
<a class="btn action-button outline-default-btn fill-button" type="button" style="margin-left: 10px;" href="{% url 'timathon:History' %}">Timathon History</a>
</div>
</div>
<div class="col d-lg-flex align-items-lg-center hero-img" style="margin-top: 50px;margin-bottom: 50px;min-width: 55%;"><img class="img-fluid" src="{% static 'images/undraw_project_team_lc5a.svg' %}"></div>
Expand Down Expand Up @@ -80,7 +80,7 @@ <h3 class="name">{{ team.name }}</h3>
</section>
<div class="container" style="margin-bottom: 100px;margin-top: 55px;">
<h1 class="text-center" style="color: rgb(255,255,255);font-family: 'Borsok Regular', Anton;font-size: 61.88px;">Discord</h1>
<h1 class="text-center mb-5" style="font-size: 21.880000000000003px;color: rgb(255,255,255);font-weight: normal;font-family: Actor, sans-serif;">Join our discord server where you can participate in <strong>weekly challenges</strong>, talk with other programmers, ask for help and more!</h1>
<h1 class="text-center mb-5" style="font-size: 21.880000000000003px;color: rgb(255,255,255);font-weight: normal;font-family: Rubik, sans-serif;">Join our discord server where you can participate in <strong>weekly challenges</strong>, talk with other programmers, ask for help and more!</h1>
<div class="text-center d-lg-flex justify-content-lg-center" style="margin-top: -26px;"><a class="btn action-button default-btn" role="button" data-bs-toggle="tooltip" data-bss-tooltip="" data-bs-placement="bottom" data-aos="zoom-in" data-aos-once="true" id="log-in-out-btn-2" href="https://discord.gg/twt" style="color: rgb(255,255,255);border-style: none;" title="discord.gg/twt"><i class="fab fa-discord" style="transform: scale(1.54);padding: 11px;"></i>Join Server</a></div>
</div>

Expand Down
40 changes: 40 additions & 0 deletions TWT/templates/timathon/view_team.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,46 @@ <h6 style="margin-left: 2px">{{ submission.description }}</h6>

</div>
{% endif %}

{% if not challenge.voting_status and votes and user in team.members.all %}
<h2 align="center" style="color:white">Marks Breakdown</h2>
<table>
<tr>
<th>C1</th>
<th>C2</th>
<th>C3</th>
<th>C4</th>
<th>Notes</th>
</tr>
{% for vote in votes %}
<tr>
<td>{{ vote.c1 }}</td>
<td>{{ vote.c2 }}</td>
<td>{{ vote.c3 }}</td>
<td>{{ vote.c4 }}</td>
<td>{{ vote.notes }}</td>
</tr>
{% endfor %}
</table>
<table>
<tr>
<th>Avg C1</th>
<th>Avg C2</th>
<th>Avg C3</th>
<th>Avg C4</th>
<th>Total Score</th>
</tr>
<br>
<tr>
<td>{{ avg_1 }}</td>
<td>{{ avg_2 }}</td>
<td>{{ avg_3 }}</td>
<td>{{ avg_4 }}</td>
<th>{{ total_score }}</th>
</tr>
</table>
{% endif %}

<script type="text/javascript">
function Copy()
{
Expand Down