aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/home/urls.py1
-rw-r--r--pydis_site/apps/resources/__init__.py0
-rw-r--r--pydis_site/apps/resources/apps.py7
-rw-r--r--pydis_site/apps/resources/migrations/__init__.py0
-rw-r--r--pydis_site/apps/resources/tests/__init__.py0
-rw-r--r--pydis_site/apps/resources/tests/test_views.py10
-rw-r--r--pydis_site/apps/resources/urls.py8
-rw-r--r--pydis_site/apps/resources/views/__init__.py3
-rw-r--r--pydis_site/apps/resources/views/resources.py7
-rw-r--r--pydis_site/settings.py1
-rw-r--r--pydis_site/static/css/resources/resources.css29
-rw-r--r--pydis_site/templates/resources/resources.html90
12 files changed, 156 insertions, 0 deletions
diff --git a/pydis_site/apps/home/urls.py b/pydis_site/apps/home/urls.py
index c9d2935d..d7db6ff1 100644
--- a/pydis_site/apps/home/urls.py
+++ b/pydis_site/apps/home/urls.py
@@ -7,5 +7,6 @@ app_name = 'home'
urlpatterns = [
path('', HomeView.as_view(), name='home'),
path('admin/', admin.site.urls),
+ path('resources/', include('pydis_site.apps.resources.urls')),
path('events/', include('pydis_site.apps.events.urls', namespace='events')),
]
diff --git a/pydis_site/apps/resources/__init__.py b/pydis_site/apps/resources/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/pydis_site/apps/resources/__init__.py
diff --git a/pydis_site/apps/resources/apps.py b/pydis_site/apps/resources/apps.py
new file mode 100644
index 00000000..e0c235bd
--- /dev/null
+++ b/pydis_site/apps/resources/apps.py
@@ -0,0 +1,7 @@
+from django.apps import AppConfig
+
+
+class ResourcesConfig(AppConfig):
+ """AppConfig instance for Resources app."""
+
+ name = 'resources'
diff --git a/pydis_site/apps/resources/migrations/__init__.py b/pydis_site/apps/resources/migrations/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/pydis_site/apps/resources/migrations/__init__.py
diff --git a/pydis_site/apps/resources/tests/__init__.py b/pydis_site/apps/resources/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/pydis_site/apps/resources/tests/__init__.py
diff --git a/pydis_site/apps/resources/tests/test_views.py b/pydis_site/apps/resources/tests/test_views.py
new file mode 100644
index 00000000..497e9bfe
--- /dev/null
+++ b/pydis_site/apps/resources/tests/test_views.py
@@ -0,0 +1,10 @@
+from django.test import TestCase
+from django_hosts import reverse
+
+
+class TestResourcesView(TestCase):
+ def test_resources_index_200(self):
+ """Check does index of resources app return 200 HTTP response."""
+ url = reverse("resources:index")
+ response = self.client.get(url)
+ self.assertEqual(response.status_code, 200)
diff --git a/pydis_site/apps/resources/urls.py b/pydis_site/apps/resources/urls.py
new file mode 100644
index 00000000..c91e306e
--- /dev/null
+++ b/pydis_site/apps/resources/urls.py
@@ -0,0 +1,8 @@
+from django.urls import path
+
+from pydis_site.apps.resources import views
+
+app_name = "resources"
+urlpatterns = [
+ path("", views.ResourcesView.as_view(), name="index"),
+]
diff --git a/pydis_site/apps/resources/views/__init__.py b/pydis_site/apps/resources/views/__init__.py
new file mode 100644
index 00000000..f54118f2
--- /dev/null
+++ b/pydis_site/apps/resources/views/__init__.py
@@ -0,0 +1,3 @@
+from .resources import ResourcesView
+
+__all__ = ["ResourcesView"]
diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py
new file mode 100644
index 00000000..e770954b
--- /dev/null
+++ b/pydis_site/apps/resources/views/resources.py
@@ -0,0 +1,7 @@
+from django.views.generic import TemplateView
+
+
+class ResourcesView(TemplateView):
+ """View for resources index page."""
+
+ template_name = "resources/resources.html"
diff --git a/pydis_site/settings.py b/pydis_site/settings.py
index f86b04b3..a73ac463 100644
--- a/pydis_site/settings.py
+++ b/pydis_site/settings.py
@@ -83,6 +83,7 @@ INSTALLED_APPS = [
'pydis_site.apps.api',
'pydis_site.apps.home',
'pydis_site.apps.staff',
+ 'pydis_site.apps.resources',
'pydis_site.apps.events',
'django.contrib.admin',
diff --git a/pydis_site/static/css/resources/resources.css b/pydis_site/static/css/resources/resources.css
new file mode 100644
index 00000000..cf4cb472
--- /dev/null
+++ b/pydis_site/static/css/resources/resources.css
@@ -0,0 +1,29 @@
+.box, .tile.is-parent {
+ transition: 0.1s ease-out;
+}
+.box {
+ min-height: 15vh;
+}
+.tile.is-parent:hover .box {
+ box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
+}
+.tile.is-parent:hover {
+ padding: 0.65rem 0.85rem 0.85rem 0.65rem;
+ filter: saturate(1.1) brightness(1.1);
+}
+
+#readingBlock {
+ background-image: linear-gradient(141deg, #911eb4 0%, #b631de 71%, #cf4bf7 100%);
+}
+
+#interactiveBlock {
+ background-image: linear-gradient(141deg, #d05600 0%, #da722a 71%, #e68846 100%);
+}
+
+#communitiesBlock {
+ background-image: linear-gradient(141deg, #3b756f 0%, #3a847c 71%, #41948b 100%);
+}
+
+#podcastsBlock {
+ background-image: linear-gradient(141deg, #232382 0%, #30309c 71%, #4343ad 100%);
+}
diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html
new file mode 100644
index 00000000..6eb32c97
--- /dev/null
+++ b/pydis_site/templates/resources/resources.html
@@ -0,0 +1,90 @@
+{% extends 'base/base.html' %}
+{% load static %}
+
+{% block title %}Resources{% endblock %}
+{% block head %}
+ <link rel="stylesheet" href="{% static "css/resources/resources.css" %}">
+{% endblock %}
+
+{% block content %}
+ {% include "base/navbar.html" %}
+
+ <section class="section">
+ <div class="container">
+ <div class="content">
+ <h1>Resources</h1>
+
+ <div class="tile is-ancestor">
+ <a class="tile is-parent" href="/articles/category/guides">
+ <article class="tile is-child box hero is-primary is-bold">
+ <p class="title is-size-1"><i class="fad fa-info-circle" aria-hidden="true"></i> Guides</p>
+ <p class="subtitle is-size-4">Made by us, for you</p>
+ </article>
+ </a>
+
+ <div class="tile is-vertical is-9">
+ <div class="tile">
+ <a class="tile is-8 is-parent" href="/resources/reading/">
+ <article class="tile is-child box hero is-black" id="readingBlock">
+ <p class="title is-size-1"><i class="fad fa-book-alt" aria-hidden="true"></i> Read</p>
+ <p class="subtitle is-size-4">Lovingly curated books to explore</p>
+ </article>
+ </a>
+
+ <div class="tile">
+ <a class="tile is-parent" href="/resources/videos/">
+ <article class="tile is-child box hero is-danger is-bold">
+ <p class="title is-size-1"><i class="fad fa-video" aria-hidden="true"></i> Watch</p>
+ <p class="subtitle is-size-4">Visually engaging</p>
+ </article>
+ </a>
+ </div>
+ </div>
+
+ <div class="tile">
+ <a class="tile is-parent" href="/resources/interactive/">
+ <article class="tile is-child box hero is-black" id="interactiveBlock">
+ <p class="title is-size-1"><i class="fad fa-code" aria-hidden="true"></i> Try</p>
+ <p class="subtitle is-size-4">Interactively discover the possibilities</p>
+ </article>
+ </a>
+ <a class="tile is-8 is-parent" href="/resources/courses/">
+ <article class="tile is-child box hero is-success is-bold">
+ <p class="title is-size-1"><i class="fad fa-graduation-cap" aria-hidden="true"></i> Learn</p>
+ <p class="subtitle is-size-4">Structured courses with clear goals</p>
+ </article>
+ </a>
+ </div>
+ </div>
+ </div>
+
+ <div class="tile is-ancestor">
+ <div class="tile is-vertical is-9">
+ <div class="tile">
+ <a class="tile is-8 is-parent" href="/resources/communities/">
+ <article class="tile is-child box hero is-black" id="communitiesBlock">
+ <p class="title is-size-1"><i class="fad fa-users" aria-hidden="true"></i> Communities</p>
+ <p class="subtitle is-size-4">Some of our best friends</p>
+ </article>
+ </a>
+ <div class="tile">
+ <a class="tile is-parent" href="/resources/podcasts/">
+ <article class="tile is-child box hero is-black" id="podcastsBlock">
+ <p class="title is-size-1"><i class="fad fa-podcast" aria-hidden="true"></i> Listen</p>
+ <p class="subtitle is-size-4">Regular podcasts to follow</p>
+ </article>
+ </a>
+ </div>
+ </div>
+ </div>
+ <a class="tile is-parent" href="/resources/tools/">
+ <article class="tile is-child box hero is-dark">
+ <p class="title is-size-1"><i class="fad fa-tools" aria-hidden="true"></i> Tools</p>
+ <p class="subtitle is-size-4">Things we love to use</p>
+ </article>
+ </a>
+ </div>
+ </div>
+ </div>
+ </section>
+{% endblock %}