From b6a007d53bdbe21f0b9330d2c092100c3916552d Mon Sep 17 00:00:00 2001 From: Ebru Yucesar Date: Wed, 24 Jul 2024 09:34:24 -0400 Subject: [PATCH 1/3] 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 From e6180d690f9e9dcfb0fb64f676850516e3454f2c Mon Sep 17 00:00:00 2001 From: Ebru Yucesar Date: Thu, 1 Aug 2024 10:48:26 -0400 Subject: [PATCH 2/3] update copy and style per Ari --- web/frontend/styles/announcement_banner.scss | 8 +++++++- web/main/templates/includes/announcement_banner.html | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/web/frontend/styles/announcement_banner.scss b/web/frontend/styles/announcement_banner.scss index 45ae03b55..5b078a639 100644 --- a/web/frontend/styles/announcement_banner.scss +++ b/web/frontend/styles/announcement_banner.scss @@ -6,7 +6,13 @@ body { @include make-row(); p { - margin: 0px; + margin: 0; + a { + color: inherit; + } + a.standout-link { + color: $light-blue; + } } } } \ No newline at end of file diff --git a/web/main/templates/includes/announcement_banner.html b/web/main/templates/includes/announcement_banner.html index 58847d03b..1e21ca837 100644 --- a/web/main/templates/includes/announcement_banner.html +++ b/web/main/templates/includes/announcement_banner.html @@ -1,3 +1,6 @@
-

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!

+

New! H2O now has access to new and up-to-date cases via + CourtListener and the Caselaw Access Project. + Click here for more info. +

\ No newline at end of file From 7b710d08d04f3910e99cd84a47d0f70590630e20 Mon Sep 17 00:00:00 2001 From: Ebru Yucesar Date: Tue, 27 Aug 2024 14:28:52 -0400 Subject: [PATCH 3/3] add blog link --- web/main/templates/includes/announcement_banner.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/main/templates/includes/announcement_banner.html b/web/main/templates/includes/announcement_banner.html index 1e21ca837..3dd5b93c9 100644 --- a/web/main/templates/includes/announcement_banner.html +++ b/web/main/templates/includes/announcement_banner.html @@ -1,6 +1,6 @@

New! H2O now has access to new and up-to-date cases via CourtListener and the Caselaw Access Project. - Click here for more info. + Click here for more info.

\ No newline at end of file