added .story-page page-break, improved ui document selection
This commit is contained in:
@@ -96,3 +96,13 @@ p {
|
|||||||
/*-webkit-region-break-inside: avoid;*/
|
/*-webkit-region-break-inside: avoid;*/
|
||||||
/* break-inside: avoid;*/
|
/* break-inside: avoid;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.story-page, .page-break {
|
||||||
|
/* Apply this class to an element to put it on a new region.
|
||||||
|
* Hint:
|
||||||
|
* You can also use an empty <div class="page-break"></div>
|
||||||
|
* if you want to put manual page breaks without attaching it to an HTML element
|
||||||
|
*/
|
||||||
|
// -webkit-region-break-before: always;
|
||||||
|
break-after: region;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* the geometry of the page */
|
/* the geometry of the page */
|
||||||
$page-width: 210mm;
|
$page-width: 210mm;
|
||||||
$page-height: 290mm;
|
$page-height: 297mm;
|
||||||
|
|
||||||
/* the size of the crop marks*/
|
/* the size of the crop marks*/
|
||||||
$crop-size: 7mm;
|
$crop-size: 7mm;
|
||||||
|
|||||||
+23
-15
@@ -1,28 +1,36 @@
|
|||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
|
|
||||||
|
$('select[name="document"]').change(function(e){
|
||||||
|
console.log("document selection",this);
|
||||||
|
$('iframe').attr('src', this.value);
|
||||||
|
});
|
||||||
|
|
||||||
$.getJSON('build/toc.json', function(data){
|
$.getJSON('build/toc.json', function(data){
|
||||||
// console.log(data);
|
console.log(data);
|
||||||
for (book of data) {
|
for (book in data) {
|
||||||
// console.log(book);
|
console.log(data[book]);
|
||||||
// var $optgroup = $('<optgroup>').attr('label', book.label);
|
// var $optgroup = $('<optgroup>').attr('label', data[book].label);
|
||||||
// for (page of book.pages) {
|
// for (page of data[book].pages) {
|
||||||
// // console.log(page);
|
// // console.log(page);
|
||||||
// $optgroup.append($('<option>').attr('value', book.label+'/'+page.file).text(book.label+' : '+page.label));
|
// $optgroup.append($('<option>').attr('value', data[book].label+'/'+page.file).text(data[book].label+' : '+page.label));
|
||||||
// }
|
// }
|
||||||
$('[name="document"]').append(
|
$('[name="document"]').append(
|
||||||
$('<option>')
|
$('<option>')
|
||||||
.attr('value', book.file).text(book.label)
|
.attr('value', data[book].file).text(data[book].label)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
$('select[name="document"]').change(function(e){
|
console.log(window.location.hash);
|
||||||
// console.log(e);
|
|
||||||
// var optionSelected = $("option:selected", this);
|
var hash = parseInt(window.location.hash.replace('#',''));
|
||||||
// var valueSelected = ;
|
console.log(hash);
|
||||||
// console.log(this.value);
|
|
||||||
$('iframe').attr('src', this.value);
|
var value = $('[name="document"] option:eq('+hash+')').attr('value');
|
||||||
});
|
console.log('value', value);
|
||||||
|
|
||||||
|
$('[name="document"]').val(value).change();
|
||||||
|
})
|
||||||
|
|
||||||
// activate toolbar events when iframe is loaded
|
// activate toolbar events when iframe is loaded
|
||||||
$('iframe').load(function() {
|
$('iframe').load(function() {
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
|
|
||||||
nb_page = 5;
|
nb_page = 100;
|
||||||
cropmarks = true;
|
cropmarks = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user