euscanwww: Fixing all templates to be XHTML compliant

Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
volpino 2012-08-15 15:32:16 +02:00
parent d66c2dff99
commit 269fc0afa5
19 changed files with 118 additions and 106 deletions

View File

@ -43,8 +43,10 @@ class BaseFeed(Feed):
def item_link(self, vlog):
kwargs = {'category': vlog.package.category,
'package': vlog.package.name}
return "%s#%s" % (reverse('djeuscan.views.package', kwargs=kwargs),
vlog.tag())
return "%s#version-%s-%s:%s-%s" % (
reverse('djeuscan.views.package', kwargs=kwargs),
vlog.version, vlog.revision, vlog.slot, vlog.overlay,
)
def item_pubdate(self, vlog):
return vlog.datetime

View File

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{% load url from future %}
{% load timedelta %}
<?xml version="1.0" encoding="utf8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>{% block title %}euscan{% endblock %}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
{% block meta %}
<link rel="alternate" type="application/atom+xml" title="Global log" href="{% url "global_feed" %}" />
{% endblock %}
@ -19,7 +21,7 @@
<body>
<div id="header">
<a href="http://www.gentoo.org">
<img id="logo" src="{{ STATIC_URL }}img/gentoo_org.png" />
<img id="logo" src="{{ STATIC_URL }}img/gentoo_org.png" alt="gentoo" />
</a>
{% block header %}<h1>Ebuild Upstream Scanner (euscan)</h1>{% endblock %}
</div>

View File

@ -3,14 +3,16 @@
<table id="table" class="display">
<thead>
<tr>
<th>Category</th>
<th><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th>
<th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th>
<th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th>
<th><img src="{{ STATIC_URL }}img/freshness-icon.png" title="Freshness" /></th>
<th><img src="{{ STATIC_URL }}img/freshness-icon.png" alt="freshness" title="Freshness" /></th>
{% if extras %}
<th>Graphs</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for category in categories %}

View File

@ -26,11 +26,11 @@
{{ block.super }}
<div class="menu notfirst-menu rounded">
<ul>
<li><img src="{{ STATIC_URL }}img/gentoo-icon.png" /> Gentoo</li>
<li><img src="{{ STATIC_URL }}img/overlay-icon.png" /> Overlays</li>
<li><img src="{{ STATIC_URL }}img/upstream-icon.png" /> Upstream</li>
<li><img src="{{ STATIC_URL }}img/unstable-icon.png" /> Unstable</li>
<li><img src="{{ STATIC_URL }}img/freshness-icon.png" /> Freshness</li>
<li><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" /> Gentoo</li>
<li><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" /> Overlays</li>
<li><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" /> Upstream</li>
<li><img src="{{ STATIC_URL }}img/unstable-icon.png" alt="unstable" /> Unstable</li>
<li><img src="{{ STATIC_URL }}img/freshness-icon.png" alt="freshness" /> Freshness</li>
</ul>
</div>
{% endblock %}

View File

@ -3,14 +3,16 @@
<table id="table" class="display">
<thead>
<tr>
<th>Herd</th>
<th><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th>
<th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th>
<th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th>
<th><img src="{{ STATIC_URL }}img/freshness-icon.png" title="Freshness" /></th>
<th><img src="{{ STATIC_URL }}img/freshness-icon.png" alt="freshness" title="Freshness" /></th>
{% if extras %}
<th>Graphs</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for herd in herds %}

View File

@ -3,14 +3,16 @@
<table id="table" class="display">
<thead>
<tr>
<th>Maintainer</th>
<th><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th>
<th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th>
<th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th>
<th><img src="{{ STATIC_URL }}img/freshness-icon.png" title="Freshness" /></th>
<th><img src="{{ STATIC_URL }}img/freshness-icon.png" alt="freshness" title="Freshness" /></th>
{% if extras %}
<th>Graphs</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for maintainer in maintainers %}

View File

@ -2,7 +2,9 @@
<table id="table" class="display">
<thead>
<tr>
<th>Overlay</th>
</tr>
</thead>
<tbody>
{% for overlay in overlays %}

View File

