Eliminate base_standard.html template and internalNavigate blocks
The base_standard.html template was an unnecessary level of template inheritance. Also removed unused `min` and `subtract` template tags.
This commit is contained in:
parent
a83d22e243
commit
783cdc6189
17 changed files with 9 additions and 77 deletions
2
TODO.md
2
TODO.md
|
@ -4,11 +4,11 @@
|
||||||
* consider removing `events` and `worldmap` modules
|
* consider removing `events` and `worldmap` modules
|
||||||
* ask Denver about why so many license files
|
* ask Denver about why so many license files
|
||||||
* serve a 400 in Apache for a hostname we don't explicitly support
|
* serve a 400 in Apache for a hostname we don't explicitly support
|
||||||
* replace `internalNavigate` with inline flexbox layout
|
|
||||||
|
|
||||||
|
|
||||||
# Done
|
# Done
|
||||||
|
|
||||||
|
* remove `internalNavigate`
|
||||||
* add tests for main pages returning 200
|
* add tests for main pages returning 200
|
||||||
* move `SITE_FUNDGOAL` configuration to `settings.py`
|
* move `SITE_FUNDGOAL` configuration to `settings.py`
|
||||||
* move `sponsors.py` and `sponsors.html` into `supporters` app
|
* move `sponsors.py` and `sponsors.html` into `supporters` app
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base_standard.html" %}
|
{% extends "base_conservancy.html" %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% block subtitle %}FOSSY - {% endblock %}
|
{% block subtitle %}FOSSY - {% endblock %}
|
||||||
{% block submenuselection %}FOSSY{% endblock %}
|
{% block submenuselection %}FOSSY{% endblock %}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{% load humanize %}
|
{% load humanize %}
|
||||||
{% load subtract %}
|
|
||||||
|
|
||||||
{% if sitefundgoal.days_remaining >= -7 %}{# i.e. 7 days over completion #}
|
{% if sitefundgoal.days_remaining >= -7 %}{# i.e. 7 days over completion #}
|
||||||
<div class="fundraiser-top-text ph3 pt2 pb3 mb2 mb3-ns">
|
<div class="fundraiser-top-text ph3 pt2 pb3 mb2 mb3-ns">
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
from django import template
|
|
||||||
|
|
||||||
register = template.Library()
|
|
||||||
|
|
||||||
@register.filter
|
|
||||||
def min(value, arg):
|
|
||||||
if value > arg:
|
|
||||||
return arg
|
|
||||||
return value
|
|
|
@ -1,7 +0,0 @@
|
||||||
from django import template
|
|
||||||
|
|
||||||
register = template.Library()
|
|
||||||
|
|
||||||
@register.filter
|
|
||||||
def subtract(value, arg):
|
|
||||||
return value - arg
|
|
|
@ -7,8 +7,6 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="singleColumn">
|
|
||||||
|
|
||||||
<h1>{{ podcast.title }}</h1>
|
<h1>{{ podcast.title }}</h1>
|
||||||
|
|
||||||
{{ podcast.long_description|safe }}
|
{{ podcast.long_description|safe }}
|
||||||
|
@ -31,5 +29,4 @@
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<p><a href="{% url 'podjango:cast' podcast_slug=podcast.slug %}">All oggcasts…</a></p>
|
<p><a href="{% url 'podjango:cast' podcast_slug=podcast.slug %}">All oggcasts…</a></p>
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
img { border: 0; }
|
img { border: 0; }
|
||||||
body { margin: 0; padding: 0; }
|
body { margin: 0; padding: 0; }
|
||||||
.clear { clear: both; }
|
.clear { clear: both; }
|
||||||
.hidden { display: none; }
|
|
||||||
|
|
||||||
p, h1, h2, h3, h4, h5, h6, #mainContent ul, #mainContent ol {
|
p, h1, h2, h3, h4, h5, h6, #mainContent ul, #mainContent ol {
|
||||||
/* margin-top: 1em; */
|
/* margin-top: 1em; */
|
||||||
|
@ -161,10 +160,6 @@ h3 { margin-top: .6em; margin-bottom: .4em; }
|
||||||
#mainContent ul, #mainContent ol { padding-left: 1.5em; }
|
#mainContent ul, #mainContent ol { padding-left: 1.5em; }
|
||||||
|
|
||||||
|
|
||||||
.internalNavigate { width: 19%; float: right; }
|
|
||||||
#mainContent .internalNavigate ul { list-style-type: none; padding-left: 0; }
|
|
||||||
.internalNavigate ul li { margin-top: .3em; margin-bottom: .3em; }
|
|
||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
|
|
||||||
body > header {
|
body > header {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base_error.html" %}
|
{% extends "base_conservancy.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<h1>500 Error</h1>
|
<h1>500 Error</h1>
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
{% load min %}
|
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html lang="en" prefix="og: http://ogp.me/ns#">
|
<html lang="en" prefix="og: http://ogp.me/ns#">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>{% block title %}{% block subtitle %}{% endblock %}Software Freedom Conservancy{% endblock %}</title>
|
<title>{% block title %}{% block subtitle %}{% endblock %}Software Freedom Conservancy{% endblock %}</title>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{% extends "base_standard.html" %}
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base_standard.html" %}
|
{% extends "base_conservancy.html" %}
|
||||||
|
|
||||||
{% block category %}News{% endblock %}
|
{% block category %}News{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
{% extends "base_conservancy.html" %}
|
|
||||||
|
|
||||||
{% block outercontent %}
|
|
||||||
<div class="mw8 center ph2 ph3">
|
|
||||||
<div class="internalNavigate">
|
|
||||||
{% block internal_navigate %}{% endblock %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="singleColumn">{% block content %}{% endblock %}</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
|
@ -2,29 +2,6 @@
|
||||||
{% block subtitle %}Conservancy Blog Query - {% endblock %}
|
{% block subtitle %}Conservancy Blog Query - {% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<script type="text/javascript">
|
|
||||||
window.addEventListener('DOMContentLoaded', function() {
|
|
||||||
function my_display (sel, b) {
|
|
||||||
if (b) { sel.slideDown(); }
|
|
||||||
else { sel.slideUp(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
function my_display_instantly (sel, b) {
|
|
||||||
if (b) { sel.show(); }
|
|
||||||
else { sel.hide(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#all_authors").click(function () {
|
|
||||||
my_display($("#authors"), !this.checked);
|
|
||||||
});
|
|
||||||
$("#all_tags").click(function () {
|
|
||||||
my_display($("#tags"), !this.checked);
|
|
||||||
});
|
|
||||||
|
|
||||||
my_display_instantly($("#authors"), !$("#all_authors").attr("checked"));
|
|
||||||
my_display_instantly($("#tags"), !$("#all_tags").attr("checked"));
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
div.query_indent { padding-left: 2em; }
|
div.query_indent { padding-left: 2em; }
|
||||||
div.query_indent table tr td { padding-right: 3em; padding-bottom: .3em; }
|
div.query_indent table tr td { padding-right: 3em; padding-bottom: .3em; }
|
||||||
|
@ -32,7 +9,6 @@ div.query_indent table tr td { padding-right: 3em; padding-bottom: .3em; }
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<form>
|
<form>
|
||||||
|
|
||||||
<p>Return posts written by any of these authors...</p>
|
<p>Return posts written by any of these authors...</p>
|
||||||
|
@ -67,8 +43,4 @@ div.query_indent table tr td { padding-right: 3em; padding-bottom: .3em; }
|
||||||
<p><input type="submit" value="View RSS feed" name="rss"/></p>
|
<p><input type="submit" value="View RSS feed" name="rss"/></p>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{# get rid of side bar #}
|
|
||||||
{% block internal_navigate %}{% endblock %}
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base_standard.html" %}
|
{% extends "base_conservancy.html" %}
|
||||||
|
|
||||||
{% block subtitle %}News Feeds - {% endblock %}
|
{% block subtitle %}News Feeds - {% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
{% block category %}sustainer{% endblock %}
|
{% block category %}sustainer{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="singleColumn">
|
|
||||||
<h2>Conservancy Sustainer Banners</h2>
|
<h2>Conservancy Sustainer Banners</h2>
|
||||||
|
|
||||||
<p>Help support Conservancy even more by sharing a banner on your own page and encourage other people to join you! We have banners for individuals and member projects below; just copy the code for the version you want into your own site.</p>
|
<p>Help support Conservancy even more by sharing a banner on your own page and encourage other people to join you! We have banners for individuals and member projects below; just copy the code for the version you want into your own site.</p>
|
||||||
|
@ -51,6 +50,4 @@
|
||||||
Please donate to them today to support community-driven free software projects!"
|
Please donate to them today to support community-driven free software projects!"
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<script type="text/javascript" src="{% static 'js/supporter-page.js' %}" defer></script>
|
<script type="text/javascript" src="{% static 'js/supporter-page.js' %}" defer></script>
|
||||||
<link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
|
<link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
|
||||||
|
<style>
|
||||||
|
.hidden { display: none; }
|
||||||
|
</style>
|
||||||
{% include "opengraph_partial.html" with url="/sustainer/" title="Support Conservancy!" description="Software freedom is critical to many of today’s most pressing social issues, but it’s only effective when FOSS is for everyone. Support Conservancy today to help make that happen!" %}
|
{% include "opengraph_partial.html" with url="/sustainer/" title="Support Conservancy!" description="Software freedom is critical to many of today’s most pressing social issues, but it’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='/static/img/conservancy-logo.png' %}
|
{% include "opengraph_urllist_partial.html" with property='image' urls='' fallback='/static/img/conservancy-logo.png' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base_standard.html" %}
|
{% extends "base_conservancy.html" %}
|
||||||
|
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue