From cc8e1026ac1b9fa1a6522dc45f41b682f5725f9f Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Fri, 21 Jun 2024 22:14:07 -0500 Subject: [PATCH] some changes to the interface --- franklincce/explorer/models.py | 21 +++++++ .../explorer/templates/explorer/all.html | 24 ++++---- .../explorer/templates/explorer/base.html | 2 +- .../explorer/templates/explorer/index.html | 27 +++++---- .../templates/explorer/legislation.html | 14 ++++- franklincce/franklincce/settings.py | 2 +- franklincce/static/style.css | 52 +++++++++++++----- franklincce/static/tn-cap.jpg | Bin 0 -> 152837 bytes franklincce/static/tn.css | 7 +++ franklincce/static/un-gen-asm.jpg | Bin 0 -> 1885342 bytes franklincce/static/un.css | 7 +++ 11 files changed, 113 insertions(+), 43 deletions(-) create mode 100644 franklincce/static/tn-cap.jpg create mode 100644 franklincce/static/tn.css create mode 100644 franklincce/static/un-gen-asm.jpg create mode 100644 franklincce/static/un.css diff --git a/franklincce/explorer/models.py b/franklincce/explorer/models.py index dd06a43..22c41be 100644 --- a/franklincce/explorer/models.py +++ b/franklincce/explorer/models.py @@ -112,3 +112,24 @@ class LegislativeText(models.Model): def get_lines(self): cls = namedtuple('LegLine', ['linenumber', 'linetext']) return [cls(i + 1, j) for i, j in enumerate(self.text.split('\n'))] + + def is_bill(self): + if self.assembly in [ + "RHB", + "BHB", + "WHB", + "RSB", + "BSB", + "WSB", + "SEN", + "HOU", + ]: + return True + return False + + def is_resolution(self): + if self.assembly in ["RGA", "BGA", "WGA", "GEN"]: + return True + return False + + diff --git a/franklincce/explorer/templates/explorer/all.html b/franklincce/explorer/templates/explorer/all.html index 53aa209..39ff046 100644 --- a/franklincce/explorer/templates/explorer/all.html +++ b/franklincce/explorer/templates/explorer/all.html @@ -1,15 +1,17 @@ {% extends "explorer/base.html" %} {% block content %} -

All legislative texts

- -{% if legislative_texts %} - -{% else %} -

No texts available

-{% endif %} + +
+

All legislative texts

+ {% if legislative_texts %} + + {% else %} +

No texts available

+ {% endif %} +
{% endblock content %} diff --git a/franklincce/explorer/templates/explorer/base.html b/franklincce/explorer/templates/explorer/base.html index 7b60f1e..05dc393 100644 --- a/franklincce/explorer/templates/explorer/base.html +++ b/franklincce/explorer/templates/explorer/base.html @@ -11,7 +11,7 @@ -