summaryrefslogtreecommitdiff
path: root/themes/theme/layout/post
diff options
context:
space:
mode:
Diffstat (limited to 'themes/theme/layout/post')
-rw-r--r--themes/theme/layout/post/post_comment.ejs48
-rw-r--r--themes/theme/layout/post/post_content.ejs7
-rw-r--r--themes/theme/layout/post/post_footer.ejs21
-rw-r--r--themes/theme/layout/post/post_head.ejs34
4 files changed, 110 insertions, 0 deletions
diff --git a/themes/theme/layout/post/post_comment.ejs b/themes/theme/layout/post/post_comment.ejs
new file mode 100644
index 00000000..60a76fb4
--- /dev/null
+++ b/themes/theme/layout/post/post_comment.ejs
@@ -0,0 +1,48 @@
+<div class="post-comment">
+
+ <% if (theme.valine.enable) {%>
+ <div id="vcomments"></div>
+ <script>
+ var META = ['nick', 'mail', 'link'];
+ var meta = '<%=theme.valine.meta%>';
+ meta = meta.split(',').filter(item => {
+ return META.includes(item);
+ });
+ new Valine({
+ el: '#vcomments',
+ appId: '<%=theme.valine.appId%>',
+ appKey: '<%=theme.valine.appKey%>',
+ lang: '<%=theme.valine.lang%>',
+ placeholder: '<%=theme.valine.placeholder%>',
+ avatar: '<%=theme.valine.avatar%>',
+ meta: meta
+ })
+ </script>
+ <% } %>
+
+ <% if (theme.disqus.enable) {%>
+ <div id="disqus_thread"></div>
+ <script>
+ /**
+ * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
+ * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */
+
+ var disqus_config = function () {
+ this.page.url = '<%=page.permalink%>'; // Replace PAGE_URL with your page's canonical URL variable
+ this.page.identifier = '<%=page.path%>'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
+ this.language = '<%=theme.disqus.language%>'
+ };
+
+ (function() { // DON'T EDIT BELOW THIS LINE
+ var d = document, s = d.createElement('script');
+ s.src = '<%=theme.disqus.disqus_url%>';
+ s.setAttribute('data-timestamp', +new Date());
+ (d.head || d.body).appendChild(s);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ <% } %>
+
+
+
+</div> \ No newline at end of file
diff --git a/themes/theme/layout/post/post_content.ejs b/themes/theme/layout/post/post_content.ejs
new file mode 100644
index 00000000..e51bc059
--- /dev/null
+++ b/themes/theme/layout/post/post_content.ejs
@@ -0,0 +1,7 @@
+<div class="post-content">
+ <%-page.content%>
+</div>
+
+<script>
+ window.onload = detectors();
+</script> \ No newline at end of file
diff --git a/themes/theme/layout/post/post_footer.ejs b/themes/theme/layout/post/post_footer.ejs
new file mode 100644
index 00000000..c4978890
--- /dev/null
+++ b/themes/theme/layout/post/post_footer.ejs
@@ -0,0 +1,21 @@
+<div class="post-footer">
+ <div class="h-line-primary"></div>
+ <nav class="post-nav">
+ <div class="prev-item">
+ <%if (page.prev) {%>
+ <div class="icon arrow-left"></div>
+ <div class="post-link">
+ <a href="<%=url_for(page.prev.path)%>">Prev</a>
+ </div>
+ <%}%>
+ </div>
+ <div class="next-item">
+ <%if (page.next) {%>
+ <div class="icon arrow-right"></div>
+ <div class="post-link">
+ <a href="<%=url_for(page.next.path)%>">Next</a>
+ </div>
+ <%}%>
+ </div>
+ </nav>
+</div>
diff --git a/themes/theme/layout/post/post_head.ejs b/themes/theme/layout/post/post_head.ejs
new file mode 100644
index 00000000..ad821406
--- /dev/null
+++ b/themes/theme/layout/post/post_head.ejs
@@ -0,0 +1,34 @@
+<div class="post-head">
+ <div class="post-info">
+ <div class="tag-list">
+ <% if (page.tags && page.tags.data && page.tags.data.length > 0) {%>
+ <% page.tags.data.forEach(function(tag) { %>
+ <span class="post-tag">
+ <a href="<%-url_for(tag.path)%>">
+ <%=tag.name%>
+ </a>
+ </span>
+ <% }) %>
+ <% } %>
+ </div>
+ <div class="post-title">
+
+ <% if (page.title) {%>
+ <%= page.title %>
+ <% } else {%>
+ *Untitled
+ <% } %>
+
+ </div>
+ <span class="post-date">
+ <%- date(page.date, theme.date_format) %>
+ </span>
+ </div>
+ <div class="post-img">
+ <% if (page.featured_image) {%>
+ <img src="<%= url_for(page.featured_image)%>" alt="featured_image">
+ <% } else { %>
+ <div class="h-line-primary"></div>
+ <% } %>
+ </div>
+</div> \ No newline at end of file