forked from mmistakes/minimal-mistakes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
86 lines (66 loc) · 2.05 KB
/
index.html
File metadata and controls
86 lines (66 loc) · 2.05 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
84
85
---
layout: splash
author_profile: false
layout: collection
entries_layout: grid
coding_cards:
- image_path: /assets/images/python-card.png
alt: "Python"
title: "Python"
excerpt: "Python tutorials and data analysis."
url: "/python/"
btn_label: "Learn Python"
- image_path: /assets/images/r-card.png
alt: "R"
title: "R Programming"
excerpt: "Data science and statistics with R."
url: "/r/"
btn_label: "Learn R"
- image_path: /assets/images/git-card.png
alt: "Git"
title: "Git & GitHub"
excerpt: "Version control and collaboration."
url: "/git/"
btn_label: "Learn Version Control"
- image_path: /assets/images/data-viz-card.png
alt: "Data Visualization"
title: "Data Visualization"
excerpt: "Choosing the most appropriate visualization for your data."
url: "/data-viz/"
btn_label: "Learn Data Viz"
---
<p>{{ site.description }}</p>
<div id="coding_cards">
{% include feature_row id="coding_cards" type="grid" %}
</div>
<script>
// show the search box after the page has loaded and the search script has initialized
// only show this search box by default on the index page
window.addEventListener("load", function () {
setTimeout(function () {
$(document).ready(function() {
loadSearch();
document.querySelector(".search__toggle").style.display = "none";
document.querySelector(".search-content").classList.add('search-content-hidden');
});
function waitForSearchInput() {
const input = document.querySelector(".ais-search-box--input");
const hits = document.querySelector(".search-hits");
if (!input || !hits) {
setTimeout(waitForSearchInput, 100);
return;
}
// Hide hits initially
hits.style.display = "none";
input.addEventListener("input", function () {
if (input.value.trim().length > 0) {
hits.style.display = "block";
} else {
hits.style.display = "none";
}
});
}
waitForSearchInput();
}, 300);
});
</script>