Skip to content

Commit

Permalink
Make lots more fiels responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Delaney committed Jun 19, 2016
1 parent 6c68036 commit 6c58cc4
Show file tree
Hide file tree
Showing 7 changed files with 247 additions and 158 deletions.
29 changes: 23 additions & 6 deletions debsources/app/copyright/templates/copyright/checksum.html
Expand Up @@ -10,7 +10,11 @@

{% block title %}Checksum: {{ checksum }}{% endblock %}

{% block breadcrumbs %} <a href='{{ url_for(".index") }}'>Copyright</a> / Checksum / {{ checksum }}{% endblock %}
{% block breadcrumbs %}
<a href='{{ url_for(".index") }}'>
Copyright
</a> / Checksum / {{ checksum }}
{% endblock %}

{% block content %}
<div class="row">
Expand All @@ -19,20 +23,33 @@ <h2>{{ self.title() }}</h2>
{% import "copyright/macros.html" as macro %}
{% if count > 1 %}
<h3>Summary</h3>
<p>This checksum appears {{ count }} times in our database. It appears in under the following licenses:
<p>This checksum appears {{ count }} times in our database.
It appears in under the following licenses:
<ul>
{% for l in licenses %}
<li>{{l}}</li>
{% endfor %}
</ul>

{% if package_filter != true %}
<p>Most frequent package{% if frequent_packages|length > 1 %}s are: {% for p in frequent_packages %} <i>{{ p }}</i>{% if not loop.last %}, {% endif %} {% endfor %}
{% else %} is: <i>{{ frequent_packages[0] }}</i>{% endif %}</p>
<p>Most frequent package
{%- if frequent_packages|length > 1 -%}s are:
{%- for p in frequent_packages -%}
<i>{{ p }}</i>
{%- if not loop.last -%},{%- endif -%}
{%- endfor -%}
{% else %} is: <i>{{ frequent_packages[0] }}</i>
{%- endif -%}</p>
{% endif %}
{% if frequent_licenses|length != 0 %}
<p>Most frequent license{% if frequent_licenses|length > 1 %}s are: {% for l in frequent_licenses %} <i>{{ l }}</i>{% if not loop.last %}, {% endif %} {% endfor %}
{% else %} is: <i>{{ frequent_licenses[0] }}</i>{% endif %}</p>
<p>Most frequent license
{%- if frequent_licenses|length > 1 -%}s are:
{%- for l in frequent_licenses -%}
<i>{{ l }}</i>
{%- if not loop.last -%},{% endif %}
{%- endfor -%}
{% else %} is: <i>{{ frequent_licenses[0] }}</i>
{%- endif -%}</p>
<h3>Details</h3>
{% endif %}

Expand Down
28 changes: 15 additions & 13 deletions debsources/app/copyright/templates/copyright/package.html
Expand Up @@ -16,20 +16,22 @@
{% block breadcrumbs %}<a href="{{ url_for('.index') }}">{{ request.blueprint }}</a> /{% endblock %}

{% block title %}Package: {{ package }}{% endblock %}
{% block source_content %}
<h2>{{ self.title() }}</h2>
{{ macros.show_suite(suite) }}

<ul id="ls">
{% for v in versions %}
<li><a href="{{ url_for('.license', packagename=package, version=v.version) }}">
{{ v.version }}</a>
({{ v.area }})
{% if v.suites %}
[{{ ", ".join(v.suites) }}]
{% endif %}
{% block source_content %}
<div class="row">
<h2>{{ self.title() }}</h2>
{{ macros.show_suite(suite) }}

</li>
{% endfor %}
<ul id="ls">
{% for v in versions %}
<li><a href="{{ url_for('.license', packagename=package, version=v.version) }}">
{{ v.version }}</a>
({{ v.area }})
{% if v.suites %}
[{{ ", ".join(v.suites) }}]
{% endif %}
</li>
{% endfor %}
</ul>
</div>
{% endblock %}
59 changes: 33 additions & 26 deletions debsources/app/patches/templates/patches/package.html
Expand Up @@ -17,34 +17,41 @@

{% block title %}Package: {{ package }}{% endblock %}
{% block source_content %}
<h2>{{ self.title() }}</h2>
{{ macros.show_suite(suite) }}
<div class="row">
<h2>{{ self.title() }}</h2>
{{ macros.show_suite(suite) }}

