Skip to content

Commit bf56b88

Browse files
committed
Use django-compressor to compress JS and CSS files. Small updates to the team section. Add initial draft of the 'about' section.
1 parent ebf6e37 commit bf56b88

File tree

5 files changed

+69
-33
lines changed

5 files changed

+69
-33
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
bibtexparser == 1.1.0
2+
csscompressor == 0.9.5
23
django-compressor == 2.4
34
django[argon2] == 3.0.3
45
gunicorn == 20.0.4

src/assets/css/style.css

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ br.sep {
3737
}
3838

3939
.site-title {
40-
font-weight: bold;
41-
font-size: 4.5em;
42-
font-family: "Nobile", Roboto, arial, monospace;
40+
font-family: "Nobile", Roboto, Arial, sans-serif !important;
4341
}
4442

4543
.tag-selector-button {
@@ -52,6 +50,14 @@ br.sep {
5250
margin-bottom: auto;
5351
}
5452

53+
54+
/****************************
55+
* Background colors
56+
****************************/
57+
.bg-white {
58+
background-color: white;
59+
}
60+
5561
/****************************
5662
* Navbar
5763
****************************/

src/encryption_compendium/settings.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,20 @@
224224
"compressor.finders.CompressorFinder",
225225
)
226226

227-
# Email options
227+
### Compression settings for django-compressor
228+
# COMPRESS_ENABLED: whether or not to compress files. Defaults to the
229+
# opposite of DEBUG.
230+
# COMPRESS_ENABLED = not DEBUG
231+
232+
# Filters to apply during compression
233+
COMPRESS_FILTERS = {
234+
"css": [
235+
"compressor.filters.css_default.CssAbsoluteFilter",
236+
"compressor.filters.cssmin.CSSCompressorFilter",
237+
],
238+
}
239+
240+
### Email options
228241
EMAIL_USER = os.getenv("EMAIL_USER")
229242
EMAIL_PASSWORD = os.getenv("EMAIL_PASSWORD")
230243
EMAIL_PORT = int(os.getenv("EMAIL_PORT", 587))

src/templates/base.html

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@
1616
Note that templates that override this block will need to insert
1717
{{ block.super }} if they want to keep the CSS that's inserted below.
1818
{% endcomment %}
19-
{% block css %}
2019

