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