Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GSoC19] Add changes for RC integrations #1

Open
wants to merge 1 commit into
base: articles
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions custom-archive-authors.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{!-- Layout --}}
{{!< default}}

<section class="topic u-container extreme-container u-paddingTop30">

{{#get "authors" limit="all" include="count.posts" order="count.posts desc"}}

<div class="row">

{{#foreach authors}}

<div class="col s12 m6 l4 u-marginBottom30">
<div class="topic-items u-relative u-textColorWhite u-overflowHidden">
{{!-- Image - partials/helper/helper-author-image.hbs --}}
{{> "helper/helper-author-image"}}

<div class="topic-gradient u-absolute0"></div>
<h3 class="u-fontSize20 u-fontWeightMedium u-absolute zindex2 u-textShadow u-textCapitalize" style="bottom:30px;left:20px">
<a href="{{url}}">{{name}} <span class="u-fontSizeSmall">({{count.posts}})</span> </a>
</h3>
{{!-- Link --}}
<a href="{{url}}" aria-label="{{name}}" class="u-absolute0 zindex3"></a>
</div>
</div>

{{/foreach}}

</div>

{{/get}}

</section>
2 changes: 1 addition & 1 deletion custom-archive-tags.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<section class="topic u-container extreme-container u-paddingTop30">

{{#get "tags" limit="18" include="count.posts" order="count.posts desc"}}
{{#get "tags" limit="all" include="count.posts" order="count.posts desc"}}

<div class="row">

Expand Down
13 changes: 5 additions & 8 deletions partials/article/article-body.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@
<hr class="post-footer-hr">

{{!-- Button for Toggle Comments --}}
<div class="button button--large button--dark-line post-comments-show js-toggle-comments">
{{!-- Disqus Comments Count --}}
<span class="disqus-comment-count mapache-disqus" data-disqus-url="{{url absolute="true"}}">0 {{t "Comments"}}</span>
{{!-- Facebook Comments Counts --}}
{{!-- <span class="fb-comments-count mapache-facebook u-hide" data-href="{{url absolute="true"}}">0</span>
<span class="mapache-facebook u-hide">{{t "Comments"}}</span> --}}
</div>

{{#if discussion_room}}
<div class="button button--large button--dark-line post-comments-show js-toggle-comments">
<span class="disqus-comment-count mapache-disqus">{{t "Comments"}}</span>
</div>
{{/if}}
</div>
</div>

Expand Down
46 changes: 10 additions & 36 deletions partials/article/article-comments.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<span class="js-toggle-comments i-close"></span>
</div>

<div class="post-comments-wrap u-padding15">
<div class="mapache-disqus-loanding u-textAlignCenter u-marginTop30">{{t "Loading..."}}</div>
{{!-- Disqus Comments --}}
<div id="disqus_thread" class="mapache-disqus u-hide"></div>
{{!-- Comments section for facebook --}}
{{!-- <div class="fb-comments mapache-facebook u-hide" data-href="{{url absolute="true"}}" data-width="100%" data-numposts="5"></div> --}}
<div class="post-comments-wrap">
<div class="mapache-disqus-loading u-textAlignCenter u-marginTop30">{{t "Loading..."}}</div>
{{!-- Comments --}}
<div class="mapache-disqus u-hide">
<iframe src='{{discussion_room}}?layout=embedded' style="width:100%;height:94%;position:absolute;left:0px;right:0px;bottom:0px" height="100%" width="100%" frameborder="0"></iframe>
</div>
</div>
</div>

Expand All @@ -19,44 +19,18 @@
{{#contentFor "scripts"}}
<script>
(function(d, s, id) {
if (typeof disqusShortName === 'undefined') return;

$('.post-comments-show').removeClass('u-hide');

var disqus_config = function () {
this.page.url = '{{url absolute="true"}}';
this.page.identifier = 'ghost-{{comment_id}}';
};

/* Comments Count */
var count = d.createElement(s);
count.src = 'https://'+disqusShortName+'.disqus.com/count.js';
count.id = 'dsq-count-scr';
count.async = true;
(d.head || d.body).appendChild(count);

// Toggle Comments
$('.js-toggle-comments').on('click', function (e) {
e.preventDefault();
$('body').toggleClass('has-comments').removeClass('is-showNavMob')

/* Call Disqus */
var js, djs = d.getElementsByTagName(s)[0];

if (d.getElementById(id)) {
return;
} else {
setTimeout(function(){
$('.mapache-disqus-loanding').remove();
$('.mapache-disqus').removeClass('u-hide');
}, 2000);
};

js = d.createElement(s);
js.id = id;
js.src = 'https://'+disqusShortName+'.disqus.com/embed.js';
js.async = true;
djs.parentNode.insertBefore(js, djs);
setTimeout(function(){
$('.mapache-disqus-loading').remove();
$('.mapache-disqus').removeClass('u-hide');
}, 2000);
});
}(document, 'script', 'disqus-js'));
</script>
Expand Down
8 changes: 5 additions & 3 deletions partials/article/article-share.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
onclick="window.open(this.href, 'share-pinterest', 'width=600,height=480');return false;">
</a>
</li>
<li>
<div class="js-toggle-comments u-pointer button--circle i-chat u-hide post-comments-show" style="margin-top:8px"></div>
</li>
{{#if discussion_room}}
<li>
<div class="js-toggle-comments u-pointer button--circle i-chat u-hide post-comments-show" style="margin-top:8px"></div>
</li>
{{/if}}
</ul>
</aside>
11 changes: 11 additions & 0 deletions partials/helper/helper-author-image.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{#if profile_image}}
<img class="story-img u-absolute0 u-image u-block lazyload"
src="{{img_url profile_image size="m"}}"
srcset="{{img_url profile_image size="xxs"}}"
data-srcset="{{img_url profile_image size="s"}} 300w,{{img_url profile_image size="m"}} 600w"
data-sizes="(max-width: 1000px) 400px, 600px"
alt="{{title}}"
/>
{{else}}
<div class="u-absolute0 u-bgCover u-block" style="background-image:url({{asset "images/not-image.jpg"}})"></div>
{{/if}}
4 changes: 2 additions & 2 deletions partials/search.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<div id="searchResults" class="search-results u-marginAuto u-sizeFullWidth"></div>
</div>
{{!-- showing the function keys --}}
<div class="search-nav-hints u-flex u-flexEnd u-hide-before-lg">
{{!-- <div class="search-nav-hints u-flex u-flexEnd u-hide-before-lg">
<div class="search-nav-hint"><span>↑</span> <span>↓</span> {{t "Navigate up/down"}}</div>
<div class="search-nav-hint"><span>Enter</span> {{t "Go to article"}}</div>
<div class="search-nav-hint"><span>/</span> {{t "Search new term"}}</div>
<div class="search-nav-hint"><span>Esc</span> {{t "Close search"}}</div>
</div>
</div> --}}
</div>
</div>