Merge remote-tracking branch 'mr/4'

This commit is contained in:
Las Zenow 2019-01-16 23:38:56 +00:00
commit b8ecea8944

View file

@ -1,24 +1,6 @@
{{template "header.html" .S}}
<ul class="pager">
{{if .Prev}}
<li class="previous">
<a href="{{.Prev}}">&larr; Prev</a>
</li>
{{end}}
{{if .Book.Active}}
<li class="">
<a href="{{.Back}}">Back</a>
</li>
{{else}}
<span class="label label-warning">waiting for moderation</span>
{{end}}
{{if .Next}}
<li class="next">
<a href="{{.Next}}">Next &rarr;</a>
</li>
{{end}}
</ul>
<div class="row">
<div class="span4">
@ -40,17 +22,31 @@
<script type="text/javascript">
function resizeIframe() {
var contentHeight = $("#bookContent").contents().find("html").height();
var menuHeight = $("#bookMenu").height();
if (contentHeight < menuHeight) {
$("#bookContent").height(menuHeight);
} else {
$("#bookContent").height(contentHeight);
}
$("#bookContent").height(ContentHeight);
}
</script>
<ul class="pager">
{{if .Prev}}
<li class="previous">
<a href="{{.Prev}}">&larr; Prev</a>
</li>
{{end}}
{{if .Book.Active}}
<li class="">
<a href="{{.Back}}">Back</a>
</li>
{{else}}
<span class="label label-warning">waiting for moderation</span>
{{end}}
{{if .Next}}
<li class="next">
<a href="{{.Next}}">Next &rarr;</a>
</li>
{{end}}
</ul>
<iframe id="bookContent" onload="resizeIframe();" style="width: 100%; height: 1080px; border: 0;" scrolling="auto" src="{{.Content}}" seamless="seamless" sandbox="allow-same-origin" frameborder=0></iframe>
</div>
</div>
<ul class="pager">
{{if .Prev}}
@ -68,4 +64,9 @@ function resizeIframe() {
{{end}}
</ul>
</div>
</div>
{{template "footer.html"}}