21-
{# UIkit stylesheet #}
22-
<link rel="stylesheet" href="{% static 'css/uikit.min.css' %}"/>
20+
{% load compress %}
21+
{% compress css %}
22+
{% block css %}
23+
{# UIkit stylesheet #}
24+
<link rel="stylesheet" href="{% static 'css/uikit.min.css' %}"/>
2325

24-
{# Custom stylesheets #}
25-
<link rel="stylesheet" href="{% static 'css/style.css' %}"/>
26-
<link rel="stylesheet" href="{% static 'fonts/fonts.css' %}"/>
27-
{% endblock %}
26+
{# Custom stylesheets #}
27+
<link rel="stylesheet" href="{% static 'css/style.css' %}"/>
28+
<link rel="stylesheet" href="{% static 'fonts/fonts.css' %}"/>
29+
{% endblock %}
30+
{% endcompress %}
2831

2932
{% block head %}{% endblock %}
3033
</head>
@@ -45,12 +48,15 @@
4548
Note that templates that override the 'javascripts' block will need to insert
4649
{{ block.super }} to keep the JavaScript that's inserted below.
4750
{% endcomment %}
48-
{% block javascripts %}
49-
<script type="application/javascript" src="{% static 'js/jquery-3.4.1.min.js' %}"></script>
50-
<script type="application/javascript" src="{% static 'js/uikit.min.js' %}"></script>
51-
<script type="application/javascript" src="{% static 'js/particles.min.js' %}"></script>
52-
<script src="{% static 'js/uikit-icons.min.js' %}"></script>
53-
{% endblock %}
51+
52+
{% compress js %}
53+
{% block javascripts %}
54+
<script type="application/javascript" src="{% static 'js/jquery-3.4.1.min.js' %}"></script>
55+
<script type="application/javascript" src="{% static 'js/uikit.min.js' %}"></script>
56+
<script type="application/javascript" src="{% static 'js/particles.min.js' %}"></script>
57+
<script src="{% static 'js/uikit-icons.min.js' %}"></script>
58+
{% endblock %}
59+
{% endcompress %}
5460

5561
</html>
5662
{% endspaceless %}

src/templates/landing_page.html

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212

1313
<div class="uk-margin-top uk-grid-large uk-text-middle" uk-grid>
1414
<div class="uk-width-1-2@l">
15-
<h1 class="site-title uk-heading-primary uk-text-break">
15+
<h1 class="site-title uk-heading-medium uk-heading-primary uk-text-break">
1616
<p>The</p>
1717
<p>Encryption</p>
1818
<p>Compendium</p>
1919
</h1>
20+
<h2 class="site-title">
21+
The encryption literature database
22+
</h2>
2023
</div>
2124

2225
<div class="landing-page-searchbar uk-text-center uk-width-1-2@l uk-text-middle">
@@ -25,21 +28,27 @@ <h1 class="site-title uk-heading-primary uk-text-break">
2528
</div>
2629
</div>
2730

28-
<div class="uk-margin-top" style="background-color: white;">
31+
<div class="bg-white uk-margin-top">
2932
<div class="uk-container">
3033
<br>
31-
<h2 class="uk-h2">
34+
<h2 class="uk-heading-small">
3235
<a class="anchor" id="about">About us</a>
3336
</h2>
34-
{% lorem 5 p %}
37+
<p>
38+
<span class="uk-text-lead">Encryption provides security and ensures user privacy on the internet.</span> However, encryption can also complicate law enforcement's job, making it difficult to investigate cybercrimes or obtain intelligence on issues related to national security. This frames the encryption policy debate as being user privacy set against national security. Often these debates lack input from different resources, and they happen over and over again with the same debate points being applied to an evolving technological landscape.
39+
</p>
40+
41+
<p>
42+
Our mission is to serve as central hub for policy makers, law practitioners, and the general public to understand the encryption debate. We have put together a comprehensive collection of research relating to the main themes of the encryption policy debate in the United States from 1970-2020.
43+
</p>
3544
<br>
3645
</div>
3746
</div>
3847

3948
<br>
4049

4150
<div class="uk-container">
42-
<h2 class="uk-h2">
51+
<h2>
4352
Search the encryption literature for the following categories:
4453
</h2>
4554

@@ -62,10 +71,10 @@ <h2 class="uk-h2">
6271
</form>
6372
</div>
6473

65-
<div class="uk-margin-top" style="background-color: white;">
74+
<div class="bg-white uk-margin-top">
6675
<div class="uk-container">
6776
<br>
68-
<h2 class="uk-h2">
77+
<h2>
6978
<a class="anchor" id="team">Team</a>
7079
</h2>
7180
<div class="uk-margin-top uk-grid-large uk-text-middle" uk-grid>
@@ -75,47 +84,48 @@ <h2 class="uk-h2">
7584
<b class="uk-text-bold">Led by Amie Stepanovich, Silicon Flatirons Director</b>
7685
<ul class="uk-list uk-list-bullet">
7786
<li>
78-
Shannon Brunston
87+
<span class="uk-text-bold">Shannon Brunston</span>
7988
<br>
8089
<small class="uk-text-small">TCP Program Student</small>
8190
</li>
8291
<li>
83-
Slate Herman
92+
<span class="uk-text-bold">Slate Herman</span>
8493
<br>
8594
<small class="uk-text-small">2L Colorado Law</small>
8695
</li>
8796
<li>
88-
Jordan Regenie
97+
<span class="uk-text-bold">Jordan Regenie</span>
8998
<br>
9099
<small class="uk-text-small">3L Colorado Law</small>
91100
</li>
92101
<li>
93-
Stacey Weber
102+
<span class="uk-text-bold">Stacey Weber</span>
94103
<br>
95104
<small class="uk-text-small">1L Colorado Law</small>
96105
</li>
97106
</ul>
98107
</div>
108+
99109
<div class="uk-width-1-2@l">
100110
<b class="uk-text-emphasis">TCP Web Development Team</b>
101111
<br>
102112
<b class="uk-text-bold">Led by Dr. Dan Massey Director, TCP Program Director</b>
103113
<ul class="uk-list uk-list-bullet">
104114
<li>
105-
Will Shand
115+
<span class="uk-text-bold">Will Shand</span>
106116
<br>
107-
<small class="uk-text-small">TCP Program Student</small>
117+
<small class="uk-text-small">Applied Mathematics Program Student</small>
108118
</li>
109119
<li>
110-
Pranav Gummaraj Srinivas
120+
<span class="uk-text-bold">Pranav Gummaraj Srinivas</span>
111121
<br>
112122
<small class="uk-text-small">TCP Program Student</small>
113123
</li>
114124
</ul>
115125
</div>
126+
116127
</div>
117-
<br>
118-
</div>
128+
<br>
119129
</div>
120130

121131
{% endblock %}

0 commit comments

Comments
 (0)