You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
loop/index.html

55 lines
1.7 KiB

<!DOCTYPE html>
<html>
<head>
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
<meta charset='UTF-8'>
<link href='http://fonts.googleapis.com/css?family=Volkhov:400,400italic' rel='stylesheet' type='text/css'>
<script src='js/jquery-1.12.2.min.js' type='text/javascript'></script>
<title>Home Page | Loop Habit Tracker</title>
<link href='reset.css' rel='stylesheet' type='text/css'>
<link href='main.css' rel='stylesheet' type='text/css'>
</head>
<body>
<div class='content'>
<h1 id="loop-habit-tracker">Loop Habit Tracker</h1>
<h2 id="home-page">Home Page</h2>
<div id="toc">
</div>
<h3 id="loop-habit-tracker">Loop Habit Tracker</h3>
<h4 id="google-play-store"><a href="https://play.google.com/store/apps/details?id=org.isoron.uhabits">Google Play Store</a></h4>
<h4 id="github-repo"><a href="https://github.com/iSoron/uhabits">GitHub Repo</a></h4>
<h4 id="faq"><a href="faq.html">FAQ</a></h4>
<script type="text/javascript">
var isFirstTitle = true;
var output = "<ul>";
$("h3, h4").each(function(i)
{
var current = $(this);
var isTitle = (current.prop("tagName").toLowerCase() == "h3");
if(isTitle)
{
if(!isFirstTitle)
output += "</ul>";
output += "<li class='header'>" + current.html() + "</li><ul>";
isFirstTitle = false;
}
else
{
current.attr("id", "q" + i);
output += "<li><a id='link" + i + "' href='#q" +
i + "' title='" + current.attr("tagName") + "'>" +
current.html() + "</a></li>";
}
});
output += "</ul></ul>";
console.log(output);
$("#toc").append(output);
</script>
</div>
</body>
</html>