@ -47,7 +47,7 @@
<dd>
<ul>
{% for version in packaged %}
<li id="{{ version.version }}-{{version.revision }}:{{ version.slot }}-[{{ version.overlay }}]">
<li id="version-{{ version.version }}-{{version.revision }}:{{ version.slot }}-{{ version.overlay }}">
{% if version.overlay == "gentoo" %}
<img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="In Gentoo" />
{% else %}
@ -69,7 +69,7 @@
<dd>
<ul>
{% for version in upstream %}
<li>
<li id="version-{{ version.version }}-{{version.revision }}:{{ version.slot }}-{{ version.overlay }}">
<img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Upstream" />
{% if version.vtype and not version.vtype|is_stable %}
@ -87,7 +87,7 @@
{% if log %}
<dt>euscan log</dt>
<dd>
<p>Date: {{ log.datetime }}
<p>Date: {{ log.datetime }}</p>
<pre class="log">{{ msg|ansi_to_html|safe }}</pre>
</dd>
{% endif %}

View File

@ -8,6 +8,7 @@
<table id="table" class="display">
<thead>
<tr>
<th>Package</th>
<th><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="Last version in Gentoo" /></th>
<th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Last version in Overlays" /></th>
@ -15,7 +16,8 @@
<th><img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="Versions in Gentoo" /></th>
<th><img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="Versions in Overlays" /></th>
<th><img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Versions only upstream" /></th>
<th><img src="{{ STATIC_URL }}img/freshness-icon.png" title="Freshness" /></th>
<th><img src="{{ STATIC_URL }}img/freshness-icon.png" alt="freshness" title="Freshness" /></th>
</tr>
</thead>
<tbody>
{% for package in packages %}

View File

@ -25,7 +25,7 @@
<p>
Powered by:
<a href="http://kernel.org" titke="Linux Kernel">
<a href="http://kernel.org" title="Linux Kernel">
<img src="{{STATIC_URL}}img/linux.png" alt="Linux Kernel" />
</a>
<a href="http://gentoo.org" title="Gentoo">

View File

@ -5,7 +5,6 @@
{% block content %}
<h2>API</h2>
<p>
<ul>
<li><a href="{% url "api.views.root" 'json' %}">/api/1.0/api.json</a></li>
<li><a href="{% url "api.views.statistics" 'json' %}">/api/1.0/statistics.json</a></li>
@ -18,7 +17,6 @@
<li>/api/1.0/package/&lt;category&gt;/&lt;package&gt;.json</li>
</ul>
Formats: xml, yaml and json
</p>
<p>Formats: xml, yaml and json</p>
{% endblock %}

View File

