forked from rc/aircox
some style
This commit is contained in:
parent
fe3f0f0713
commit
298cb5636b
|
@ -5001,6 +5001,10 @@ body.ready .nav-main a {
|
||||||
background: #262626;
|
background: #262626;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-submenu h1 {
|
||||||
|
color: #a2a2a2;
|
||||||
|
}
|
||||||
|
|
||||||
.nav-submenu h2 {
|
.nav-submenu h2 {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,30 @@ class GenericMenu(Menu):
|
||||||
return super().render_html(request)
|
return super().render_html(request)
|
||||||
|
|
||||||
|
|
||||||
|
class GroupMenuItem(MenuItem):
|
||||||
|
"""
|
||||||
|
Display a list of items based on given list of items
|
||||||
|
"""
|
||||||
|
def __init__(self, label, *args, **kwargs):
|
||||||
|
super().__init__(label, None, *args, **kwargs)
|
||||||
|
|
||||||
|
def get_queryset(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def make_item(self, item):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def render_html(self, request):
|
||||||
|
self.request = request
|
||||||
|
self.station = self.request and self.request.aircox.station
|
||||||
|
|
||||||
|
title = '</ul><h2>{}</h2><ul>'.format(self.label)
|
||||||
|
qs = [
|
||||||
|
self.make_item(item).render_html(request)
|
||||||
|
for item in self.get_queryset()
|
||||||
|
]
|
||||||
|
return title + '\n'.join(qs)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Today's diffusions menu
|
# Today's diffusions menu
|
||||||
|
@ -261,31 +285,6 @@ def register_programs_menu_item():
|
||||||
# Submenu hides themselves if there are no children
|
# Submenu hides themselves if there are no children
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
class GroupMenuItem(MenuItem):
|
|
||||||
"""
|
|
||||||
Display a list of items based on given list of items
|
|
||||||
"""
|
|
||||||
def __init__(self, label, *args, **kwargs):
|
|
||||||
super().__init__(label, None, *args, **kwargs)
|
|
||||||
|
|
||||||
def get_queryset(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def make_item(self, item):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def render_html(self, request):
|
|
||||||
self.request = request
|
|
||||||
self.station = self.request and self.request.aircox.station
|
|
||||||
|
|
||||||
title = '<h1>{}</h1>'.format(self.label)
|
|
||||||
qs = [
|
|
||||||
self.make_item(item).render_html(request)
|
|
||||||
for item in self.get_queryset()
|
|
||||||
]
|
|
||||||
return title + '\n'.join(qs)
|
|
||||||
|
|
||||||
|
|
||||||
class SelectStationMenuItem(GroupMenuItem):
|
class SelectStationMenuItem(GroupMenuItem):
|
||||||
"""
|
"""
|
||||||
Menu to display today's diffusions
|
Menu to display today's diffusions
|
||||||
|
@ -297,7 +296,7 @@ class SelectStationMenuItem(GroupMenuItem):
|
||||||
return MenuItem(
|
return MenuItem(
|
||||||
station.name,
|
station.name,
|
||||||
reverse('wagtailadmin_home') + '?aircox.station=' + str(station.pk),
|
reverse('wagtailadmin_home') + '?aircox.station=' + str(station.pk),
|
||||||
classnames = 'icon ' + ('icon-success'
|
classnames = 'icon ' + ('icon-success menu-active'
|
||||||
if station == self.station else
|
if station == self.station else
|
||||||
'icon-cross'
|
'icon-cross'
|
||||||
if not station.active else
|
if not station.active else
|
||||||
|
|
6
notes.md
6
notes.md
|
@ -2,8 +2,8 @@ This file is used as a reminder, can be used as crappy documentation too.
|
||||||
|
|
||||||
|
|
||||||
# for the 1.0
|
# for the 1.0
|
||||||
- sounds:
|
- logs:
|
||||||
- detect id3 tags
|
- do not add track if between two consecutive diffusions
|
||||||
- run tests:
|
- run tests:
|
||||||
- streamer: dealer & streams hours (to localtime)
|
- streamer: dealer & streams hours (to localtime)
|
||||||
x diffusions: update & check algorithms
|
x diffusions: update & check algorithms
|
||||||
|
@ -15,7 +15,7 @@ This file is used as a reminder, can be used as crappy documentation too.
|
||||||
\--> rewrite streamer for client-server controller
|
\--> rewrite streamer for client-server controller
|
||||||
\--> move liquidsoap control on commands/streamer.py
|
\--> move liquidsoap control on commands/streamer.py
|
||||||
- cms:
|
- cms:
|
||||||
- button to select the current station
|
x button to select the current station
|
||||||
|
|
||||||
|
|
||||||
# conventions
|
# conventions
|
||||||
|
|
Loading…
Reference in New Issue
Block a user