-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost.html
More file actions
81 lines (72 loc) · 2.38 KB
/
post.html
File metadata and controls
81 lines (72 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
layout: default
---
<article class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
<div class="post-meta">
<time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time>
<span class="author">by {{ page.author | default: site.author }}</span>
{% if page.tags.size > 0 %}
<div class="post-tags">
{% for tag in page.tags %}
<a href="{{ '/tags#' | append: tag | relative_url }}" class="tag">{{ tag }}</a>
{% endfor %}
</div>
{% endif %}
</div>
</header>
<div class="post-content">
{{ content }}
</div>
<footer class="post-footer">
<!-- Enhanced Social Sharing -->
{% include social-sharing.html %}
<!-- Navigation -->
<nav class="post-navigation">
{% if page.previous.url %}
<a class="prev-post" href="{{ page.previous.url | relative_url }}">
<span class="nav-label">← Previous Post</span>
<span class="nav-title">{{ page.previous.title }}</span>
</a>
{% endif %}
{% if page.next.url %}
<a class="next-post" href="{{ page.next.url | relative_url }}">
<span class="nav-label">Next Post →</span>
<span class="nav-title">{{ page.next.title }}</span>
</a>
{% endif %}
</nav>
</footer>
</article>
<!-- Related Posts -->
{% assign related_posts = site.related_posts | limit: 3 %}
{% if related_posts.size > 0 %}
<section class="related-posts">
<h2>Related Posts</h2>
<div class="related-posts-grid">
{% for post in related_posts %}
<article class="related-post">
<h3><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h3>
<p class="post-meta">{{ post.date | date: "%B %d, %Y" }}</p>
<p class="post-excerpt">{{ post.excerpt | strip_html | truncatewords: 15 }}</p>
</article>
{% endfor %}
</div>
</section>
{% endif %}
<script>
function copyToClipboard(text) {
navigator.clipboard.writeText(text).then(function() {
// Show success message
const btn = event.target.closest('.copy-link');
const originalText = btn.innerHTML;
btn.innerHTML = '<i class="fas fa-check"></i> Copied!';
btn.classList.add('copied');
setTimeout(() => {
btn.innerHTML = originalText;
btn.classList.remove('copied');
}, 2000);
});
}
</script>