Adding lazy-load version of feed component to load data using AJAX after page content has been rendered.
This commit is contained in:
@@ -1,6 +1,43 @@
|
||||
title = "Feed"
|
||||
url = "/feed"
|
||||
url = "/feed/:channel?/:tag?/"
|
||||
layout = "default"
|
||||
is_hidden = 0
|
||||
|
||||
[ShortFeed]
|
||||
channelFilter = "{{ :channel }}"
|
||||
tagFilter = "{{ :tag }}"
|
||||
maxItems = 50
|
||||
|
||||
[ChannelList]
|
||||
includeEmpty = 0
|
||||
|
||||
[TagList]
|
||||
==
|
||||
<p>Feed</p>
|
||||
<?php
|
||||
function onStart()
|
||||
{
|
||||
$this->addJs('https://cdnjs.cloudflare.com/ajax/libs/jqcloud/1.0.3/jqcloud.min.js');
|
||||
$this->addJs('assets/javascript/feedlayout.js');
|
||||
//$this->addCss('https://cdnjs.cloudflare.com/ajax/libs/jqcloud/1.0.3/jqcloud.min.css');
|
||||
}
|
||||
?>
|
||||
==
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<h1>Feed</h1>
|
||||
<div id="feedarea" class="col-container masonry">
|
||||
{% partial 'feed/template' feeditemclass='col-sm-12 col-md-6 col-xl-4' %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<h2>Channels</h2>
|
||||
{% component 'ChannelList' %}
|
||||
|
||||
<h2>Tags</h2>
|
||||
<div id="tagcloud" style="height: 500px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% put scripts %}
|
||||
<script type="text/javascript">const tagData = {{ tags | raw }};</script>
|
||||
{% endput %}
|
||||
Reference in New Issue
Block a user