aboutsummaryrefslogtreecommitdiffstats
path: root/templates/main
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-08-07 15:09:08 +0100
committerGravatar Gareth Coles <[email protected]>2018-08-07 15:09:16 +0100
commitaf54db6c136138c66cf5ca72419989525a0baa5c (patch)
tree8519aeab8d45277c51797c7dc23aacf3b56ed1bb /templates/main
parentA wizard is never late, nor is he early. (diff)
Initial project layout for django
Diffstat (limited to 'templates/main')
-rw-r--r--templates/main/about/channels.html268
-rw-r--r--templates/main/about/index.html40
-rw-r--r--templates/main/about/partners.html46
-rw-r--r--templates/main/about/privacy.html324
-rw-r--r--templates/main/about/rules.html124
-rw-r--r--templates/main/base.html53
-rw-r--r--templates/main/bot/clean_logs.html81
-rw-r--r--templates/main/index.html38
-rw-r--r--templates/main/info/faq.html324
-rw-r--r--templates/main/info/help.html461
-rw-r--r--templates/main/info/index.html43
-rw-r--r--templates/main/info/resources.html103
-rw-r--r--templates/main/jams/already.html26
-rw-r--r--templates/main/jams/banned.html44
-rw-r--r--templates/main/jams/index.html144
-rw-r--r--templates/main/jams/info.html128
-rw-r--r--templates/main/jams/join.html362
-rw-r--r--templates/main/jams/profile.html103
-rw-r--r--templates/main/jams/retract.html61
-rw-r--r--templates/main/jams/retracted.html31
-rw-r--r--templates/main/jams/team_list.html106
-rw-r--r--templates/main/jams/team_view.html291
-rw-r--r--templates/main/jams/thanks.html25
-rw-r--r--templates/main/navigation.html165
-rw-r--r--templates/main/ws_test.html26
-rw-r--r--templates/main/ws_test_rst.html39
26 files changed, 0 insertions, 3456 deletions
diff --git a/templates/main/about/channels.html b/templates/main/about/channels.html
deleted file mode 100644
index ac3d95b5..00000000
--- a/templates/main/about/channels.html
+++ /dev/null
@@ -1,268 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Channels{% endblock %}
-{% block og_title %}Channels{% endblock %}
-{% block og_description %}Channel listing and what's each channel is for{% endblock %}
-{% block content %}
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <h1 class="uk-article-title hover-title" id="top">
- Channels
-
- <a href="#top" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <p class="uk-article-meta">
- Keeping things tidy
- </p>
-
- <p>
- Every channel on the server has a use, and we expect users to keep things relevant to the channel
- whenever possible. Below, we've outlined all of the channels a normal user has access to send
- messages to, and what they should be used for.
- </p>
-
- <h2>Discussion</h2>
-
- <p>
- Channels in this section are designated for discussion and chat, and shouldn't be used for help
- requests in most cases. All channels in this category are on-topic.
- </p>
-
- <table uk-table class="uk-table-striped uk-table uk-table-divider table-bordered">
- <thead>
- <tr>
- <th>Channel</th>
- <th>Info</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="fira-code">#python-discussion</td>
- <td>
- Discussion about the Python programming language and ecosystem
- </td>
- </tr>
- <tr>
- <td class="fira-code">#tools</td>
- <td>
- Discussion relating to Python tooling - IDEs, editors, package managers, documentation
- generators, and so on
- </td>
- </tr>
- <tr>
- <td class="fira-code">#meta</td>
- <td>
- Discussion and suggestions relating to the Discord server, site, bot, and other
- projects of ours
- </td>
- </tr>
- </tbody>
- </table>
-
- <h2>Off-Topic</h2>
-
- <p>
- Channels in this section are designated for off-topic <strong>discussion</strong>, and any topic
- may be talked about here once it follows our rules. Note that these channels are for discussion,
- and are not places for you to dump images or memes.
- </p>
-
- <p>
- These channels are renamed daily by the server bot. Suggest funny channel names
- <a href="https://gitlab.com/python-discord/meta/issues/8">on the dedicated GitLab meta issue</a>.
- </p>
-
- <h2>Python Help</h2>
-
- <p>
- Channels in this section are strictly on-topic, and designated for asking general Python-related
- questions. If you're a beginner or you need some help with your Python, this is probably where you
- want to be.
- </p>
-
- <p>
- Please try to pick a channel that isn't busy when asking your question. If you're not sure
- how best to ask a question, take a look at
- <a href="{{ url_for("main.info.help") }}">our guide on that subject</a>.
- </p>
-
- <h2>Topical Chat/Help</h2>
-
- <p>
- Channels in this section are strictly on-topic, and geared towards specific subjects. They can be
- used for either discussion or asking questions - if you need help with one of the specific things
- covered here, it's best to ask your question in the relevant channel rather than one of the general
- help channels.
- </p>
-
- <table uk-table class="uk-table-striped uk-table uk-table-divider table-bordered">
- <thead>
- <tr>
- <th>Channel</th>
- <th>Info</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="fira-code">#databases</td>
- <td>
- Discussion and questions relating to databases - both traditional and document-oriented -
- such as SQLite, Postgresql, RethinkDB, Cassandra, Redis and so on
- </td>
- </tr>
- <tr>
- <td class="fira-code">#data-science</td>
- <td>
- Discussion and questions relating to machine learning, natural language processing,
- statistics and graphing and so on
- </td>
- </tr>
- <tr>
- <td class="fira-code">#dev-ops</td>
- <td>
- Discussion and questions relating to devops - for example, deployment and configuration
- of services, virtual machines and containers, and the day-to-day running of your
- Python-powered services
- </td>
- </tr>
- <tr>
- <td class="fira-code">#discord-py</td>
- <td>
- Discussion and questions relating to the
- <a href="https://github.com/Rapptz/discord.py">discord.py</a> library for writing
- Discord bots in Python - This channel refers specifically to the
- <a href="https://discordpy.readthedocs.io/en/async/"><span class="fira-code">async</span> branch of discord.py</a>,
- which is currently the stable version but is heavily outdated
- </td>
- </tr>
- <tr>
- <td class="fira-code">#discord-py-rewrite</td>
- <td>
- Discussion and questions relating to the
- <a href="https://github.com/Rapptz/discord.py">discord.py</a> library for writing
- Discord bots in Python - This channel refers specifically to the
- <a href="https://discordpy.readthedocs.io/en/rewrite/"><span class="fira-code">rewrite</span> branch of discord.py</a>,
- which is the most up-to-date version but is considered to be in beta
- </td>
- </tr>
- <tr>
- <td class="fira-code">#security</td>
- <td>
- Discussion and questions relating to cybersecurity, especially in relation to Python
- and best practises
- </td>
- </tr>
- <tr>
- <td class="fira-code">#software-testing</td>
- <td>
- Discussion and questions relating to testing your Python applications
- </td>
- </tr>
- <tr>
- <td class="fira-code">#user-interface</td>
- <td>
- Discussion and questions relating to designing and building user interfaces
- in Python, and related libraries and tools - this includes graphical interfaces and
- console interfaces
- </td>
- </tr>
- <tr>
- <td class="fira-code">#web-development</td>
- <td>
- Discussion and questions relating to web development - including Python frameworks
- such as Flask and Django, as well as HTML and JavaScript where it relates to the Web
- </td>
- </tr>
- </tbody>
- </table>
-
- <h2>Events</h2>
-
- <p>
- Channels in this section are strictly on-topic, and designated for the discussion of Python-related
- events - for example, our <a href="{{ url_for("main.jams.index") }}">Code Jams</a>, as well as any
- other large, related events that many of our users are partaking in.
- </p>
- <p>
- If you're part of a related event and you don't see a channel for it here, feel free to ask for one!
- </p>
-
- <h2>Special</h2>
-
- <p>
- Channels in this section are designated for special uses, and don't really fit into the other
- categories.
- </p>
-
- <table uk-table class="uk-table-striped uk-table uk-table-divider table-bordered">
- <thead>
- <tr>
- <th>Channel</th>
- <th>Info</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="fira-code">#bot-commands</td>
- <td>
- A channel specifically for making use of the bots on the server without clogging up
- the other channels
- </td>
- </tr>
- <tr>
- <td class="fira-code">#checkpoint</td>
- <td>
- Invisible to most users after verifying themselves, this channel is where new
- users verify that they accept the rules and
- <a href="{{ url_for("main.about.privacy") }}">privacy policy</a>
- </td>
- </tr>
- <tr>
- <td class="fira-code">#challenges</td>
- <td>
- While currently not in use, this channel lists various programming challenges that
- one might like to attempt during their learning efforts - we'll be replacing this
- with something better later, so stay tuned!
- </td>
- </tr>
- <tr>
- <td class="fira-code">#reddit</td>
- <td>
- A listing channel with a live feed of posts from
- <a href="https://reddit.com/r/Python">r/Python</a>, our official subreddit.
- </td>
- </tr>
- <tr>
- <td class="fira-code">#show-your-projects</td>
- <td>
- A listing channel for users to show off their Python-oriented projects - please note
- that this is not a discussion channel, and we do not allow postings for communities
- or commercial projects - and if possible, we prefer that you post a link to your
- source code instead of a website
- </td>
- </tr>
- <tr>
- <td class="fira-code">#show-your-projects-discussion</td>
- <td>
- Strictly on-topic discussion relating to projects posted in
- <span class="fira-code">#show-your-projects</span> - we prefer that all discussion
- relating to personal projects goes here
- </td>
- </tr>
- </tbody>
- </table>
-
- <h2>Voice</h2>
-
- <p>
- This section contains all of our general voice channels, as well as a single text channel -
- <span class="fira-code">#voice-chat</span>. If you're in a voice channel but can't use a
- microphone, you should use this channel to reply to other users using text instead of any
- of the other channels.
- </p>
- </article>
- </div>
- </div>
-{% endblock %} \ No newline at end of file
diff --git a/templates/main/about/index.html b/templates/main/about/index.html
deleted file mode 100644
index 35fe6ae0..00000000
--- a/templates/main/about/index.html
+++ /dev/null
@@ -1,40 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}About{% endblock %}
-{% block og_title %}About{% endblock %}
-{% block og_description %}Partners links, and information about the server{% endblock %}
-{% block content %}
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <h1 class="uk-article-title hover-title" id="top">
- About
-
- <a href="#top" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <p class="uk-article-meta">
- Learn about the server, find links to our partners, and more!
- </p>
- <p>
- <strong>Channels</strong>
- <a href="{{ url_for('main.about.channels') }}"><i class="fas fa-link"></i></a>
- <br />
- <span class="uk-text-meta">Server channel listings and information</span>
- </p>
- <p>
- <strong>Partners</strong>
- <a href="{{ url_for('main.about.partners') }}"><i class="fas fa-link"></i></a>
- <br />
- <span class="uk-text-meta">Links to our partnered servers</span>
- </p>
- <p>
- <strong>Rules</strong>
- <a href="{{ url_for('main.about.rules') }}"><i class="fas fa-link"></i></a>
- <br />
- <span class="uk-text-meta">Rules and infraction information for our community</span>
- </p>
- </article>
- </div>
- </div>
-{% endblock %}
diff --git a/templates/main/about/partners.html b/templates/main/about/partners.html
deleted file mode 100644
index 83803265..00000000
--- a/templates/main/about/partners.html
+++ /dev/null
@@ -1,46 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Partners{% endblock %}
-{% block og_title %}Partners{% endblock %}
-{% block og_description %}List and Links to Partner servers{% endblock %}
-{% block content %}
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <h1 class="uk-article-title hover-title" id="top">
- Partners
- <a href="#top" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <div class="uk-column-1-2@m uk-column-divider" id="partner-cards">
- {% if partners is none %}
- <div class="uk-alert-danger" uk-alert>
- <p>
- We were unable to load the <code>partners.json</code> file. If you see this, please
- notify us!
- </p>
- </div>
- {% else %}
- {% for partner_name, partner_data in partners.items() %}
- <div class="uk-card-default uk-card-hover uk-inline">
- <div class="uk-card-media-top">
- <a href="{{ partner_data['invite'] }}">
- <img src="{{ partner_data['banner'] }}" alt="{{ partner_name }}"/>
- </a>
- </div>
- <div class="uk-card-body">
- <p>{{ partner_data['description'] }}</p>
- </div>
- <div class="uk-card-footer">
- <a href="{{ partner_data['invite'] }}" class="uk-button uk-button-text">
- Join the server
- </a>
- </div>
- </div>
- {% endfor %}
- {% endif %}
- </div>
- </article>
- </div>
- </div>
-{% endblock %}
diff --git a/templates/main/about/privacy.html b/templates/main/about/privacy.html
deleted file mode 100644
index fa4e2aab..00000000
--- a/templates/main/about/privacy.html
+++ /dev/null
@@ -1,324 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Privacy{% endblock %}
-{% block og_title %}Privacy{% endblock %}
-{% block og_description %}Our privacy policy, and compliance information{% endblock %}
-{% block content %}
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <h1 class="uk-article-title hover-title" id="top">
- Privacy
-
- <a href="#top" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <p class="uk-article-meta">
- Stay safe out there
- </p>
-
- <p>
- We take every step to ensure that your data is used ethically and that includes making sure that
- you know exactly what data we collect, and what we do with it. That means that instead of a
- bunch of legalese, we've provided this information in an easy, human-readable form below.
- </p>
-
- <p>
- Please note that we are a completely non-profit community. We have no interest in selling your
- data, or shipping it off to third parties. Our community is entirely volunteer-run - it does
- not have any form of monetary income whatsoever - and we believe that this is how it should be.
- </p>
-
- <h3>Data collection</h3>
-
- <div class="uk-alert uk-alert-warning">
- <p>
- Please note that data <span class="uk-text-primary">marked with blurple text below</span> is not
- automatically removed. We need to hold onto this information in order to maintain infraction records
- and ensure the smooth running of our community.
- </p>
- <p>
- We do not store any data until you have verified yourself in <code>#checkpoint</code> on the server,
- and certified that you agree to our rules and privacy policy. If you are leaving the server and would
- like us to remove this data as well, please contact a member of staff directly.
- </p>
- </div>
-
- <table class="uk-table uk-table-divider uk-table-striped uk-table-small table-bordered" id="data-collection-table">
- <thead>
- <tr class="thick-bottom-border">
- <th class="uk-width-1-4">What we collect</th>
- <th class="uk-width-1-4">When it's collected</th>
- <th class="uk-width-1-4">What it's used for</th>
- <th class="uk-width-1-4">Who can access it</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="uk-text-primary">Discord user ID</td>
- <td class="uk-table-shrink"><strong>!accept</strong> run on Discord</td>
- <td>Statistics, data association (infractions, code jam applications, etc)</td>
- <td>Administrative staff</td>
- </tr>
- <tr>
- <td class="uk-text-primary">Discord username and discriminator</td>
- <td class="uk-table-shrink"><strong>!accept</strong> run on Discord</td>
- <td>Display purposes (alongside ID in staff areas, public profiles)</td>
- <td>Public (for code jam team listings and winner info) and staff areas</td>
- </tr>
- <tr>
- <td class="uk-text-primary">Discord avatar URLs</td>
- <td class="uk-table-shrink"><strong>!accept</strong> run on Discord</td>
- <td>Display purposes (alongside ID in staff areas, public profiles)</td>
- <td>Public (for code jam team listings and winner info) and staff areas</td>
- </tr>
- <tr>
- <td class="uk-text-primary">Assigned roles on Discord</td>
- <td class="uk-table-shrink"><strong>!accept</strong> run on Discord</td>
- <td>Access control for the site, infractions, role restoration after kicks</td>
- <td>Administrative staff</td>
- </tr>
- <tr class="thick-bottom-border">
- <td class="uk-text-primary">Messages sent on Discord</td>
- <td class="uk-table-shrink"><strong>!accept</strong> run on Discord</td>
- <td>
- Stored in memory by the bot for processing temporarily, may also end up in
- staff-only logging channels for the purposes of accountability and infraction
- management
- </td>
- <td>Administrative staff</td>
- </tr>
-
- <tr class="thick-bottom-border">
- <td>OAuth access and refresh token</td>
- <td class="uk-table-shrink">Discord login on site</td>
- <td>Used to find your Discord user ID when you log in</td>
- <td>Administrative staff</td>
- </tr>
-
- <tr>
- <td>GitLab username</td>
- <td class="uk-table-shrink">Code jam profile</td>
- <td>Used to identify you on GitLab as part of a code jam team</td>
- <td>Public, for code jam team listings</td>
- </tr>
- <tr class="thick-bottom-border">
- <td>Timezone</td>
- <td class="uk-table-shrink">Code jam profile</td>
- <td>A factor in code jam team match-ups</td>
- <td>Administrative staff</td>
- </tr>
-
- <tr class="thick-bottom-border">
- <td>System Information</td>
- <td class="uk-table-shrink">Code jam signup</td>
- <td>Used to verify that you have a working environment</td>
- <td>Administrative staff</td>
- </tr>
-
- <tr>
- <td>Email Address</td>
- <td class="uk-table-shrink">Issues emailed directly to GitLab</td>
- <td>Used to keep track of issue submissions</td>
- <td>GitLab staff - never stored in our database</td>
- </tr>
- </tbody>
- </table>
-
- <p>
- Note that we don't ordinarily collect your email address, and your email address will never be
- stored on our servers. The only time it will be shown is in the title of any issues you create on
- GitLab by directly emailing us on the <code>meta@</code> email address. These issues are confidential,
- not associated with a user account, do not require a GitLab account, and will only ever be seen by
- staff.
- </p>
-
- <h1 class="uk-article-title hover-title" id="consent">
- Collecting consent
-
- <a href="#consent" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
-
- <p>
- If you joined the community on or before the <strong>20th of May, 2018</strong>, you will have seen an announcement about our
- privacy policy on the Discord server. You will have had the opportunity to leave the server if
- you weren't happy with it. If you decided to stay, then we will consider you to have accepted
- our use of your data, as detailed on this page.
- </p>
- <p>
- If you joined the community after the <strong>20th of May, 2018</strong>, you will have been greeted with the
- <code>#checkpoint</code> channel. In this channel, you must run the <code>!accept</code>
- command to signify that you accept both our rules and this privacy policy. This will also have been
- detailed in a message in that channel.
- </p>
- <p>
- Please note that your acceptance of this privacy policy is retroactive, and you agree that any
- revisions to it will apply when they are published. We will attempt to keep everyone updated on
- changes to this policy via the usual announcement channels - if at any point you are not happy with
- a change to the privacy policy, please bring it up with a member of staff. If we're unable to
- solve your issue in a satisfactory way, you may remove your data as detailed below.
- </p>
-
- <h1 class="uk-article-title hover-title" id="removal">
- Data removal
-
- <a href="#removal" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
-
- <p>
- If you'd like to remove your data from our servers, there are two options available to you.
- </p>
-
- <div class="uk-grid uk-grid-match" uk-grid>
- <div class="uk-width-3-5@m">
- <div class="uk-card uk-card-default uk-card-small">
- <div class="uk-card-header">
- <h3 class="uk-card-title">Complete data removal</h3>
- </div>
-
- <div class="uk-card-body">
- <p>
- If you'd like to remove all of your personal data from our servers, all you need to do
- is leave the Discord server. As much of the data we collect is necessary for running
- our community, we are unable to offer you community membership with zero data collection.
- </p>
- <p>
- Please note that data <span class="uk-text-primary">marked with blurple text in the table above</span>
- is not automatically removed. We need to hold onto this information in order to maintain infraction records
- and ensure the smooth running of our community. If you are leaving the server and would like us to remove
- this data as well, please contact a member of staff directly.
- </p>
- <p>
- Once you've left the Discord server, your data is removed automatically. Please note that
- for the sake of data integrity and moderation purposes, we do not remove your Discord
- user ID from our database - but we do anonymize your data as far as possible.
- </p>
- <p>
- As with deleting your code jam profile directly, you will be issued an automatic ban
- from future code jams if you have applied for or are currently taking part in a
- code jam.
- </p>
- </div>
- </div>
- </div>
- <div class="uk-width-2-5@m">
- <div class="uk-card uk-card-default uk-card-small">
- <div class="uk-card-header">
- <h3 class="uk-card-title">Code jam profile removal</h3>
- </div>
-
- <div class="uk-card-body">
- <p>
- If you've provided us with a code jam profile in the past and would like to remove
- it, you may do so by heading to the
- <a href="{{ url_for("main.jams.profile") }}">"My Profile" page</a>,
- where you will find a button that will remove your profile.
- </p>
- <p>
- Please note that this is a nuclear option. If you have applied for or are currently
- taking part in a code jam, this will void your application and you will receive an
- automatic ban from future code jams until you've contacted us about it.
- </p>
- </div>
- </div>
- </div>
- </div>
-
- <h1 class="uk-article-title hover-title" id="gdpr">
- GDPR compliance
-
- <a href="#gdpr" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <p class="uk-article-meta">
- Keeping your data under your control
- </p>
-
- <p>
- Under the terms specified above, we do aim to comply with GDPR. While we do not currently have
- an automated way for users to export the data they've provided to us, we're happy to do this
- manually or answer any other GDPR- or privacy-related queries you may have. Feel free to contact
- our GDPR officer on Discord (<code>gdude#2002</code>), or any other member of the administrative
- staff.
- </p>
- <p>
- We believe that the best way to keep your personal data safe is to avoid collecting it at all.
- Discord itself is GDPR-compliant and they've already done the legwork required to ensure that
- your data may be collected - so we don't see the need to collect your personal information
- ourselves. Don't forget that by using Discord, you are stating that you are of legal age in
- your country to give consent to process your data!
- </p>
- <p>
- We are currently working on an automated way to get all of your data in both a human-readable
- and machine-readable format. Keep your eye on the usual announcements channels for more information
- on that, as it happens.
- </p>
-
- <h1 class="uk-article-title hover-title" id="changelog">
- Changelog
-
- <a href="#changelog" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <p class="uk-article-meta">
- Accountability, for the masses
- </p>
-
- <ul class="uk-list uk-list-divider">
- <li>
- <h4>July 27th, 2018</h4>
- <p>
- As we're replacing Rowboat (the bot we use for moderation), we need to hold onto some of
- your data - even after you've left the server. This is necessary to ensure the smooth
- running and security of our community.
- </p>
- </li>
- <li>
- <h4>July 3rd, 2018</h4>
- <p>
- While we don't collect your email addresses, they are visible on GitLab if you email an
- issue directly to our <code>meta@</code> email address, but only to staff.
- </p>
- </li>
- <li>
- <h4>June 7th, 2018</h4>
- <p>
- We no longer collect GitHub usernames - instead, we collect GitLab usernames. Additionally,
- we now collect user avatar URLs for display purposes.
- </p>
- </li>
- <li>
- <h4>June 5th, 2018</h4>
- <p>
- Rectified an omission in the old privacy policy, where the system information you provide
- as part of a code jam signup wasn't mentioned.
- </p>
- </li>
- <li>
- <h4>May 31st, 2018</h4>
- <p>
- We no longer collect your date of birth, and all collected dates of birth have been
- removed from our database. The reason for this is that Discord itself already complies with
- GDPR - and in order for you to sign up for a code jam, you must already have a Discord
- account.
- </p>
- </li>
- <li>
- <h4>May 20th, 2018</h4>
- <p>
- Completed the first version of our privacy policy. We also updated our OAuth scopes for
- Discord logins - we no longer collect your email, or get the access to join you to servers
- automatically. All collected emails have also been removed from the database.
- </p>
- </li>
- </ul>
- </article>
- </div>
- </div>
-{% endblock %}
diff --git a/templates/main/about/rules.html b/templates/main/about/rules.html
deleted file mode 100644
index b11f91d9..00000000
--- a/templates/main/about/rules.html
+++ /dev/null
@@ -1,124 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Rules{% endblock %}
-{% block og_title %}Rules{% endblock %}
-{% block og_description %}The server rules, along with an explanation of what happens when they're broken{% endblock %}
-{% block content %}
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <h1 class="uk-article-title hover-title" id="top">
- Rules
-
- <a href="#top" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <p class="uk-article-meta">
- Keeping our noses clean since 2017
- </p>
- <p>
- We have a small but strict set of rules on our server. Please read over them and take them on board -
- if you don't understand anything or need some clarification, feel free to ask any staff member!
- </p>
- <ol>
- <li>
- Be polite, and do not spam
- </li>
- <li>
- Follow the <a href="https://discordapp.com/guidelines">Discord community guidelines</a>
- </li>
- <li>
- Don't intentionally make other people uncomfortable - if someone asks you to stop discussing
- something, you should stop
- </li>
- <li>
- Be patient both with users asking questions, and the users answering them
- </li>
- <li>
- We will not help you with anything that might break a law or the terms of service of any other
- community, site, service, or otherwise - No piracy, brute-forcing, captcha circumvention,
- sneaker bots, or anything else of that nature
- </li>
- <li>
- Listen to and respect the staff members - we're here to help, but we're all human beings
- </li>
- <li>
- All discussion should be kept within the relevant channels for the subject - See the
- <a href="{{ url_for("main.about.channels") }}">channels page</a> for more information
- </li>
- <li>
- This is an English-speaking server, so please speak English to the best of your ability -
- <a href="https://translate.google.com">Google Translate</a> should be fine if you're not sure
- </li>
- <li>
- Keep all discussions safe for work - No gore, nudity, sexual soliciting, references to suicide,
- or anything else of that nature
- </li>
- <li>
- We do not allow advertisements for communities or commercial projects - Contact us directly if
- you want to discuss a partnership!
- </li>
- </ol>
-
- <h1 class="uk-article-title hover-title" id="nickname-policy">
- Nickname Policy
-
- <a href="#nickname-policy" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <p class="uk-article-meta">
- Keep It Simple, Stupid
- </p>
- <p>
- In order to keep things pleasant and workable for both users and staff members, we enforce the
- following requirements regarding your nickname.
- </p>
- <ol>
- <li>No blank or "invisible" names</li>
- <li>No slurs or other offensive sentiments</li>
- <li>No noisy unicode characters - for example, z̯̯͡a̧͎̺̻̝͕̠l̡͓̫̣g̹̲o̡̼̘ or byte order marks</li>
- <li>No nicknames designed to annoy other users</li>
- <li>Make sure the nickname is easy to mention using a keyboard that can only type ASCII characters</li>
- </ol>
- <p>
- Staff reserves the right to change the nickname of any user for any reason. Failure to comply with these
- requirements may result in you losing the right to change your nickname. We also reserve the right to
- discipline users with offensive usernames, regardless of the nickname they're using.
- </p>
-
- <h1 class="uk-article-title hover-title" id="infractions">
- Infractions
-
- <a href="#infractions" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <p class="uk-article-meta">
- Why you gotta be so rude?
- </p>
- <p>
- We have a generally no-nonsense policy when it comes to our rules. If you notice someone breaking
- them, feel free to mention or DM a staff member and we'll try to deal with it as soon as possible.
- </p>
- <p>
- The possible actions we take based on infractions can include the following:
- </p>
- <ul>
- <li>A public verbal or textual warning</li>
- <li>Forced nick changes, where appropriate</li>
- <li>A short temporary mute</li>
- <li>A long temporary mute</li>
- <li>A kick from the server</li>
- <li>A temporary ban from the server</li>
- <li>A permanent ban from the server</li>
- </ul>
- <p>
- While we do discuss more serious matters internally before handing out a punishment, simpler
- infractions are dealt with directly by individual staffers and the punishment they hand out is left
- to their own discretion.
- </p>
- </article>
- </div>
- </div>
-{% endblock %} \ No newline at end of file
diff --git a/templates/main/base.html b/templates/main/base.html
deleted file mode 100644
index bb12fc9b..00000000
--- a/templates/main/base.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- {% block head %}
- <title>Python Discord | {% block title %}{% endblock %}</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
-
- <script src="{{ static_file('js/script.js') }}" type="application/javascript"></script>
-
- <!-- Stylesheets -->
- <link rel="shortcut icon" href="{{ static_file('favicon.ico') }}">
- <link rel="stylesheet" href="{{ static_file('css/uikit_blurple.css') }}"/>
- <link rel="stylesheet" href="{{ static_file('css/style.css') }}"/>
- <link rel="stylesheet" href="{{ static_file('css/bundled/pygments-monokai.css') }}"/>
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
-
- <!-- OpenGraph metadata -->
- <meta property="og:title" content="Python Discord | {% block og_title %}{% endblock %}">
- <meta property="og:description" content="{% block og_description %}We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.{% endblock %}">
- <meta content="/static/logos/logo_discord.png" property="og:image">
- {% endblock %}
- {% block extra_head %}
-
- {% endblock %}
- </head>
- <body class="{% block page_classes %}{% endblock page_classes %}
- page-{{ current_page.replace(".", "-") }}
- blueprint-{{ blueprint.replace(".", "-") }}">
- {% if current_page == "main.index" %}
- <div class="uk-offcanvas-content uk-section-primary">
- {% else %}
- <div class="uk-offcanvas-content">
- {% endif %}
- {% include "main/navigation.html" %}
- {% block content %}{% endblock %}
- </div>
-
- <footer>
- <div class="uk-section uk-section-secondary uk-container-medium uk-text-meta">
- <div class="uk-text-center uk-text-meta">
- <p>
- This website uses <a href="https://python.org">Python</a> and
- <a href="http://flask.pocoo.org/">Flask</a>, and was developed collaboratively on
- <a href="https://gitlab.com/python-discord/projects/site">GitLab</a>.
- <br />
- For privacy &amp; GDPR-related info, please <a href="{{ url_for("main.about.privacy") }}">see this page</a>.
- </p>
- </div>
- </div>
- </footer>
- </body>
-</html>
diff --git a/templates/main/bot/clean_logs.html b/templates/main/bot/clean_logs.html
deleted file mode 100644
index 83ee0cba..00000000
--- a/templates/main/bot/clean_logs.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<html class="clean-logs">
- <head>
- <link rel="stylesheet" href="{{ static_file('css/style.css') }}"/>
- </head>
- <body>
- {% for message in messages %}
-
- <!-- Main message -->
- <span class="nick" style="color: {{ message.color }}">{{ message.author }}<span class="time">{{ message.timestamp }} | User ID: {{ message.user_id }}</span></span><br>
- <span class="text">{{ message.content }}</span>
-
- <!-- File attachments -->
- {% for attachment in message.attachments %}
- <span class="text">{{ attachment }}</span>
- {% endfor %}
-
- <!-- Embeds -->
- {% for embed in message.embeds %}
- <div class="embed">
-
- <!-- Title -->
- {% if embed.title %}
- {% if embed.url %}
- <span><strong><a href="{{ embed.url }}">{{ embed.title }}</a></strong></span><br>
- {% else %}
- <span><strong>{{ embed.title }}</strong></span><br>
- {% endif %}
- {% endif %}
-
-
- <!-- Description -->
- {% if embed.description %}
- <br>
- <span>{{ embed.description }}</span>
- {% endif %}
-
- <!-- Fields -->
- {% if embed.fields %}
- <div class="fields">
- {% for field in embed.fields %}
- <div class="field">
- <br>
- {% if field.name %}
- <span><strong>{{ field.name }}</strong></span><br>
- {% endif %}
-
- <span>{{ field.value }}</span>
- </div>
- {% endfor %}
- </div>
- {% endif %}
-
- <!-- Image -->
- {% if embed.image %}
- <br>
- {% if embed.image.url %}
- <img src="{{ embed.image.url }}">
- {% endif %}
- {% endif %}
-
- <!-- Thumbnail -->
- {% if embed.thumbnail %}
- <br>
- {% if embed.thumbnail.url %}
- <img src="{{ embed.thumbnail.url }}">
- {% endif %}
- {% endif %}
-
- <!-- Footer -->
- {% if embed.footer %}
- <br>
- {% if embed.footer.text %}
- <span class="footer">{{ embed.footer.text }}</span>
- {% endif %}
- {% endif %}
- </div>
- {% endfor %}
- {% endfor %}
- </body>
-</html>
-
diff --git a/templates/main/index.html b/templates/main/index.html
deleted file mode 100644
index c73c2e4b..00000000
--- a/templates/main/index.html
+++ /dev/null
@@ -1,38 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Home{% endblock %}
-{% block og_title %}Home{% endblock %}
-{% block content %}
-<div class="uk-section uk-section-primary">
- <div class="uk-container uk-text-center">
- <h1 class="uk-header uk-article-title">
- Python Discord
- </h1>
- <p class="uk-article-meta">
- The official Discord server of <a href="https://www.reddit.com/r/Python/">r/Python</a>
- </p>
- <p class="uk-text-lead">
- We're a large, friendly community focused around the Python programming language,
- open to those who wish to learn the language or improve their skills, as well as
- those looking to help others.
- </p>
- <p>
- We organise regular community events and have a dedicated staff of talented Python developers
- available to assist around the clock. Whether you're looking to learn the language or working
- on a complex project, we've got someone who can help you if you get stuck.
- </p>
- <div class="uk-container uk-align-center">
- <a href="{{ url_for('main.invite') }}" class="uk-button uk-button-large uk-button-darkish" id="invite-button">
- <img src="https://discordapp.com/api/guilds/267624335836053506/embed.png?style=banner3">
- </a>
- </div>
- <hr class="uk-divider-icon"/>
- <div class="uk-container uk-container-small uk-text-meta">
- <p>
- Please note: this site is under construction. What you see now may be vastly different
- from the final project state. Feel free to chat to us on Discord if you're curious!
- </p>
- </div>
-
- </div>
-</div>
-{% endblock %}
diff --git a/templates/main/info/faq.html b/templates/main/info/faq.html
deleted file mode 100644
index e742f317..00000000
--- a/templates/main/info/faq.html
+++ /dev/null
@@ -1,324 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}FAQ{% endblock %}
-{% block og_title %}FAQ{% endblock %}
-{% block og_description %}Frequently Asked Questions{% endblock %}
-{% block content %}
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <h1 class="uk-article-title hover-title" id="top">
- Frequently Asked Questions
-
- <a href="#top" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <p class="uk-article-meta">
- Insert witty quip here
- </p>
- <p>
- These are some of the most-asked questions we get on a day-to-day basis. If you have a
- question, be sure to check this page and see if we've answered it already. If you'd like to
- suggest an entry to this page, why not submit a merge request
- <a href="https://gitlab.com/python-discord/projects/site">on GitLab</a>?
- </p>
-
- <div uk-grid class="uk-grid uk-grid-match">
- <div class="uk-width-1-1@s">
- <h2 class="uk-heading-divider" id="starting-out">
- Starting Out with Python
-
- <a href="#starting-out" class="uk-text-primary uk-float-right" title="Permanent link to this header">
- <i class="far fa-link"></i>
- </a>
- </h2>
- </div>
-
- <div class="uk-width-1-3@m">
- <strong>Is Python a good first language?</strong>
- </div>
- <div class="uk-width-2-3@m">
- <p>
- In our opinion, yes it is. It's a very powerful language, but it will force you to
- write readable code and it's designed to allow you to write code very quickly, without
- you having to keep your head in a book for hours on end.
- </p>
- <p>
- Python is used as a teaching language in many schools, colleges and universities - but
- it's a very capable language that is suitable for many real-world tasks as well, and
- it's only gaining in popularity!
- </p>
- </div>
-
- <div class="uk-width-1-3@m">
- <strong>I'm new to Python - how/where do I get started?</strong>
- </div>
- <div class="uk-width-2-3@m">
- <p>
- How you get started with Python is very much going to depend on your prior programming
- experience. If you're already an experienced programmer, you should should have no
- trouble following pretty much any guide out there - but for true beginners, we recommend
- full-on tutorials such as Automate the Boring Stuff with Python.
- </p>
- <p>
- For more information on that and other resources, feel free to take a look at
- <a href="{{ url_for("main.info.resources") }}">our resources page</a>.
- </p>
- </div>
-
- <div class="uk-width-1-3@m">
- <strong>Should I start with Python 2 or Python 3? Which is better?</strong>
- </div>
- <div class="uk-width-2-3@m">
- <p>
- Generally, we're always going to recommend that people new to Python start with Python 3.
- There's a few reasons for this:
- </p>
- <ul>
- <li>
- Python 3 is the latest-and-greatest version. It gets all the new features and is in
- active development.
- </li>
- <li>
- Python 2 lacks many features available in Python 3 and is mechanically different in a
- few important areas.
- </li>
- <li>
- Python 2 is being sunset and will reach its end of life in 2020. It will not be
- maintained past 2020. There will be no Python 2.8.
- </li>
- <li>
- Most libraries now fully support Python 3, and many are dropping or have dropped support
- for Python 2.
- </li>
- </ul>
-
- <p>
- The only reason a user may want to stick with Python 2 is if they are stuck working a job
- with a legacy codebase that cannot or will not be updated to work with Python 3. To users
- in those situations: Commiserations.
- </p>
- </div>
-
- <div class="uk-width-1-3@m">
- <strong>What IDE/Editor should I use? Should I use an IDE if I'm a beginner?</strong>
- </div>
- <div class="uk-width-2-3@m">
- <p>
- If you're a beginner, you should not be using an IDE. This is because IDEs do a lot of
- basic things automatically where a beginner should learn to do things themselves - for
- example, some IDEs can generate huge chunks of code or catch beginner errors without you
- even noticing you'd made a typo.
- </p>
- <p>
- If you're not a beginner or you decide to try an IDE regardless, we heavily recommend
- <a href="https://www.jetbrains.com/pycharm/">PyCharm</a>. This is a well-known IDE which
- is entirely in a league of its own, and has a very capable free "community" edition that
- will serve most people's needs.
- </p>
- <p>
- We've listed off some of our favourite editors and IDEs on
- <a href="{{ url_for("main.info.resources") }}">our resources page</a>. Feel free to
- take a look if you're not sure what's out there.
- </p>
- <p>
- By the way, we host <a href="{{ url_for("main.jams.index") }}">quarterly code jams</a>
- for the users of our community, and the prize for winning it is a one-year PyCharm Pro
- license - sponsored by JetBrains. If you like PyCharm and are thinking of grabbing a copy
- of Pro, why not join in?
- </p>
- </div>
-
- <div class="uk-width-1-3@m">
- <strong>What's wrong with "Learn Python the Hard Way"?</strong>
- </div>
- <div class="uk-width-2-3@m">
- <p>
- Learn Python the Hard Way, Zed Shaw's most infamous work, is largely considered by the
- Python community to be poor-quality and misleading in general. This is due to numerous
- issues with the material, which include being extremely opinionated and sometimes
- condescending, out of date, confusing and even wildly incorrect in some places.
- </p>
- <p>
- Learners that have used Learn Python the Hard Way as their primary learning material often
- find themselves confused and asking questions that really don't make that much sense - it's
- also been observed that learners in this position tend to suffer heavily from the infamous
- <a href="http://xyproblem.info/">XY Problem</a>.
- </p>
- <p>
- For more information on why you should avoid Learn Python the Hard Way, you can have a look
- at <a href="https://sopython.com/wiki/LPTHW_Complaints">this article on the sopython
- wiki</a>,
- which enumerates the most egregious issues with it.
- </p>
- </div>
-
- <div class="uk-width-1-3@m">
- <strong>If I type "python" or "pip" into a terminal, I get "command not found".</strong>
- </div>
- <div class="uk-width-2-3@m">
- <p>
- That's not a question, but there's a few things you can look at to try to solve this.
- </p>
- <ul>
- <li>
- If you're on Windows, the python installer has an option labelled "Add to PATH" -
- Make sure you check this when you install python. If you forgot to do that the
- first time, then the easiest way to solve this problem is to reinstall Python
- </li>
- <li>
- If you're on Windows, there's a good chance that <code>python</code> and
- <code>pip</code> aren't what you actually need to run! Some options you could
- try include <code>py -3</code>, <code>python3</code> or <code>python36</code> - if
- one of these works, then you should be able to use <code>py -3 -m pip</code>,
- <code>pip3</code> or <code>pip36</code> as well
- </li>
- <li>
- If you're on a Mac, Python comes with the OS - however, it's quite likely to be
- an old version. You can solve this by using <a href="https://brew.sh">Homebrew</a>
- to install a more recent version of Python, which should be made available as
- <code>python3</code>
- </li>
- </ul>
- </div>
-
- <div class="uk-width-1-3@m">
- <strong>Why can't I import this module?</strong>
- </div>
- <div class="uk-width-2-3@m">
- <p>
- When finding yourself unable to import something in Python, you can follow these
- steps to figure it out:
- </p>
- <ul>
- <li>
- Is the module part of <a href="https://docs.python.org/3/library/">Python's standard
- library</a>?
- </li>
- <li>
- If not, have you installed it? If the module <a href="https://pypi.org/search/">is on
- PyPi</a>,
- you can install it using pip in a terminal: <code>pip install module_name</code>
- </li>
- <li>
- If you think you've installed it, try upgrading it with pip in a terminal:
- <code>pip install -U module_name</code> - Make sure there were no errors during
- installation
- </li>
- <li>
- If all else fails, make sure you've read the module documentation fully, and ensure
- that you're following it correctly
- </li>
- <li>
- If you're sure that you've done everything correctly, you may have found a bug - come
- and chat to us, and we might recommend that you report your problem to the developer
- </li>
- </ul>
- </div>
-
- <div class="uk-width-1-3@m">
- <strong>What's PEP8? Should I care about code style?</strong>
- </div>
- <div class="uk-width-2-3@m">
- <p>
- <a href="https://www.python.org/dev/peps/pep-0008/">Python Enhancement Proposal #8</a>
- is known as the official Python style guide. It sets out a lot of very clear guidelines
- which help you structure your code.
- </p>
- <p>
- One of the most useful things you can do when writing your code is to follow a style
- guide. It makes it easier to read your code overall, but a consistent style guide
- is very important as it means that everyone that contributes to your project is
- writing code in the same style - meaning everyone will be able to read it. As PEP
- itself reads: "A foolish consistency is the hobgoblin of little minds".
- </p>
- <p>
- PEP8 isn't the only style guide available to you, but it is the most widely used
- and best-understood of them - and for that reason, we do recommend you use it. That
- said,
- <a href="https://google.github.io/styleguide/pyguide.html">Google's Python Style Guide</a>
- is also widely used by Google engineers.
- </p>
- </div>
-
- <div class="uk-width-1-1@s">
- <h2 class="uk-heading-divider" id="community">
- Community Questions
-
- <a href="#community" class="uk-text-primary uk-float-right" title="Permanent link to this header">
- <i class="far fa-link"></i>
- </a>
- </h2>
- </div>
-
- <div class="uk-width-1-3@m">
- <strong>Why did you move to GitLab? Do you hate Microsoft?</strong>
- </div>
- <div class="uk-width-2-3@m">
- <p>
- While many of our users do prefer to work on Linux, we don't hate Microsoft. While
- <a href="https://www.theregister.co.uk/2018/06/04/microsoft_buys_github/">
- the news about Microsoft's acquisition of GitHub
- </a>
- did prompt us to initially mirror our GitHub repositories to GitLab for safety, we didn't
- outright make the move because of the acquisition - in fact, some of our staff members
- had been suggesting we use it from the start! Here's some of the reasons we decided
- to move:
- </p>
- <ul>
- <li>
- Prior to moving to GitLab, our development efforts were split among three services:
- <a href="https://clickup.com/">ClickUp</a> for issue tracking,
- <a href="https://github.com/">GitHub</a> for code storage and collaboration,
- and <a href="https://clickup.com/">Travis</a> for continuous integration and testing.
- GitLab is a fantastic alternative to all of these services, and moving to it has allowed
- us to consolidate our efforts in one place.
- </li>
- <li>
- For a long time now, GitLab has been innovating on features and pushing them to production
- much faster than GitHub. Using GitLab gives us far more options when it comes to issue
- management, merge requests, continuous integration and deployment - to name
- a few things.
- </li>
- <li>
- In the vast majority of cases where GitHub and GitLab solve the same problem or
- have a similar feature, GitLab does it better.
- </li>
- <li>
- GitLab has had free private repositories for some time now, and these are convenient
- for us to store internal documentation and tasks in.
- </li>
- <li>
- GitLab is fully open-source and quite easy to host yourself. In the event that the
- public platform ends up dying or being abused by its staff, we can simply spin
- up our own instance and keep on working as if there were no problems.
- </li>
- </ul>
- </div>
-
- <div class="uk-width-1-1@s">
- <h2 class="uk-heading-divider" id="misc">
- Misc. Questions
-
- <a href="#misc" class="uk-text-primary uk-float-right" title="Permanent link to this header">
- <i class="far fa-link"></i>
- </a>
- </h2>
- </div>
-
- <div class="uk-width-1-3@m">
- <strong>What does "real" Python development look like?</strong>
- </div>
- <div class="uk-width-2-3@m">
- <p>
- Python is a very versatile language, and a real-life application using it can take
- many forms. That said, we do plenty of Python development here ourselves. If
- you're curious about this question, then why not take a look at
- <a href="https://gitlab.com/python-discord">our projects</a>?
- </p>
- </div>
- </div>
- </article>
- </div>
- </div>
-{% endblock %}
diff --git a/templates/main/info/help.html b/templates/main/info/help.html
deleted file mode 100644
index 9cc09af2..00000000
--- a/templates/main/info/help.html
+++ /dev/null
@@ -1,461 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Getting Help{% endblock %}
-{% block og_title %}Getting Help{% endblock %}
-{% block og_description %}A guide on how to ask good questions, how to avoid annoying those helping out, and how to interpret answers{% endblock %}
-{% block content %}
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <h1 class="uk-article-title hover-title" id="top">
- Getting Help
-
- <a href="#top" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <p class="uk-article-meta">
- Everything's exploding, customers are complaining, management's on the fritz!
- </p>
- <p>
- This document is intended to provide you with the information you need to get help as quickly and
- effectively as possible. If you're stuck on a problem or you just don't understand something, feel
- free to join us and ask for help - you can use this as a reference when forming your question.
- </p>
- <p>
- Much of this document is based on the sentiments expressed by Eric Steven Raymond and Rick Moen
- in their essay, <a href="http://www.catb.org/esr/faqs/smart-questions.html">How To Ask Questions The Smart Way</a>.
- Please note that the essay is very long and may be considered rude by some. Additionally, the people
- behind that essay are in no way affiliated with us - please do not bother them with your Python
- problems.
- </p>
- <h2 class="uk-article-title hover-title" id="before">
- Before You Ask
-
- <a href="#before" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h2>
- <p class="uk-article-meta">
- Take stock of your problem, and do your homework.
- </p>
- <p>
- Before you ask your question, there are a few things you can do to find an answer on your own.
- Experienced developers will do the following:
- </p>
- <ul>
- <li>Read the official documentation for whatever you're working with</li>
- <li>Use a debugger to inspect your code</li>
- <li>Do some research online - for example, on Stack Overflow</li>
- <li>Read the source code for whatever you're working with</li>
- <li>Search the message history of the help channels</li>
- </ul>
- <p>
- Essentially, doing your research is the first step towards a solution to any problem. If your
- problem isn't extremely general, we're going to be doing exactly these steps ourselves when you ask,
- so doing the legwork beforehand saves everyone a lot of time.
- </p>
- </article>
- </div>
- </div>
- <div class="uk-section uk-section-muted">
- <div class="uk-container uk-container-small uk-text-center">
- <blockquote>
- <p>
- <i class="fas fa-quote-left fa-pull-left"></i>
- <i class="fas fa-quote-right fa-pull-right"></i>
- Creativity requires input, and that's what research is. You're gathering material with which to
- build.
- </p>
- <small>
- Gene Luen Yang
- </small>
- </blockquote>
- </div>
- </div>
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <p>
- If you're an absolute beginner, take a moment to step back from the problem.
- Have you <a href="https://wiki.python.org/moin/BeginnersGuide/NonProgrammers">read a book or done a
- tutorial</a>? There's a huge amount of resources out there, many of which are going to help you a lot more than
- us answering the beginners' questions for you. If you're following a tutorial, book or course and
- you don't understand something, then <strong>that</strong> is the correct time to ask a beginners'
- question. Of course, we won't turn you away if you do have a beginners' question &mdash; by all
- means,
- come to us if you do have a problem.
- </p>
- <p>
- Have you read the official documentation for the module or technology you're working with? The
- <a href="https://docs.python.org/3/">official Python 3 docs</a> are a fantastic and valuable
- resource, so if you're using a bundled module, your first port of call should be there. If you're
- using a third-party library, often they will have some official documentation uploaded somewhere
- &mdash;
- try having a Google around, or take a look <a href="https://pypi.org">at PyPi</a> in case they've
- linked it from there.
- </p>
- <p>
- If you can't find the documentation or you find it lacking, the next place to look is the source
- code.
- Grab a decent IDE (we recommend <a href="https://www.jetbrains.com/pycharm/">PyCharm</a> Community)
- and a coffee, download a copy of the project and open it up, and get to browsing!
- </p>
- <p>
- If you're still confused, try searching the Internet for people that have already had the same
- problem. Often, you won't be the only person to have encountered the issue you're dealing with - more often
- than not, you'll find a GitLab ticket or a StackOverflow question along with a fix or answer to your
- question already posted.
- </p>
- <p>
- If none of the above helps you or you're lost, scared and alone, feel free to continue on to the
- Discord server. You can use the search feature (the <i class="fas fa-search"></i> at the top right) to check
- whether someone else has asked your question recently, or just feel free to pick one of the help channels
- and ask your question.
- </p>
- <h2 class="uk-article-title hover-title" id="good-question">
- A Good Question
-
- <a href="#good-question" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h2>
- <p class="uk-article-meta">
- Thank you for helping us help you help us all.
- </p>
- <p>
- When you're ready to ask a question, there's a few things you should have to hand before forming
- a query.
- </p>
- <ul>
- <li>
- A code example that illustrates your problem
- <ul>
- <li>If possible, make this a minimal example rather than an entire application</li>
- </ul>
- </li>
- <li>Details on how you attempted to solve the problem on your own</li>
- <li>Full version information &mdash; for example, <em class="uk-text-primary">"Python 3.6.4 with
- discord.py 1.0.0a"</em></li>
- </ul>
- <p>
- Your question should be informative, but to the point. More importantly, how you phrase your
- question
- and how you address those that may help you is crucial. Courtesy never hurts, and please type
- using correctly-spelled and grammatical language as far as you possibly can.
- </p>
- <p>
- When you're inspecting a problem, don't be quick to assume that you've found a bug, or that your
- approach is correct. While it helps to detail what exactly you're trying to do, you should also
- be able to give us the bigger picture - describe the goal, not just the step. Describe the problem's
- symptoms in chronological order - not your guesses as to their cause.
- </p>
- </article>
- </div>
- </div>
- <div class="uk-section uk-section-muted">
- <div class="uk-container uk-container-small uk-text-center">
- <div class="uk-child-width-expand" uk-grid>
- <div class="uk-text-primary">
- <p class="uk-text-bold uk-text-center">
- Bad Questions
- </p>
- </div>
- <div class="uk-text-primary">
- <p class="uk-text-bold uk-text-center">
- Good Questions
- </p>
- </div>
- </div>
- <div class="uk-grid-divider uk-child-width-expand" uk-grid>
- <div class="uk-text-danger">
- <p>
- Where can I find information on discord.py?
- </p>
- <p class="uk-text-meta">
- This question suggests that the person asking it hasn't done any research, or even a simple
- Google search.
- </p>
- </div>
- <div class="uk-text-success">
- <p>
- I used Google to try to find more information about "discord.py 1.0.0a", but I couldn't
- really
- find anything useful. Does anyone know where I might find a guide to writing commands
- using this library?
- </p>
- </div>
- </div>
- <div class="uk-child-width-expand" uk-grid>
- <div>
- <hr class="uk-divider-icon"/>
- </div>
- <div>
- <hr class="uk-divider-icon"/>
- </div>
- </div>
- <div class="uk-grid-divider uk-child-width-expand" uk-grid>
- <div class="uk-text-danger">
- <p>
- Pillow puts my text at the bottom of the image instead of where I wanted it. Why is it broken?
- </p>
- <p class="uk-text-meta">
- This question assumes that the problem is with Pillow itself, and that it isn't
- the questioner's fault. It also doesn't provide enough information on the problem.
- </p>
- </div>
- <div class="uk-text-success">
- <p>
- Pillow appears to insert text at the bottom of the image if the given X coordinate is negative.
- I had a look at the documentation and searched Stack Overflow, but I couldn't find any
- information on using negative coordinates to position text. Has anyone attempted this?
- </p>
- </div>
- </div>
- <div class="uk-child-width-expand" uk-grid>
- <div>
- <hr class="uk-divider-icon"/>
- </div>
- <div>
- <hr class="uk-divider-icon"/>
- </div>
- </div>
- <div class="uk-grid-divider uk-child-width-expand" uk-grid>
- <div class="uk-text-danger">
- <p>
- I'm having some trouble writing a YouTube random URL generator - can anyone help?
- </p>
- <p class="uk-text-meta">
- This question provides no information on the problem, and asks for help in a way that isn't
- engaging - some people will find this annoying, as answering your question is guaranteed
- to result in another question.
- </p>
- </div>
- <div class="uk-text-success">
- <p>
- My YouTube random URL generator appears to be returning false positives for tested URLs,
- stating that a URL points to a real video when that video doesn't actually exist. Obviously
- there's some issue with how this is checked, but I can't put my finger on it. Is there anything
- I can check?
- </p>
- </div>
- </div>
- <div class="uk-child-width-expand" uk-grid>
- <div>
- <hr class="uk-divider-icon"/>
- </div>
- <div>
- <hr class="uk-divider-icon"/>
- </div>
- </div>
- <div class="uk-grid-divider uk-child-width-expand" uk-grid>
- <div class="uk-text-danger">
- <p>
- I want to share a YouTube video with my friend, but the video doesn't move when I print the page.
- How do I make the video move?
- </p>
- <p class="uk-text-meta">
- This question assumes a specific (wrong) approach, and isn't open-ended enough to account for
- the possibility of a better solution.
- </p>
- </div>
- <div class="uk-text-success">
- <p>
- I'm attempting to figure out the best way to share a YouTube video with my friend that doesn't
- have the Internet at home. I can't think of a better approach than printing the page, which
- obviously doesn't help much given that the video doesn't move on the paper - can anyone think
- of a better approach to this?
- </p>
- </div>
- </div>
- <div class="uk-child-width-expand" uk-grid>
- <div>
- <hr class="uk-divider-icon"/>
- </div>
- <div>
- <hr class="uk-divider-icon"/>
- </div>
- </div>
- <div class="uk-grid-divider uk-child-width-expand" uk-grid>
- <div class="uk-text-danger">
- <p>
- I was given this assignment by my teacher, but I'm not sure how to approach it. Does anyone
- have any ideas?
- </p>
- <p class="uk-text-meta">
- This question is clearly a homework question. Homework is supposed to challenge you, and we
- will not provide solutions to homework. Instead, ask a more general question.
- </p>
- </div>
- <div class="uk-text-success">
- <p>
- I have a list of numbers - how do I calculate how many of them are even? Is there a way
- to remove all the odd numbers from my list? Are there quick ways to find the average of
- a list of numbers, or add them all together?
- </p>
- </div>
- </div>
- </div>
- </div>
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <h2 class="uk-article-title hover-title" id="answers">
- Interpreting Answers
-
- <a href="#answers" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h2>
- <p class="uk-article-meta">
- Wow, rude.
- </p>
- <p>
- Programmers have a certain set of mannerisms. While we all try to be as courteous with our replies
- as possible, occasionally it may seem as if a helper is annoyed or disinterested in your question.
- This isn't personal - it's just part of our culture. Remember that the people you're asking for help
- are humans and that they're here voluntarily, in their free time.
- </p>
- <p>
- If you've asked a question and you're told to read the documentation or search the web, you should
- do that. When this happens, it's often the case that the person responding has the information you need
- open in their web browser and either thinks that it's very easy to find, or that you would learn
- more from seeking out the source of the information yourself. If you've already done this, you should
- tell us by including it in your question!
- </p>
- <p>
- If you don't understand an answer, don't immediately bounce back and demand clarification. Use the
- tools available to you (the internet, documentation, source code) to help you understand the answer, and
- if you still can't figure it out, ask for clarification and provide any relevant information you learned
- during your research.
- </p>
- </article>
- </div>
- </div>
-
- <div class="uk-section uk-section-muted">
- <div class="uk-container uk-container-small uk-text-center">
- <blockquote>
- <p>
- <i class="fas fa-quote-left fa-pull-left"></i>
- <i class="fas fa-quote-right fa-pull-right"></i>
- Successful people ask better questions, and as a result, they get better answers.
- </p>
- <small>
- Tony Robbins
- </small>
- </blockquote>
- </div>
- </div>
-
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <p>
- Much of what looks like rudeness within programming communities is not intended to be offensive and
- it's often just a product of the down-to-earth, direct style of communication that is typical in
- a community that is more concerned with solving problems than anything else. If you perceive
- rudeness, try to react calmly. If a user really is acting out, then chances are that a member of staff will
- call them out on it. If this doesn't happen, contact a member of staff directly and they will try
- to clarify this with you.
- </p>
- <p>
- It's okay to mess up. It happens to all of us. That said, if you mess up badly enough, it's likely
- that you will be corrected there and then, in public and with a verbal scalpel. Take this as a
- learning experience and don't let it get to you - this is a common and appropriate response in
- many programming circles. Community standards do not maintain themselves - they're maintained by
- people applying actively them, visibly, in public.
- </p>
-
- <h2 class="uk-article-title hover-title" id="what-not-to-ask">
- What Not To Ask
-
- <a href="#what-not-to-ask" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h2>
- <p class="uk-article-meta">
- Sample questions to avoid as much as possible.
- </p>
-
- <p class="uk-text-lead">
- Can I ask a question?
- </p>
- <p>
- Yes. Always yes. Just ask it.
- </p>
-
- <p class="uk-text-lead">
- Can I use str() on a discord.py Channel object?
- </p>
- <p>
- Try it yourself and see. Experimentation is a great way to learn, and you'll save a lot of time by
- just trying things out. Don't be afraid of your computer!
- </p>
-
- <p class="uk-text-lead">
- My code doesn't work
- </p>
- <p>
- This isn't a question, and it provides absolutely no context or information. Depending on the moods
- of the people that are around, you may even find yourself ignored. Don't be offended by this - just
- try
- again with a better question.
- </p>
- </article>
- </div>
- </div>
-
- <div class="uk-section uk-section-muted">
- <div class="uk-container uk-container-small uk-text-center">
- <blockquote>
- <p>
- <i class="fas fa-quote-left fa-pull-left"></i>
- <i class="fas fa-quote-right fa-pull-right"></i>
- So much of life isn’t about having the right answer; it’s about knowing the right question.
- </p>
- <small>
- Duane Hewitt
- </small>
- </blockquote>
- </div>
- </div>
-
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <p class="uk-text-lead">
- Can anyone help me break into someone's Facebook account?<br/>
- Can anyone help me download anime from this streaming site's listing page?<br/>
- How do I write a virus?
- </p>
- <p>
- We will absolutely not help you with hacking, pirating, or any other illegal activity. A question
- like this is likely to be followed up with a ban if the person asking it doesn't back down quickly.
- </p>
-
- <p class="uk-text-lead">
- Can I send you a private message?
- </p>
- <p>
- No. We do not provide one-on-one tutoring - you can hire someone locally if you really need that. We
- also prefer that questions are answered in a public channel as it means that everyone else present
- is able to learn from them. If you're working with code that you are unable to disclose for any
- reason, you should try to make your question more general and write a separate, small piece of code
- to illustrate your problem.
- </p>
-
- <p class="uk-text-lead">
- Can you help me over Teamviewer?
- </p>
- <p>
- No. We will not help you by accessing your computer remotely, or watching a video stream of your
- problem, unless the problem is something that inherently requires that. The reason for this is that
- our time is limited, and watching a video or participating in a screen-sharing session means that we
- have to focus on you, instead of being able to deal with other people while you're figuring out an
- answer. If your problem is graphical and you can't adequately describe it without a visual, take a
- screenshot or provide a short screen recording to illustrate your problem.
- </p>
- </article>
- </div>
- </div>
-{% endblock %} \ No newline at end of file
diff --git a/templates/main/info/index.html b/templates/main/info/index.html
deleted file mode 100644
index 07e1a4d8..00000000
--- a/templates/main/info/index.html
+++ /dev/null
@@ -1,43 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Information{% endblock %}
-{% block og_title %}Information{% endblock %}
-{% block og_description %}Informational pages, listings and guides{% endblock %}
-{% block content %}
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <h1 class="uk-article-title hover-title" id="top">
- Information
-
- <a href="#top" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <p class="uk-article-meta">
- What you need, when you need it
- </p>
-
- <p>
- <strong>Code Jams</strong> &nbsp;
- <a href="{{ url_for('main.info.jams') }}"><i class="fas fa-link"></i></a>
- <br />
- <span class="uk-text-meta">Information on our monthly code jams, where users are paired into teams to compete with each other</span>
- </p>
-
- <p>
- <strong>Getting Help</strong> &nbsp;
- <a href="{{ url_for('main.info.help') }}"><i class="fas fa-link"></i></a>
- <br />
- <span class="uk-text-meta">How to ask for help - and how to interpret the responses</span>
- </p>
-
- <p>
- <strong>Resources</strong> &nbsp;
- <a href="{{ url_for('main.info.resources') }}"><i class="fas fa-link"></i></a>
- <br />
- <span class="uk-text-meta">A page full of useful resources for learning and working with Python</span>
- </p>
- </article>
- </div>
- </div>
-{% endblock %} \ No newline at end of file
diff --git a/templates/main/info/resources.html b/templates/main/info/resources.html
deleted file mode 100644
index 574d0bfb..00000000
--- a/templates/main/info/resources.html
+++ /dev/null
@@ -1,103 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Resources{% endblock %}
-{% block og_title %}Resources{% endblock %}
-{% block og_description %}A list of helpful resources for beginner and experienced Python programmers alike{% endblock %}
-{% block content %}
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <h1 class="uk-article-title hover-title" id="top">
- Resources
-
- <a href="#top" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h1>
- <p class="uk-article-meta">
- Learn you a Haskell for great- wait, wrong book
- </p>
- <p>
- This page is intended to be a listing of useful resources for beginner and experienced Python
- programmers alike. This page is generated from a JSON file
- <a href="https://gitlab.com/python-discord/projects/site/blob/master/static/resources.json">on GitLab</a> -
- if there's a great resource that you love and you don't see it on this page, feel free to submit a
- merge request!
- </p>
- <p>
- Some resources aren't free - the below key will help you figure out whether you need to pay for
- a resource or not. You can also hover them for more information on the payment (or tap them on
- mobile).
- </p>
- <div class="uk-text-center uk-flex uk-flex-center">
- <div class="payment-icon">
- <img src="{{ static_file("images/payment_icons/green.svg") }}" uk-tooltip="Free" />
- <span>Free</span>
- </div>
-
- <div class="payment-icon">
- <img src="{{ static_file("images/payment_icons/yellow.svg") }}" uk-tooltip="Payment Optional" />
- <span>Payment optional</span>
- </div>
-
- <div class="payment-icon">
- <img src="{{ static_file("images/payment_icons/red.svg") }}" uk-tooltip="Paid" />
- <span>Paid</span>
- </div>
- </div>
- {% if categories is none %}
- <div class="uk-alert-danger" uk-alert>
- <p>
- We were unable to load the <code>resources.json</code> file. If you see this, please
- notify us!
- </p>
- </div>
- {% else %}
- {% for category_name, category_data in categories.items() %}
- <h2 class="uk-heading-divider hover-title" id="{{ category_name.replace(" ", "-").lower() }}">
- {{ category_name }}
-
- <a href="#{{ category_name.replace(" ", "-").lower() }}" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- <br/>
- <p class="uk-article-meta">
- {{ category_data.description }}
- </p>
- </h2>
- {% for item, data in category_data.resources.items() %}
- <p>
- {% if data["payment"] == "optional" %}
- {% set file_path = static_file("images/payment_icons/yellow.svg") %}
- {% elif data["payment"] == "paid" %}
- {% set file_path = static_file("images/payment_icons/red.svg") %}
- {% else %}
- {% set file_path = static_file("images/payment_icons/green.svg") %}
- {% endif %}
-
- {% if data["payment_description"] %}
- <img class="uk-float-left payment-description" uk-tooltip="{{ data["payment_description"] }}" src="{{ file_path }}" />
- {% else %}
- <img class="uk-float-left payment-description" uk-tooltip="{{ data["payment"].title() }}" src="{{ file_path }}" />
- {% endif %}
-
- <div class="resource-title">
- <strong>{{ item }}</strong> <br />
- <div class="uk-button-group">
- {% for url in data.urls %}
- <a class="uk-button uk-button-default uk-button-small"
- uk-tooltip="title: {{ url.title }}; pos: bottom"
- href="{{ url.url }}"><i class="{{ url.classes }}"></i></a>
- {% endfor %}
- </div>
- </div>
-
- <br class="uk-float-" />
- <span class="uk-text-meta">{{ data.description }}</span>
- </p>
- {% endfor %}
- {% endfor %}
- {% endif %}
- </article>
- </div>
- </div>
-{% endblock %} \ No newline at end of file
diff --git a/templates/main/jams/already.html b/templates/main/jams/already.html
deleted file mode 100644
index 16cba149..00000000
--- a/templates/main/jams/already.html
+++ /dev/null
@@ -1,26 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Code Jams | Already applied{% endblock %}
-{% block og_title %}Code Jams | Already applied{% endblock %}
-
-{% block content %}
-<div class="uk-section">
- <div class="uk-container uk-container-small">
- <h1 class="uk-header uk-article-title">
- Code Jam {{ jam.number }}: {{ jam.title }}
- </h1>
- <p class="uk-article-meta">
- Bring the thunder!
- </p>
-
- <p class="uk-alert uk-alert-danger">
- Thanks for your interest in this code jam! It looks like we already have an application here for you,
- so please just sit back, relax, and we'll let you know whether you've been selected for this code
- jam when the time comes.
- </p>
-
- <a class="uk-button uk-button-secondary uk-align-center" href="{{ url_for("main.jams.index") }}">
- <i class="uk-icon fa-fw far fa-arrow-left"></i> &nbsp;Back to all code jams
- </a>
- </div>
-</div>
-{% endblock %}
diff --git a/templates/main/jams/banned.html b/templates/main/jams/banned.html
deleted file mode 100644
index fa47c1ec..00000000
--- a/templates/main/jams/banned.html
+++ /dev/null
@@ -1,44 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Code Jams | Banned{% endblock %}
-{% block og_title %}Code Jams | Banned{% endblock %}
-
-{% block content %}
-<div class="uk-section">
- <div class="uk-container uk-container-small">
- <h1 class="uk-header uk-article-title">
- Code Jam {{ jam.number }}: {{ jam.title }}
- </h1>
- <p class="uk-article-meta">
- Bring the thunder!
- </p>
-
- {% if infraction.number == -1 %}
- <p class="uk-alert uk-alert-danger">
- Thanks for your interest in this code jam! Unfortunately, due to your previous actions, you have been
- permanently banned from participating in our code jams.
- <br />
- <br />
- The reason given is: <strong>{{ infraction.reason }}</strong>
- <br />
- <br />
- If you feel that this is a mistake, please feel free to contact one of the admins on Discord.
- </p>
- {% else %}
- <p class="uk-alert uk-alert-danger">
- Thanks for your interest in this code jam! Unfortunately, due to your previous actions, you have been
- temporarily banned from participating in our code jams.
- <br />
- <br />
- The reason given is: <strong>{{ infraction.reason }}</strong>
- <br />
- <br />
- If you feel that this is a mistake, please feel free to contact one of the admins on Discord.
- </p>
- {% endif %}
-
- <a class="uk-button uk-button-secondary uk-align-center" href="{{ url_for("main.jams.index") }}">
- <i class="uk-icon fa-fw far fa-arrow-left"></i> &nbsp;Back to all code jams
- </a>
- </div>
-</div>
-{% endblock %}
diff --git a/templates/main/jams/index.html b/templates/main/jams/index.html
deleted file mode 100644
index 3546bd71..00000000
--- a/templates/main/jams/index.html
+++ /dev/null
@@ -1,144 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Code Jams | Home{% endblock %}
-{% block og_title %}Code Jams | Home{% endblock %}
-{% block page_classes %}uses-rst{% endblock %}
-{% block content %}
-<div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <div uk-grid class="uk-grid-large">
- <div class="uk-width-expand">
- <h1 class="uk-article-title">
- Code Jams
- </h1>
- <p class="uk-article-meta">
- We jammin'
- </p>
-
- <p>
- Every three months or so, we aim to host a server-wide code jam, suitable for all members of the server. In
- these, we announce a theme and date in advance, and users may sign up via a link provided in the
- announcements channel on the server. Once the sign-up period is over, users are grouped into
- teams. On the day of the code jam, we announce a task - each team will then work on a solution
- to this task.
- </p>
- <p>
- Once the code jam is over, our staff team will review and test each submission. Once that's done,
- a winner will be decided!
- </p>
- <p>
- If you'd like to join one of our code jams, feel free to ask a member of staff about the next one.
- </p>
- </div>
-
- <figure class="jetbrains uk-width-1-4@l uk-width-1-4@m uk-width-1-1@s">
- <h1 class="uk-article-title">
- Sponsors
- </h1>
- <p class="uk-article-meta">
- Our generous benefactors
- </p>
-
- <a href="https://jetbrains.com">
- <img src="{{ static_file("images/jetbrains.png") }}" class="jam-image"/>
- </a>
- </figure>
- </div>
-
- <br />
- <a href="{{ url_for("wiki.page", page="jams") }}" class="uk-button uk-button-secondary">
- <i class="uk-icon fa-fw far fa-book"></i> &nbsp;Wiki
- </a>
- <a href="{{ url_for("wiki.page", page="jams") }}" class="uk-button uk-button-secondary">
- <i class="uk-icon fa-fw far fa-list"></i> &nbsp;Rules &amp; Guidelines
- </a>
- <a href="{{ url_for("main.jams.info") }}" class="uk-button uk-button-secondary">
- <i class="uk-icon fa-fw far fa-code-branch"></i> &nbsp;Git Primer
- </a>
-
- {% if jams %}
- {% for jam in jams %}
- <h1 class="uk-article-title">
- Code Jam {{ jam.number }}: {{ jam.title }}
- <span class="uk-float-right">
- {% if jam.state == "announced" %}
- {% if has_applied_to_jam(jam) %}
- <a class="uk-button uk-button-default uk-disabled" href="#">
- <i class="uk-icon fa-fw far fa-check"></i> &nbsp;Applied
- </a>
- {% else %}
- <a class="uk-button uk-button-primary" href="{{ url_for("main.jams.join", jam=jam.number) }}">
- <i class="uk-icon fa-fw far fa-plus"></i> &nbsp;Join
- </a>
- {% endif %}
- {% else %}
- {% if jam.teams and jam.teams | length > 0 %}
- <a class="uk-button uk-button-primary" href="{{ url_for('main.jams.jam_team_list', jam_id=jam.number) }}">
- <i class="uk-icon fa-fw far fa-users"></i> &nbsp;Teams
- </a>
- {% endif %}
- <a class="uk-button uk-button-default" target="_blank" href="{{ jam.repo }}">
- <i class="uk-icon fa-fw fab fa-gitlab"></i>
- </a>
- {% endif %}
- </span>
- <p class="uk-article-meta">
- State: {{ jam.state.title() }}
- </p>
- </h1>
- <div class="uk-grid-match uk-grid-small uk-text-center uk-grid-gap-none uk-grid-collapse jam-tiles uk-margin-small-top" uk-grid>
- <div class="uk-width-1-2@m uk-tile uk-tile-success uk-padding-small">
- <p class="uk-h4 jam-tile-text">Start: {{ format_datetime(jam.date_start) }} UTC</p>
- </div>
- <div class="uk-width-1-2@m uk-tile uk-tile-danger uk-padding-small">
- <p class="uk-h4 jam-tile-text">End: {{ format_datetime(jam.date_end) }} UTC</p>
- </div>
- {% if jam.participants %}
- {% if jam.winning_team %}
- <a href="{{ url_for('main.jams.jam_team_list', jam_id=jam.number) }}" class="uk-link-reset uk-width-1-2@m uk-tile uk-tile-primary uk-padding-small">
- <p class="uk-h4 jam-tile-text">Participants: {{ jam.participants | length }}</p>
- </a>
- <a href="{{ url_for('main.jams.team_view', team_id=jam.winning_team.id) }}" class="uk-link-reset uk-width-1-2@m uk-tile uk-tile-winner uk-padding-small">
- <p class="uk-h4 jam-tile-text">Champions: {{ jam.winning_team.name }}</p>
- </a>
- {% else %}
- <a href="{{ url_for('main.jams.jam_team_list', jam_id=jam.number) }}" class="uk-link-reset uk-width-1-1@m uk-tile uk-tile-primary uk-padding-small">
- <p class="uk-h4 jam-tile-text">Participants: {{ jam.participants | length }}</p>
- </a>
- {% endif %}
- {% endif %}
- </div>
- <p>
- {% if jam.state in ["running", "judging", "finished"] %}
- <span class="uk-label uk-align-right theme-label">
- Theme: {{ jam.theme }}
- </span>
- {% endif %}
- <p>
-
- </p>
-
- {{ jam.info_html | safe }}
-
- {% if jam.state in ["running", "judging", "finished"] %}
- <br />
-
- {{ jam.task_html | safe }}
- {% endif %}
-
- {% if jam.state == "finished" %}
- <br />
-
- {{ jam.end_html | safe }}
- {% endif %}
-
- {% endfor %}
- {% else %}
- <p>
- Looking for our code jams? There's nothing here just yet!
- </p>
- {% endif %}
- </article>
- </div>
-</div>
-{% endblock %}
diff --git a/templates/main/jams/info.html b/templates/main/jams/info.html
deleted file mode 100644
index 920256a6..00000000
--- a/templates/main/jams/info.html
+++ /dev/null
@@ -1,128 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Code Jams | Git Primer{% endblock %}
-{% block og_title %}Code Jams | Git Primer{% endblock %}
-{% block og_description %}Information about our code jams - monthly events where users are grouped into pairs to solve a Python task{% endblock %}
-{% block content %}
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <article class="uk-article">
- <h2 class="uk-article-title hover-title" id="getting-started">
- Getting Started
-
- <a href="#getting-started" class="uk-text-primary" title="Permanent link to this header">
- <i class="fas fa-paragraph" data-fa-transform="shrink-8"></i>
- </a>
- </h2>
- <p class="uk-article-meta">
- Git good - Dropbox bad
- </p>
- <p>
- All of our code jams happen on <a href="http://gitlab.com/">GitLab</a>. If you don't have an
- account there, you'll need to create one before you can join one of our code jams. Teams are required
- to fork the repository we have set up for the current code jam, commit their code to their fork, and
- then open a merge request with their project on the code jam repository.
- </p>
- <p>
- Once the challenge task has been announced, head to the link provided to reach the challenge repository.
- In order to work on the task, you will need to fork the repository - this will create a copy of the
- repository under your account, which you will be able to work on with your teammates. To do so,
- log into GitLab and click on the "Fork" button on the repository page. Select your username from the
- dialogue, and it will be forked to your account.
- </p>
- <figure>
- <img src="{{ static_file('images/jams/jams_1.png') }}" class="uk-align-center uk-border-rounded" />
- <img src="{{ static_file('images/jams/jams_2.png') }}" class="uk-align-center uk-border-rounded" />
- </figure>
- <p>
- Once this has been done, you should find yourself looking at your new copy of the repository. Next
- up, you'll need to give your teammates access to it! Click on the "Settings" tab, click on
- "Collaborators", enter your password if you're prompted for it, and add your teammates as
- collaborators.
- </p>
- <figure>
- <img src="{{ static_file('images/jams/jams_3.png') }}" class="uk-align-center uk-border-rounded" />
- <img src="{{ static_file('images/jams/jams_4.png') }}" class="uk-align-center uk-border-rounded" />
- <img src="{{ static_file('images/jams/jams_5.png') }}" class="uk-align-center uk-border-rounded" />
- </figure>
- <p>
- Now that you've set up your repository, it's time to install Git. If you're on Linux, you can
- install Git using your system's package manager. Windows users can install
- <a href="https://git-scm.com/download/win">Git for Windows</a>, and Mac users can install Git
- using <a href="https://brew.sh">Homebrew</a>. Once you're all installed, open up a terminal
- (or open Git Bash if you're on Windows). For the purpose of illustration we will be working on
- Windows, but this will work on any platform.
- </p>
- <p>
- We will use Git to clone the repository to the machine. Simply type <code>git clone &lt;url&gt;</code>
- and Git will download a copy of the repository. The URL is the same one you use to get to the
- repository page on GitLab. Use <code>cd project-name</code> to change directory to the repository.
- </p>
- <figure>
- <img src="{{ static_file('images/jams/jams_6.png') }}" class="uk-align-center uk-border-rounded" />
- </figure>
- <p>
- Now, open the newly-cloned repository in your favourite editor and make some edits. We'll be using
- <a href="https://code.visualstudio.com/">Visual Studio Code</a> in this example, but use whatever
- you prefer. For example, let's create a file named "hello.py", and add a line of code to it.
- </p>
- <figure>
- <img src="{{ static_file('images/jams/jams_7.png') }}" class="uk-align-center uk-border-rounded" />
- </figure>
- <p>
- Now that we've edited a file, we need to make Git aware of our changes. Head back over to your
- terminal, and type <code>git add hello.py</code> to add this file to our changeset.
- </p>
- <p>
- Next up, we'll need to bundle up our changes into a commit, and push it to GitLab. To do that, we'll
- use <code>git commit -am "message"</code>. Make sure you use a descriptive message explaining why
- you made your changes and what they are, but try to keep it to a single line of text if you can.
- Following this, we can use <code>git push origin master</code> to push our commit up to GitLab.
- </p>
- <figure>
- <img src="{{ static_file('images/jams/jams_8.png') }}" class="uk-align-center uk-border-rounded" />
- <img src="{{ static_file('images/jams/jams_9.png') }}" class="uk-align-center uk-border-rounded" />
- </figure>
- <p>
- In order to pull the latest version of the code when the repository was cloned earlier, we can
- simply use the <code>git pull</code> command. In order to illustrate this, we will need to enlist
- the help of our lovely assistant...
- </p>
- <figure>
- <img src="{{ static_file('images/jams/jams_10.png') }}" class="uk-align-center uk-border-rounded" />
- <img src="{{ static_file('images/jams/jams_11.png') }}" class="uk-align-center uk-border-rounded" />
- <img src="{{ static_file('images/jams/jams_12.png') }}" class="uk-align-center uk-border-rounded" />
- </figure>
- <p>
- Oh boy.
- </p>
- <p>
- Once you've pushed some code to the repository, you will notice a "Merge request" link. Click on
- that to create a merge request, which will let us know that you're working on the task and help us
- to keep track of things. Simply click on the "Create merge request" button on the next page, fill
- in the "Title" box with your team number - for example, "Team 1" - and click the big green
- button to finish.
- </p>
- <figure>
- <img src="{{ static_file('images/jams/jams_13.png') }}" class="uk-align-center uk-border-rounded" />
- <img src="{{ static_file('images/jams/jams_14.png') }}" class="uk-align-center uk-border-rounded" />
- <img src="{{ static_file('images/jams/jams_15.png') }}" class="uk-align-center uk-border-rounded" />
- <img src="{{ static_file('images/jams/jams_16.png') }}" class="uk-align-center uk-border-rounded" />
- </figure>
- <p>
- Now that your merge request has been created, keep working on your project! Code that you push to
- GitLab will automatically be added to your merge request in real-time. As the code jam continues on,
- you may find review comments waiting from us. These are just suggestions to help you improve as
- a programmer - free advice from us. Feel free to incorporate our suggestions into your project
- if you wish.
- </p>
- <figure>
- <img src="{{ static_file('images/jams/jams_17.png') }}" class="uk-align-center uk-border-rounded" />
- </figure>
- <p>
- That's all there is to it! Keep working at your task, do your best and you might just come out
- on top!
- </p>
- </article>
- </div>
- </div>
-{% endblock %} \ No newline at end of file
diff --git a/templates/main/jams/join.html b/templates/main/jams/join.html
deleted file mode 100644
index 4ff645b8..00000000
--- a/templates/main/jams/join.html
+++ /dev/null
@@ -1,362 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Code Jams | Join{% endblock %}
-{% block og_title %}Code Jams | Join{% endblock %}
-{% block page_classes %}uses-rst{% endblock %}
-
-{% macro show_question(question) %}
- <div id="div-{{ question.id }}">
- <div class="uk-form-label">
- {% if question.optional %}
- <label class="uk-form-label question-label" for="{{ question.id }}">
- <strong>{{ question.title }}</strong>
- <br />
- <span class="uk-text-meta">You may skip this question</span>
- </label>
- {% else %}
- <label class="uk-form-label question-label" for="{{ question.id }}">
- <strong>{{ question.title }}</strong>
- <br />
- <span class="uk-text-meta">This question is required</span>
- </label>
- {% endif %}
- </div>
- <div class="uk-form-controls uk-form-controls-text">
- {% if question.type == "checkbox" %}
- {% if question.optional %}
- <input class="uk-checkbox" type="checkbox" name="{{ question.id }}" id="{{ question.id }}">
- <label for="{{ question.id }}" class="checkbox-label">Confirm</label>
- {% else %}
- <input class="uk-checkbox" type="checkbox" name="{{ question.id }}" id="{{ question.id }}" required>
- <label for="{{ question.id }}" class="checkbox-label">Confirm</label>
- {% endif %}
-
- {% elif question.type == "email" %}
- {% if question.optional %}
- <input class="uk-input" type="email" name="{{ question.id }}" id="{{ question.id }}" placeholder="[email protected]">
- {% else %}
- <input class="uk-input" type="email" name="{{ question.id }}" id="{{ question.id }}" placeholder="[email protected]" required>
- {% endif %}
-
- {% elif question.type == "number" %}
- {% if question.optional %}
- <input class="uk-input" type="number" max="{{ question.data.max }}" min="{{ question.data.min }}" name="{{ question.id }}" id="{{ question.id }}" value="{{ question.data.min }}">
- {% else %}
- <input class="uk-input" type="number" max="{{ question.data.max }}" min="{{ question.data.min }}" name="{{ question.id }}" id="{{ question.id }}" value="{{ question.data.min }}" required>
- {% endif %}
-
- {% elif question.type == "radio" %}
- {% if question.optional %}
- {% for option in question.data.options %}
- <input class="uk-radio radio-{{ question.id }}" type="radio" name="{{ question.id }}" id="{{ question.id }}-{{ option }}" value="{{ option }}">
- <label class="radio-label" for="{{ question.id }}-{{ option }}">{{ option }}</label>
- {% endfor %}
- {% else %}
- {% for option in question.data.options %}
- <input class="uk-radio radio-{{ question.id }}" type="radio" name="{{ question.id }}" id="{{ question.id }}-{{ option }}" value="{{ option }}" required>
- <label class="radio-label" for="{{ question.id }}-{{ option }}">{{ option }}</label>
- {% endfor %}
- {% endif %}
-
- {% elif question.type == "range" %}
- <div class="uk-flex uk-flex-between">
- {% if question.optional %}
- {% for num in range(question.data.min, question.data.max + 1) %}
- <span>
- <input class="uk-radio radio-{{ question.id }}" type="radio" name="{{ question.id }}" id="{{ question.id }}-{{ num }}" value="{{ num }}">
- <label class="range-label" for="{{ question.id }}-{{ num }}">{{ num }}</label>
- </span>
- {% endfor %}
- {% else %}
- {% for num in range(question.data.min, question.data.max + 1) %}
- <span>
- <input class="uk-radio radio-{{ question.id }}" type="radio" name="{{ question.id }}" id="{{ question.id }}-{{ num }}" value="{{ num }}" required>
- <label class="range-label" for="{{ question.id }}-{{ num }}">{{ num }}</label>
- </span>
- {% endfor %}
- {% endif %}
- </div>
-
- {% elif question.type == "text" %}
- {% if question.optional %}
- <input class="uk-input" type="text" name="{{ question.id }}" id="{{ question.id }}">
- {% else %}
- <input class="uk-input" type="text" name="{{ question.id }}" id="{{ question.id }}" required>
- {% endif %}
-
- {% elif question.type == "textarea" %}
- {% if question.optional %}
- <textarea class="uk-input uk-textarea fira-code textarea" name="{{ question.id }}" id="{{ question.id }}"></textarea>
- {% else %}
- <textarea class="uk-input uk-textarea fira-code textarea" name="{{ question.id }}" id="{{ question.id }}" required></textarea>
- {% endif %}
-
- {% elif question.type == "slider" %}
- <div class="uk-flex uk-flex-between">
- <label class="uk-label slider-label" for="{{ question.id }}" id="{{ question.id }}-slider-value">{{ question.data.min }}</label>
- <input class="uk-range range-slider" name="{{ question.id }}" id="{{ question.id }}" min="{{ question.data.min }}" max="{{ question.data.max }}" step="1" value="{{ question.data.min }}" type="range">
- </div>
-
- {% endif %}
- </div>
- </div>
-{% endmacro %}
-
-{% block content %}
-<div class="uk-section">
- <div class="uk-container uk-container-small">
- <h1 class="uk-header uk-article-title">
- Code Jam {{ jam.number }}: {{ jam.title }}
- </h1>
- <p class="uk-article-meta">
- Bring the thunder!
- </p>
- <p>
- Please fill out the form below to apply for this code jam. Once you've submitted your application and the
- application window has closed, we'll review it and let you know whether you've been entered!
- </p>
- <p>
- Please note that you will not be able to edit your application after you've submitted it.
- </p>
- <hr class="uk-divider-icon" />
-
- {{ form.preamble_html | safe }}
-
- <hr class="uk-divider-icon" />
-
- {% if jam.state != "announced" %}
- <p class="uk-alert uk-alert-primary">
- Unfortunately, we're not accepting applications for this code jam right now - but we appreciate your
- interest. Keep an eye on <code>#announcements</code> on Discord for information on the next jam!
- </p>
- {% else %}
- <form action="{{ url_for("main.jams.join", jam=jam.number) }}" method="post" class="uk-form-horizontal uk-flex uk-flex-column">
- {% for question in questions %}
- {{ show_question(question) }}
- <br />
- {% endfor %}
- <br />
-
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
-
- <div class="uk-text-center">
- <a class="uk-button uk-button-default" href="{{ url_for("main.jams.index") }}">
- <i class="uk-icon fa-fw far fa-arrow-left"></i> &nbsp;Back
- </a>
- <button type="submit" class="uk-button uk-button-primary" name="submit" id="submit" disabled>
- <i class="uk-icon fa-fw far fa-check"></i> &nbsp;Apply
- </button>
- </div>
- </form>
-
- {% endif %}
- </div>
-</div>
-
-<script type="application/javascript">
- "use strict";
-
- // noinspection JSAnnotator (It thinks I'm not assigning this for some reason)
- const questions = {{ questions | tojson }};
- const button = document.getElementById("submit");
-
- function validateEmail(email) {
- let re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
- return re.test(String(email).toLowerCase());
- }
-
- function isNum(value) {
- return !isNaN(parseInt(value));
- }
-
- function checkInputs() {
- let input, inputs, div;
- let disabled = false;
-
- for (let question of questions) {
- div = document.getElementById("div-" + question.id);
-
- switch (question.type) {
- case "checkbox":
- if (!question.optional) {
- let input = document.getElementById(question.id);
-
- if (!input.checked) {
- disabled = true;
- div.classList.add("danger-input");
- } else {
- div.classList.remove("danger-input");
- }
- }
- break;
- case "email":
- input = document.getElementById(question.id);
-
- if (!question.optional || input.value.length > 0) {
- if (input.value.length < 5 || !validateEmail(input.value)) {
- disabled = true;
- div.classList.add("danger-input");
- } else {
- div.classList.remove("danger-input");
- }
- } else {
- div.classList.remove("danger-input");
- }
- break;
- case "number":
- input = document.getElementById(question.id);
-
- if (!question.optional || input.value.length > 0) {
- if (input.value.length < 1 || !isNum(input.value)) {
- disabled = true;
- div.classList.add("danger-input");
- } else {
- let val = parseInt(input.value);
-
- if (val < question.data.min || val > question.data.max) {
- disabled = true;
- div.classList.add("danger-input");
- } else {
- div.classList.remove("danger-input");
- }
- }
- }
- break;
- case "radio":
- if (! question.optional) {
- inputs = document.getElementsByClassName("radio-" + question.id);
- let selected = null;
-
- for (let inner of inputs) {
- if (inner.checked) {
- selected = inner;
- }
- }
-
- if (selected === null) {
- disabled = true;
- div.classList.add("danger-input");
- } else {
- div.classList.remove("danger-input");
- }
- }
-
- break;
- case "range":
- if (! question.optional) {
- inputs = document.getElementsByClassName("radio-" + question.id);
- let selected = null;
-
- for (let inner of inputs) {
- if (inner.checked) {
- selected = inner;
- }
- }
-
- if (selected === null) {
- disabled = true;
-
- div.classList.add("danger-input");
- } else {
- div.classList.remove("danger-input");
- }
- }
-
- break;
- case "text":
- if (!question.optional) {
- input = document.getElementById(question.id);
-
- if (input.value.length < 1) {
- disabled = true;
- div.classList.add("danger-input");
- } else {
- div.classList.remove("danger-input");
- }
- }
-
- break;
- case "textarea":
- if (!question.optional) {
- input = document.getElementById(question.id);
-
- if (input.value.length < 1) {
- disabled = true;
- div.classList.add("danger-input");
- } else {
- div.classList.remove("danger-input");
- }
- }
-
- break;
- case "slider":
- break;
- }
- }
-
- button.disabled = disabled;
- }
-
- function setUpChecks() {
- let input, inputs, label;
-
- for (let question of questions) {
- switch (question.type) {
- case "checkbox":
- input = document.getElementById(question.id);
- input.onchange = checkInputs;
-
- break;
- case "email":
- input = document.getElementById(question.id);
- input.oninput = checkInputs;
-
- break;
- case "number":
- input = document.getElementById(question.id);
- input.oninput = checkInputs;
- input.onchange = checkInputs;
-
- break;
- case "radio":
- inputs = document.getElementsByClassName("radio-" + question.id);
-
- for (let inner of inputs) {
- inner.onchange = checkInputs;
- }
-
- break;
- case "range":
- inputs = document.getElementsByClassName("radio-" + question.id);
-
- for (let inner of inputs) {
- inner.onchange = checkInputs;
- }
-
- break;
- case "text":
- input = document.getElementById(question.id);
- input.oninput = checkInputs;
-
- break;
- case "textarea":
- input = document.getElementById(question.id);
- input.oninput = checkInputs;
-
- break;
- case "slider":
- input = document.getElementById(question.id);
- label = document.getElementById(question.id + "-slider-value");
-
- input.oninput = function() {
- label.textContent = this.value;
- checkInputs();
- };
- break;
- }
- }
- }
-
- setUpChecks();
- checkInputs();
-</script>
-{% endblock %}
diff --git a/templates/main/jams/profile.html b/templates/main/jams/profile.html
deleted file mode 100644
index 40d22490..00000000
--- a/templates/main/jams/profile.html
+++ /dev/null
@@ -1,103 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Code Jams | My Profile{% endblock %}
-{% block og_title %}Code Jams | My Profile{% endblock %}
-
-{% block content %}
-<div class="uk-section">
- <div class="uk-container uk-container-small">
- <h1 class="uk-header uk-article-title">
- Code Jams: My Profile
- </h1>
-
- {% if done %}
- <p class="uk-alert uk-alert-success">
- Thanks - your data has been saved!
- </p>
- {% else %}
- <p class="uk-alert uk-alert-primary">
- Please make sure you've filled this out correctly, as we do use this data when evaluating your code jam
- application.
- <br />
- <br />
- You may come back here and edit your data at any time.
- </p>
- {% endif %}
-
- {% if form %}
- <form class="uk-form-horizontal" action="{{ url_for("main.jams.profile", form=form) }}" method="post">
- {% else %}
- <form class="uk-form-horizontal" action="{{ url_for("main.jams.profile") }}" method="post">
- {% endif %}
-
- <div>
- <div class="uk-form-label">
- <label class="uk-form-label" for="gitlab_username">GitLab Username</label>
- </div>
- <div class="uk-form-controls-text uk-form-controls">
- <input class="uk-input" type="text" name="gitlab_username" id="gitlab_username" value="{{ participant.gitlab_username }}" required>
- </div>
- </div>
- <div>
- <div class="uk-form-label">
- <label class="uk-form-label" for="timezone">Timezone</label>
- </div>
- <div class="uk-form-controls-text uk-form-controls">
- <input class="uk-input" type="text" name="timezone" id="timezone" value="{{ participant.timezone }}" required>
- </div>
- </div>
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
- <br />
-
- <div class="uk-text-center">
- <a class="uk-button uk-button-default" href="{{ url_for("main.jams.index") }}">
- <i class="uk-icon fa-fw far fa-arrow-left"></i> &nbsp;Back
- </a>
- <button type="submit" class="uk-button uk-button-primary" id="submit">
- <i class="uk-icon fa-fw far fa-check"></i> &nbsp;Save
- </button>
-
- {% if existing %}
- <a class="uk-button uk-button-danger" href="{{ url_for("main.jams.retract") }}">
- <i class="uk-icon fa-fw fas fa-bomb"></i> &nbsp;Delete
- </a>
- {% else %}
- <a class="uk-button uk-button-default uk-text-muted uk-link-muted cursor-default"
- uk-tooltip="title: You can't delete your profile because you haven't submitted one yet!; pos: bottom">
- <i class="uk-icon fa-fw fas fa-bomb"></i> &nbsp;Delete
- </a>
- {% endif %}
- </div>
- </form>
- </div>
-</div>
-
-
-
-<script type="application/javascript">
- const tz = moment().format("Z");
-
- const gitlab_input = document.getElementById("gitlab_username");
- const tz_input = document.getElementById("timezone");
-
- const submit_button = document.getElementById("submit");
-
- function checkInputs() {
- if (gitlab_input.value.length < 1)
- return submit_button.disabled = true;
-
- if (tz_input.value.length < 1)
- return submit_button.disabled = true;
-
- submit_button.disabled = false;
- }
-
- gitlab_input.oninput = checkInputs;
- tz_input.oninput = checkInputs;
-
- if (tz_input.value.length < 1) {
- document.getElementById("timezone").value = "UTC" + tz;
- }
-
- checkInputs();
-</script>
-{% endblock %}
diff --git a/templates/main/jams/retract.html b/templates/main/jams/retract.html
deleted file mode 100644
index e013337b..00000000
--- a/templates/main/jams/retract.html
+++ /dev/null
@@ -1,61 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Code Jams | Already applied{% endblock %}
-{% block og_title %}Code Jams | Already applied{% endblock %}
-
-{% block content %}
-<div class="uk-section">
- <div class="uk-container uk-container-small">
- <h1 class="uk-header uk-article-title">
- Code Jams: Retract Profile
- </h1>
-
- {% if participant %}
- <p>
- Are you sure you'd like to retract your code jam profile?
- </p>
-
- {% if banned %}
- <p>
- Retracting your code jam profile will remove your date of birth, GitLab username and timezone from our
- database. If you're entirely sure that you'd like to remove your profile, please click on the "Remove" button below.
- </p>
-
- <p>
- As you are currently taking part in a code jam,
- <strong class="uk-text-danger">this will void your application and you will receive an automatic ban from future code jams</strong>
- until you've contacted us about it.
- </p>
- {% else %}
- <p>
- Retracting your code jam profile will remove your date of birth, GitLab username and timezone from our
- database. If you're entirely sure that you'd like to remove your profile, please click on the "Remove" button below.
- </p>
-
- <p>
- As you are not currently taking part in an ongoing code jam,
- <strong class="uk-text-primary">you will not be banned from future code jams</strong>.
- </p>
- {% endif %}
-
- <form action="{{ url_for("main.jams.retract") }}" method="post" class="uk-form uk-text-center" uk-form>
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
-
- <a class="uk-button uk-button-primary" href="{{ url_for("main.jams.profile") }}">
- <i class="uk-icon fa-fw far fa-arrow-left"></i> &nbsp;Cancel
- </a>
- <button class="uk-button uk-button-danger" type="submit">
- <i class="uk-icon fa-fw fas fa-bomb"></i> &nbsp;Remove
- </button>
- </form>
- {% else %}
- <p class="uk-alert uk-alert-danger">
- You can't delete your profile - you haven't submitted one to us yet!
- </p>
-
- <a class="uk-button uk-button-secondary uk-width-1-1" href="{{ url_for("main.jams.profile") }}">
- <i class="uk-icon fa-fw far fa-arrow-left"></i> &nbsp;Back
- </a>
- {% endif %}
- </div>
-</div>
-{% endblock %}
diff --git a/templates/main/jams/retracted.html b/templates/main/jams/retracted.html
deleted file mode 100644
index b67b6497..00000000
--- a/templates/main/jams/retracted.html
+++ /dev/null
@@ -1,31 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Code Jams | Already applied{% endblock %}
-{% block og_title %}Code Jams | Already applied{% endblock %}
-
-{% block content %}
-<div class="uk-section">
- <div class="uk-container uk-container-small">
- <h1 class="uk-header uk-article-title">
- Code Jams: Profile Retracted
- </h1>
-
- {% if banned %}
- <p>
- Your code jam profile has been deleted. As you were participating in an ongoing code jam, you have
- been issued with an automatic ban from future code jams. If you'd like to join a code jam in the
- future, please contact us directly and we'll try to resolve the situation with you. Thanks for your
- interest in our code jams regardless!
- </p>
- {% else %}
- <p>
- Your code jam profile has been deleted. you were not participating in an ongoing code jam, no further
- action is required by you. Thanks for your interest in our code jams regardless!
- </p>
- {% endif %}
-
- <a class="uk-button uk-button-secondary uk-width-1-1" href="{{ url_for("main.jams.index") }}">
- <i class="uk-icon fa-fw far fa-arrow-left"></i> &nbsp;Back to code jams
- </a>
- </div>
-</div>
-{% endblock %}
diff --git a/templates/main/jams/team_list.html b/templates/main/jams/team_list.html
deleted file mode 100644
index 75c48337..00000000
--- a/templates/main/jams/team_list.html
+++ /dev/null
@@ -1,106 +0,0 @@
-{% extends "main/base.html" %}
-
-{% block title %}
- {% if user_teams %}
- Code Jams | My Teams
- {% else %}
- Code Jams | Code Jam {{ jam.number }} Teams
- {% endif %}
-{% endblock %}
-{% block og_title %}
- {% if user_teams %}
- Code Jams | My Teams
- {% else %}
- Code Jams | Code Jam {{ jam.number }} Teams
- {% endif %}
-{% endblock %}
-
-{% block page_classes %}jam-team-list{% endblock %}
-
-{% block content %}
- <div class="uk-section">
- <div class="uk-container">
- <h1 class="uk-header uk-article-title uk-heading-divider">
- {% if user_teams %}
- Code Jams: My Teams
- {% else %}
- Code Jam {{ jam.number }}: Teams
- {% endif %}
- </h1>
- {% if not user_teams %}
- <p>
- <a id="back" class="uk-button uk-button-default" href="{{ url_for("main.jams.index") }}">
- <i class="uk-icon fa-fw far fa-arrow-left"></i> &nbsp;All Jams
- </a>
- </p>
- {% endif %}
- {% if teams %}
- <div class="uk-flex uk-flex-row uk-flex-wrap uk-flex-center team-list-cards">
- {% for team in teams %}
- <div class="uk-card uk-card-default uk-margin-small-bottom uk-margin-small-right uk-margin-small-top uk-margin-small-left
- {% if not user_teams %}
- {% if logged_in and user.user_id in member_ids(team.members) %}
- team-card-own
- {% endif %}
- {% if jam.winning_team and jam.winning_team == team.id %}
- team-card-winner
- {% endif %}
- {% endif %}
- ">
- <div class="uk-card-body">
- <div class="uk-card-title">
- {% if not user_teams %}
- {% if logged_in and user.user_id in member_ids(team.members) %}
- <i class="uk-icon fa-fw far fa-user team-badge-own" uk-tooltip="Your Team"></i>
- {% endif %}
- {% if jam.winning_team and jam.winning_team == team.id %}
- <i class="uk-icon fa-fw far fa-trophy team-badge-winner" uk-tooltip="Champions"></i>
- {% endif %}
- {% endif %}
- Team <strong>{{ team.name }}</strong>
- {% if user_teams %}
- <p class="uk-article-meta team-subtitle">
- Code Jam {{ team.jam.number }}
- </p>
- {% endif %}
- </div>
- <div class="team-member-avatars">
- {% for member in team.members %}
- <a href="https://discordapp.com/users/{{ member.user_id }}"
- title="{{ member.username }}#{{ member.discriminator }}"
- target="_blank"
- class="team-member-avatar-link">
- <img src="{{ member.avatar }}" class="team-member-avatar uk-border-circle"/>
- </a>
- {% endfor %}
- </div>
- <div class="team-links">
- <a href="{{ url_for('main.jams.team_view', team_id=team.id) }}"
- class="uk-button uk-button-primary">
- <i class="uk-icon fa-fw far fa-eye"></i> &nbsp;View
- </a>
- {% if team.repo %}
- <a href="https://gitlab.com/{{ team.repo }}" target="_blank"
- class="uk-button uk-button-default">
- <i class="uk-icon fa-fw fab fa-gitlab"></i>
- </a>
- {% else %}
- <a href="#" target="_blank" class="uk-button uk-button-darkish uk-disabled">
- <i class="uk-icon fa-fw fab fa-gitlab"></i>
- </a>
- {% endif %}
- </div>
- </div>
- </div>
- {% endfor %}
- </div>
- {% else %}
- {% if user_teams %}
- <p>You are not part of any team.</p>
- {% else %}
- <p>There are no teams in this jam.</p>
- {% endif %}
- {% endif %}
- </div>
- </div>
-{% endblock %}
diff --git a/templates/main/jams/team_view.html b/templates/main/jams/team_view.html
deleted file mode 100644
index 0554c3d4..00000000
--- a/templates/main/jams/team_view.html
+++ /dev/null
@@ -1,291 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Team {{ team.name }}{% endblock %}
-{% block og_title %}Team {{ team.name }}{% endblock %}
-
-{% block page_classes %}jam-team-view{% endblock %}
-
-{% block content %}
- <div class="uk-section">
- <div class="uk-container uk-container-small">
- <h1 class="uk-header uk-article-title">
- Team <strong>{{ team.name }}</strong>
- </h1>
- <p class="uk-article-meta">
- Code Jam {{ team.jam.number }}
- </p>
- <p>
- <a href="{{ url_for('main.jams.jam_team_list', jam_id=team.jam.number) }}"
- class="uk-button uk-button-default">
- <i class="uk-icon fa-fw far fa-users"></i> &nbsp;Competing Teams
- </a>
- {% if logged_in %}
- <a href="{{ url_for('main.jams.user_team_list') }}"
- class="uk-button uk-button-default">
- <i class="uk-icon fa-fw far fa-user"></i> &nbsp;My Teams
- </a>
- {% endif %}
- </p>
-
- <div class="uk-grid">
- <div class="uk-width-1-2@m">
- <h2>
- Team Members
- </h2>
- <div class="participant-card-list">
- {% for member in team.members %}
- <div class="participant-card uk-card-default">
- <a href="https://discordapp.com/users/{{ member.user_id }}" target="_blank"
- class="participant-avatar-link">
- <img src="{{ member.avatar }}" class="uk-border-circle participant-avatar">
- </a>
- <strong>{{ member.username }}#{{ member.discriminator }}</strong>
- <div class="participant-links">
- <a href="https://gitlab.com/{{ member.gitlab_username }}" target="_blank"
- class="uk-button uk-button-default">
- <i class="uk-icon fa-fw fab fa-gitlab"></i>
- </a>
- </div>
- </div>
- {% endfor %}
- </div>
- </div>
- <div class="uk-width-1-2@m">
- <h2>
- Activity
- </h2>
- <p>
- {% if team.repo %}
- <a href="https://gitlab.com/{{ team.repo }}" target="_blank"
- class="uk-button uk-button-primary">
- <i class="uk-icon fa-fw fab fa-gitlab"></i> &nbsp;View on GitLab
- </a>
- {% else %}
- <a href="https://gitlab.com/{{ team.repo }}" target="_blank" id="view-repo-button"
- class="uk-button uk-button-darkish uk-disabled">
- <i class="uk-icon fa-fw fab fa-gitlab"></i> &nbsp;View on GitLab
- </a>
- {% endif %}
- {% if is_own_team %}
- <a class="uk-button uk-button-default" id="edit-repo-button">
- <i class="uk-icon fa-fw far fa-pencil"></i>
- </a>
- {% endif %}
- </p>
- <div id="gitlab-activity" class="gitlab-activity uk-card-default
- {% if not team.repo %}
- uk-hidden
- {% endif %}
- ">
- <div id="gitlab-activity-loading" class="gitlab-activity-loading">
- <div class="gitlab-activity-loading-content">
- <p>
- Loading GitLab activity, hang tight...
- </p>
- <div uk-spinner class="gitlab-activity-spinner"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- {% if is_own_team %}
- <div id="repo-modal" class="uk-flex-top" uk-modal>
- <div class="uk-modal-dialog">
- <button class="uk-modal-close-default" type="button" uk-close></button>
-
- <div class="uk-modal-header">
- <h2 class="uk-modal-title">Edit Repository</h2>
- </div>
- <form>
- <input type="hidden" name="csrf_token" id="csrf_token" value="{{ csrf_token() }}"/>
- <div class="uk-modal-body">
- <p>
- Enter your team's GitLab repository URL in the field below.
- </p>
- <p>
- Note: it should be a fork of the jam's GitLab repository
- (<strong>{{ team.jam.repo }}</strong>).
- </p>
- <div class="uk-form-horizontal">
- <div>
- <div class="uk-form-label">
- <label class="uk-form-label" for="repo-url">Repository URL</label>
- </div>
-
- <div class="uk-form-controls uk-form-controls-text">
- <input class="uk-input" type="text" name="repo-url" id="repo-url"
- value="https://gitlab.com/{{ team.repo }}" required>
- </div>
- </div>
- </div>
- </div>
-
- <div class="uk-modal-footer">
- <div class="uk-text-center">
- <button class="uk-button uk-button-default uk-modal-close" type="button" id="repo-cancel">
- <i class="uk-icon fa-fw far fa-arrow-left"></i> &nbsp;Cancel
- </button>
- <a class="uk-button uk-button-primary" id="repo-submit">
- <i class="uk-icon fa-fw far fa-check"></i> &nbsp;Save
- </a>
- </div>
- </div>
- </form>
- </div>
- </div>
- {% endif %}
- <script type="application/javascript">
- "use strict";
-
- {% if is_own_team %}
- /* Modal */
-
- const csrf_token = "{{ csrf_token() }}";
- const repo_edit_target = "{{ url_for('main.jams.team.edit_repo', team_id=team.id) }}";
- const repo_modal = UIkit.modal(document.getElementById("repo-modal"));
- const repo_cancel = document.getElementById("repo-cancel");
- const repo_submit = document.getElementById("repo-submit");
- const repo_url = document.getElementById("repo-url");
- const repo_edit_button = document.getElementById("edit-repo-button");
-
- repo_cancel.onclick = function () {
- repo_modal.hide();
- };
-
- repo_edit_button.onclick = () => {
- repo_modal.show();
- };
-
- function editTeamRepoURL(repo, callback) {
- $.ajax(repo_edit_target, {
- "data": {"repo_url": repo},
- "dataType": "json",
- "headers": {"X-CSRFToken": csrf_token},
- "method": "POST",
- }).done(data => {
- if ("error_code" in data) {
- return callback(false, data);
- }
-
- return callback(true, data);
- }).fail((xhr) => callback(false, xhr["responseJSON"]));
- }
-
- repo_submit.onclick = () => {
- repo_submit.classList.add("uk-disabled");
- let repo = repo_url.value;
- editTeamRepoURL(repo, (success, data) => {
- repo_submit.classList.remove("uk-disabled");
- if (success) {
- UIkit.notification({
- "message": "Edited repository successfully",
- "status": "success",
- "pos": "bottom-center",
- "timeout": 5000,
- });
-
- GITLAB_PROJECT_ID = data["project_path"];
- repo_modal.hide();
- resetGitLabActivity();
- } else {
- console.log(data);
- let message = (data && "error_message" in data) ? `Failed: ${data["error_message"]}` : "Failed to edit repository.";
- UIkit.notification({
- "message": message,
- "status": "danger",
- "pos": "bottom-center",
- "timeout": 5000
- });
- }
- });
- };
-
- {% endif %}
-
-
- /* GitLab activity */
-
- function resetGitLabActivity() {
- $("#gitlab-activity-events").remove();
- $("#gitlab-activity-loading").show();
- $("#gitlab-activity").removeClass("uk-hidden");
- $("#view-repo-button").attr("href", `https://gitlab.com/${GITLAB_PROJECT_ID}`)
- .removeClass("uk-button-darkish")
- .removeClass("uk-disabled")
- .addClass("uk-button-primary");
- loadGitLabActivity();
- }
-
- let GITLAB_PROJECT_ID = "{{ team.repo }}"; // the gitlab project id
- function loadGitLabActivity() {
- const GITLAB_EVENT_ACTIONS = ["pushed"]; // the actions to filter in the event list
- const JAM_START_DATE = "{{ day_delta(team.jam.date_start, -1).strftime("%Y-%m-%d") }}"; // the start date of the jam, in order to ignore pushes prior to start
- const JAM_END_DATE = "{{ day_delta(team.jam.date_end, +1).strftime("%Y-%m-%d") }}"; // the end date of the jam, in order to ignore pushes after the end
- const GITLAB_PROJECT_EVENTS_ENDPOINT = () => `https://gitlab.com/api/v4/projects/${encodeURIComponent(GITLAB_PROJECT_ID)}/events?action=${GITLAB_EVENT_ACTIONS.join(",")}&after=${JAM_START_DATE}&before=${JAM_END_DATE}`;
- const GITLAB_ACCEPTED_ACTIONS = ["pushed", "created"];
-
- function gitlabBranchURL(branch) {
- return `https://gitlab.com/${GITLAB_PROJECT_ID}/tree/${branch}`
- }
-
- function gitlabCommitURL(commit) {
- return `https://gitlab.com/${GITLAB_PROJECT_ID}/commit/${commit}`
- }
-
- function onEventsLoaded(events) {
- $("#gitlab-activity-loading").hide();
-
- let eventList = $("<div id=\"gitlab-activity-events\"></div>")
- .addClass("gitlab-activity-events");
-
- let eventCount = 0;
- for (let i = 0; i < events.length; i++) {
- let event = events[i];
- if (!GITLAB_ACCEPTED_ACTIONS.includes(event["push_data"]["action"])) {
- continue;
- }
- let commit = event["push_data"]["commit_to"];
- let branch = event["push_data"]["ref"];
- let eventDate = Date.parse(event["created_at"]);
- let eventElement = $(
- ""
- + "<div class=\"gitlab-activity-event-item\">"
- + "<div class=\"gitlab-activity-event-item-content\">"
- + `<span><strong>${event["author"]["username"]}</strong> pushed: "${event["push_data"]["commit_title"]}"</span>`
- + "<br>"
- + `<a target=\"blank\" href=\"${gitlabCommitURL(commit)}\" class=\"pasta\">${commit.substring(0, 8)}</a>`
- + `<a target=\"blank\" href=\"${gitlabBranchURL(branch)}\" class=\"pasta\"><i class="uk-icon fa-fw far fa-code-branch"></i> ${branch}</a>`
- + ``
- + "</div>"
- + "</div>"
- );
- eventList.append(eventElement);
- eventCount++;
- }
-
- let footerMessage = eventCount > 0 ? "We've reached the end!" : "There is no activity to show at this time.";
-
- // add the footer
- let eventListFooter = $(
- ""
- + "<div class=\"gitlab-activity-events-footer\">"
- + `<span>${footerMessage}</span>`
- + "</div>"
- ).appendTo(eventList);
-
- $("#gitlab-activity").append(eventList);
- }
-
- function onEventsFailed(xhr) {
- console.error(xhr);
- }
-
- $.get(
- GITLAB_PROJECT_EVENTS_ENDPOINT()
- ).done(onEventsLoaded).fail(onEventsFailed);
- }
-
- window.onload = loadGitLabActivity;
- </script>
-{% endblock %}
diff --git a/templates/main/jams/thanks.html b/templates/main/jams/thanks.html
deleted file mode 100644
index f123b227..00000000
--- a/templates/main/jams/thanks.html
+++ /dev/null
@@ -1,25 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}Code Jams | Thanks!{% endblock %}
-{% block og_title %}Code Jams | Thanks!{% endblock %}
-
-{% block content %}
-<div class="uk-section">
- <div class="uk-container uk-container-small">
- <h1 class="uk-header uk-article-title">
- Code Jam {{ jam.number }}: {{ jam.title }}
- </h1>
- <p class="uk-article-meta">
- Bring the thunder!
- </p>
-
- <p class="uk-alert uk-alert-success">
- Thanks for your application! Just sit back, relax, and we'll let you know whether you've been selected
- for this code jam when the time comes.
- </p>
-
- <a class="uk-button uk-button-secondary uk-align-center" href="{{ url_for("main.jams.index") }}">
- <i class="uk-icon fa-fw far fa-arrow-left"></i> &nbsp;Back to all code jams
- </a>
- </div>
-</div>
-{% endblock %}
diff --git a/templates/main/navigation.html b/templates/main/navigation.html
deleted file mode 100644
index a32ac1c1..00000000
--- a/templates/main/navigation.html
+++ /dev/null
@@ -1,165 +0,0 @@
-<style>
- .uk-navbar-nav:first-child {
- margin-left: -20px;
- }
-</style>
-<div class="uk-background-secondary uk-light" uk-sticky="sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky; animation: uk-animation-slide-top; top: 400; bottom: #animation">
- <nav data-uk-navbar class="uk-navbar-container uk-navbar-transparent" uk-navbar="boundary-align: true">
- <div class="uk-navbar-left uk-padding-remove-left">
- <a href="{{ url_for('main.index') }}" class="uk-navbar-item uk-logo uk-padding-remove-left">
- <img src="{{ static_file('logos/logo_banner.svg') }}" class="navbar-logo"/>
- </a>
- </div>
-
- <div class="uk-navbar-right">
- <ul class="uk-navbar-nav uk-visible@m">
- {% if current_page == "main.index" %}
- <li class="uk-active"><a href="{{ url_for('main.index') }}"><i class="uk-icon fas fa-home fa-fw"></i> &nbsp;Home</a></li>
- {% else %}
- <li><a href="{{ url_for('main.index') }}"><i class="uk-icon fas fa-home fa-fw"></i> &nbsp;Home</a></li>
- {% endif %}
-
- {% if current_page.startswith("wiki.") %}
- <li class="uk-active"><a href="{{ url_for('wiki.index') }}"><i class="uk-icon fas fa-book fa-fw"></i> &nbsp;Wiki</a></li>
- {% else %}
- <li><a href="{{ url_for('wiki.index') }}"><i class="uk-icon fas fa-book fa-fw"></i> &nbsp;Wiki</a></li>
- {% endif %}
-
- <li><a href="{{ url_for('main.invite') }}"><i class="uk-icon fab fa-discord fa-fw"></i> &nbsp;Discord</a></li>
- <li><a href="https://www.reddit.com/r/Python/" title="r/Python on Reddit"><i class="uk-icon fab fa-reddit-alien fa-fw"></i> &nbsp;Reddit</a></li>
-
- {% if is_staff() %}
- {% if current_page.startswith("staff.") %}
- <li class="uk-active"><a href="{{ url_for('staff.index') }}"><i class="uk-icon fas fa-wrench fa-fw"></i> &nbsp;Staff</a></li>
- {% else %}
- <li class=""><a href="{{ url_for('staff.index') }}"><i class="uk-icon fas fa-wrench fa-fw"></i> &nbsp;Staff</a></li>
- {% endif %}
- {% endif %}
- </ul>
- <ul class="uk-navbar-nav">
- <li>
- <a><i class="uk-icon fas fa-chevron-down"></i></a>
- <div class="uk-navbar-dropdown uk-background-secondary" uk-dropdown="pos: bottom-right">
- <ul class="uk-nav uk-navbar-dropdown-nav">
- <li class="uk-nav-header uk-hidden@m">Navigation</li>
-
- {% if current_page == "main.index" %}
- <li class="uk-nav-item uk-active uk-hidden@m"><a href="{{ url_for('main.index') }}"><i class="uk-icon fas fa-home fa-fw"></i> &nbsp;Home</a></li>
- {% else %}
- <li class="uk-nav-item uk-hidden@m"><a href="{{ url_for('main.index') }}"><i class="uk-icon fas fa-home fa-fw"></i> &nbsp;Home</a></li>
- {% endif %}
-
- {% if current_page.startswith("wiki.") %}
- <li class="uk-nav-item uk-active uk-hidden@m"><a href="{{ url_for('wiki.index') }}"><i class="uk-icon fas fa-book fa-fw"></i> &nbsp;Wiki</a></li>
- {% else %}
- <li class="uk-nav-item uk-hidden@m"><a href="{{ url_for('wiki.index') }}"><i class="uk-icon fas fa-book fa-fw"></i> &nbsp;Wiki</a></li>
- {% endif %}
-
- <li class="uk-nav-item uk-hidden@m"><a href="{{ url_for('main.invite') }}"><i class="uk-icon fab fa-discord fa-fw"></i> &nbsp;Discord</a></li>
- <li class="uk-nav-item uk-hidden@m"><a href="https://www.reddit.com/r/Python/" title="r/Python on Reddit"><i class="uk-icon fab fa-reddit-alien fa-fw"></i> &nbsp;Reddit</a></li>
-
- {% if is_staff() %}
- {% if current_page.startswith("staff.") %}
- <li class="uk-nav-item uk-active uk-hidden@m"><a href="{{ url_for('staff.index') }}"><i class="uk-icon fas fa-wrench fa-fw"></i> &nbsp;Staff</a></li>
- {% else %}
- <li class="uk-nav-item uk-hidden@m"><a href="{{ url_for('staff.index') }}"><i class="uk-icon fas fa-wrench fa-fw"></i> &nbsp;Staff</a></li>
- {% endif %}
- {% endif %}
- <li class="uk-nav-divider uk-hidden@m"></li>
-
- {% if not debug %}
- {% if logged_in %}
- <li class="uk-active"><a href="{{ url_for('main.logout') }}"><i class="uk-icon fas fa-unlock"></i> &nbsp;Logout</a></li>
- {% else %}
- <li class="uk-active"><a href="{{ url_for('discord.login') }}"><i class="uk-icon fas fa-lock"></i> &nbsp;Login with Discord</a></li>
- {% endif %}
- {% else %}
- <li class="uk-active"><a class="debug-mode-item"><i class="uk-icon fas fa-exclamation-triangle"></i> &nbsp;Debug mode</a></li>
- {% endif %}
-
- {% if current_page.startswith("main.info") %}
- <li class="uk-nav-header uk-active"><a href="{{ url_for('main.info.index') }}">Information</a></li>
- {% else %}
- <li class="uk-nav-header"><a href="{{ url_for('main.info.index') }}">Information</a></li>
- {% endif %}
-
- {% if current_page == "main.info.faq" %}
- <li class="uk-active"><a href="{{ url_for('main.info.faq') }}">FAQ</a></li>
- {% else %}
- <li><a href="{{ url_for('main.info.faq') }}">FAQ</a></li>
- {% endif %}
-
- {% if current_page == "main.info.help" %}
- <li class="uk-active"><a href="{{ url_for('main.info.help') }}">Getting Help</a></li>
- {% else %}
- <li><a href="{{ url_for('main.info.help') }}">Getting Help</a></li>
- {% endif %}
-
- {% if current_page == "main.info.resources" %}
- <li class="uk-active"><a href="{{ url_for('main.info.resources') }}">Resources</a></li>
- {% else %}
- <li><a href="{{ url_for('main.info.resources') }}">Resources</a></li>
- {% endif %}
-
- {% if current_page.startswith("main.about.") %}
- <li class="uk-nav-header uk-active"><a href="{{ url_for('main.about.index') }}">About</a></li>
- {% else %}
- <li class="uk-nav-header"><a href="{{ url_for('main.about.index') }}">About</a></li>
- {% endif %}
-
- {% if current_page == "main.about.channels" %}
- <li class="uk-active"><a href="{{ url_for('main.about.channels') }}">Channels</a></li>
- {% else %}
- <li><a href="{{ url_for('main.about.channels') }}">Channels</a></li>
- {% endif %}
-
- {% if current_page == "main.about.partners" %}
- <li class="uk-active"><a href="{{ url_for('main.about.partners') }}">Partners</a></li>
- {% else %}
- <li><a href="{{ url_for('main.about.partners') }}">Partners</a></li>
- {% endif %}
-
- {% if current_page == "main.about.rules" %}
- <li class="uk-active"><a href="{{ url_for('main.about.rules') }}">Server Rules</a></li>
- {% else %}
- <li><a href="{{ url_for('main.about.rules') }}">Server Rules</a></li>
- {% endif %}
-
- {% if current_page.startswith("main.jams") %}
- <li class="uk-nav-header uk-active"><a href="{{ url_for('main.jams.index') }}">Code Jams</a></li>
- {% else %}
- <li class="uk-nav-header"><a href="{{ url_for('main.jams.index') }}">Code Jams</a></li>
- {% endif %}
-
- {% if current_page == "main.jams.index" %}
- <li class="uk-active"><a href="{{ url_for('main.jams.index') }}">All Jams</a></li>
- {% else %}
- <li><a href="{{ url_for('main.jams.index') }}">All Jams</a></li>
- {% endif %}
-
- {% if current_page == "main.jams.profile" %}
- <li class="uk-active"><a href="{{ url_for('main.jams.profile') }}">My Profile</a></li>
- {% else %}
- <li><a href="{{ url_for('main.jams.profile') }}">My Profile</a></li>
- {% endif %}
-
- {% if current_page == "main.jams.user_team_list" %}
- <li class="uk-active"><a href="{{ url_for('main.jams.user_team_list') }}">My Teams</a></li>
- {% else %}
- <li><a href="{{ url_for('main.jams.user_team_list') }}">My Teams</a></li>
- {% endif %}
-
- <li class="uk-nav-divider"></li>
-
- {% if current_page.startswith("main.about.privacy") %}
- <li class="uk-active"><a href="{{ url_for('main.about.privacy') }}">Privacy</a></li>
- {% else %}
- <li><a href="{{ url_for('main.about.privacy') }}">Privacy</a></li>
- {% endif %}
- </ul>
- </div>
- </li>
- </ul>
- </div>
- </nav>
-</div>
diff --git a/templates/main/ws_test.html b/templates/main/ws_test.html
deleted file mode 100644
index 64a7dfc4..00000000
--- a/templates/main/ws_test.html
+++ /dev/null
@@ -1,26 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}WS Test{% endblock %}
-{% block og_title %}WS Test{% endblock %}
-{% block og_description %}A test page for our Websockets implementation{% endblock %}
-{% block content %}
- <div class="uk-container uk-section">
- <h1>Open your JS console to test</h1>
-
- <script type="application/javascript">
- let ws = new WebSocket("wss://api.{{ server_name }}/ws/echo");
-
- ws.onopen = function(event) {
- console.log("WS opened! Use send() to send a message.");
- };
-
- ws.onmessage = function (event) {
- console.log("<- " + event.data);
- };
-
- function send(text) {
- console.log("-> " + text);
- ws.send(text);
- }
- </script>
- </div>
-{% endblock %}
diff --git a/templates/main/ws_test_rst.html b/templates/main/ws_test_rst.html
deleted file mode 100644
index a0bae79b..00000000
--- a/templates/main/ws_test_rst.html
+++ /dev/null
@@ -1,39 +0,0 @@
-{% extends "main/base.html" %}
-{% block title %}WS Test{% endblock %}
-{% block og_title %}WS Test{% endblock %}
-{% block og_description %}A test page for our Websockets implementation{% endblock %}
-{% block content %}
- <div class="uk-container uk-section">
- <h1>Enter some text to test.</h1>
-
- <textarea title="RST Input" id="rst"></textarea>
- <input type="button" value="Submit" id="submit-button" />
-
- <br />
-
- <div id="output"></div>
-
- <script type="application/javascript">
- let ws = new WebSocket("wss://api.{{ server_name }}/ws/rst");
-
- ws.onopen = function(event) {
- console.log("WS opened! Use send() to send a message.");
- };
-
- ws.onmessage = function (event) {
- document.getElementById("output").innerHTML = event.data;
- };
-
- function send(text) {
- console.log("-> " + text);
- ws.send(text);
- }
-
- document.getElementById("submit-button").onclick = function() {
- send(
- document.getElementById("rst").value
- );
- }
- </script>
- </div>
-{% endblock %}