Skip to content

Navlang is an easy-to-use navigation bar specification language. Its goal is to allow the web designer to create a usable, decent-looking navigation bar with minimal typing or markup creation. For those who want to really fine-tune their navigation, it also allows simple specification of CSS attributes to control the appearance of individual men…

lensovet/navlang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INSTALLATION:
Extract all the files into one directory and open index.html in Firefox 3+ or Safari 4+ (should work in earlier versions; IE currently untested).

RUNNING CODE:
After opening index.html, paste code into the text box and tab/click out of it. The results will be output below. Note that the lj/last.fm/fb navigation bar at the bottom of the page is static and is not affected by any inputs.

FILES:
-parser.js: parses input and generates AST for interpreter
-treewalkers.js: walks the generated AST and creates the CSS/JS/HTML markup corresponding to it. Also contains methods to reposition submenus at runtime as necessary.
-creator.js: convenience methods to generate the navbar for a given input string
-DEMO: contains three demos highlighting the language's features.

A NOTE ON MORE TYPICAL USAGE:
The demo page provides a very convenient and cool way to try out the code and play with it. However, in actual usage, this is obviously impractical. One example of *actual* usage of the language in creating a nav bar is shown in index.html with the static navbar at the bottom of the page. Note that it is generated in <body>'s onload method. Alternatively, separate JavaScript functions could be created and placed in separate files and then imported and invoked "blindly", allowing website managers to have a single .js file holding all of their navigation bars.

About

Navlang is an easy-to-use navigation bar specification language. Its goal is to allow the web designer to create a usable, decent-looking navigation bar with minimal typing or markup creation. For those who want to really fine-tune their navigation, it also allows simple specification of CSS attributes to control the appearance of individual men…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published