Load JS through Django's staticfiles app

This avoids the need for adjustments during development and allows production to
be served under a single /static declaration in Apache.
This commit is contained in:
Ben Sturmfels 2024-02-27 09:25:05 +11:00
parent 279f1deae5
commit caa0ff7b86
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0
3 changed files with 18 additions and 16 deletions

View file

@ -1,9 +1,11 @@
{% extends "base_conservancy.html" %}
{% load static %}
{% block subtitle %}Support Conservancy - {% endblock %}
{% block category %}supporter{% endblock %}
{% block head %}
<script type="text/javascript" src="/js/supporter-page.js"></script>
<script type="text/javascript" src="{% static 'js/supporter-page.js' %}"></script>
<link href="/css/forms.css" rel="stylesheet" type="text/css"/>
{% endblock %}
@ -21,10 +23,10 @@
<h4><a href="#annual"><span class="donate-box-highlight">Annual supporter</span> via PayPal, ACH, or credit card.</a></h4>
<h4><a href="#monthly"><span class="donate-box-highlight">Monthly supporter</span> via PayPal, ACH, or credit card.</a></h4>
<span class="donate-box-highlight">Other annual supporters methods:</span>
<div class="toggle-unit">
<h4 class="toggle-control" data-text="Wire Transfer"
<h4 class="toggle-control" data-text="Wire Transfer"
data-expanded-text="Wire Transfer:">Wire Transfer</h4>
<div class="toggle-content">
Contact <a href="mailto:accounting@sfconservancy.org">Conservancy
@ -34,14 +36,14 @@
</div><!-- /.toggle.unit -->
<div class="toggle-unit">
<h4 class="toggle-control" data-text="Paper Check"
<h4 class="toggle-control" data-text="Paper Check"
data-expanded-text="Paper Check:">Paper Check</h4>
<div class="toggle-content">
Send paper check for $120 to:<br/>
Software Freedom Conservancy, Inc.<br/>
137 MONTAGUE ST STE 380<br/>
BROOKLYN, NY 11201-3548 &nbsp; USA<br/>
Please write <q>SUPPORTER</q> and t-shirt size in memo line.
Please write <q>SUPPORTER</q> and t-shirt size in memo line.
</div><!-- /.toggle-content -->
</div><!-- /.toggle.unit -->
@ -55,7 +57,7 @@
<p>Software Freedom Conservancy is an essential organization to free and
open source software. We are the home of over
<a href="/members/current/">30 projects</a> like
<a href="/members/current/">30 projects</a> like
<a href="http://git-scm.org">Git</a>,
<a href="http://inkscape.org">Inkscape</a>, <a href="http://samba.org">Samba</a>,
<a href="http://winehq.org">Wine</a>, <a href="http://www.seleniumhq.org/">Selenium</a>, the <a href="/copyleft-compliance/">GPL Compliance Project for Linux
@ -88,13 +90,13 @@ conferences, and publish materials to increase understanding about the
organizational, community and legal issues around free and open source
software. We advocate for free and open source software and provide
education around that mission. We form partnerships across our
communities to work more effectively. Check out <a
communities to work more effectively. Check out <a
href="https://copyleft.org/">copyleft.org</a>
or sign up to join the <a
or sign up to join the <a
href="/news/2014/aug/12/tax-exempt-working-group/">
tax exempt working group</a>.</li>
<li>we seek to solve problems for the public through free and open
<li>we seek to solve problems for the public through free and open
source
software. We've launched a <a href="https://npoacct.sfconservancy.org/">
nonprofits accounting project</a> to help all
@ -112,9 +114,9 @@ of dollars in licensing fees for subpar accounting software.</li>
<img class="appeal-footer" alt="*" src="/img/conservancy-supporter-heart.png"/>
<p>As an organization, we try to do everything transparently; even
<p>As an organization, we try to do everything transparently; even
our
<a
<a
href="https://gitorious.org/conservancy/policies/source/master:">
internal policies</a> are published and available for scrutiny.</p>
@ -161,7 +163,7 @@ internal policies</a> are published and available for scrutiny.</p>
Should we <a href="/sponsors#supporters">list you publicly</a> as a Conservancy Supporter? </strong></label>
<input type="radio" checked="checked" name="on1" value="publicAckYes" />Yes
<input type="radio" name="on1" value="publicAckNo" />No<br/>
<label for="joinList"><strong>Join Conservancy's
Low-Traffic Announcement Email List? </strong></label>
<input type="radio" checked="checked" name="os1" value="joinListYes" />Yes

View file

@ -15,8 +15,8 @@
<link rel="stylesheet" type="text/css" href="/css/tachyons.css"/>
<link rel="stylesheet" type="text/css" media="screen" href="/css/conservancy.css" />
<link rel="stylesheet" type="text/css" media="(min-width: 67em)" href="/css/conservancy-bigscreen.css" />
<script type="text/javascript" src="/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="/js/conservancy.js"></script>
<script type="text/javascript" src="{% static 'js/jquery-1.7.2.js' %}"></script>
<script type="text/javascript" src="{% static 'js/conservancy.js' %}"></script>
{% block head %}{% endblock %}
</head>

View file

@ -4,7 +4,7 @@
{% block category %}sustainer{% endblock %}
{% block head %}
<script type="text/javascript" src="/js/supporter-page.js"></script>
<script type="text/javascript" src="{% static 'js/supporter-page.js' %}"></script>
<link href="/css/forms.css" rel="stylesheet" type="text/css"/>
{% include "opengraph_partial.html" with url="/sustainer/" title="Support Conservancy!" description="Software freedom is critical to many of today&rsquo;s most pressing social issues, but it&rsquo;s only effective when FOSS is for everyone. Support Conservancy today to help make that happen!" %}
{% include "opengraph_urllist_partial.html" with property='image' urls='' fallback='/img/conservancy-logo.png' %}
@ -175,7 +175,7 @@ can provide solid FOSS replacements to proprietary technologies for all of us.</
<p>Our staff has been presenting and speaking about software freedom all year.
Our Executive Director Karen Sandler received an honorary doctorate from
Katholieke Universiteit Leuven for her incredible work in FOSS leadership, and
her advocacy and pursuit of software freedom and rights for all.
her advocacy and pursuit of software freedom and rights for all.
In November she spoke at <a href="https://www.sfscon.it/talks/the-history-of-and-path-forward-for-copyleft-and-the-gpl/">SFSCON about "The History of, and Path forward for, Copyleft and the GPL"</a>.</p>
<div class="picture-small right">