Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
wizards
mffzoom
Commits
049e07d2
Commit
049e07d2
authored
Apr 14, 2020
by
Martin Mareš
Browse files
App: Show current time
parent
0febf3f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/static/mffzoom.css
View file @
049e07d2
...
...
@@ -68,3 +68,10 @@ body {
margin-top
:
0.5ex
;
font-size
:
9px
;
}
#now
{
height
:
1px
;
background-color
:
#cc0000
;
opacity
:
0.3
;
z-index
:
10
;
}
app/templates/main.html
View file @
049e07d2
...
...
@@ -51,6 +51,9 @@
<p
class=
mdesc
>
{{ m.topic }}
</div>
{% endfor %}
{% if g.now %}
<div
id=
now
style=
'position: absolute; left: {{ g.now.x }}px; top: {{ g.now.y }}px; width: {{ g.now.w }}px;'
></div>
{% endif %}
</div>
</body>
</html>
app/zoom.py
View file @
049e07d2
...
...
@@ -151,6 +151,15 @@ def main_page():
"label"
:
(
dt
+
timedelta
(
seconds
=
first_slot
+
i
*
slot_size
)).
strftime
(
"%H:%M"
),
}
for
i
in
range
(
num_slots
)]
dt_now
=
datetime
.
now
(
tz
=
dateutil
.
tz
.
tzlocal
())
rel_now
=
dt_now
.
timestamp
()
-
dt
.
timestamp
()
-
first_slot
if
rel_now
>
0
and
rel_now
<
num_slots
*
slot_size
:
g
.
now
=
{
"x"
:
0
,
"y"
:
int
(
rel_now
/
3600.
*
room_hour_height
),
"w"
:
row_offset
+
num_rooms
*
room_box_width
+
20
,
}
# XXX: No meeting is ever longer than 24 hours
db_query
(
"""
SELECT m.meeting_id, m.topic, s.start_time, s.duration, u.email, u.full_name
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment