From b1c1b5b0bec07a15141577b8cc4939b9071b1d28 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Thu, 17 May 2018 14:33:56 +0100 Subject: Restructure code jams page layout --- templates/main/base.html | 6 +- templates/main/info/jams.html | 207 ---------------------------------------- templates/main/jams/index.html | 15 +++ templates/main/jams/info.html | 207 ++++++++++++++++++++++++++++++++++++++++ templates/main/jams/signup.html | 15 +++ templates/main/navigation.html | 40 +++++--- templates/wiki/base.html | 20 ++-- 7 files changed, 278 insertions(+), 232 deletions(-) delete mode 100644 templates/main/info/jams.html create mode 100644 templates/main/jams/index.html create mode 100644 templates/main/jams/info.html create mode 100644 templates/main/jams/signup.html (limited to 'templates') diff --git a/templates/main/base.html b/templates/main/base.html index cfe41099..9b25a724 100644 --- a/templates/main/base.html +++ b/templates/main/base.html @@ -28,14 +28,14 @@ {% endblock %} - - {% if current_page == "index" %} + + {% if current_page == "main.index" %}
{% else %}
{% endif %} {% include "main/navigation.html" %} - {% if current_page != "index" %} + {% if current_page != "main.index" %} {% block beta_error %}
diff --git a/templates/main/info/jams.html b/templates/main/info/jams.html deleted file mode 100644 index 99b325ab..00000000 --- a/templates/main/info/jams.html +++ /dev/null @@ -1,207 +0,0 @@ -{% extends "main/base.html" %} -{% block title %}Code Jams{% endblock %} -{% block og_title %}Code Jams{% 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 %} -
-
-
-
-
-

- Code Jams - - - - -

- - -

- 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. -

-

- Once the code jam is over, our staff team will review and test each submission. Once that's done, - a winner will be decided! -

-

- If you'd like to join one of our code jams, feel free to ask a member of staff about the next one. -

-
- -
-

- Sponsors -

- - - - - -
-
- -

- Rules and Guidelines - - - - -

- -

- In order to keep things fair and on-topic, the following rules must be adhered to. Failure to - follow these rules will result in disqualification. -

-
    -
  • - Projects must be strongly Python-oriented. - -
      -
    • You may mix in other languages, but the project must be Python-based.
    • -
    -
  • -
  • You may not write any code in advance.
  • -
  • You may not write any code after the deadline.
  • -
  • The work must be your own - don't copy another team's work.
  • -
-

- Additionally, the following suggestions could be helpful for all teams. -

-
    -
  • All team members should contribute to the project in some way. Work together!
  • -
  • Open your pull request early - that way, you know it'll be there by the deadline.
  • -
  • Lint your code - we lint each pull request using Flake8, and your code should validate.
  • -
  • Communicate with your teammates - Add them as a friend, start a group DM, and work together on the problem.
  • -
- -

- Getting Started - - - - -

- -

- All of our code jams happen on GitHub. 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 pull request with their project on the code jam repository. -

-

- 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 GitHub and click on the "Fork" button on the repository page. Select your username from the - dialogue, and it will be forked to your account. -

-
- - -
-

- 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. -

-
- - - -
-

- 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 - Git for Windows, and Mac users can install Git - using Homebrew. 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. -

-

- We will use Git to clone the repository to the machine. Simply type git clone <url> - and Git will download a copy of the repository. The URL is the same one you use to get to the - repository page on GitHub. Use cd project-name to change directory to the repository. -

-
- -
-

- Now, open the newly-cloned repository in your favourite editor and make some edits. We'll be using - Visual Studio Code 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. -

-
- -
-

- Now that we've edited a file, we need to make Git aware of our changes. Head back over to your - terminal, and type git add hello.py to add this file to our changeset. -

-

- Next up, we'll need to bundle up our changes into a commit, and push it to GitHub. To do that, we'll - use git commit -am "message". 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 git push origin master to push our commit up to GitHub. -

-
- - -
-

- In order to pull the latest version of the code when the repository was cloned earlier, we can - simply use the git pull command. In order to illustrate this, we will need to enlist - the help of our lovely assistant... -

-
- - - -
-

- Oh boy. -

-

- Once you've pushed some code to the repository, you will notice a "Pull request" link. Click on - that to create a pull 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 pull 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. -

-
- - - - -
-

- Now that your pull request has been created, keep working on your project! Code that you push to - GitHub will automatically be added to your pull 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. -

-
- -
-

- That's all there is to it! Keep working at your task, do your best and you might just come out - on top! -

