Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mffzoom
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wizards
mffzoom
Commits
049e07d2
Commit
049e07d2
authored
5 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
App: Show current time
parent
0febf3f4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/static/mffzoom.css
+7
-0
7 additions, 0 deletions
app/static/mffzoom.css
app/templates/main.html
+3
-0
3 additions, 0 deletions
app/templates/main.html
app/zoom.py
+9
-0
9 additions, 0 deletions
app/zoom.py
with
19 additions
and
0 deletions
app/static/mffzoom.css
+
7
−
0
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
;
}
This diff is collapsed.
Click to expand it.
app/templates/main.html
+
3
−
0
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>
This diff is collapsed.
Click to expand it.
app/zoom.py
+
9
−
0
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment