Skip to content

Commit

Permalink
Sort books by date, add disclaimer (#6176)
Browse files Browse the repository at this point in the history
* sort books primarily by date so that most up-to-date books are on top 
* simplify headers; all books are paid, no need to mention it
* improve flow on small screens
* add a disclaimer on top noting that books are not endorsed by the
listing -- feedback on wording welcome

CC @krisstern @NotMyFault

---------

Co-authored-by: Kevin Martens <99040580+kmartens27@users.noreply.github.com>
Co-authored-by: Alexander Brandes <brandes.alexander@web.de>
  • Loading branch information
3 people authored Mar 23, 2023
1 parent 85f921a commit 172f31b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 21 deletions.
6 changes: 6 additions & 0 deletions content/_partials/books.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[NOTE]
====
The books in this list are not endorsed by the Jenkins project.
The list of books on this page is provided for informational purposes, sorted from newest to oldest publication date.
Since older books on the list can contain outdated information, the link:/doc/[Jenkins documentation] can help fill in any gaps.
====
46 changes: 25 additions & 21 deletions content/books.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,33 @@ title: Jenkins Related Books
.col-md-12 {
margin-bottom: 2rem;
}
#jenkins-related-books {
margin-bottom: 2rem;
.admonitionblock {
margin: 2rem 0;
}
.book-image {
max-height: 300px;
max-width: 300px;
margin: 8px;
}
@media(min-width: 576px) {
.book-image {
float: right;
}
}

=partial("books.adoc")

- site.books.values.sort_by{ |book| [book['type'], book['title'], book['publication_year']] }.reverse.each_with_index do |book, index|
- site.books.values.sort_by{ |book| [-book['publication_year'], book['title']] }.each_with_index do |book, index|
%h4
%span
- if book['url']
%a{:href => book['url'], :target => '_blank'}
= book['title']
- else
= book['title']
- if book['image']
%img{:src => expand_link('images/' + book['image']), :style => 'max-height: 300px; max-width: 300px; float: right; margin: 5px;'}
%img.book-image{:src => expand_link('images/' + book['image'])}
%div{:style => 'margin-bottom: 2rem'}
%h4
%span
- if book['url']
%a{:href => book['url'], :target => '_blank'}
= book['title']
- else
= book['title']
- if book['author']
%h5
Authored by
Expand All @@ -33,19 +45,11 @@ title: Jenkins Related Books
- if book['publisher']
%h5
Published by
= book['publisher']
- if book['publication_year']
%h5
Published in
= book['publication_year']
- if book['publication_year']
%h5
Type:
= book['type']
= "#{book['publisher']}, #{book['publication_year']}"
- if book['description']
%p
= book['description']
- if book['quote']
%blockquote
= book['quote']
%div{:style => 'clear: both;'}
%div{:style => 'clear: both;'}

0 comments on commit 172f31b

Please sign in to comment.