mirror of
https://github.com/janeczku/calibre-web
synced 2024-09-27 22:58:22 +00:00
add epub reader flow setting
This commit is contained in:
parent
7a961c9011
commit
2617bdaf52
@ -416,7 +416,7 @@ input:-moz-placeholder { color: #454545; }
|
|||||||
|
|
||||||
.md-content > div p {
|
.md-content > div p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 10px 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#searchResults li > p {
|
#searchResults li > p {
|
||||||
@ -551,11 +551,11 @@ input:-moz-placeholder { color: #454545; }
|
|||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
height: 320px;
|
height: 265px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.md-content > div {
|
.md-content > div {
|
||||||
padding: 15px 40px 30px;
|
padding: 15px 40px 10px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -572,7 +572,7 @@ input:-moz-placeholder { color: #454545; }
|
|||||||
border: none;
|
border: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin-top: 5%;
|
margin-top: 2%;
|
||||||
margin-right: 1%;
|
margin-right: 1%;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.slider {
|
.slider {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translate(0,-50%);
|
transform: translate(0,-20%);
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
@ -83,6 +83,16 @@
|
|||||||
<button type="button" id="sepiaTheme" class="sepiaTheme" onclick="selectTheme(this.id)"><span id="sepiaSelected"> </span>{{_('Sepia')}}</button>
|
<button type="button" id="sepiaTheme" class="sepiaTheme" onclick="selectTheme(this.id)"><span id="sepiaSelected"> </span>{{_('Sepia')}}</button>
|
||||||
<button type="button" id="blackTheme" class="blackTheme" onclick="selectTheme(this.id)"><span id="blackSelected"> </span>{{_('Black')}}</button>
|
<button type="button" id="blackTheme" class="blackTheme" onclick="selectTheme(this.id)"><span id="blackSelected"> </span>{{_('Black')}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<p>
|
||||||
|
<!-- Hardcoded pagination as the initial value as it is the "default" flow. Need to find a way to do this dynamically on startup-->
|
||||||
|
<label for="readerFlow">{{_('Reader flow:')}}</label>
|
||||||
|
<select id="readerFlow" name="readerFlow">
|
||||||
|
<option value="paginated">{{_('Paginated')}}</option>
|
||||||
|
<option value="scrolled-doc">{{_('Scrolled')}}</option>
|
||||||
|
</select>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
<input type="checkbox" id="sidebarReflow" name="sidebarReflow">{{_('Reflow text when sidebars are open.')}}
|
<input type="checkbox" id="sidebarReflow" name="sidebarReflow">{{_('Reflow text when sidebars are open.')}}
|
||||||
@ -146,6 +156,17 @@
|
|||||||
fontSizeFader.addEventListener ("change", function () {
|
fontSizeFader.addEventListener ("change", function () {
|
||||||
reader.rendition.themes.fontSize(`${this.value}%`)
|
reader.rendition.themes.fontSize(`${this.value}%`)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// reader flow settings logic
|
||||||
|
let readerFlow = document.getElementById('readerFlow');
|
||||||
|
readerFlow.addEventListener ("change", function () {
|
||||||
|
reader.rendition.flow(this.value);
|
||||||
|
if (this.value === "paginated") {
|
||||||
|
document.getElementById("divider").classList.add("show");
|
||||||
|
} else {
|
||||||
|
document.getElementById("divider").classList.remove("show");
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<script src="{{ url_for('static', filename='js/libs/screenfull.min.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/libs/screenfull.min.js') }}"></script>
|
||||||
<script src="{{ url_for('static', filename='js/libs/reader.min.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/libs/reader.min.js') }}"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user