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.44k stars 229 forks source link

Suggestion: compact custom columns bootstrap layout for Book details page #464

Open horus68 opened 5 years ago

horus68 commented 5 years ago

This is more a suggestion then a fix sharing my unfinished code and looking for better solutions!

I use several custom columns but when using the Bootstrap theme in the book details page the labels are shown in one line and the values in a new line (all kind of fields) resulting into a long screen

The actual code in \templates\bootstrap\bookdetail.html is https://github.com/seblucas/cops/blob/f65537cdc6f11e135fdc0fbfcaf05524f63ec667/templates/bootstrap/bookdetail.html#L66-L68

    <p>
        <h4>{{=column.customColumnType.columnTitle}}: </h4>{{=column.htmlvalue}}
    </p>

So you will end up with a long screen to be able to see all the custom fields 2019-10-14 13_31_21-

Possible solution:

I'm now considering removing the H4 for a bold or italic tag so the values will appear in the same line and reducing vertical windows size

    <p>
        - <b>{{=column.customColumnType.columnTitle}}: </b>{{=column.htmlvalue}}
    </p>

Now each column uses a single line (exception are the long text fields type that continues to use 2 lines!) so the same window size now display more custom columns: 2019-10-14 13_32_37-

This is a more compact look saving me scrolling time to see those technical fields.

Note: the normal template already display labels and fields in the same line: 2019-10-14 13_28_57-Howard Pyle's Book of Pirates