shorten authors in author / discover / index / search and shelf
This commit is contained in:
		
							parent
							
								
									3272b4ca1e
								
							
						
					
					
						commit
						15aa49e163
					
				| 
						 | 
					@ -41,9 +41,19 @@
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
        <p class="author">
 | 
					        <p class="author">
 | 
				
			||||||
          {% for author in entry.authors %}
 | 
					          {% for author in entry.authors %}
 | 
				
			||||||
          <a href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')}}</a>
 | 
					            {% if loop.index > config_authors_max and config_authors_max != 0 %}
 | 
				
			||||||
          {% if not loop.last %}
 | 
					              {% if not loop.first %}
 | 
				
			||||||
          &
 | 
					                <span class="author-hidden-divider">&</span>
 | 
				
			||||||
 | 
								  {% endif %}
 | 
				
			||||||
 | 
					              <a class="author-name author-hidden" href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
				
			||||||
 | 
					              {% if loop.last %}
 | 
				
			||||||
 | 
					                <a href="#" class="author-expand" data-authors-max="{{config_authors_max}}" data-collapse-caption="({{_('reduce')}})">(...)</a>
 | 
				
			||||||
 | 
					              {% endif %}
 | 
				
			||||||
 | 
					            {% else %}
 | 
				
			||||||
 | 
					              {% if not loop.first %}
 | 
				
			||||||
 | 
					                <span>&</span>
 | 
				
			||||||
 | 
					              {% endif %}
 | 
				
			||||||
 | 
					              <a class="author-name" href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
				
			||||||
            {% endif %}
 | 
					            {% endif %}
 | 
				
			||||||
          {% endfor %}
 | 
					          {% endfor %}
 | 
				
			||||||
        </p>
 | 
					        </p>
 | 
				
			||||||
| 
						 | 
					@ -81,11 +91,13 @@
 | 
				
			||||||
        <p class="title">{{entry.title|shortentitle}}</p>
 | 
					        <p class="title">{{entry.title|shortentitle}}</p>
 | 
				
			||||||
        <p class="author">
 | 
					        <p class="author">
 | 
				
			||||||
		  {% for author in entry.authors %}
 | 
							  {% for author in entry.authors %}
 | 
				
			||||||
          <a href="https://www.goodreads.com/author/show/{{ author.gid }}" target="_blank" rel="noopener">
 | 
								{% if loop.index > config_authors_max and config_authors_max != 0 %}
 | 
				
			||||||
            {{author.name.replace('|',',')}}
 | 
									<a class="author-name author-hidden" href="https://www.goodreads.com/author/show/{{ author.gid }}" target="_blank" rel="noopener">{{author.name.replace('|',',')}}</a>
 | 
				
			||||||
          </a>
 | 
									{% if loop.last %}
 | 
				
			||||||
          {% if not loop.last %}
 | 
										<a href="#" class="author-expand" data-authors-max="{{config_authors_max}}" data-collapse-caption="({{_('reduce')}})">(...)</a>
 | 
				
			||||||
          &
 | 
									{% endif %}
 | 
				
			||||||
 | 
								{% else %}
 | 
				
			||||||
 | 
									<a class="author-name" href="https://www.goodreads.com/author/show/{{ author.gid }}" target="_blank" rel="noopener">{{author.name.replace('|',',')}}</a>
 | 
				
			||||||
		    {% endif %}
 | 
							    {% endif %}
 | 
				
			||||||
          {% endfor %}
 | 
					          {% endfor %}
 | 
				
			||||||
        </p>
 | 
					        </p>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,9 +19,19 @@
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
        <p class="author">
 | 
					        <p class="author">
 | 
				
			||||||
          {% for author in entry.authors %}
 | 
					          {% for author in entry.authors %}
 | 
				
			||||||
            <a href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
					            {% if loop.index > config_authors_max and config_authors_max != 0 %}
 | 
				
			||||||
            {% if not loop.last %}
 | 
					              {% if not loop.first %}
 | 
				
			||||||
              &
 | 
					                <span class="author-hidden-divider">&</span>
 | 
				
			||||||
 | 
								  {% endif %}
 | 
				
			||||||
 | 
					              <a class="author-name author-hidden" href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
				
			||||||
 | 
					              {% if loop.last %}
 | 
				
			||||||
 | 
					                <a href="#" class="author-expand" data-authors-max="{{config_authors_max}}" data-collapse-caption="({{_('reduce')}})">(...)</a>
 | 
				
			||||||
 | 
					              {% endif %}
 | 
				
			||||||
 | 
					            {% else %}
 | 
				
			||||||
 | 
					              {% if not loop.first %}
 | 
				
			||||||
 | 
					                <span>&</span>
 | 
				
			||||||
 | 
					              {% endif %}
 | 
				
			||||||
 | 
					              <a class="author-name" href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
				
			||||||
            {% endif %}
 | 
					            {% endif %}
 | 
				
			||||||
          {% endfor %}
 | 
					          {% endfor %}
 | 
				
			||||||
        </p>
 | 
					        </p>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,9 +22,19 @@
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
        <p class="author">
 | 
					        <p class="author">
 | 
				
			||||||
          {% for author in entry.authors %}
 | 
					          {% for author in entry.authors %}
 | 
				
			||||||
            <a href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
					            {% if loop.index > config_authors_max and config_authors_max != 0 %}
 | 
				
			||||||
            {% if not loop.last %}
 | 
					              {% if not loop.first %}
 | 
				
			||||||
              &
 | 
					                <span class="author-hidden-divider">&</span>
 | 
				
			||||||
 | 
								  {% endif %}
 | 
				
			||||||
 | 
					              <a class="author-name author-hidden" href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
				
			||||||
 | 
					              {% if loop.last %}
 | 
				
			||||||
 | 
					                <a href="#" class="author-expand" data-authors-max="{{config_authors_max}}" data-collapse-caption="({{_('reduce')}})">(...)</a>
 | 
				
			||||||
 | 
					              {% endif %}
 | 
				
			||||||
 | 
					            {% else %}
 | 
				
			||||||
 | 
					              {% if not loop.first %}
 | 
				
			||||||
 | 
					                <span>&</span>
 | 
				
			||||||
 | 
					              {% endif %}
 | 
				
			||||||
 | 
					              <a class="author-name" href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
				
			||||||
            {% endif %}
 | 
					            {% endif %}
 | 
				
			||||||
          {% endfor %}
 | 
					          {% endfor %}
 | 
				
			||||||
        </p>
 | 
					        </p>
 | 
				
			||||||
