From 3606b86c028bf0dea6702a7f730712d5c32785b9 Mon Sep 17 00:00:00 2001 From: DerTyp187 Date: Wed, 10 Nov 2021 12:56:03 +0100 Subject: [PATCH] a-current a --- TealCode/main/static/main/css/style.css | 11 ++++-- TealCode/main/templates/main/base.html | 22 ++++++++--- TealCode/main/templates/main/category.html | 45 +++++++++------------- TealCode/main/templates/main/topic.html | 1 + TealCode/main/views.py | 3 +- 5 files changed, 45 insertions(+), 37 deletions(-) diff --git a/TealCode/main/static/main/css/style.css b/TealCode/main/static/main/css/style.css index 017dec2..4f2f4d1 100644 --- a/TealCode/main/static/main/css/style.css +++ b/TealCode/main/static/main/css/style.css @@ -34,14 +34,18 @@ body header div a{ padding-right: 30px; cursor:pointer; transition: 0.1s; - transition-timing-function: linear; + transition-timing-function: linear; + text-decoration: none; font-weight: bold; } +body header div .a-current{ + color:rgb(0, 255, 106); + text-decoration: underline; +} body header div a:hover{ - color:rgb(226, 4, 255); - + color:rgb(0, 255, 106); text-decoration: underline; } @@ -62,6 +66,7 @@ body main #main-content{ body main #main-content #main-headline h2{ text-align: center; letter-spacing: 2.5px; + text-transform: capitalize; } body main #main-content #main-content-code{ diff --git a/TealCode/main/templates/main/base.html b/TealCode/main/templates/main/base.html index 51ed92b..5e40b78 100644 --- a/TealCode/main/templates/main/base.html +++ b/TealCode/main/templates/main/base.html @@ -20,12 +20,12 @@

TealFire

- Python - C# - C++ - C - Java - JavaScript + Python + C# + C++ + C + Java + JavaScript
@@ -37,5 +37,15 @@ + + \ No newline at end of file diff --git a/TealCode/main/templates/main/category.html b/TealCode/main/templates/main/category.html index 7b1aaa7..8a7b45f 100644 --- a/TealCode/main/templates/main/category.html +++ b/TealCode/main/templates/main/category.html @@ -2,36 +2,27 @@ {% block content %}
+ {% if category_obj.title == "cs" %} +

C#

+ + {% else %}

{{ category_obj.title }}

+ {% endif %}
-
- -

How To 1 in c

-
-
- -

How To 1 in c

-
-
- -

How To 1 in c

-
-
- -

How To 1 in c

-
-
- -

How To 1 in c

-
-
- -

How To 1 in c

-
-
- -

How To 1 in c

+ {% for topic in topics %} +
+ +

{{ topic.title }}

+ {% endfor %} + +
+ + {% endblock content %} \ No newline at end of file diff --git a/TealCode/main/templates/main/topic.html b/TealCode/main/templates/main/topic.html index f7c69fe..0059e65 100644 --- a/TealCode/main/templates/main/topic.html +++ b/TealCode/main/templates/main/topic.html @@ -5,6 +5,7 @@
+
{{code}}
diff --git a/TealCode/main/views.py b/TealCode/main/views.py index 8bb1103..1be7aef 100644 --- a/TealCode/main/views.py +++ b/TealCode/main/views.py @@ -28,7 +28,8 @@ def category(req, category): if category: category_obj = Category.objects.filter(title = category).first() if category_obj: - return render(req, "main/category.html", {'category_obj': category_obj}) + topics_obj = Topic.objects.filter(category=category_obj) + return render(req, "main/category.html", {'category_obj': category_obj, 'topics': topics_obj}) return redirect("main-index")