forked from jan/debianmemberportfolio
improved design, additional texts, base template
- add style classes to output table - add Debian and AGPL logos - use a base template for common template code - add proper styles for output table
This commit is contained in:
parent
eb4341c0db
commit
ed65846189
6 changed files with 196 additions and 127 deletions
BIN
ddportfolioservice/public/images/agplv3-88x31.png
Normal file
BIN
ddportfolioservice/public/images/agplv3-88x31.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
ddportfolioservice/public/images/openlogo-100.jpg
Normal file
BIN
ddportfolioservice/public/images/openlogo-100.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
|
@ -3,6 +3,19 @@ html, body {
|
|||
font-size:10pt;
|
||||
}
|
||||
|
||||
#debianlogo {
|
||||
float:right;
|
||||
}
|
||||
|
||||
#content {
|
||||
clear:both;
|
||||
}
|
||||
|
||||
#agpllogo {
|
||||
float:left;
|
||||
margin-right:10px;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse:collapse;
|
||||
width:100%;
|
||||
|
@ -12,6 +25,23 @@ th, td {
|
|||
border:1px solid grey;
|
||||
}
|
||||
|
||||
tr.section {
|
||||
background-color: #a0a0a0;
|
||||
color: #f0f0f0;
|
||||
}
|
||||
|
||||
tr.odd td {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
tr.even td {
|
||||
background-color: #e0e0ff;
|
||||
}
|
||||
|
||||
tr.error td {
|
||||
background-color: #ffe0e0;
|
||||
}
|
||||
|
||||
td {
|
||||
vertical-align:top;
|
||||
padding:2px;
|
||||
|
@ -23,6 +53,5 @@ td p {
|
|||
}
|
||||
|
||||
.errormsg {
|
||||
font-size:80%;
|
||||
color:red;
|
||||
}
|
45
ddportfolioservice/templates/base.mako
Normal file
45
ddportfolioservice/templates/base.mako
Normal file
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<%doc>
|
||||
Template for the data input form.
|
||||
Copyright (c) 2009 Jan Dittberner <jan@dittberner.info>
|
||||
|
||||
This file is part of DDPortfolio service.
|
||||
|
||||
DDPortfolio service is free software: you can redistribute it and/or
|
||||
modify it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
DDPortfolio service is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public
|
||||
License along with this program. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
</%doc>
|
||||
<html>
|
||||
<head>
|
||||
<title>${_('Debian Developer Portfolio Service')}${self.titleaddon()}</title>
|
||||
${h.stylesheet_link('/stylesheets/style.css')}
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
${h.image('/images/openlogo-100.jpg', _('Debian Logo'), 100, 100,
|
||||
id='debianlogo')}
|
||||
<h1>${_('Debian Developer Portfolio Service')}</h1>
|
||||
<p>${_('''This service has been inspired by Stefano Zachioli's <a href="http://wiki.debian.org/DDPortfolio">DDPortfolio page in the Debian Wiki</a>. You can create a set of customized links leading to a Debian Developer's or package maintainer's information regarding Debian.''')}</p>
|
||||
</div>
|
||||
<div id="content">
|
||||
${self.body()}
|
||||
</div>
|
||||
<div id="footer">
|
||||
${h.image('/images/agplv3-88x31.png', _('AGPL - Free Software'), 88, 31,
|
||||
id='agpllogo')}
|
||||
<p>${_('''The service is available under the terms of the <a href="http://www.gnu.org/licenses/agpl.html">GNU Affero General Public License</a> as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. You can <a href="http://ddportfolio.debian.net/gitweb?p=ddportfolioservice.git;a=summary">download the source code</a> using <a href="http://git.or.cz">git</a>.''')}</p>
|
||||
<p>${_('''Copyright © 2009 Jan Dittberner''')}</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,5 +1,4 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<%inherit file="base.mako" />
|
||||
<%doc>
|
||||
Template for the data input form.
|
||||
Copyright (c) 2009 Jan Dittberner <jan@dittberner.info>
|
||||
|
@ -20,12 +19,9 @@ You should have received a copy of the GNU Affero General Public
|
|||
License along with this program. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
</%doc>
|
||||
<html>
|
||||
<head>
|
||||
<title>${_('Debian Developer Portfolio')}</title>
|
||||
${h.stylesheet_link('/stylesheets/style.css')}
|
||||
</head>
|
||||
<body>
|
||||
<%def name="titleaddon()">
|
||||
- ${_('Enter your personal information')}
|
||||
</%def>
|
||||
${h.form(h.url_for(action='urllist'), method='get')}
|
||||
<fieldset id="ddportfolio">
|
||||
<legend>${_('Debian Developer Portfolio')}</legend>
|
||||
|
@ -36,7 +32,7 @@ License along with this program. If not, see
|
|||
<span class="errormsg">${c.messages['errors']['email']}</span>
|
||||
% endif
|
||||
</label><br />
|
||||
${h.text('email', value=request.params.get('email', None))}<br />
|
||||
${h.text('email', request.params.get('email', None), id='email')}<br />
|
||||
</div>
|
||||
<div id="namefield">
|
||||
<label for="name">${_('Name:')}
|
||||
|
@ -45,7 +41,7 @@ License along with this program. If not, see
|
|||
<span class="errormsg">${c.messages['errors']['name']}</span>
|
||||
% endif
|
||||
</label><br />
|
||||
${h.text('name', value=request.params.get('name', None))}<br />
|
||||
${h.text('name', request.params.get('name', None), id='name')}<br />
|
||||
</div>
|
||||
<div id="gpgfpfield">
|
||||
<label for="gpgfp">${_('GPG fingerprint:')}
|
||||
|
@ -54,7 +50,7 @@ License along with this program. If not, see
|
|||
<span class="errormsg">${c.messages['errors']['gpgfp']}</span>
|
||||
% endif
|
||||
</label><br />
|
||||
${h.text('gpgfp', value=request.params.get('gpgfp', None))}<br />
|
||||
${h.text('gpgfp', request.params.get('gpgfp', None), id='gpgfp')}<br />
|
||||
</div>
|
||||
<div id="usernamefield">
|
||||
<label for="username">${_('Debian user name:')}
|
||||
|
@ -63,8 +59,8 @@ License along with this program. If not, see
|
|||
<span class="errormsg">${c.messages['errors']['username']}</span>
|
||||
% endif
|
||||
</label><br />
|
||||
${h.text('username',
|
||||
value=request.params.get('username', None))}<br />
|
||||
${h.text('username', request.params.get('username', None),
|
||||
id='username')}<br />
|
||||
</div>
|
||||
<div id="nonddemailfield">
|
||||
<label for="nonddemail">${_('Non DD email address:')}
|
||||
|
@ -73,8 +69,8 @@ License along with this program. If not, see
|
|||
<span class="errormsg">${c.messages['errors']['nonddemail']}</span>
|
||||
% endif
|
||||
</label><br />
|
||||
${h.text('nonddemail',
|
||||
value=request.params.get('nonddemail', None))}<br />
|
||||
${h.text('nonddemail', request.params.get('nonddemail', None),
|
||||
id='nonddemail')}<br />
|
||||
</div>
|
||||
<div id="aliothusernamefield">
|
||||
<label for="aliothusername">${_('Alioth user name:')}
|
||||
|
@ -84,8 +80,8 @@ License along with this program. If not, see
|
|||
class="errormsg">${c.messages['errors']['aliothusername']}</span>
|
||||
% endif
|
||||
</label><br />
|
||||
${h.text('aliothusername',
|
||||
value=request.params.get('username', None))}<br />
|
||||
${h.text('aliothusername', request.params.get('username', None),
|
||||
id='aliothusername')}<br />
|
||||
</div>
|
||||
<div id="modefield">
|
||||
<label for="mode_html">${_('Output format:')}
|
||||
|
@ -102,5 +98,3 @@ License along with this program. If not, see
|
|||
</div>
|
||||
</fieldset>
|
||||
${h.end_form()}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<%inherit file="base.mako" />
|
||||
<%doc>
|
||||
Template for the url output page.
|
||||
Copyright (c) 2009 Jan Dittberner <jan@dittberner.info>
|
||||
|
@ -20,35 +19,39 @@ You should have received a copy of the GNU Affero General Public
|
|||
License along with this program. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
</%doc>
|
||||
<html>
|
||||
<head>
|
||||
<title>${_('Debian Developer Portfolio')}</title>
|
||||
${h.stylesheet_link('/stylesheets/style.css')}
|
||||
</head>
|
||||
<body>
|
||||
<%def name="titleaddon()">
|
||||
- ${_('Your personal links')}
|
||||
</%def>
|
||||
% if c.urldata:
|
||||
<fieldset id="ddportfolio">
|
||||
<legend>${_('Debian Developer Portfolio')}</legend>
|
||||
<table>
|
||||
<table id="urltable">
|
||||
<thead>
|
||||
<tr><th>${_('Usage')}</th><th>${_('URL')}</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
% for row in c.urldata:
|
||||
% if row[0] == 'section':
|
||||
<tr><th class="sectionlabel" colspan="2">${row[2]}</th></tr>
|
||||
<tr class="section"><th class="sectionlabel" colspan="2">${row[2]}</th></tr>
|
||||
<% urlclass = 'odd' %>
|
||||
% elif row[0] == 'error':
|
||||
<tr>
|
||||
<tr class="error">
|
||||
<td>${h.textile(row[4])}</td>
|
||||
<td>${_('Error during URL creation')}<br />
|
||||
<td>${_('Error during URL creation:')}
|
||||
<span class="errormsg">${row[3].replace("\n",
|
||||
'<br />')}</span></td>
|
||||
</tr>
|
||||
% else:
|
||||
<tr>
|
||||
<tr class="url ${urlclass}">
|
||||
<td>${h.textile(row[4])}</td>
|
||||
<td>${h.link_to(h.truncate(row[3], length=120), row[3])}</td>
|
||||
</tr>
|
||||
<%
|
||||
if urlclass == 'odd':
|
||||
urlclass = 'even'
|
||||
else:
|
||||
urlclass = 'odd'
|
||||
%>
|
||||
% endif
|
||||
% endfor
|
||||
</tbody>
|
||||
|
@ -56,5 +59,3 @@ License along with this program. If not, see
|
|||
</fieldset>
|
||||
% endif
|
||||
<p>${h.link_to(_('Restart'), h.url_for(action='index'))}</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue