diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/main/jams/index.html | 122 | ||||
-rw-r--r-- | templates/staff/jams/edit_ending.html | 2 | ||||
-rw-r--r-- | templates/staff/jams/edit_info.html | 2 |
3 files changed, 72 insertions, 54 deletions
diff --git a/templates/main/jams/index.html b/templates/main/jams/index.html index 18a19003..a5d2a5d0 100644 --- a/templates/main/jams/index.html +++ b/templates/main/jams/index.html @@ -7,12 +7,8 @@ <article class="uk-article"> <div uk-grid class="uk-grid-large"> <div class="uk-width-expand"> - <h1 class="uk-article-title hover-title" id="top"> + <h1 class="uk-article-title"> Code Jams - - <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"> We jammin' @@ -43,61 +39,83 @@ </p> <a href="https://jetbrains.com"> - <img src="{{ static_file("images/jetbrains.png") }}" /> + <img src="{{ static_file("images/jetbrains.png") }}" style="max-width: 15rem;" /> </a> </figure> </div> - <h2 class="uk-article-title hover-title" id="rules"> - Rules and Guidelines + <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> 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> Rules & 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> Git Primer + </a> + + {% if jams %} + {% for jam in jams %} + <h1 class="uk-article-title uk-heading-divider"> + Code Jam {{ jam.number }}: {{ jam.title }} + <span class="uk-float-right"> + {% if jam.state == "announced" %} + <a class="uk-button uk-button-primary" target="_blank" href="{{ jam.repo }}"> + <i class="uk-icon fa-fw far fa-plus"></i> Join + </a> + {% else %} + <a class="uk-button uk-button-default" target="_blank" href="{{ jam.repo }}"> + <i class="uk-icon fa-fw fab fa-github"></i> Repository + </a> + {% endif %} + </span> + <p class="uk-article-meta"> + State: {{ jam.state.title() }} + </p> + </h1> + + <p> + {% if jam.participants %} + <span class="uk-label uk-label"> + {{ jam.participants | length }} participants + </span> + {% endif %} + <span class="uk-label uk-label-success"> + {{ format_datetime(jam.date_start) }} UTC + </span> + + <span style="vertical-align: middle"> + <i class="uk-icon fa-fw far fa-arrow-right" ></i> + </span> + + <span class="uk-label uk-label-danger"> + {{ format_datetime(jam.date_end) }} UTC + </span> + <p> + + </p> + + {{ jam.info_html | safe }} + + {% if jam.state in ["running", "judging", "finished"] %} + <br /> - <a href="#rules" 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"> - Keeping the fight clean - </p> - <p> - 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. - </p> - <ul> - <li> - Projects must be strongly Python-oriented. + {{ jam.task_html | safe }} + {% endif %} - <ul> - <li>You may mix in other languages, but the project must be Python-based.</li> - </ul> - </li> - <li>You may not write any code in advance.</li> - <li>You may not write any code after the deadline.</li> - <li>The work must be your own - don't copy another team's work.</li> - </ul> - <p> - Additionally, the following suggestions could be helpful for all teams. - </p> - <ul> - <li>All team members should contribute to the project in some way. Work together!</li> - <li>Open your pull request early - that way, you know it'll be there by the deadline.</li> - <li>Lint your code - we lint each pull request using Flake8, and your code should validate.</li> - <li>Communicate with your teammates - Add them as a friend, start a group DM, and work together on the problem.</li> - </ul> + {% if jam.state == "finished" %} + <br /> - <h2 class="uk-article-title hover-title" id="further-reading"> - Further Reading + {{ jam.end_html | safe }} + {% endif %} - <a href="#further-reading" 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"> - Need some support? - </p> - <p> - We're currently working on some better documentation for our code jams. In the meantime, you can always - read over our <a href="{{ url_for("main.jams.info") }}">old Getting Started guide</a>. - </p> + {% endfor %} + {% else %} + <p> + Looking for our code jams? There's nothing here just yet! + </p> + {% endif %} </article> </div> </div> diff --git a/templates/staff/jams/edit_ending.html b/templates/staff/jams/edit_ending.html index cc27a208..600ad6fc 100644 --- a/templates/staff/jams/edit_ending.html +++ b/templates/staff/jams/edit_ending.html @@ -19,7 +19,7 @@ <div id="editor" class="uk-textarea" style="resize: vertical; min-height: 15rem;">{{ jam.end_rst }}</div> </div> - <input type="hidden" name="end_rst" id="end_rst" /> + <input type="hidden" name="end_rst" id="end_rst" value="{{ jam.end_rst }}" /> </div> <input type="hidden" name="csrf_token" id="csrf_token" value="{{ csrf_token() }}"/> diff --git a/templates/staff/jams/edit_info.html b/templates/staff/jams/edit_info.html index 0dd2ff1b..31ee3168 100644 --- a/templates/staff/jams/edit_info.html +++ b/templates/staff/jams/edit_info.html @@ -34,7 +34,7 @@ <label class="uk-form-label"> Info (RST) <br /> - <span class="uk-text-meta">Will be available as soon as the jam state is "Running"</span> + <span class="uk-text-meta">Will be available as soon as the jam state is "Announced"</span> <br /> <br /> <button class="uk-button uk-button-secondary" type="button" id="preview-info-button"> |