post/static/post/main.js
/**
 * Loads the side through different post requests.
 * On homepage trending posts will be added later.
 * top tags.
 * all tags.
 * On pages other than homepage, latest and featured posts will be added.
 */
Loads the side through different post requests.
On homepage trending posts will be added later.
top tags.
all tags.
On pages other than homepage, latest and featured posts will be added.
Loads the side through different post requests . On homepage trending posts will be added later . top tags . all tags . On pages other than homepage latest and featured posts will be added .
function loadSidebar() {
    const latestPosts = { id: '#latest-posts', top_n: 5 };
    latestPosts.url = jq(latestPosts.id).data('url');
    sendPost(latestPosts.url, latestPosts.id, { 'top_n': latestPosts.top_n });
    const trendingPosts = { id: '#trending-posts', top_n: 5 };
    trendingPosts.url = jq(trendingPosts.id).data('url');
    sendPost(trendingPosts.url, trendingPosts.id, { 'top_n': trendingPosts.top_n });
    const popTagsEle = { id: '#popular-tags', top_n: 5 };
    popTagsEle.url = jq(popTagsEle.id).data('url');
    sendPost(popTagsEle.url, popTagsEle.id, { 'top_n': popTagsEle.top_n });
    const popCategoriesEle = { id: '#popular-categories', top_n: 3 };
    popCategoriesEle.url = jq(popCategoriesEle.id).data('url');
    sendPost(popCategoriesEle.url, popCategoriesEle.id, { 'top_n': popCategoriesEle.top_n });
}
function loadSidebar ( ) { const latestPosts = { id : '#latest-posts' , top_n : 5 } ; latestPosts . url = jq ( latestPosts . id ) . data ( 'url' ) ; sendPost ( latestPosts . url , latestPosts . id , { 'top_n' : latestPosts . top_n } ) ; const trendingPosts = { id : '#trending-posts' , top_n : 5 } ; trendingPosts . url = jq ( trendingPosts . id ) . data ( 'url' ) ; sendPost ( trendingPosts . url , trendingPosts . id , { 'top_n' : trendingPosts . top_n } ) ; const popTagsEle = { id : '#popular-tags' , top_n : 5 } ; popTagsEle . url = jq ( popTagsEle . id ) . data ( 'url' ) ; sendPost ( popTagsEle . url , popTagsEle . id , { 'top_n' : popTagsEle . top_n } ) ; const popCategoriesEle = { id : '#popular-categories' , top_n : 3 } ; popCategoriesEle . url = jq ( popCategoriesEle . id ) . data ( 'url' ) ; sendPost ( popCategoriesEle . url , popCategoriesEle . id , { 'top_n' : popCategoriesEle . top_n } ) ; }
Loads the side through different post requests.
Loads the side through different post requests .