diff --git a/.trufflehog3.yml b/.trufflehog3.yml index b90d3acd6..bb2b31d49 100644 --- a/.trufflehog3.yml +++ b/.trufflehog3.yml @@ -10,6 +10,7 @@ exclude: # exclude matching issues - .ruff_cache - node_modules/** - .pytest_cache/** + - .idea/** - message: Examples and data necessary for running auto-tests paths: - docs/*.html diff --git a/app/categories/__init__.py b/app/categories/__init__.py index 963347911..c64a6b8d3 100644 --- a/app/categories/__init__.py +++ b/app/categories/__init__.py @@ -1,9 +1,11 @@ from flask import Blueprint from .domestic_abuse import bp as domestic_abuse_bp from .discrimination import bp as discrimination_bp +from .family import bp as family_bp bp = Blueprint("categories", __name__) bp.register_blueprint(domestic_abuse_bp) bp.register_blueprint(discrimination_bp) +bp.register_blueprint(family_bp) from app.categories import routes # noqa: E402,F401 diff --git a/app/categories/family/__init__.py b/app/categories/family/__init__.py new file mode 100644 index 000000000..5fc3ad082 --- /dev/null +++ b/app/categories/family/__init__.py @@ -0,0 +1,10 @@ +from flask import Blueprint + +bp = Blueprint( + "family", + __name__, + template_folder="./templates", + url_prefix="/family", +) + +from app.categories.family import routes # noqa: E402,F401 diff --git a/app/categories/family/routes.py b/app/categories/family/routes.py new file mode 100644 index 000000000..4c6209024 --- /dev/null +++ b/app/categories/family/routes.py @@ -0,0 +1,10 @@ +from app.categories.family import bp +from flask import render_template, url_for + + +@bp.route("") +def index(): + return render_template( + "categories/family.html", + back_link=url_for("categories.index"), + ) diff --git a/app/templates/categories/components/cannot-find-your-problem.html b/app/templates/categories/components/cannot-find-your-problem.html new file mode 100644 index 000000000..49cbd9532 --- /dev/null +++ b/app/templates/categories/components/cannot-find-your-problem.html @@ -0,0 +1,7 @@ +{%- from 'govuk_frontend_jinja/components/inset-text/macro.html' import govukInsetText -%} + +{% macro cannot_find_your_problem(category_name, next_steps_destination) %} +{{ govukInsetText({ + "html": "If you cannot find your problem: children, families, relationships" +}) }} +{% endmacro %} \ No newline at end of file diff --git a/app/templates/categories/family.html b/app/templates/categories/family.html new file mode 100644 index 000000000..34228aba7 --- /dev/null +++ b/app/templates/categories/family.html @@ -0,0 +1,71 @@ +{# This page was built as a prototype #} +{% extends "base.html" %} +{%- from 'govuk_frontend_jinja/components/back-link/macro.html' import govukBackLink -%} +{%- from 'govuk_frontend_jinja/components/exit-this-page/macro.html' import govukExitThisPage -%} +{%- from 'categories/components/list-item.html' import list_item, list_item_small -%} +{%- from 'categories/components/cannot-find-your-problem.html' import cannot_find_your_problem -%} + +{% block pageTitle %}Family - GOV.UK{% endblock %} + +{% block beforeContent%} + {{ super() }} + {{ govukBackLink({ + 'href': url_for('categories.index'), + 'text': "Back" + }) }} +{% endblock %} + +{% block content %} + + {{ super() }} + +