Simplify html and css
This commit is contained in:
parent
bd7e5f68dd
commit
5457fa834f
4
main.css
4
main.css
|
@ -1,8 +1,8 @@
|
|||
/* Theming taken from https://github.com/vector-im/riot-web/blob/cf5cf02529f95a094d88051c12fdb87a03d87335/src/skins/vector/css/themes/_base.scss */
|
||||
table {
|
||||
.room {
|
||||
margin-left: 2em;
|
||||
}
|
||||
td {
|
||||
.info {
|
||||
align-items: center;
|
||||
display:flex;
|
||||
}
|
||||
|
|
39
spaces.html
39
spaces.html
|
@ -11,33 +11,36 @@
|
|||
</head>
|
||||
<body>
|
||||
<%def name="render(room)">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
% if 'avatar_url' in room:
|
||||
<td><img class="avatar roomAvatar" src=${mxc2url(room['avatar_url'])}>
|
||||
% endif
|
||||
|
||||
% if 'room_id' in room:
|
||||
<a href="https://view.matrix.org/room/${room['room_id']}">
|
||||
|
||||
% if 'name' in room:
|
||||
<div> ${room['name']} </div>
|
||||
<div class="room">
|
||||
<div class="info">
|
||||
% if 'avatar_url' in room:
|
||||
<img class="avatar roomAvatar" src=${mxc2url(room['avatar_url'])}>
|
||||
% endif
|
||||
|
||||
|
||||
</a>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
% if 'room_id' in room:
|
||||
% if 'children' not in room:
|
||||
<a href="https://view.matrix.org/room/${room['room_id']}">
|
||||
% endif
|
||||
|
||||
% if 'name' in room:
|
||||
<div> ${room['name']} </div>
|
||||
% endif
|
||||
|
||||
</a>
|
||||
% endif
|
||||
</div>
|
||||
|
||||
% if 'children' in room:
|
||||
<details>
|
||||
% for subroom in room['children']:
|
||||
<tr><td>${render(subroom)}</td></tr>
|
||||
${render(subroom)}
|
||||
% endfor
|
||||
</details>
|
||||
% endif
|
||||
</div>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</%def>
|
||||
|
||||
${render(s)}
|
||||
|
|
Loading…
Reference in New Issue