theshell.ch/site/_layouts/home.html

98 lines
3.3 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
{% include head.html %}
<body onload="typing_shell()" style="background-color:#000;">
<header class="spec-header">
<div class="menuDesktop" style="background-color:#000;">
<div class="logo">
<div><h1 id="title-home" style="display:inline-block;"></h1><span id="blikli"></span></div>
</div>
<div class="fill-space"></div>
<div class="search-box">
<input type="text" id="search-bar"><label for="search-bar"><img src="/assets/style/search_icon.png"></label>
<ul id="search-results"></ul>
</div>
<nav class="nav-menu">
<div>Learn
<ul>
<li><a href="{{ site.baseurl }}/pages/topic/cmd/basic.html">Basic commands</a></li>
<li><a href="{{ site.baseurl }}/pages/topic/cmd/interm.html">Intermediate commands</a></li>
<li><a href="{{ site.baseurl }}/pages/topic/cmd/advanced.html">Advanced commands</a></li>
<li><a href="{{ site.baseurl }}/pages/topic/fs.html">Filesystem</a></li>
<li><a href="{{ site.baseurl }}/pages/topic/scripts.html">Scripting</a></li>
</ul>
</div>
<code>|</code>
<div>About
<ul>
<li><a href="{{ site.baseurl }}/pages/info/project.html">The project</a></li>
<li><a href="{{ site.baseurl }}/pages/info/people.html">The people</a></li>
<li><a href="{{ site.baseurl }}/pages/topic/about.html">More...</a></li>
</ul>
</div>
</nav>
</div>
</header>
<main class="container">
{{ content }}
</main>
{% include footer.html %}
<script src="https://cdn.rawgit.com/christian-fei/Simple-Jekyll-Search/master/dest/simple-jekyll-search.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var searchBar = document.getElementById('search-bar');
var results = document.getElementById('search-results');
var sjs = SimpleJekyllSearch({
searchInput: searchBar,
resultsContainer: results,
json: '/search.json',
searchResultTemplate:
'<li><a href="{url}"><h3>{title}</h3><h4>{category}</h4></a></li>',
success: function(sr) {
results.setAttribute("class", sr.length <= 1 ? "" : "show");
}
});
searchBar.addEventListener('keypress', function () {
sjs.search();
});
});
// Animated logo
var sentence = ["<span class='NotoSansLight'>t", "h", "e</span>",
"<span class='NotoSansBold'>s", "h", "e", "l", "l</span>"];
var shell = "";
var counter = 0;
function typing_shell() {
if (counter < 8){
write(counter);
counter++;
} else {
document.getElementById("blikli").classList.add("bli");
}
}
setInterval(typing_shell, 200);
function write(position){
shell = shell + sentence[position];
document.getElementById("title-home").innerHTML = shell;
}
var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
var homeVideo = document.getElementById('videoHome');
if (!isChrome) {
homeVideo.play();
document.getElementById('foolChrome').remove();
homeVideo.muted = true;
homeVideo.play();
}
</script>
</body>