-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtalk.html
More file actions
executable file
·83 lines (75 loc) · 2.75 KB
/
Copy pathtalk.html
File metadata and controls
executable file
·83 lines (75 loc) · 2.75 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
80
81
82
83
---
title: Talks
layout: page_no_side
description: Say Whatever I Want
header-img: "img/talk-bg.jpg"
permalink: /talk/
---
<style>
/* Styles specific to the tab functionality on this page */
.hexo-talk-tab {
padding: 5px;
}
.hexo-talk-active {
display: none;
}
.hexo-talk-meta {
font-family: 'Lora', 'Times New Roman', serif;
font-size: 87%;
font-style: italic;
color: #808080;
padding-right: 10px;
}
.hexo-talk-hide {
display: none;
}
.hexo-talk-show {
display: block;
}
</style>
<div style="display: none;">
<a class="hexo-talk-tab" id="hexo-talk-tab1" rel="external"></a>
<a class="hexo-talk-tab" id="hexo-talk-tab2" rel="external"></a>
<a class="hexo-talk-tab" id="hexo-talk-tab3" href="javascript:;" rel="external"></a>
</div>
<!-- Paginated Lists -->
{% include paginated_list.html items=site.data.talks2 per_page=20 list_id="hexo-talk-item1" prev_label="← Newer" next_label="Older →" container_class="talks-title-list" %}
{% include paginated_list.html items=site.data.talks2 per_page=20 list_id="hexo-talk-item2" prev_label="← Newer" next_label="Older →" container_class="talks-title-list" %}
{% include paginated_list.html items=site.data.talks per_page=20 list_id="hexo-talk-item3" prev_label="← Newer" next_label="Older →" container_class="talks-title-list" %}
<!-- Scripts -->
<script src="{{ site.baseurl }}/js/pagination.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
// Init paginated lists
['hexo-talk-item1', 'hexo-talk-item2', 'hexo-talk-item3'].forEach(function(id) {
if (window.initPaginatedList) {
window.initPaginatedList(id);
}
});
// Tab functionality
function tabClick() {
var tabs = document.querySelectorAll('.hexo-talk-tab');
tabs.forEach(function(t) { t.classList.remove('hexo-talk-active'); });
this.classList.add('hexo-talk-active');
var itemId = this.id.replace('tab', 'item');
var allLists = document.querySelectorAll('[id^="hexo-talk-item"]');
allLists.forEach(function(list) {
if (list.id === itemId) {
list.classList.remove('hexo-talk-hide');
list.classList.add('hexo-talk-show');
} else {
list.classList.remove('hexo-talk-show');
list.classList.add('hexo-talk-hide');
}
});
}
var tabs = document.querySelectorAll('.hexo-talk-tab');
tabs.forEach(function(tab) {
tab.onclick = tabClick;
});
// Activate the last tab by default
if (tabs.length > 2) {
tabs[2].click();
}
});
</script>