<ul id="ls">
{% for v in versions %}
<li>{%- if v.supported == true %}<a href="{{ url_for('.summary', packagename=package, version=v.version) }}">{{ v.version }}</a>
{%- else %}
{{ v.version }}
<ul id="ls">
{% for v in versions %}
<li>
{%- if v.supported == true -%}
<a href="{{ url_for('.summary', packagename=package, version=v.version) }}">
{{- v.version -}}
</a>
{%- else %}
{{- v.version -}}
{%- endif %}
({{ v.area }})
{% if v.suites %}
[{{ ", ".join(v.suites) }}]
{% endif %}
{%- if v.supported == true %}
{%- if v.series == 0 %}
<strong>*</strong>
{%- endif %}
{%- endif %}
({{ v.area }})
{% if v.suites %}
[{{ ", ".join(v.suites) }}]
</li>
{% endfor %}
</ul>
<p>
{% if is_empty == true %}
<small>* This package has no patches yet.</small><br>
{% endif %}
{%- if v.supported == true %}
{%- if v.series == 0 %}
<strong>*</strong>
{%- endif %}
{%- endif %}
</li>
{% endfor %}
</ul>
<p>
{% if is_empty == true %}
<small>* This package has no patches yet.</small><br>
{% endif %}

<small>Note: packages without a link may have patches in a different format
than 3.0 (quilt).</small>
</p>

<small>
Note: packages without a link may have patches in a different format
than 3.0 (quilt).
</small>
</p>
</div>
{% endblock %}
7 changes: 6 additions & 1 deletion debsources/app/patches/templates/patches/patch.html
Expand Up @@ -15,16 +15,21 @@
href="{{ config.HIGHLIGHT_JS_FOLDER }}/styles/{{ config.HIGHLIGHT_STYLE }}.css">
<script src="{{ config.HIGHLIGHT_JS_FOLDER }}/highlight.min.js"></script>
{% endblock %}

{% block breadcrumbs %} <a href='{{ url_for(".index") }}'>Patches</a> / Patch / <a href="{{ url_for('.versions', packagename=package) }}">{{ package }}</a> / <a href="{{ url_for('.summary', packagename=package, version=version) }}">{{ version }}</a>
{% endblock %}

{% block title %}Package: {{ package }}{% endblock %}

{% block content %}

<h2>{{ self.title() }} / {{ version }}</h2>

{% include "source_file_code.inc.html" %}

<script type="text/javascript">
debsources.source_file();
hljs.highlightBlock(document.getElementById('sourcecode'))

</script>

{% endblock %}
115 changes: 78 additions & 37 deletions debsources/app/patches/templates/patches/summary.html
Expand Up @@ -15,59 +15,100 @@
}
</style>
{% endblock %}
{% block breadcrumbs %} <a href='{{ url_for(".index") }}'>Patches</a> / <a href="{{ url_for('.versions', packagename=package) }}">{{ package }}</a> /{{ version }}

{% block breadcrumbs %}
<a href='{{ url_for(".index") }}'>
Patches</a> /
<a href="{{ url_for('.versions', packagename=package) }}">
{{ package }}</a> / {{ version }}
{% endblock %}

{% block title %}Package: {{ package }}{% endblock %}

{% block content %}
<h2>{{ self.title() }} / {{ version }}</h2>
<div class="row">
<h2>{{ self.title() }} / {{ version }}</h2>

<h3>Metadata</h3>
<table>
<tr class="head">
<th>Package</th>
<th>Version</th>
<th>Patches format</th>
</tr>
<tr>
<td>{{ package }}</td>
<td>{{ version }}</td>
<td>{{ format.rstrip() }}</td>
</tr>
</table>
<h3 class="subtitle">Metadata</h3>
<table class="table">
<tr class="head">
<th>Package</th>
<th>Version</th>
<th>Patches format</th>
</tr>
<tr>
<td>{{ package }}</td>
<td>{{ version }}</td>
<td>{{ format.rstrip() }}</td>
</tr>
</table>
</div>

