From 108034f1d20efbaf4a1329e67c396ddde3726db2 Mon Sep 17 00:00:00 2001 From: ludger Date: Thu, 11 Oct 2018 12:12:42 +0200 Subject: [PATCH] Fixing frontend/backend again --- backend/postings/static/postings/js/main.js | 8 +++++++- .../postings/templates/postings/frontend/base_page.html | 4 ++-- backend/postings/templates/postings/frontend/entity.html | 2 ++ .../postings/templates/postings/frontend/landing.html | 5 +++++ .../postings/templates/postings/frontend/results.html | 5 +++++ frontpage/js/main.js | 9 +++++++++ frontpage/rateables/js/main.js | 9 +++++++++ 7 files changed, 39 insertions(+), 3 deletions(-) diff --git a/backend/postings/static/postings/js/main.js b/backend/postings/static/postings/js/main.js index 771d39e..64bda14 100644 --- a/backend/postings/static/postings/js/main.js +++ b/backend/postings/static/postings/js/main.js @@ -99,5 +99,11 @@ $(function(){ ((''+month).length<2 ? '0' : '') + month + '/' + d.getFullYear(); $(".date").append(output); - + if ($('.landingpage').length > 0) { + $("body").addClass("box"); + }else if ($('.results').length > 0) { + $("body").addClass("box3"); + }else if ($('.entity').length > 0) { + $("body").addClass("box2"); + } }); \ No newline at end of file diff --git a/backend/postings/templates/postings/frontend/base_page.html b/backend/postings/templates/postings/frontend/base_page.html index 0bd4f60..4e6f40a 100644 --- a/backend/postings/templates/postings/frontend/base_page.html +++ b/backend/postings/templates/postings/frontend/base_page.html @@ -33,11 +33,11 @@ -
+ {% block content %} {# Fill in this block in child pages to display content for the page. #} {% endblock %} -
+ {# Javascript dependencies #} diff --git a/backend/postings/templates/postings/frontend/entity.html b/backend/postings/templates/postings/frontend/entity.html index 2303ce7..000ecdf 100644 --- a/backend/postings/templates/postings/frontend/entity.html +++ b/backend/postings/templates/postings/frontend/entity.html @@ -8,6 +8,7 @@ {% endblock %} {% block content %} +

{{ entity.name }} {{ entity.average }}

@@ -92,6 +93,7 @@
+ {% endblock %} {% block extra_js %} diff --git a/backend/postings/templates/postings/frontend/landing.html b/backend/postings/templates/postings/frontend/landing.html index c333292..f1b6bf1 100644 --- a/backend/postings/templates/postings/frontend/landing.html +++ b/backend/postings/templates/postings/frontend/landing.html @@ -6,6 +6,8 @@ {% endblock %} {% block content %} + +

Find rated courses

The best course reviews by your fellow students!

@@ -20,4 +22,7 @@
+
+ + {% endblock %} diff --git a/backend/postings/templates/postings/frontend/results.html b/backend/postings/templates/postings/frontend/results.html index dcdcab8..6649fee 100644 --- a/backend/postings/templates/postings/frontend/results.html +++ b/backend/postings/templates/postings/frontend/results.html @@ -5,6 +5,7 @@ {% endblock %} {% block content %} +
@@ -42,4 +43,8 @@ {% endif %}
+
+
+
+ {% endblock %} \ No newline at end of file diff --git a/frontpage/js/main.js b/frontpage/js/main.js index 771d39e..4afcb81 100644 --- a/frontpage/js/main.js +++ b/frontpage/js/main.js @@ -100,4 +100,13 @@ $(function(){ d.getFullYear(); $(".date").append(output); + if ($('.fullcontainer .landingpage')[0]) { + alert("yihaa"); + }else{ + alert("noo"); + } + if ($('.fullcontainer landingpage')[0]) { + alert("yihaa2"); + } + }); \ No newline at end of file diff --git a/frontpage/rateables/js/main.js b/frontpage/rateables/js/main.js index 771d39e..ac6a657 100644 --- a/frontpage/rateables/js/main.js +++ b/frontpage/rateables/js/main.js @@ -100,4 +100,13 @@ $(function(){ d.getFullYear(); $(".date").append(output); + + if ($('.fullcontainer .landingpage')[0]) { + alert("yihaa"); + }else{ + alert("noo"); + } + if ($('.fullcontainer landingpage')[0]) { + alert("yihaa2"); + } }); \ No newline at end of file