123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <html>
- <head>
- <title>Achievement Aggregator</title>
- <style type="text/css">
- body {
- font-family: sans-serif;
- }
-
- .achievement {
- border: 1px solid black;
- float: left;
- margin: 5px;
- padding: 2px;
- position: relative;
- display: block;
- width: 450px;
- height: 90px;
- }
-
- .achievement .img {
- width: 90px;
- height: 90px;
- float: left;
- text-align: center;
- }
-
- .achievement .source {
- text-transform: uppercase;
- font-size: small;
- display: inline;
- font-weight: bold;
- }
-
- .achievement .source:after {
- content: ':';
- }
-
- .achievement .name {
- display: inline;
- }
-
- .achievement .description {
- font-style: italic;
- }
-
- .achievement .date {
- position: absolute;
- margin: 0;
- top: 2px;
- right: 2px;
- font-size: small;
- }
-
- td.actions form {
- display: inline;
- }
- </style>
- </head>
- <body>
- <div id="content">
- {% if is_admin %}
- <div class="admin">
- <h1>Admin</h1>
- <h2>Add Source</h2>
- <form action="/admin/source/add" method="post">
- <label>Name: <input type="text" name="name"/></label>
- <label>URL: <input type="text" name="url"/></label>
- <input type="submit" value="Add"/>
- </form>
- </div>
- {% endif %}
-
- <h1>My Accounts</h1>
- <table>
- <tr>
- <th>Source</th>
- <th>Credentials</th>
- </tr>
- {% for account in accounts %}
- <tr>
- <td>{{ account.source.name|escape }}</td>
- <td>{{ account.credentials|escape }}</td>
- <td class="actions">
- <form action="/worker/update" method="post">
- <input type="hidden" name="key" value="{{ account.key|escape }}"/>
- <input type="submit" value="Update now"/>
- </form>
- <form action="/account/delete" method="post">
- <input type="hidden" name="key" value="{{ account.key|escape }}"/>
- <input type="submit" value="Delete"/>
- </form>
- </td>
- </tr>
- {% endfor %}
- </table>
-
- <h2>Add account</h2>
- <form action="/account/add" method="post">
- <label>Type:
- <select name="type">
- {% for source in sources %}
- <option value="{{ source.key|escape }}">{{ source.name|escape }}</option>
- {% endfor %}
- </select>
- </label>
- <label>Credentials: <input type="text" name="credentials"/></label>
- <input type="submit" value="Add"/>
- </form>
-
- <h1>My Achievements</h1>
-
- {% for achievement in achievements %}
- <div class="achievement">
- <p class="source">{{ achievement.achievement.source.name|escape }}</p>
- <div class="img">
- <img src="{{ achievement.achievement.image|escape }}"
- alt="{{ achievement.achievement.name|escape }}"/>
- </div>
- <p class="name">{{ achievement.achievement.name|escape }}</p>
- <p class="description">{{ achievement.achievement.description|escape }}</p>
- <p class="date">{{ achievement.awarded|escape }}</p>
- </div>
- {% endfor %}
- </div>
- </body>
- </html>
|