| 
						 | 
					@ -67,9 +77,19 @@
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
        <p class="author">
 | 
					        <p class="author">
 | 
				
			||||||
          {% for author in entry.authors %}
 | 
					          {% for author in entry.authors %}
 | 
				
			||||||
            <a href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
					            {% if loop.index > config_authors_max and config_authors_max != 0 %}
 | 
				
			||||||
            {% if not loop.last %}
 | 
					              {% if not loop.first %}
 | 
				
			||||||
              &
 | 
					                <span class="author-hidden-divider">&</span>
 | 
				
			||||||
 | 
								  {% endif %}
 | 
				
			||||||
 | 
					              <a class="author-name author-hidden" href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
				
			||||||
 | 
					              {% if loop.last %}
 | 
				
			||||||
 | 
					                <a href="#" class="author-expand" data-authors-max="{{config_authors_max}}" data-collapse-caption="({{_('reduce')}})">(...)</a>
 | 
				
			||||||
 | 
					              {% endif %}
 | 
				
			||||||
 | 
					            {% else %}
 | 
				
			||||||
 | 
					              {% if not loop.first %}
 | 
				
			||||||
 | 
					                <span>&</span>
 | 
				
			||||||
 | 
					              {% endif %}
 | 
				
			||||||
 | 
					              <a class="author-name" href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
				
			||||||
            {% endif %}
 | 
					            {% endif %}
 | 
				
			||||||
          {% endfor %}
 | 
					          {% endfor %}
 | 
				
			||||||
        </p>
 | 
					        </p>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,9 +46,19 @@
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
        <p class="author">
 | 
					        <p class="author">
 | 
				
			||||||
          {% for author in entry.authors %}
 | 
					          {% for author in entry.authors %}
 | 
				
			||||||
            <a href="{{url_for('author', book_id=author.id ) }}">{{author.name.replace('|',',')}}</a>
 | 
					            {% if loop.index > config_authors_max and config_authors_max != 0 %}
 | 
				
			||||||
            {% if not loop.last %}
 | 
					              {% if not loop.first %}
 | 
				
			||||||
              &
 | 
					                <span class="author-hidden-divider">&</span>
 | 
				
			||||||
 | 
								  {% endif %}
 | 
				
			||||||
 | 
					              <a class="author-name author-hidden" href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
				
			||||||
 | 
					              {% if loop.last %}
 | 
				
			||||||
 | 
					                <a href="#" class="author-expand" data-authors-max="{{config_authors_max}}" data-collapse-caption="({{_('reduce')}})">(...)</a>
 | 
				
			||||||
 | 
					              {% endif %}
 | 
				
			||||||
 | 
					            {% else %}
 | 
				
			||||||
 | 
					              {% if not loop.first %}
 | 
				
			||||||
 | 
					                <span>&</span>
 | 
				
			||||||
 | 
					              {% endif %}
 | 
				
			||||||
 | 
					              <a class="author-name" href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
				
			||||||
            {% endif %}
 | 
					            {% endif %}
 | 
				
			||||||
          {% endfor %}
 | 
					          {% endfor %}
 | 
				
			||||||
        </p>
 | 
					        </p>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,9 +28,19 @@
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
        <p class="author">
 | 
					        <p class="author">
 | 
				
			||||||
          {% for author in entry.authors %}
 | 
					          {% for author in entry.authors %}
 | 
				
			||||||
            <a href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')}}</a>
 | 
					            {% if loop.index > config_authors_max and config_authors_max != 0 %}
 | 
				
			||||||
            {% if not loop.last %}
 | 
					              {% if not loop.first %}
 | 
				
			||||||
              &
 | 
					                <span class="author-hidden-divider">&</span>
 | 
				
			||||||
 | 
								  {% endif %}
 | 
				
			||||||
 | 
					              <a class="author-name author-hidden" href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
				
			||||||
 | 
					              {% if loop.last %}
 | 
				
			||||||
 | 
					                <a href="#" class="author-expand" data-authors-max="{{config_authors_max}}" data-collapse-caption="({{_('reduce')}})">(...)</a>
 | 
				
			||||||
 | 
					              {% endif %}
 | 
				
			||||||
 | 
					            {% else %}
 | 
				
			||||||
 | 
					              {% if not loop.first %}
 | 
				
			||||||
 | 
					                <span>&</span>
 | 
				
			||||||
 | 
					              {% endif %}
 | 
				
			||||||
 | 
					              <a class="author-name" href="{{url_for('author', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
 | 
				
			||||||
            {% endif %}
 | 
					            {% endif %}
 | 
				
			||||||
          {% endfor %}
 | 
					          {% endfor %}
 | 
				
			||||||
        </p>
 | 
					        </p>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user