mirror of
https://github.com/evilhero/mylar
synced 2025-01-03 05:24:43 +00:00
114 lines
No EOL
4.4 KiB
HTML
114 lines
No EOL
4.4 KiB
HTML
<%!
|
|
import mylar
|
|
%>
|
|
<%
|
|
now_page = pages[current_page]
|
|
%>
|
|
<!doctype html>
|
|
<html class="whole-page">
|
|
<%include file="header.html" />
|
|
|
|
<body class="inner-page">
|
|
<div class="reader-whole">
|
|
% if (current_page + 1) == 1:
|
|
<a class="btn btn-floating btn-large pulse tooltipped" id="settings-help" data-position="bottom" data-delay="50" data-tooltip="Click the center to bring up settings. Click the left and right sides of the page to change pages."><i class="material-icons">help_outline</i></a>
|
|
% endif
|
|
<div class="col s12 overlay-settings">
|
|
<div class="overlay-settings-text">
|
|
<div class="page-left">
|
|
<span class="settings-span-left">
|
|
<h4 style="display: none;" id="page-settings-left-text">
|
|
<i class="large material-icons" id="settings-arrow">arrow_back</i>
|
|
</h4>
|
|
</span>
|
|
</div>
|
|
<div class="page-settings">
|
|
<span class="settings-span-center">
|
|
<p style="display: none;" id="page-settings-text">
|
|
<a class="waves-effect waves-light btn-large" id="settings-button" href="index">Home</a>
|
|
</br>
|
|
</br>
|
|
<b>On Page ${current_page + 1} of ${nop} Pages</b>
|
|
</br>
|
|
</br>
|
|
<a class="waves-effect waves-light btn-large" id="settings-button" action="action" value="Back" onclick="window.history.go(-1); return false">Close Book</a>
|
|
</br>
|
|
</br>
|
|
<b>Fit Comic to Height/Width/No Fit</b>
|
|
</br>
|
|
</br>
|
|
<a class="waves-effect waves-light btn-large" id="size-width-button" href="#!">Width</a>
|
|
<a class="waves-effect waves-light btn-large" id="size-height-button" href="#!">Height</a>
|
|
<a class="waves-effect waves-light btn-large" id="size-normal-button" href="#!">No Fit</a>
|
|
</p>
|
|
</span>
|
|
</div>
|
|
<div class="page-right">
|
|
<span class="settings-span-right">
|
|
<h4 style="display: none;" id="page-settings-right-text"><i class="large material-icons" id="settings-arrow">arrow_forward</i></h4>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row reader-overlay">
|
|
% if size == "wide":
|
|
<img class="reader-page-wide" src="${now_page}"/>
|
|
% elif size == "high":
|
|
<img class="reader-page-high" src="${now_page}"/>
|
|
% elif size == "norm":
|
|
<img class="reader-page-norm" src="${now_page}"/>
|
|
% else:
|
|
<img class="reader-page-wide" src="${now_page}"/>
|
|
% endif:
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$('.modal-trigger').leanModal();
|
|
$(".page-settings").click(function() {
|
|
$(".page-settings").toggleClass( "dimmed" );
|
|
$(".page-left").toggleClass( "dimmed" );
|
|
$(".page-right").toggleClass( "dimmed" );
|
|
$("#page-settings-text").toggle();
|
|
$("#page-settings-left-text").toggle();
|
|
$("#page-settings-right-text").toggle();
|
|
});
|
|
$(".page-right").click(function() {
|
|
$(".whole-page").load("${mylar.CONFIG.HTTP_ROOT}read_comic?ish_id=${ish_id}&page_num=${np}&size=${size}");
|
|
});
|
|
$(".page-left").click(function() {
|
|
$(".whole-page").load("${mylar.CONFIG.HTTP_ROOT}read_comic?ish_id=${ish_id}&page_num=${pp}&size=${size}");
|
|
});
|
|
$(document).one("keyup", function(e) {
|
|
if (e.which == 39) {
|
|
$(".whole-page").load("${mylar.CONFIG.HTTP_ROOT}read_comic?ish_id=${ish_id}&page_num=${np}&size=${size}");
|
|
}
|
|
});
|
|
$(document).one("keyup", function(e) {
|
|
if (e.which == 37) {
|
|
$(".whole-page").load("${mylar.CONFIG.HTTP_ROOT}read_comic?ish_id=${ish_id}&page_num=${pp}&size=${size}");
|
|
}
|
|
});
|
|
$("#size-width-button").click(function() {
|
|
$(".reader-overlay").html("<img class='reader-page-wide' src='${now_page}'/>");
|
|
// $.ajax({
|
|
// url: "up_size_pref?pref=wide"
|
|
// });
|
|
});
|
|
$("#size-height-button").click(function() {
|
|
$(".reader-overlay").html("<img class='reader-page-high' src='${now_page}'/>");
|
|
// $.ajax({
|
|
// url: "up_size_pref?pref=high"
|
|
// });
|
|
});
|
|
$("#size-normal-button").click(function() {
|
|
$(".reader-overlay").html("<img class='reader-page-norm' src='${now_page}'/>");
|
|
// $.ajax({
|
|
// url: "up_size_pref?pref=norm"
|
|
// });
|
|
});
|
|
});
|
|
</script>
|
|
</html> |