-
-
-
-{% endblock %} \ No newline at end of file diff --git a/templates/main/jams/index.html b/templates/main/jams/index.html new file mode 100644 index 00000000..e1f7e56d --- /dev/null +++ b/templates/main/jams/index.html @@ -0,0 +1,15 @@ +{% extends "main/base.html" %} +{% block title %}Home{% endblock %} +{% block og_title %}Home{% endblock %} +{% block content %} +
+
+

+ Jams +

+ +
+
+{% endblock %} diff --git a/templates/main/jams/info.html b/templates/main/jams/info.html new file mode 100644 index 00000000..99b325ab --- /dev/null +++ b/templates/main/jams/info.html @@ -0,0 +1,207 @@ +{% extends "main/base.html" %} +{% block title %}Code Jams{% endblock %} +{% block og_title %}Code Jams{% 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 %} +
+
+
+
+
+

+ Code Jams + + + + +

+ + +

+ 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. +

+

+ Once the code jam is over, our staff team will review and test each submission. Once that's done, + a winner will be decided! +

+

+ If you'd like to join one of our code jams, feel free to ask a member of staff about the next one. +

+
+ +
+

+ Sponsors +

+ + + + + +
+
+ +

+ Rules and Guidelines + + + + +

+ +

+ In order to keep things fair and on-topic, the following rules must be adhered to. Failure to + follow these rules will result in disqualification. +

+
    +
  • + Projects must be strongly Python-oriented. + +
      +
    • You may mix in other languages, but the project must be Python-based.
    • +
    +
  • +
  • You may not write any code in advance.
  • +
  • You may not write any code after the deadline.
  • +
  • The work must be your own - don't copy another team's work.
  • +
+

+ Additionally, the following suggestions could be helpful for all teams. +

+
    +
  • All team members should contribute to the project in some way. Work together!
  • +
  • Open your pull request early - that way, you know it'll be there by the deadline.
  • +
  • Lint your code - we lint each pull request using Flake8, and your code should validate.
  • +
  • Communicate with your teammates - Add them as a friend, start a group DM, and work together on the problem.
  • +
+ +

+ Getting Started + + + + +

+ +

+ All of our code jams happen on GitHub. 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 pull request with their project on the code jam repository. +

+

+ 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 GitHub and click on the "Fork" button on the repository page. Select your username from the + dialogue, and it will be forked to your account. +

+
+ + +
+

+ 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. +

+
+ + + +
+

+ 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 + Git for Windows, and Mac users can install Git + using Homebrew. 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. +

+

+ We will use Git to clone the repository to the machine. Simply type git clone <url> + and Git will download a copy of the repository. The URL is the same one you use to get to the + repository page on GitHub. Use cd project-name to change directory to the repository. +

+
+ +
+

+ Now, open the newly-cloned repository in your favourite editor and make some edits. We'll be using + Visual Studio Code 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. +

+
+ +
+

+ Now that we've edited a file, we need to make Git aware of our changes. Head back over to your + terminal, and type git add hello.py to add this file to our changeset. +

+

+ Next up, we'll need to bundle up our changes into a commit, and push it to GitHub. To do that, we'll + use git commit -am "message". 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 git push origin master to push our commit up to GitHub. +

+
+ + +
+

+ In order to pull the latest version of the code when the repository was cloned earlier, we can + simply use the git pull command. In order to illustrate this, we will need to enlist + the help of our lovely assistant... +

+
+ + + +
+

+ Oh boy. +

+

+ Once you've pushed some code to the repository, you will notice a "Pull request" link. Click on + that to create a pull 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 pull 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. +

+
+ + + + +
+

+ Now that your pull request has been created, keep working on your project! Code that you push to + GitHub will automatically be added to your pull 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. +

+
+ +
+

+ That's all there is to it! Keep working at your task, do your best and you might just come out + on top! +

+
+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/main/jams/signup.html b/templates/main/jams/signup.html new file mode 100644 index 00000000..d363f3a3 --- /dev/null +++ b/templates/main/jams/signup.html @@ -0,0 +1,15 @@ +{% extends "main/base.html" %} +{% block title %}Home{% endblock %} +{% block og_title %}Home{% endblock %} +{% block content %} +
+
+

+ Signup +

+ +
+
+{% endblock %} diff --git a/templates/main/navigation.html b/templates/main/navigation.html index 8333fd18..d15b46f7 100644 --- a/templates/main/navigation.html +++ b/templates/main/navigation.html @@ -13,7 +13,7 @@