Compare commits
No commits in common. "c61f0ce3725683c6ec48e3e352effd104aabba13" and "a0ff199506921b8b4053f71606f5356bcfa93070" have entirely different histories.
c61f0ce372
...
a0ff199506
10
main.css
10
main.css
|
@ -1,11 +1,4 @@
|
||||||
/* 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 */
|
||||||
tbody {
|
|
||||||
margin-left: 2em;
|
|
||||||
}
|
|
||||||
tr {
|
|
||||||
margin-left: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
color: #454545;
|
color: #454545;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
@ -88,9 +81,6 @@ table#timeline {
|
||||||
table#timeline tr {
|
table#timeline tr {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
tr {
|
|
||||||
margin-left: 2em;
|
|
||||||
}
|
|
||||||
td.rightAlign {
|
td.rightAlign {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
|
|
|
@ -4,11 +4,6 @@
|
||||||
from mako.template import Template
|
from mako.template import Template
|
||||||
import json
|
import json
|
||||||
|
|
||||||
def mxc2url(mxc):
|
|
||||||
serverName = mxc.split('/')[2]
|
|
||||||
mediaId = mxc.split('/')[3]
|
|
||||||
return "https://matrix.org/_matrix/media/v3/download/" + serverName + "/" + mediaId
|
|
||||||
|
|
||||||
def render(spaces, template):
|
def render(spaces, template):
|
||||||
appTemplate = Template(filename=template)
|
appTemplate = Template(filename=template)
|
||||||
print(appTemplate.render(s=spaces))
|
print(appTemplate.render(s=spaces))
|
||||||
|
|
28
spaces.html
28
spaces.html
|
@ -1,9 +1,3 @@
|
||||||
<%!
|
|
||||||
def mxc2url(mxc):
|
|
||||||
serverName = mxc.split('/')[2]
|
|
||||||
mediaId = mxc.split('/')[3]
|
|
||||||
return "https://matrix.org/_matrix/media/v3/download/" + serverName + "/" + mediaId
|
|
||||||
%>
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -11,33 +5,29 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<%def name="render(space)">
|
<%def name="render(space)">
|
||||||
<table>
|
<table id="roomList">
|
||||||
<tbody>
|
<tbody>
|
||||||
% for room in space:
|
% for room in space:
|
||||||
<tr>
|
<tr>
|
||||||
% if 'avatar_url' in room:
|
|
||||||
<td><img class="avatar roomAvatar" src=${mxc2url(room['avatar_url'])}></td>
|
|
||||||
% endif
|
|
||||||
% if 'room_type' in room and room['room_type'] == "m.space":
|
% if 'room_type' in room and room['room_type'] == "m.space":
|
||||||
<td><div> Subspace: ${room['name']} </div></td>
|
<td> Subspace: ${room['name']} <td>
|
||||||
</tr>
|
${render(room['children_state'])}
|
||||||
<tr><td>${render(room['children_state'])}</td></tr>
|
|
||||||
% else:
|
% else:
|
||||||
|
|
||||||
% if 'room_id' in room:
|
% if 'room_id' in room:
|
||||||
<td><a href="https://view.matrix.org/room/${room['room_id']}">
|
<td>
|
||||||
|
<a href="https://view.matrix.org/room/${room['room_id']}">
|
||||||
% if 'name' in room:
|
% if 'name' in room:
|
||||||
<div> ${room['name']} </div>
|
<div> ${room['name']} </td>
|
||||||
% endif
|
% endif
|
||||||
|
|
||||||
</a> </td>
|
</a>
|
||||||
|
</td>
|
||||||
% endif
|
% endif
|
||||||
</tr>
|
|
||||||
% endif
|
% endif
|
||||||
|
</tr>
|
||||||
% endfor
|
% endfor
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
${render(s)}
|
${render(s)}
|
||||||
|
|
Loading…
Reference in New Issue