fix some bugs with audio
This commit is contained in:
parent
042a0ef17f
commit
f5eaf8daf1
@ -147,14 +147,13 @@ class Audio(object):
|
||||
"source": source,
|
||||
"target": target,
|
||||
"binary": "%s" % options["binary"],
|
||||
"format": ".%s" % options["format"],
|
||||
"loglevel": "-loglevel %s" % options["loglevel"],
|
||||
"audio": "-c:a %s" % options["audio"],
|
||||
}
|
||||
|
||||
warning("Generation", source)
|
||||
|
||||
command = "{binary} {loglevel} -i {source} {audio} -y {target}{format}".format(**ffmpeg_switches)
|
||||
|
||||
command = "{binary} {loglevel} -i {source} {audio} -y {target}".format(**ffmpeg_switches)
|
||||
print(command)
|
||||
error(os.system(command) == 0, "%s command failed" % ffmpeg_switches["binary"])
|
||||
|
||||
|
@ -315,9 +315,11 @@ a.google {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
/*
|
||||
.author-meta {
|
||||
padding-bottom: 7em;
|
||||
}
|
||||
*/
|
||||
|
||||
.author-info {
|
||||
color: #ccc;
|
||||
@ -443,3 +445,30 @@ a.google {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 1.5em 10px;
|
||||
padding: 0.5em 10px;
|
||||
quotes: "\201C""\201D""\2018""\2019";
|
||||
}
|
||||
|
||||
blockquote:before {
|
||||
color: #ccc;
|
||||
content: open-quote;
|
||||
font-size: 4em;
|
||||
line-height: 0.1em;
|
||||
margin-right: 0.25em;
|
||||
vertical-align: -0.4em;
|
||||
}
|
||||
|
||||
blockquote:after {
|
||||
color: #ccc;
|
||||
content: close-quote;
|
||||
font-size: 4em;
|
||||
line-height: 0.1em;
|
||||
margin-left: 0.25em;
|
||||
vertical-align: -0.4em;
|
||||
}
|
||||
|
||||
blockquote p {
|
||||
display: inline;
|
||||
}
|
||||
|
@ -1,10 +1,8 @@
|
||||
{% if section.image.type == "audio" %}
|
||||
{% set audio = Audio(section.image) %}
|
||||
{{ audio.copy() }}
|
||||
{% endif %}
|
||||
<div class="audio-player">
|
||||
<h2>{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}</h2>
|
||||
<audio controls>
|
||||
<source src="{{ audio }}.mp3" type="audio/mpeg">
|
||||
<source src="{{ audio }}" type="audio/mpeg">
|
||||
</audio>
|
||||
</div>
|
||||
|
@ -16,15 +16,17 @@
|
||||
<span>
|
||||
<a href="http://twitter.com/{{ section.twitter }}">Twitter</a>
|
||||
</span>
|
||||
{% if section.facebook or section.website %}
|
||||
<span> | </span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if section.facebook %}
|
||||
<span>
|
||||
<a href="http://facebook.com/{{ section.facebook }}">Facebook</a>
|
||||
</span>
|
||||
<span> | </span>
|
||||
{% endif %}
|
||||
{% if section.website %}
|
||||
<span> | </span>
|
||||
<span>
|
||||
<a href="{{ section.sebsite }}">{{ section.website }}</a>
|
||||
</span>
|
||||
|
@ -2,12 +2,10 @@
|
||||
{% set pathstatic = ".." %}
|
||||
{% else %}
|
||||
{% set pathstatic = "." %}
|
||||
{% endif %}
|
||||
{% if section.image.type == "audio" %}
|
||||
{% set audio = Audio(section.image) %}
|
||||
{{ audio.copy() }}
|
||||
{% endif %}
|
||||
{% set audio = Audio(section.image) %}
|
||||
<h4>{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}</h4>
|
||||
<audio controls>
|
||||
<source src="{{ pathstatic }}/{{ audio }}.mp3" type="audio/mpeg">
|
||||
<source src="{{ pathstatic }}/{{ audio }}" type="audio/mpeg">
|
||||
</audio>
|
||||
|
Loading…
x
Reference in New Issue
Block a user