seblucas / cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
1.41k stars 227 forks source link

Font size in reader #422

Open PetrusVermaak opened 5 years ago

PetrusVermaak commented 5 years ago

Where do I go if I want to increase the font size in the online reader?

I have tried clicking on the aA on the top right but its still too small.

Joduai commented 5 years ago

@PetrusVermaak I am also struggling with unbrowse'able cops library using default templates. The bootstrap theme is even worse, as it's completely unreadable on kindle readers. I wasn't fond of @Jocala css fixes in #414 , and since I haven't found in webz any custom made template for cops I had to roll up my own sleeves.

The simplest way possible, working with all default styles is this:

  1. edit /templates/default/file.html
  2. scroll to bottom, and before ending </header> tag add below code:
<style media="screen" type="text/css">
body{zoom:150%;}
a {color:#000;}
.container section {font-size:150%;line-height:150%;}
.download a {display:inline-block;width: 100%;color:#000;border: 1px solid #000;background:#FFF;margin:0 0 3px 0;}
.download a[title*="Reader"] {display:block;}
.download a[title*="Open"],
.books {padding:10px 0;overflow: auto;}
.books .download a:nth-of-type(even) {display:none;}
footer {overflow:auto;}
footer,footer div {height:auto !important;}
footer a {display:block;padding:10px;font-size:150%;}
</style>

If you want to make only one subset of default template, add above styles in respective css file.

PetrusVermaak commented 5 years ago

@Joduai, you're da man!!! Thank you so much! This is awesome!!

Joduai commented 5 years ago

@PetrusVermaak Thanks 😊 I went further with all this mess, as I wanted to get a smooth looking and readable online library in all possible ways. Could you check this one, and let me know? https://github.com/Joduai/cops-kindle/tree/master

I tested this on voyage 1, so I can't assure it will be handled well on other generations. Could you tell me what type of kindle reader do you have?

PetrusVermaak commented 5 years ago

@Joduai, I use my smartphone and so does my wife, but it's similar to the kindle... Your source code allowed for bigger text so that's great!!!

Your code works perfect with our installation of cops. Thank you so much!