@ -24,10 +24,10 @@
{% if user.is_authenticated %}
<span class="pull-right">
<button class="btn favourite-button {% if favourited %}hide{% endif %}" data-url="{% url "favourite_category" category %}">
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" >
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" />
</button>
<button class="btn unfavourite-button {% if not favourited %}hide{% endif %}" data-url="{% url "unfavourite_category" category %}">
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" >
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" />
</button>
</span>
{% endif %}
@ -35,22 +35,22 @@
{% packages packages %}
<h3>Statistics</h2>
<h3>Statistics</h3>
<h4>Current statistics</h4>
<p>
<img src="{% url "chart_category" category 'pie-versions' %}" />
<img src="{% url "chart_category" category 'pie-packages' %}" />
<img alt="pie versions" src="{% url "chart_category" category 'pie-versions' %}" />
<img alt="pie packages" src="{% url "chart_category" category 'pie-packages' %}" />
</p>
<h4>All Time</h4>
<p>
<img src="{% url "chart_category" category 'versions-weekly' %}" />
<img src="{% url "chart_category" category 'versions-monthly' %}" />
<img alt="versions weekly" src="{% url "chart_category" category 'versions-weekly' %}" />
<img alt="versions monthly" src="{% url "chart_category" category 'versions-monthly' %}" />
</p>
<p>
<img src="{% url "chart_category" category 'packages-weekly' %}" />
<img src="{% url "chart_category" category 'packages-monthly' %}" />
<img alt="packages weekly" src="{% url "chart_category" category 'packages-weekly' %}" />
<img alt="packages monthly" src="{% url "chart_category" category 'packages-monthly' %}" />
</p>
<script type="text/javascript">
@ -78,9 +78,9 @@ $(document).ready(function () {
<div class="menu rounded notfirst-menu">
<dl>
<dt>Versions</dt>
<dd><img src="{% url "chart_category" category 'versions-monthly-small' %}" /></dd>
<dd><img alt="versions" src="{% url "chart_category" category 'versions-monthly-small' %}" /></dd>
<dt>Packages</dt>
<dd><img src="{% url "chart_category" category 'packages-monthly-small' %}" /></dd>
<dd><img alt="packages" src="{% url "chart_category" category 'packages-monthly-small' %}" /></dd>
</dl>
</div>
{% endblock %}

View File

@ -22,7 +22,7 @@
<h4>Usage examples</h4>
<ul>
<li><a href="{% url "global_feed" %}?portage_info=0&show_removals=0">{% url "global_feed" %}?portage_info=0&amp;show_removals=0</a></li>
<li><a href="{% url "global_feed" %}?portage_info=0&amp;show_removals=0">{% url "global_feed" %}?portage_info=0&amp;show_removals=0</a></li>
<li><a href="{% url "global_feed" %}?ignore_pre=true">{% url "global_feed" %}?ignore_pre=true</a></li>
</ul>
</div>

View File

@ -23,10 +23,10 @@
{% if user.is_authenticated %}
<span class="pull-right">
<button class="btn favourite-button {% if favourited %}hide{% endif %}" data-url="{% url "favourite_herd" herd.herd %}">
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" >
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" />
</button>
<button class="btn unfavourite-button {% if not favourited %}hide{% endif %}" data-url="{% url "unfavourite_herd" herd.herd %}">
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" >
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" />
</button>
</span>
{% endif %}
@ -34,21 +34,21 @@
</h2>
{% packages packages %}
<h3>Statistics</h2>
<h3>Statistics</h3>
<h4>Current statistics</h4>
<p>
<img src="{% url "chart_herd" herd.herd 'pie-versions' %}" />
<img src="{% url "chart_herd" herd.herd 'pie-packages' %}" />
<img alt="pie versions" src="{% url "chart_herd" herd.herd 'pie-versions' %}" />
<img alt="pie packages" src="{% url "chart_herd" herd.herd 'pie-packages' %}" />
</p>
<h4>All Time</h4>
<p>
<img src="{% url "chart_herd" herd.herd 'versions-weekly' %}" />
<img src="{% url "chart_herd" herd.herd 'versions-monthly' %}" />
<p>
<img alt="versions weekly" src="{% url "chart_herd" herd.herd 'versions-weekly' %}" />
<img alt="versions monthly" src="{% url "chart_herd" herd.herd 'versions-monthly' %}" />
</p>
<img src="{% url "chart_herd" herd.herd 'packages-weekly' %}" />
<img src="{% url "chart_herd" herd.herd 'packages-monthly' %}" />
<p>
<img alt="packages weekly" src="{% url "chart_herd" herd.herd 'packages-weekly' %}" />
<img alt="packages monthly" src="{% url "chart_herd" herd.herd 'packages-monthly' %}" />
</p>
<script type="text/javascript">
@ -76,9 +76,9 @@ $(document).ready(function () {
<div class="menu rounded notfirst-menu">
<dl>
<dt>Versions</dt>
<dd><img src="{% url "chart_herd" herd.herd 'versions-monthly-small' %}" /></dd>
<dd><img alt="versions" src="{% url "chart_herd" herd.herd 'versions-monthly-small' %}" /></dd>
<dt>Packages</dt>
<dd><img src="{% url "chart_herd" herd.herd 'packages-monthly-small' %}" /></dd>
<dd><img alt="packages" src="{% url "chart_herd" herd.herd 'packages-monthly-small' %}" /></dd>
</dl>
</div>

View File

@ -19,14 +19,14 @@
{% block content %}
<h2>
Maintainer: {{ maintainer.name }} &lt{{ maintainer.email }}&gt
Maintainer: {{ maintainer.name }} &lt;{{ maintainer.email }}&gt;
{% if user.is_authenticated %}
<span class="pull-right">
<button class="btn favourite-button {% if favourited %}hide{% endif %}" data-url="{% url "favourite_maintainer" maintainer.id %}">
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" >
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" />
</button>
<button class="btn unfavourite-button {% if not favourited %}hide{% endif %}" data-url="{% url "unfavourite_maintainer" maintainer.id %}">
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" >
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" />
</button>
</span>
{% endif %}
@ -34,22 +34,22 @@
{% packages packages %}
<h3>Statistics</h2>
<h3>Statistics</h3>
<h4>Current statistics</h4>
<p>
<img src="{% url "chart_maintainer" maintainer.id 'pie-versions' %}" />
<img src="{% url "chart_maintainer" maintainer.id 'pie-packages' %}" />
<img alt="pie versions" src="{% url "chart_maintainer" maintainer.id 'pie-versions' %}" />
<img alt="pie packages" src="{% url "chart_maintainer" maintainer.id 'pie-packages' %}" />
</p>
<h4>All Time</h4>
<p>
<img src="{% url "chart_maintainer" maintainer.id 'versions-weekly' %}" />
<img src="{% url "chart_maintainer" maintainer.id 'versions-monthly' %}" />
<img alt="version weekly" src="{% url "chart_maintainer" maintainer.id 'versions-weekly' %}" />
<img alt="versions monthly" src="{% url "chart_maintainer" maintainer.id 'versions-monthly' %}" />
</p>
<p>
<img src="{% url "chart_maintainer" maintainer.id 'packages-weekly' %}" />
<img src="{% url "chart_maintainer" maintainer.id 'packages-monthly' %}" />
<img alt="packages weekly" src="{% url "chart_maintainer" maintainer.id 'packages-weekly' %}" />
<img alt="packages monthly" src="{% url "chart_maintainer" maintainer.id 'packages-monthly' %}" />
</p>
<script type="text/javascript">
@ -77,9 +77,9 @@ $(document).ready(function () {
<div class="menu rounded notfirst-menu">
<dl>
<dt>Versions</dt>
<dd><img src="{% url "chart_maintainer" maintainer.id 'versions-monthly-small' %}" /></dd>
<dd><img alt="versions" src="{% url "chart_maintainer" maintainer.id 'versions-monthly-small' %}" /></dd>
<dt>Packages</dt>
<dd><img src="{% url "chart_maintainer" maintainer.id 'packages-monthly-small' %}" /></dd>
<dd><img alt="packages" src="{% url "chart_maintainer" maintainer.id 'packages-monthly-small' %}" /></dd>
</dl>
</div>

View File

@ -13,10 +13,10 @@
{% if user.is_authenticated %}
<span class="pull-right">
<button class="btn favourite-button {% if favourited %}hide{% endif %}" data-url="{% url "favourite_overlay" overlay %}">
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" >
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" />
</button>
<button class="btn unfavourite-button {% if not favourited %}hide{% endif %}" data-url="{% url "unfavourite_overlay" overlay %}">
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" >
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" />
</button>
</span>
{% endif %}

View File

@ -36,16 +36,16 @@
{% if user.is_authenticated %}
<span class="pull-right">
<button class="btn refresh-button {% if refresh_requested %}hide{% endif %}" data-category="{{ package.category }}" data-package="{{ package.name }}">
<img src="{{ STATIC_URL}}/img/refresh-active.png" alt="Refresh" >
<img src="{{ STATIC_URL}}/img/refresh-active.png" alt="Refresh" />
</button>
<button class="btn refresh-button-disabled disabled {% if not refresh_requested %}hide{% endif %}">
<img src="{{ STATIC_URL}}/img/refresh-inactive.png" alt="Refresh" >
<img src="{{ STATIC_URL}}/img/refresh-inactive.png" alt="Refresh" />
</button>
<button class="btn favourite-button {% if favourited %}hide{% endif %}" data-url="{% url "favourite_package" package.category package.name %}">
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" >
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" />
</button>
<button class="btn unfavourite-button {% if not favourited %}hide{% endif %}" data-url="{% url "unfavourite_package" package.category package.name %}">
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" >
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" />
</button>
</span>
{% endif %}

View File

@ -6,15 +6,15 @@
<h2>Statistics</h2>
<h3>Current statistics</h3>
<img src="{% url "chart" 'pie-versions' %}" />
<img src="{% url "chart" 'pie-packages' %}" />
<img alt="pie versions" src="{% url "chart" 'pie-versions' %}" />
<img alt="pie packages" src="{% url "chart" 'pie-packages' %}" />
<h3>All time statistics</h3>
<img src="{% url "chart" 'packages-weekly' %}" />
<img src="{% url "chart" 'packages-monthly' %}" />
<img alt="packages weekly" src="{% url "chart" 'packages-weekly' %}" />
<img alt="packages monthly" src="{% url "chart" 'packages-monthly' %}" />
<img src="{% url "chart" 'versions-weekly' %}" />
<img src="{% url "chart" 'versions-monthly' %}" />
<img alt="versions weekly" src="{% url "chart" 'versions-weekly' %}" />
<img alt="versions monthly" src="{% url "chart" 'versions-monthly' %}" />
{% endblock %}

View File

@ -13,10 +13,10 @@
{% if user.is_authenticated %}
<span class="pull-right">
<button class="btn favourite-button {% if favourited %}hide{% endif %}" data-url="{% url "favourite_world" %}">
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" >
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" />
</button>
<button class="btn unfavourite-button {% if not favourited %}hide{% endif %}" data-url="{% url "unfavourite_world" %}">
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" >
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" />
</button>
</span>
{% endif %}