Patch 4 (#752)
* Target new class Target new class for caliblur language support * Move publishing date into div Places publishing date in new div to assist caliBlur in targeting this element. This PR does not create any visual difference on the default theme. * Target newly created div
This commit is contained in:
parent
c77825371d
commit
eb1c87fbae
|
@ -224,14 +224,13 @@ $( '.publishers span:nth-child(3)' ).text(function() {
|
||||||
return $(this).text().replace(/^\s+|^\t+|\t+|\s+$/g, "");
|
return $(this).text().replace(/^\s+|^\t+|\t+|\s+$/g, "");
|
||||||
});
|
});
|
||||||
|
|
||||||
published = $( '.book-meta p:contains("Publishing date")' )
|
published = $( '.publishing-date p' )
|
||||||
.text().split(': ');
|
.text().split(': ');
|
||||||
$( '.book-meta p:contains("Publishing date")' )
|
$( '.publishing-date p' ).remove();
|
||||||
.before( '<div class="published-date"></div>' );
|
|
||||||
$( '.book-meta p:contains("Publishing date")' ).remove();
|
|
||||||
$.each(published, function(i, val) {
|
$.each(published, function(i, val) {
|
||||||
$( '.published-date' ).append( '<span>' + published[i] + '</span>' );
|
$( '.publishing-date' ).append( '<span>' + published[i] + '</span>' );
|
||||||
});
|
});
|
||||||
|
|
||||||
languages = $( '.languages p span' ).text().split( ': ' );
|
languages = $( '.languages p span' ).text().split( ': ' );
|
||||||
$( '.languages p span' ).remove();
|
$( '.languages p span' ).remove();
|
||||||
$.each(languages, function(i, val) {
|
$.each(languages, function(i, val) {
|
||||||
|
@ -400,7 +399,7 @@ if ( $( 'body.shelf' ).length > 0 ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move create shelf
|
// Move create shelf
|
||||||
$( '#nav_createshelf' ).prependTo( 'li:contains("Your Shelves")' );
|
$( '#nav_createshelf' ).prependTo( '.your-shelves' );
|
||||||
|
|
||||||
// Create drop-down for profile and move elements to it
|
// Create drop-down for profile and move elements to it
|
||||||
$( '#main-nav' )
|
$( '#main-nav' )
|
||||||
|
|
|
@ -144,7 +144,9 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if entry.pubdate[:10] != '0101-01-01' %}
|
{% if entry.pubdate[:10] != '0101-01-01' %}
|
||||||
|
<div class="publishing-date">
|
||||||
<p>{{_('Publishing date')}}: {{entry.pubdate|formatdate}} </p>
|
<p>{{_('Publishing date')}}: {{entry.pubdate|formatdate}} </p>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if cc|length > 0 %}
|
{% if cc|length > 0 %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user