diff --git a/cps/static/css/style.css b/cps/static/css/style.css index c7e39fb7..c4a9b502 100644 --- a/cps/static/css/style.css +++ b/cps/static/css/style.css @@ -36,6 +36,11 @@ a{color: #45b29d}a:hover{color: #444;} .container-fluid .book .meta .title{font-weight:bold;font-size:15px;color:#444} .container-fluid .book .meta .author{font-size:12px;color:#999} .container-fluid .book .meta .rating{margin-top:5px}.rating .glyphicon-star{color:#999}.rating .glyphicon-star.good{color:#45b29d} + +.container-fluid .author .author-hidden, .container-fluid .author .author-hidden-divider { + display: none; +} + .navbar-brand{font-family: 'Grand Hotel', cursive; font-size: 35px; color: #45b29d !important;} .more-stuff{margin-top: 20px; padding-top: 20px; border-top: 1px solid #ccc} .more-stuff>li{margin-bottom: 10px;} @@ -52,6 +57,7 @@ span.glyphicon.glyphicon-tags {padding-right: 5px;color: #999;vertical-align: te -moz-box-shadow: 0 5px 8px -6px #777; box-shadow: 0 5px 8px -6px #777; } + .navbar-default .navbar-toggle .icon-bar {background-color: #000;} .navbar-default .navbar-toggle {border-color: #000;} .cover { margin-bottom: 10px;} diff --git a/cps/static/js/main.js b/cps/static/js/main.js index 895feb28..9a51df5b 100644 --- a/cps/static/js/main.js +++ b/cps/static/js/main.js @@ -205,4 +205,12 @@ $(function() { $(window).resize(function() { $(".discover .row").isotope("layout"); }); + + $(".author-expand").click(function() { + $(this).parent().find("a.author-name").slice($(this).data("authors-max")).toggle(); + $(this).parent().find("span.author-hidden-divider").toggle(); + $(this).html() === $(this).data("collapse-caption") ? $(this).html("(...)") : $(this).html($(this).data("collapse-caption")); + $(".discover .row").isotope("layout"); + }); + }); diff --git a/cps/templates/author.html b/cps/templates/author.html index 2ebe8c4e..4fe231bb 100644 --- a/cps/templates/author.html +++ b/cps/templates/author.html @@ -41,10 +41,20 @@

{% for author in entry.authors %} - {{author.name.replace('|',',')}} - {% if not loop.last %} - & - {% endif %} + {% if loop.index > config_authors_max and config_authors_max != 0 %} + {% if not loop.first %} + & + {% endif %} + {{author.name.replace('|',',')|shortentitle(30)}} + {% if loop.last %} + (...) + {% endif %} + {% else %} + {% if not loop.first %} + & + {% endif %} + {{author.name.replace('|',',')|shortentitle(30)}} + {% endif %} {% endfor %}

{% if entry.ratings.__len__() > 0 %} @@ -80,13 +90,15 @@

{{entry.title|shortentitle}}

- {% for author in entry.authors %} - - {{author.name.replace('|',',')}} - - {% if not loop.last %} - & - {% endif %} + {% for author in entry.authors %} + {% if loop.index > config_authors_max and config_authors_max != 0 %} + {{author.name.replace('|',',')}} + {% if loop.last %} + (...) + {% endif %} + {% else %} + {{author.name.replace('|',',')}} + {% endif %} {% endfor %}

diff --git a/cps/templates/config_view_edit.html b/cps/templates/config_view_edit.html index 3b8ebf80..83c20834 100644 --- a/cps/templates/config_view_edit.html +++ b/cps/templates/config_view_edit.html @@ -27,6 +27,10 @@
+
+ + +