forked from rc/aircox
work on design
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
<title>{{ page.title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="top">
|
||||
<div class="menu top">
|
||||
{% render_sections position="top" %}
|
||||
</div>
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
</header>
|
||||
|
||||
<div class="page flex_row">
|
||||
<nav class="page_left flex_item">
|
||||
<nav class="menu page_left flex_item">
|
||||
{% render_sections position="page_left" %}
|
||||
</nav>
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
{% endblock %}
|
||||
</main>
|
||||
|
||||
<nav class="page_right flex_item">
|
||||
<nav class="menu page_right flex_item">
|
||||
{% render_sections position="page_right" %}
|
||||
</nav>
|
||||
</div>
|
||||
|
@ -4,7 +4,7 @@
|
||||
{% block content_extras %}
|
||||
{% with tracks=page.tracks.all %}
|
||||
{% if tracks %}
|
||||
<div class="playlist">
|
||||
<section class="playlist">
|
||||
<h2>{% trans "Playlist" %}</h2>
|
||||
<ul>
|
||||
{% for track in tracks %}
|
||||
@ -14,11 +14,11 @@
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<div class="dates">
|
||||
<section class="dates">
|
||||
<h2>{% trans "Dates of diffusion" %}</h2>
|
||||
<ul>
|
||||
{% with diffusion=page.diffusion %}
|
||||
@ -28,16 +28,16 @@
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% with podcasts=self.get_podcasts %}
|
||||
{% if podcasts %}
|
||||
<div class="podcasts list">
|
||||
<section class="podcasts list">
|
||||
<h2>{% trans "Podcasts" %}</h2>
|
||||
{% for item in podcasts %}
|
||||
{% include 'cms/snippets/sound_list_item.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
|
@ -25,9 +25,10 @@
|
||||
{% endif %}
|
||||
<section class="body">
|
||||
{{ page.body|richtext}}
|
||||
{% block content_extras %}{% endblock %}
|
||||
</section>
|
||||
|
||||
{% block content_extras %}{% endblock %}
|
||||
|
||||
<div class="post_content">
|
||||
{% render_sections position="post_content" %}
|
||||
</div>
|
||||
|
@ -1,8 +1,10 @@
|
||||
{% extends "cms/sections/section_item.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% with item_date_format="H:i" list_css_class="date_list" %}
|
||||
{% include "cms/snippets/list.html" %}
|
||||
{% with item_date_format="H:i" list_css_class="date_list" list_no_cover=True %}
|
||||
{% for item in object_list %}
|
||||
{% include "cms/snippets/date_list_item.html" %}
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -10,49 +10,50 @@
|
||||
|
||||
|
||||
</style>
|
||||
<div id="player">
|
||||
<div class="box">
|
||||
<audio preload="metadata">
|
||||
{% trans "Your browser does not support the <code>audio</code> element." %}
|
||||
{% for stream in streams %}
|
||||
<source src="{{ stream }}" />
|
||||
{% endfor %}
|
||||
</audio>
|
||||
<div id="player" class="player">
|
||||
<audio preload="metadata">
|
||||
{% trans "Your browser does not support the <code>audio</code> element." %}
|
||||
{% for stream in streams %}
|
||||
<source src="{{ stream }}" />
|
||||
{% endfor %}
|
||||
</audio>
|
||||
|
||||
<button class="play" onclick="Player.play()"
|
||||
title="{% trans "play/pause" %}"></button>
|
||||
<div class="controls flex_row">
|
||||
<progress class="flex_item" value="0" max="1"></progress>
|
||||
<span class="info duration"></span>
|
||||
|
||||
<h3 class="title">{{ self.live_title }}</h3>
|
||||
|
||||
<div>
|
||||
<div class="info duration"></div>
|
||||
<progress value="0" max="1"></progress>
|
||||
|
||||
<input type="checkbox" class="single" id="player_single_mode">
|
||||
<label for="player_single_mode"></label>
|
||||
</div>
|
||||
<input type="checkbox" class="single" id="player_single_mode">
|
||||
<label for="player_single_mode" class="info" title="{% trans "single mode" %}">↻</label>
|
||||
</div>
|
||||
|
||||
<div class="playlist">
|
||||
<li class='item' style="display: none;">
|
||||
<h2 class="title">{{ self.live_title }}</h2>
|
||||
<div class="info duration"></div>
|
||||
<li class='item list_item flex_row' style="display: none;">
|
||||
<div class="button">
|
||||
<img src="{% static "cms/images/play.png" %}" class="play"
|
||||
title="{% trans "play" %}" />
|
||||
<img src="{% static "cms/images/pause.png" %}" class="pause"
|
||||
title="{% trans "pause" %}" />
|
||||
<img src="{% static "cms/images/loading.png" %}" class="loading"
|
||||
title="{% trans "loading..." %}" />
|
||||
</div>
|
||||
|
||||
<h3 class="title flex_item">{{ self.live_title }}</h3>
|
||||
<div class="actions">
|
||||
<a class="action detail" title="{% trans "more informations" %}">➔</a>
|
||||
<a class="action remove" title="{% trans "remove this sound" %}">✖</a>
|
||||
</div>
|
||||
<span class="info duration"></span>
|
||||
</li>
|
||||
</div>
|
||||
<div class='item on_air'>
|
||||
<h2 class="title"></h2>
|
||||
<a class="url">➔</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var player = new Player('player');
|
||||
player.playlist.add(new Sound('{{ self.live_title }}', '', [
|
||||
{% for stream in streams %}'{{ stream }}',{% endfor %}
|
||||
]));
|
||||
var sound = player.playlist.add(new Sound('{{ self.live_title }}', '', undefined,
|
||||
streams=[
|
||||
{% for stream in streams %}'{{ stream }}',{% endfor %}
|
||||
]), on_air_url = '{% url 'controllers.on_air' %}');
|
||||
player.select(sound, false);
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -1,9 +1,11 @@
|
||||
{% extends "cms/sections/section_item.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{{ list_page.url }}" method="GET">
|
||||
<input type="text" name="search" placeholder="{{ self.text }}">
|
||||
<img src="{% static "cms/images/search.png" %}" class="icon"/>
|
||||
<input type="text" name="search" placeholder="{{ self.default_text }}">
|
||||
<input type="submit" style="display: none;">
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
@ -1,6 +1,11 @@
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load honeypot %}
|
||||
|
||||
{% if comment_form or page.comments %}
|
||||
<h2><img src="{% static "cms/images/comments.png" %}" class="icon">{% trans "Comments" %}</h2>
|
||||
{% endif %}
|
||||
|
||||
{% if comment_form %}
|
||||
{% with comment_form as form %}
|
||||
{{ form.non_field_errors }}
|
||||
@ -30,7 +35,10 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<ul>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
<ul class="list">
|
||||
{% for comment in page.comments %}
|
||||
<li class="comment">
|
||||
<div class="metadata">
|
||||
@ -45,8 +53,3 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@ is just a bit different.
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if not list_no_cover %}
|
||||
{% if item_big_cover %}
|
||||
{% image item.cover max-640x480 class="cover big" height="" width="" %}
|
||||
{% elif item.cover %}
|
||||
@ -23,6 +24,7 @@ is just a bit different.
|
||||
{% else %}
|
||||
<div class="cover small"></div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="flex_item">
|
||||
<h3>{{ item.title }}</h3>
|
||||
|
@ -1,13 +1,22 @@
|
||||
{% load static %}
|
||||
|
||||
{# TODO: complete archive podcast -> info #}
|
||||
<a class="list_item sound" onclick="player.playlist.add(new Sound(
|
||||
<div class="list_item sound">
|
||||
<a onclick="player.select(player.playlist.add(new Sound(
|
||||
title='{{ item.name|escape }}',
|
||||
detail='{{ item.detail_url }}',
|
||||
stream='{{ item.url }}'));">
|
||||
<h3>{{ item.name }}</h3>
|
||||
duration={{ item.duration|date:"H*3600+i*60+s" }},
|
||||
streams='{{ item.url }}')));" class="flex_row">
|
||||
<img src="{% static "cms/images/listen.png" %}" class="icon"/>
|
||||
<h3 class="flex_item">{{ item.name }}</h3>
|
||||
|
||||
<span class="info">
|
||||
{{ duration.date|date:'H:i:s' }}
|
||||
{% if item.duration.hour > 0 %}
|
||||
{{ item.duration|date:'H:i:s' }}
|
||||
{% else %}
|
||||
{{ item.duration|date:'i:s' }}
|
||||
{% endif %}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user