Skip to content

Commit

Permalink
Align coding style and css-classes in directory.html with other templ…
Browse files Browse the repository at this point in the history
…ates
  • Loading branch information
marcus-sonestedt committed Jan 20, 2010
1 parent d6ad303 commit d67d931
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
6 changes: 1 addition & 5 deletions buildbot/status/web/files/default.css
Expand Up @@ -156,14 +156,10 @@ table.info td.left {
text-align: left
}

.info .alt {
.alt {
background-color: #f6f6f6;
}

li.alt {
background-color: #f6f6f6;
}

li {
padding: 0.1em 1em 0.1em 1em;
}
Expand Down
37 changes: 21 additions & 16 deletions buildbot/status/web/templates/directory.html
@@ -1,30 +1,35 @@
{% extends "layout.html" %}
{% block head %}
{{ super() }}
<style type="text/css">
.even { background-color: #eeeeee}
.odd { background-color: #dedede}
</style>
{% endblock %}

{% block content %}

<h1>Directory listing for {{ path }}</h1>
{% set row_class = cycler('odd', 'even') %}

{% set row_class = cycler('alt', '') %}

<table>

<tr class="{{ row_class.next() }}">
<th style="min-width:18em">Name</th>
<th style="min-width:8em">Size</th>
<th style="min-width:10em">Type</th>
<th style="min-width:10em">Encoding</th>
</tr>

{% for d in directories %}
<tr class="directory {{ row_class.next() }}">
<td><a href="{{d['href']}}">{{d['text']}}</a></td>
<td>{{d['size']}}</td>
<td>{{d['type']}}</td>
<td>{{d['encoding']}}</td>
<td><a href="{{ d.href }}"><b>{{ d.text }}</b></a></td>
<td><b>{{ d.size }}</b></td>
<td><b>{{ d.type }}</b></td>
<td><b>{{ d.encoding }}</b></td>
</tr>
{% endfor %}

{% for f in files %}
<tr class="file {{ row_class.next() }}">
<td><a href="{{f['href']}}">{{f['text']}}</a></td>
<td>{{f['size']}}</td>
<td>{{f['type']}}</td>
<td>{{f['encoding']}}</td>
<td><a href="{{ f.href }}">{{ f.text }}</a></td>
<td>{{ f.size }}</td>
<td>{{ f.type }}</td>
<td>{{ f.encoding }}</td>
</tr>
{% endfor %}
</table>
Expand Down

0 comments on commit d67d931

Please sign in to comment.