Created
November 16, 2018 20:58
-
-
Save firatoezcan/3c5761c1c315a69510b0e152b41a0245 to your computer and use it in GitHub Desktop.
The current code of the dynamic navigation generation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener("DOMContentLoaded", function () { | |
var content = getCorrectContent() | |
var navigation = getCorrectNavigation() | |
var cssRules = [ /* Array containing strings corresponding to CSS rules */ ] | |
init() | |
function init() { | |
addNavigation() | |
addNavigationEvents() | |
addCSSRules(cssRules.join("")) | |
} | |
function addNavigation() { | |
/** | |
* Get the information out of the navigation | |
* Hydrate the templates with the required data | |
* concatenate the templates and prepend it to content | |
**/ | |
} | |
function addNavigationEvents() { | |
// Attach EventListeners to the newly created navigation | |
} | |
function addCSSRules(css) { | |
// Create <style> element and append it to the head | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment