From b6a007d53bdbe21f0b9330d2c092100c3916552d Mon Sep 17 00:00:00 2001 From: Ebru Yucesar Date: Wed, 24 Jul 2024 09:34:24 -0400 Subject: [PATCH] add banner for CL API announcement --- web/frontend/pages/main.scss | 1 + web/frontend/styles/announcement_banner.scss | 12 ++++++++++++ web/frontend/styles/variables.scss | 1 + web/main/legal_document_sources.py | 2 +- web/main/templates/base.html | 1 + web/main/templates/includes/announcement_banner.html | 3 +++ 6 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 web/frontend/styles/announcement_banner.scss create mode 100644 web/main/templates/includes/announcement_banner.html diff --git a/web/frontend/pages/main.scss b/web/frontend/pages/main.scss index 263b1c5bf..46d30763a 100644 --- a/web/frontend/pages/main.scss +++ b/web/frontend/pages/main.scss @@ -21,6 +21,7 @@ @import 'footer'; @import 'mockups'; @import 'spinner'; +@import 'announcement_banner'; // view semantic styles @import 'landing'; diff --git a/web/frontend/styles/announcement_banner.scss b/web/frontend/styles/announcement_banner.scss new file mode 100644 index 000000000..45ae03b55 --- /dev/null +++ b/web/frontend/styles/announcement_banner.scss @@ -0,0 +1,12 @@ +body { + .announcement-banner { + background-color: $tinted-light-blue; + font-size: 14px; + padding: 10px 15px; + @include make-row(); + + p { + margin: 0px; + } + } +} \ No newline at end of file diff --git a/web/frontend/styles/variables.scss b/web/frontend/styles/variables.scss index d4cd2a400..2be6edf7a 100644 --- a/web/frontend/styles/variables.scss +++ b/web/frontend/styles/variables.scss @@ -20,6 +20,7 @@ $light-orange: lighten($orange, 20%); $yellow: #F8BA1C; $light-yellow: lighten($yellow, 40%); $green: #17AC10; +$tinted-light-blue: lighten($light-blue, 35%); $highlight: #f8e71c; diff --git a/web/main/legal_document_sources.py b/web/main/legal_document_sources.py index 29ec42daa..2ef11c84c 100644 --- a/web/main/legal_document_sources.py +++ b/web/main/legal_document_sources.py @@ -634,7 +634,7 @@ def pull(legal_doc_source, id): name=case_name, doc_class="Case", citations=citations, - jurisdiction=cluster.get("court_id"), + jurisdiction=additional_metadata.get("court_id"), effective_date=parser.parse(cluster.get("date_filed")), publication_date=parser.parse(cluster.get("date_modified")), updated_date=datetime.now(), diff --git a/web/main/templates/base.html b/web/main/templates/base.html index 4c754ee84..a04ef8c9f 100644 --- a/web/main/templates/base.html +++ b/web/main/templates/base.html @@ -28,6 +28,7 @@ + {% include 'includes/announcement_banner.html' %} {% block banner %}{% endblock banner %}
{% include 'includes/header.html' %} diff --git a/web/main/templates/includes/announcement_banner.html b/web/main/templates/includes/announcement_banner.html new file mode 100644 index 000000000..58847d03b --- /dev/null +++ b/web/main/templates/includes/announcement_banner.html @@ -0,0 +1,3 @@ +
+

Increased access to caselaw via CourtListener API lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. Yay!

+
\ No newline at end of file