Skip to content

Commit

Permalink
Theme update.
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepSpaceHarbor committed Mar 5, 2020
1 parent 2df0b4d commit 6a65afa
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 141 deletions.
40 changes: 22 additions & 18 deletions layout/_partial/article-full.ejs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div class="container blogPost">
<div class="row">
<div class="col-sm-8">
<div class="col-sm-9 px-md-5">
<h2 class="blog-post-title">
<%- item.title || item.link%>
</h2>
<p class="meta"><i class="far fa-clock"></i>
<%= item.date.format(config.date_format) %>
<%- partial('categories', {item: item}) %>
<p class="meta">
<i class="far fa-clock"></i>
<%= item.date.format(config.date_format) %> <%- partial('categories', {item: item}) %>
</p>
<!-- Content -->
<%- item.content %>
Expand All @@ -16,7 +16,7 @@
</p>
</div>

<div class="col-sm-4">
<div class="col-sm-3">
<%- partial('sidebar', {item: item}) %>
</div>
</div>
Expand All @@ -25,16 +25,20 @@
<script>
var isScrolling;
var prevScrollpos = window.pageYOffset;
window.addEventListener('scroll', function (event) {
window.clearTimeout(isScrolling);
isScrolling = setTimeout(function () {
var currentScrollPos = window.pageYOffset;
if (prevScrollpos > currentScrollPos) {
$("#navbar").slideDown();
} else {
$("#navbar").slideUp();
}
prevScrollpos = currentScrollPos;
}, 66);
}, false);
</script>
window.addEventListener(
'scroll',
function(event) {
window.clearTimeout(isScrolling);
isScrolling = setTimeout(function() {
var currentScrollPos = window.pageYOffset;
if (prevScrollpos > currentScrollPos) {
$('#navbar').slideDown();
} else {
$('#navbar').slideUp();
}
prevScrollpos = currentScrollPos;
}, 66);
},
false
);
</script>
31 changes: 15 additions & 16 deletions layout/_partial/sidebar.ejs
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<% if (theme.sidebar.tldr && theme.sidebar.tldr.length){ %>
<%
theme.sidebar.tldr.forEach(function(tldr){%>
<span><b>
<%=tldr.title%></b></span>
<% if (theme.sidebar.tldr && theme.sidebar.tldr.length){ %> <% theme.sidebar.tldr.forEach(function(tldr){%>
<span><b> <%=tldr.title%></b></span>
<p>
<%=tldr.content%>
<%-tldr.content%>
</p>
<hr />
<% })} %>
<% })} %> <% if(theme.sidebar.twitter.enabled){ %>

<% if(theme.sidebar.twitter.enabled){ %>
<span><a href="https://twitter.com/<%=theme.sidebar.twitter.username%>" target="_blank" rel="noopener"><b><i class="fab fa-twitter-square"></i>
<i class="fas fa-at"></i>
<%=theme.sidebar.twitter.username%></b></a></span>
<span
><a href="https://twitter.com/<%=theme.sidebar.twitter.username%>" target="_blank" rel="noopener"
><b
><i class="fab fa-twitter-square"></i>
<i class="fas fa-at"></i>
<%=theme.sidebar.twitter.username%></b
></a
></span
>
<br />
<a class="twitter-timeline" data-height="<%=theme.sidebar.twitter.height%>" data-dnt="true" data-chrome="nofooter transparent noheader noborders "
href="https://twitter.com/<%=theme.sidebar.twitter.username%>?ref_src=twsrc%5Etfw"></a>
<a class="twitter-timeline" data-height="<%=theme.sidebar.twitter.height%>" data-dnt="true" data-chrome="nofooter transparent noheader noborders " href="https://twitter.com/<%=theme.sidebar.twitter.username%>?ref_src=twsrc%5Etfw"></a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<% } %>
<% } %>
Loading

0 comments on commit 6a65afa

Please sign in to comment.