{% if supported != true %}
<p>The format of the patches in the package is not yet supported! </p>
{% else %}
{% if patches|length == 0 %}
<p>This package has no patches.</p>
<div class="row">
{% if supported != true %}
<p>The format of the patches in the package is not yet supported! </p>
{% else %}
<h3>Patch series</h3>
<small>
<a href="{{ url_for('sources.source', path_to=package + '/' + version + '/debian/patches/series') }}">
view the series file
</a>
</small>
<table>
{% if patches|length == 0 %}
<p>This package has no patches.</p>
{% else %}
<h3 class="subtitle">Patch series</h3>
<small>
<a href="{{ url_for('sources.source',
path_to=package + '/' + version + '/debian/patches/series') }}">
view the series file
</a>
</small>
<table class="table">
<tr class="head">
<th>Patch</th>
<th>File delta</th>
<th>Description</th>
</tr>
{% for patch in series %}
<tr>
<td><a href="{{ url_for('.patch_view', packagename=package, version=version, path_to=patch.rstrip().split(' ')[0])}}">{{ patch.rstrip().replace('-', ' ') }}</a> | <a href="{{ patches[patch]['download'] }}">(download)</a></td>
<td><p>{%- for line in patches[patch]['deltas'] %}
<a href="{{ url_for('sources.source', path_to=path + '/' + line['filepath'])}}">{{ line['filepath'] }}</a> |
<span title='from diffstat manual: f0 for concise, which shows only the value and a single histogram code for each of insert (+), delete (-) or modify (!)'>{{ line['deltas'] }}</span><br />
{%- endfor %} {{ patches[patch]['summary'] }}</p></td>
<td><pre class="description">{{ patches[patch]['description'].decode('utf-8') }}</pre>
{%- if patches[patch]['bug'] != "" %}
<p>Bug: <a href="https://bugs.debian.org/{{patches[patch]['bug']}}">#{{patches[patch]['bug']}}</a></p>
{%- endif %}
<td>
<a href="{{ url_for('.patch_view',
packagename=package, version=version, path_to=patch.rstrip().split(' ')[0])}}">
{{ patch.rstrip().replace('-', ' ') }}
</a> <br class="visable-sm"/>
<a href="{{ patches[patch]['download'] }}">
(download)
</a>
</td>
<td>
<div class="file-delta">
{%- for line in patches[patch]['deltas'] %}
<a href="{{ url_for('sources.source',
path_to=path + '/' + line['filepath'])}}">
{{ line['filepath'] }}</a>
<br />
<span class="diff"
title='from diffstat manual: f0 for concise, which shows only the value and a single histogram code for each of insert (+), delete (-) or modify (!)'>
{{ line['deltas'] }}
</span>
<br />
{%- endfor %}
<span class="delta-summary">
{{ patches[patch]['summary'] }}
</span>
</div>
</td>
<td>
<pre class="description">
{{ patches[patch]['description'].decode('utf-8') }}
</pre>
{%- if patches[patch]['bug'] != "" %}
<p>Bug:
<a href="https://bugs.debian.org/{{patches[patch]['bug']}}">
#{{patches[patch]['bug']}}
</a>
</p>
{%- endif %}
</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% endif %}
{% endif %}
</div>
{% endblock %}
31 changes: 24 additions & 7 deletions debsources/app/static/css/base.css
Expand Up @@ -5,9 +5,10 @@
*/


/* Base (templates/base.html styles */
/* # Base (templates/base.html styles */

/* displayed on index.html */

/* ## Displayed on index.html */


#indexmenu {
Expand Down Expand Up @@ -65,7 +66,7 @@
width: 90%;
}

/* lists made in multiple columns (e.g. in macros.listpackages() */
/* ## Lists made in multiple columns (e.g. in macros.listpackages() */

.listcolumn li {
margin-left: 30px;
Expand Down Expand Up @@ -117,7 +118,23 @@ table.rrd tr td {
border: none;
}

/* infobox */
/* ## Alternative misc styles */

.subtitle {
margin: 0.5em 0 0.5em 0;
}

/* ## File Deltas */

.file-delta > .diff {
color: grey;
}

.file-delta > .delta-summary {
font-size: .7em;
}

/* ## Infobox */

#pkginfobox {
}
Expand Down Expand Up @@ -184,7 +201,7 @@ hr.doc{
width:10%;
}

/* Related to responsiveness (mobile friendily css) */
/* ## Related to responsiveness (mobile friendily css) */

/* max-width: @screen-md-max
* This will target md, sm, and xs screens */
Expand All @@ -197,7 +214,6 @@ hr.doc{
padding-left: 1em;
right: inherit;
top: inherit;

}

#infobox_content {
Expand Down Expand Up @@ -244,12 +260,13 @@ hr.doc{

/* Firefox specific hack for fieldsetting
* see: https://stackoverflow.com/q/17408815 */

@-moz-document url-prefix() {
fieldset {
display: table-cell;
}

/* bootstrap resets */
/* ## Bootstrap Resets */

a, a:hover, a:focus {
color: #222;
Expand Down

0 comments on commit 6c58cc4

Please sign in to comment.