From c3ac6f5335d292f35dd6b5a4189714d9986d65ae Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Tue, 5 Mar 2019 21:54:26 +0000 Subject: [PATCH] Add list of articles by same author(s) to each article page It is in the form of a carousel --- _includes/article-carousel.html | 50 +++++++ _includes/article-page-head.html | 6 + _includes/head.html | 1 + _layouts/404.html | 1 + _layouts/article-list.html | 1 - _layouts/image-article.html | 5 +- _layouts/video-article.html | 5 +- _site/404.html | 5 + _site/css/article-page.css | 52 +++++++ _site/css/carousel-mdc-card-list.css | 0 _site/css/global.css | 40 ++++++ _site/css/mdc-card-list.css | 39 ----- _site/css/slick-theme.css | 204 +++++++++++++++++++++++++++ _site/css/slick.css | 119 ++++++++++++++++ _site/index.html | 2 +- _site/js/article-page.js | 39 +++++ _site/js/jquery-migrate-1.4.1.min.js | 2 + _site/js/jquery-migrate-3.0.0.min.js | 2 + _site/js/slick.min.js | 1 + _site/sitemap.xml | 4 +- css/article-page.css | 52 +++++++ css/carousel-mdc-card-list.css | 0 css/global.css | 40 ++++++ css/mdc-card-list.css | 39 ----- css/slick-theme.css | 204 +++++++++++++++++++++++++++ css/slick.css | 119 ++++++++++++++++ js/article-page.js | 39 +++++ js/jquery-migrate-1.4.1.min.js | 2 + js/jquery-migrate-3.0.0.min.js | 2 + js/slick.min.js | 1 + 30 files changed, 992 insertions(+), 84 deletions(-) create mode 100644 _includes/article-carousel.html create mode 100644 _includes/article-page-head.html create mode 100644 _site/css/carousel-mdc-card-list.css create mode 100644 _site/css/slick-theme.css create mode 100644 _site/css/slick.css create mode 100644 _site/js/article-page.js create mode 100644 _site/js/jquery-migrate-1.4.1.min.js create mode 100644 _site/js/jquery-migrate-3.0.0.min.js create mode 100644 _site/js/slick.min.js create mode 100644 css/carousel-mdc-card-list.css create mode 100644 css/slick-theme.css create mode 100644 css/slick.css create mode 100644 js/article-page.js create mode 100644 js/jquery-migrate-1.4.1.min.js create mode 100644 js/jquery-migrate-3.0.0.min.js create mode 100644 js/slick.min.js diff --git a/_includes/article-carousel.html b/_includes/article-carousel.html new file mode 100644 index 0000000..331b99b --- /dev/null +++ b/_includes/article-carousel.html @@ -0,0 +1,50 @@ +{% if site.categories.articles.size > 1 %} + {% assign article_list_displayed = false %} + {% for article in site.categories.articles %} + {% if article.url != page.url %} + {% for author in article.authors %} + {% for current_author in page.authors %} + {% if author == current_author %} + {% if article_list_displayed == false %} +

+ {% if page.authors.first %} + Other Articles By These Authors + {% else %} + Other Articles By This Author + {% endif %} +

+ + +{% endif %} diff --git a/_includes/article-page-head.html b/_includes/article-page-head.html new file mode 100644 index 0000000..f22b9ce --- /dev/null +++ b/_includes/article-page-head.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/_includes/head.html b/_includes/head.html index bdf47c2..9208adc 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -42,4 +42,5 @@ + diff --git a/_layouts/404.html b/_layouts/404.html index 9458053..2f47cf2 100644 --- a/_layouts/404.html +++ b/_layouts/404.html @@ -18,6 +18,7 @@ {% include footer.html %} + {% include top-scroll-button.html %}