some changes to the interface
This commit is contained in:
parent
79d441d1f6
commit
cc8e1026ac
|
@ -112,3 +112,24 @@ class LegislativeText(models.Model):
|
||||||
def get_lines(self):
|
def get_lines(self):
|
||||||
cls = namedtuple('LegLine', ['linenumber', 'linetext'])
|
cls = namedtuple('LegLine', ['linenumber', 'linetext'])
|
||||||
return [cls(i + 1, j) for i, j in enumerate(self.text.split('\n'))]
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
{% extends "explorer/base.html" %}
|
{% extends "explorer/base.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>All legislative texts</h1>
|
<link rel="stylesheet" type="text/css" href="/static/tn.css" />
|
||||||
|
<div class="boxed">
|
||||||
{% if legislative_texts %}
|
<h1>All legislative texts</h1>
|
||||||
<ul>
|
{% if legislative_texts %}
|
||||||
{% for text in legislative_texts %}
|
<ul>
|
||||||
<li><a href="{% url 'viewleg' text.id %}">{{ text.legislation_title }}</a></li>
|
{% for text in legislative_texts %}
|
||||||
{% endfor %}
|
<li><a href="{% url 'viewleg' text.id %}">{{ text.legislation_title }}</a></li>
|
||||||
</ul>
|
{% endfor %}
|
||||||
{% else %}
|
</ul>
|
||||||
<p>No texts available</p>
|
{% else %}
|
||||||
{% endif %}
|
<p>No texts available</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<nav id="navbar">
|
<nav id="navbar" class="boxed">
|
||||||
<div id="leftnav">
|
<div id="leftnav">
|
||||||
<a href="/explorer">explorer</a>
|
<a href="/explorer">explorer</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,19 +1,22 @@
|
||||||
{% extends "explorer/base.html" %}
|
{% extends "explorer/base.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Welcome to explorer</h1>
|
<link rel="stylesheet" type="text/css" href="/static/tn.css" />
|
||||||
|
<div class="boxed">
|
||||||
|
<h1>Welcome to explorer</h1>
|
||||||
|
|
||||||
<p><i>an interactive database for YMCA CCE legislation</i></p>
|
<p><i>an interactive database for YMCA CCE legislation</i></p>
|
||||||
|
|
||||||
<h2>Some randomly selected legislation</h2>
|
<h2>Some randomly selected legislation</h2>
|
||||||
|
|
||||||
{% if legislative_texts %}
|
{% if legislative_texts %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for text in legislative_texts %}
|
{% for text in legislative_texts %}
|
||||||
<li><a href="{% url 'viewleg' text.id %}">{{ text.legislation_title }}</a></li>
|
<li><a href="{% url 'viewleg' text.id %}">{{ text.legislation_title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>No texts available</p>
|
<p>No texts available</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -2,12 +2,20 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="legcontainer">
|
<div id="legcontainer">
|
||||||
<div id="leginfo" class="boxed">
|
{% if legislation.is_bill %}
|
||||||
<h1 class="no-margin-top wrapword">{{ legislation.legislation_title }}</h1>
|
<link rel="stylesheet" type="text/css" href="/static/tn.css" />
|
||||||
|
{% elif legislation.is_resolution %}
|
||||||
|
<link rel="stylesheet" type="text/css" href="/static/un.css" />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<i>{{ legislation.assembly }}/{{ legislation.committee }}/{{ legislation.docket_order }}</i>
|
<div id="leginfo" class="boxed">
|
||||||
|
<h1 class="no-margin-top">{{ legislation.legislation_title }}</h1>
|
||||||
|
|
||||||
|
<p><i>{{ legislation.assembly }}/{{ legislation.committee }}/{{ legislation.docket_order }}</i></p>
|
||||||
|
|
||||||
<p>Sponsored by {{ legislation.sponsors }} of {{ legislation.school }}</p>
|
<p>Sponsored by {{ legislation.sponsors }} of {{ legislation.school }}</p>
|
||||||
|
|
||||||
|
<p>Presented as part of the {{ legislation.from_book.name }} conference</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="legislation" class="boxed">
|
<div id="legislation" class="boxed">
|
||||||
|
|
|
@ -24,7 +24,7 @@ SECRET_KEY = 'django-insecure-1%p#re)z*_xd9umo0!1foh(yiz&2=*5q#0b4(m42r0^m%kxli#
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = ["localhost", "127.0.0.1", "[::1]"]
|
ALLOWED_HOSTS = ["localhost", "192.168.0.87", "127.0.0.1", "[::1]"]
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,36 @@
|
||||||
|
:root {
|
||||||
|
--component-bg-color: rgba(10, 10, 10, 0.7);
|
||||||
|
--text-color: rgb(150, 150, 150);
|
||||||
|
--accented-text-color: rgb(255, 255, 255);
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: lightblue;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:active {
|
||||||
|
color: orangered;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
color: mediumpurple;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-moz-selection ::selection {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
nav#navbar {
|
nav#navbar {
|
||||||
border-bottom: 1px solid black; /* block for top bar */
|
|
||||||
padding-bottom: 10px;
|
|
||||||
display: flex; /* make it from left to right */
|
display: flex; /* make it from left to right */
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
background-color: var(--component-bg-color);
|
||||||
|
background-clip: padding-box;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#leftnav {
|
#leftnav {
|
||||||
|
@ -24,8 +48,7 @@ nav#navbar {
|
||||||
#legcontainer {
|
#legcontainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
gap: 10px;
|
||||||
gap: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#leginfo {
|
#leginfo {
|
||||||
|
@ -44,6 +67,7 @@ nav#navbar {
|
||||||
@media only screen and (max-width: 570px) {
|
@media only screen and (max-width: 570px) {
|
||||||
#legcontainer {
|
#legcontainer {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
#leginfo {
|
#leginfo {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -59,21 +83,19 @@ nav#navbar {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
padding-top: 0px;
|
padding-top: 0px;
|
||||||
border: solid 1px;
|
border: solid 1px;
|
||||||
|
background-color: var(--component-bg-color);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapword {
|
|
||||||
white-space: -moz-pre-wrap !important;
|
|
||||||
white-space: -pre-wrap;
|
|
||||||
white-space: -o-pre-wrap;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
word-wrap: break-word;
|
|
||||||
white-space: -webkit-pre-wrap;
|
|
||||||
word-break: break-all;
|
|
||||||
white-space: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.legnumbers {
|
.legnumbers {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
color: var(--accented-text-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
p, td, i, ul, li {
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 149 KiB |
|
@ -0,0 +1,7 @@
|
||||||
|
body {
|
||||||
|
background-image: url("/static/tn-cap.jpg");
|
||||||
|
background-position: center;
|
||||||
|
background-attachment: fixed;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 1.8 MiB |
|
@ -0,0 +1,7 @@
|
||||||
|
body {
|
||||||
|
background-image: url("/static/un-gen-asm.jpg");
|
||||||
|
background-position: center;
|
||||||
|
background-attachment: fixed;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
Loading…
Reference in New Issue