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() }} + +
+
+

{% trans %}Children, families and relationships{% endtrans %}

+ +
+ + {{ list_item(_("Children and social services, children in care"), + _("Help for any problem if social services are involved with a child. Includes children in care, or being adopted. Also special guardianship."), + url_for("categories.index")) }} + + {{ list_item(_("Problems with an ex-partner, divorce, when a relationship ends"), + _("If you cannot agree about money, finances and property. Includes contact with children, where children live, and other child arrangements. If an ex-partner is not doing what they agreed. If you’re worried about a child."), + url_for("categories.index")) }} + + {{ list_item(_("If there is domestic abuse in your family"), + _("Making arrangements for children and finances. Also, keeping yourself safe, protecting children and legal help to leave the relationship."), + url_for("categories.index")) }} + + + {{ list_item(_("Family mediation"), + _("Help to cover the costs of family mediation (solve problems about money and children before you go to court"), + url_for("categories.index"))}} + + {{ list_item(_("Child taken without your consent"), + _("If a child has been abducted (taken without your permission), including outside the UK."), + url_for("categories.index"))}} + +
+ +

More problems

+ +
+ + {{ list_item_small(_("Children with special educational needs and disabilities (SEND)"), + _("Get help with a child's SEND."), + url_for("categories.index")) }} + + {{ list_item_small(_("Schools, colleges, other education settings"), + _("Advice about legal action against a school. Includes if a child is out of school, exclusions, transport to school, judicial reviews."), + url_for("categories.index")) }} + + {{ list_item_small(_("Forced marriage"), + _("Help with forced marriage and Forced Marriage Protection Orders."), + url_for("categories.index")) }} + + {{ cannot_find_your_problem(_("Children, families and relationships"), url_for("categories.family.index")) }} + +
+
+{% endblock %} \ No newline at end of file diff --git a/app/templates/categories/index.html b/app/templates/categories/index.html index 05183432f..8c83f6a64 100644 --- a/app/templates/categories/index.html +++ b/app/templates/categories/index.html @@ -22,7 +22,7 @@

Most searched problems

{{ list_item_arrow("Children, families and relationships", "Includes children and social services, children in care. Also, help with children and finances if you divorce or split up.", - url_for("categories.index")) }} + url_for("categories.family.index")) }} {{ list_item_arrow("Discrimination", "Treated unfairly because of things like your disability or health condition, race, age, sex, religion or pregnancy.", @@ -54,8 +54,6 @@

Most searched problems


-
-

@@ -96,9 +94,6 @@

Other problems covered by legal aid

}) }}
- - - {% endblock %}