Add ugly quick-nav
This commit is contained in:
@@ -7,6 +7,10 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav>
|
||||
<ul id="navList"></ul>
|
||||
</nav>
|
||||
|
||||
<h1>Keep Talking and Nobody Explodes</h1>
|
||||
|
||||
<section id="sectionWires">
|
||||
|
||||
@@ -80,6 +80,21 @@ h2 {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
nav {
|
||||
background-color: white;
|
||||
border-left: 1px solid black;
|
||||
border-top: 1px solid black;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
#navList {
|
||||
line-height: 150%;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding-left: 0.2em;
|
||||
}
|
||||
|
||||
#sectionWires button {
|
||||
border-color: black;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -26,6 +26,11 @@ $('.jsResetSection').on('click', function () {
|
||||
ktane.resetInputs($(this).closest('section')).filter('[type="text"]').first().focus();
|
||||
});
|
||||
|
||||
$('section').each(function () {
|
||||
var $navList = $('#navList');
|
||||
$navList.append('<li><a href="#' + this.id + '">' + $(this).find('h2').first().text() + '</a></li>');
|
||||
});
|
||||
|
||||
(function () {
|
||||
/**
|
||||
* Wires
|
||||
|
||||
Reference in New Issue
Block a user