diff --git a/project/pages/views.py b/project/pages/views.py index 9ad1f5a..1842fa8 100644 --- a/project/pages/views.py +++ b/project/pages/views.py @@ -10,6 +10,11 @@ class IndexView(TemplateView): class NoJavascriptView(TemplateView): template_name = 'core/no-js.html' + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context['no_js_redirect'] = True + return context + class Custom404View(CustomHeaderBG.Template): template_name = 'core/404.html' diff --git a/templates/base.html b/templates/base.html index 6c4a93b..c660e24 100644 --- a/templates/base.html +++ b/templates/base.html @@ -35,10 +35,11 @@ - - + {% if not no_js_redirect %} + + {% endif %} diff --git a/templates/core/no-js.html b/templates/core/no-js.html index fc924b1..b1592df 100644 --- a/templates/core/no-js.html +++ b/templates/core/no-js.html @@ -1,72 +1,65 @@ +{% extends 'base.html' %} {% load staticfiles %} - - - - Javascript Disabled | TheOrangeOne - - - - - - -

Javascript is disabled!

-
-

You appear to have javascript disabled. For my site to function properly, javascript must be enabled! The javascript is used to dynamically change the webpage on your device. Without them then the site will break, cause a tonne of errors, and not look right, all of which aren't very nice, for you or me.

-

The javascript on this page won't damage your computer in any way, and has been written entirely by me, or has used trusted and open-source 3rd-party libraries. You can trust this site! Re-enabling the javascript functions inside your browser is very easy, and helpful tutorials can be found below!

-
-
-

Re-enabling Javascript in your browser

-
-
-

Re-enabling in Firefox

-
-
-
    -
  1. Navigate to 'about:config', using the browsers address bar.
  2. -
  3. Accept the security warning, and notice that no dragons lie ahead.
  4. -
  5. In the search bar, enter 'javascript'
  6. -
  7. Find the entry 'Javascript.enabled' (possibly using ctrl + F)
  8. -
  9. Toggle the entry by either double-clicking the entry, or right-clicking and selecting 'Toggle'.
  10. -
-
-
+{% block htmltitle %}Javascript is Disabled!{% endblock %} -
-
-

Re-enabling in Chrome

-
-
-
    -
  1. Click the Chrome menu icon () in the top right hand corder of the window.
  2. -
  3. Click 'Settings'.
  4. -
  5. Under the 'Privacy' section, select 'Content settings'.
  6. -
  7. Under 'Javascript', select 'Allow all sites to run Javascript(Recommended)'.
  8. -
-
+{% block content %} +

Javascript is disabled!

+
+

You appear to have javascript disabled. For my site to function properly, javascript must be enabled! The javascript is used to dynamically change the webpage on your device. Without them then the site will break, cause a tonne of errors, and not look right, all of which aren't very nice, for you or me.

+

The javascript on this page won't damage your computer in any way, and has been written entirely by me, or has used trusted and open-source 3rd-party libraries. You can trust this site! Re-enabling the javascript functions inside your browser is very easy, and helpful tutorials can be found below!

- -
-
-

Re-enabling in Internet Explorer

-
- +
+

Re-enabling Javascript in your browser

+
+
+

Re-enabling in Firefox

+
-
    -
  1. Select the gear icon in the top right hand corner , and click 'Internet Options'.
  2. -
  3. Select Security > Internet > Custom Level.
  4. -
  5. Scroll down until you find 'Scripting', and select 'Enable'
  6. -
-

- Also: If you are using Internet Explorer (Or Microsoft Edge for that matter), Stop! Use one of the other ones. They're much faster, and better, especially Firefox! -

+
    +
  1. Navigate to 'about:config', using the browsers address bar.
  2. +
  3. Accept the security warning, and notice that no dragons lie ahead.
  4. +
  5. In the search bar, enter 'javascript'
  6. +
  7. Find the entry 'Javascript.enabled' (possibly using ctrl + F)
  8. +
  9. Toggle the entry by either double-clicking the entry, or right-clicking and selecting 'Toggle'.
  10. +
+
+
+ +
+
+

Re-enabling in Chrome

+
+
+
    +
  1. Click the Chrome menu icon () in the top right hand corder of the window.
  2. +
  3. Click 'Settings'.
  4. +
  5. Under the 'Privacy' section, select 'Content settings'.
  6. +
  7. Under 'Javascript', select 'Allow all sites to run Javascript(Recommended)'.
  8. +
+
+
+ +
+
+

Re-enabling in Internet Explorer

+
+ +
+
    +
  1. Select the gear icon in the top right hand corner , and click 'Internet Options'.
  2. +
  3. Select Security > Internet > Custom Level.
  4. +
  5. Scroll down until you find 'Scripting', and select 'Enable'
  6. +
+

+ Also: If you are using Internet Explorer (Or Microsoft Edge for that matter), Stop! Use one of the other ones. They're much faster, and better, especially Firefox! +

+
-
-
-

- After enabling javascript, the page should automatically redirect to the homepage. If it doesn't, just refresh the page, or Click here. -

-
- - - \ No newline at end of file +
+

+ After enabling javascript, the page should automatically redirect to the homepage. If it doesn't, just refresh the page, or Click here. +

+
+ +{% endblock%} \ No newline at end of file