diff --git a/templates/about.html b/templates/about.html new file mode 100644 index 0000000..e7b4146 --- /dev/null +++ b/templates/about.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% load static %} + +{% block title %}About{% endblock %} + +{% block content %} +

About

+{% endblock%} diff --git a/templates/base.html b/templates/base.html index c7895bc..671ad10 100644 --- a/templates/base.html +++ b/templates/base.html @@ -22,13 +22,13 @@ menu diff --git a/templates/nav-items.html b/templates/nav-items.html deleted file mode 100644 index 7c6686b..0000000 --- a/templates/nav-items.html +++ /dev/null @@ -1,3 +0,0 @@ -
  • Sass
  • -
  • Components
  • -
  • JavaScript
  • diff --git a/templates/navigation/index.html b/templates/navigation/index.html new file mode 100644 index 0000000..59e6e1d --- /dev/null +++ b/templates/navigation/index.html @@ -0,0 +1 @@ +{% include "navigation/item.html" with reverse="about" text="About" %} diff --git a/templates/navigation/item.html b/templates/navigation/item.html new file mode 100644 index 0000000..f129bba --- /dev/null +++ b/templates/navigation/item.html @@ -0,0 +1 @@ +
  • {{ text }}
  • diff --git a/website/common/tests.py b/website/common/tests.py index 79dc329..de6b1b7 100644 --- a/website/common/tests.py +++ b/website/common/tests.py @@ -14,3 +14,9 @@ class HomepageViewTestCase(BaseTestCase): def test_contains_view_name(self): response = self.client.get(reverse("homepage")) self.assertContains(response, '') + + +class AboutViewTestCase(BaseTestCase): + def test_accessible(self): + response = self.client.get(reverse("about")) + self.assertEqual(response.status_code, 200) diff --git a/website/common/urls.py b/website/common/urls.py index 78031a6..7352531 100644 --- a/website/common/urls.py +++ b/website/common/urls.py @@ -2,4 +2,7 @@ from django.urls import path from . import views -urlpatterns = [path("", views.HomepageView.as_view(), name="homepage")] +urlpatterns = [ + path("", views.HomepageView.as_view(), name="homepage"), + path("about/", views.AboutView.as_view(), name="about"), +] diff --git a/website/common/views.py b/website/common/views.py index eaf0583..155177b 100644 --- a/website/common/views.py +++ b/website/common/views.py @@ -3,3 +3,7 @@ from django.views.generic import TemplateView class HomepageView(TemplateView): template_name = "homepage.html" + + +class AboutView(TemplateView): + template_name = "about.html"