diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..34d80fd --- /dev/null +++ b/templates/base.html @@ -0,0 +1,16 @@ + + + + + + + + {% block head %}{% endblock %} + + + + {% include 'components/github_ribbon.html' %} + {% block content %}{% endblock %} + + + \ No newline at end of file diff --git a/templates/challenge.html b/templates/challenge.html index dea662c..21845ce 100644 --- a/templates/challenge.html +++ b/templates/challenge.html @@ -1,46 +1,138 @@ - - - +{% extends "base.html" %} + +{% block head %} + {{ super() }} + + - - - - - {% include 'github_ribbon.html' %} -
- -
-
-

Challenge - {{name}}

-

Python version: {{ python_info }}

+{% endblock %} + +{% block content %} +
+ + + + +
+ +
+
+ Challenge - {{ name }} + {%include 'components/badge.html' with context %} +
+

Complete code following the instructions below, so that there are no type errors throughout the test code except for those lines followed by a # expect-type-error comment. You don't need to implement the function, just add type annotations. Hit the "Run" button to see result.

-
-
-
+ +
+ +
+
+ +
+ +
+
+
+
-

Test cases

-
-
-
-

+ - +{% endblock %} \ No newline at end of file diff --git a/templates/components/badge.html b/templates/components/badge.html new file mode 100644 index 0000000..7cb5b02 --- /dev/null +++ b/templates/components/badge.html @@ -0,0 +1,36 @@ + + + + + + +
+ + + + {{ python_info }} +
\ No newline at end of file diff --git a/templates/challenge_list.html b/templates/components/challenge_list.html similarity index 67% rename from templates/challenge_list.html rename to templates/components/challenge_list.html index cb38724..11d6d82 100644 --- a/templates/challenge_list.html +++ b/templates/components/challenge_list.html @@ -1,21 +1,45 @@ + + +
Challenges -
    - Basic +
      + Basic {% for challenge in challenge_names | selectattr("difficulty", "equalto", "basic") %}
    1. {{ challenge.name }}
    2. {% endfor %}
      - Intermediate + + Intermediate {% for challenge in challenge_names | selectattr("difficulty", "equalto", "intermediate") %}
    3. {{ challenge.name }}
    4. {% endfor %}
      - Advanced + + Advanced {% for challenge in challenge_names | selectattr("difficulty", "equalto", "advanced") %}
    5. {{ challenge.name }}
    6. @@ -28,4 +52,4 @@
    7. {{ challenge.name }}
    8. {% endfor %}
    -
+ \ No newline at end of file diff --git a/templates/components/darkmode.html b/templates/components/darkmode.html new file mode 100644 index 0000000..e731443 --- /dev/null +++ b/templates/components/darkmode.html @@ -0,0 +1,67 @@ + + + + +
+ + + + + +
\ No newline at end of file diff --git a/templates/github_ribbon.html b/templates/components/github_ribbon.html similarity index 100% rename from templates/github_ribbon.html rename to templates/components/github_ribbon.html diff --git a/templates/index.html b/templates/index.html index 4c49986..18a6e9a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,21 +1,24 @@ - - - +{% endblock %} - -
-

Welcome to Python Type Challenges!

-
- {% include 'github_ribbon.html' %} {% include 'challenge_list.html' %} - +{% block content %} +
+

Welcome to Python Type Challenges!

+ {% include 'components/challenge_list.html' %} +
+{% endblock%} \ No newline at end of file