diff --git a/app/assets/javascripts/initializers/initializeReadingListPage.js.erb b/app/assets/javascripts/initializers/initializeReadingListPage.js.erb
index 1bbfd0842..ab297faeb 100644
--- a/app/assets/javascripts/initializers/initializeReadingListPage.js.erb
+++ b/app/assets/javascripts/initializers/initializeReadingListPage.js.erb
@@ -6,22 +6,25 @@ function initializeReadingListPage(){
var params = getQueryParams(document.location.search);
document.getElementById('substories').dataset.tabs = '{"v": "'+(params.v || '')+'", "t": "'+(params.t || '')+'" }'
postCommentFilter();
- if (params.v === "comments") {
- getArticles("***onlytags***");
- }
+ getArticles("***onlytags***");
+ }
+ document.getElementById("load-more-cta").onclick = function(event) {
+ event.target.classList.remove("showing");
+ getArticles("");
}
}
-function getArticles(tag){
+function getArticles(tag, num){
var user = userData();
var substoriesDiv = document.getElementById("substories");
var algoliaIds = user.reading_list_ids.map(function(id){return "articles-"+id});
var resultDivs = []
var tags = {}
articlesIndex.getObjects(algoliaIds, function(err, content) {
- content.results.forEach(function(story){
+ var results = num ? content.results.slice(0, num) : content.results ;
+ results.forEach(function(story, i){
if (story) {
if (tag == "" || story.tag_list.indexOf(tag) > -1){
resultDivs.push(buildArticleHTML(story));
@@ -41,8 +44,12 @@ function getArticles(tag){
var message = "
This is where to find your bookmarked posts, but it looks like you have not bookmarked anything.
"
substoriesDiv.innerHTML = message;
}
+ } else {
+ if (results.lenth > 35) {
+ document.getElementById("load-more-cta").classList.add("showing");
+ }
+ renderTags(tags);
}
- renderTags(tags)
initializeReadingListIcons();
});
}
@@ -163,7 +170,7 @@ function getStories(){
if (tabsObj["v"] == "comments") {
getComments(tabsObj["t"] || "");
} else {
- getArticles(tabsObj["t"] || "");
+ getArticles(tabsObj["t"] || "", 45);
}
}
diff --git a/app/assets/javascripts/serviceworker.js.erb b/app/assets/javascripts/serviceworker.js.erb
index a2d6f92c0..ce4d26014 100644
--- a/app/assets/javascripts/serviceworker.js.erb
+++ b/app/assets/javascripts/serviceworker.js.erb
@@ -1,4 +1,4 @@
-var CACHE_VERSION = 'v2.4.7';
+var CACHE_VERSION = 'v2.4.8';
var CACHE_NAME = CACHE_VERSION + ':sw-cache::';
var REQUESTS_LIMIT = 70;
diff --git a/app/assets/stylesheets/articles.scss b/app/assets/stylesheets/articles.scss
index f121fbc64..5d1e77859 100644
--- a/app/assets/stylesheets/articles.scss
+++ b/app/assets/stylesheets/articles.scss
@@ -731,9 +731,31 @@
font-family: $helvetica-condensed;
font-stretch:condensed;
font-size:1.1em;
- }
- &:hover{
- background:$light-gray;
+ .sidebar-nav-link{
+ &:hover{
+ background: $light-purple;
+ }
+ }
+ .readinglist-sidebar-subcat{
+ font-weight: bold;
+ font-size: 0.78em;
+ font-family: $helvetica;
+ padding-bottom: 10px;
+ a{
+ color: $medium-gray;
+ padding: 7px 13px;
+ display: inline-block;
+ &:hover{
+ background: darken($light-green, 5%);
+ color: $dark-gray;
+ }
+ }
+ .separator{
+ border-left: 2px solid $light-medium-gray;
+ padding:4px 0px;
+ margin: 0px 4px;
+ }
+ }
}
@media screen and ( min-width: 950px ){
.sidebar-nav-link-follow{
@@ -1169,3 +1191,15 @@
background-color:rgb(102, 226, 213);
}
}
+
+.load-more-cta{
+ margin: 35px auto;
+ border: 0px;
+ font-size: 20px;
+ padding: 5px 10px;
+ border-radius: 3px;
+ display: none;
+ &.showing {
+ display:block;
+ }
+}
\ No newline at end of file
diff --git a/app/views/articles/_sidebar_nav.html.erb b/app/views/articles/_sidebar_nav.html.erb
index e6d5f4112..bd9472b17 100644
--- a/app/views/articles/_sidebar_nav.html.erb
+++ b/app/views/articles/_sidebar_nav.html.erb
@@ -20,6 +20,9 @@
" /> MY READING LIST
+
<% end %>
diff --git a/app/views/reading_list_items/index.html.erb b/app/views/reading_list_items/index.html.erb
index b0de004c7..8c2cdc2ea 100644
--- a/app/views/reading_list_items/index.html.erb
+++ b/app/views/reading_list_items/index.html.erb
@@ -37,8 +37,8 @@