1.7.9 • Published 6 years ago

clientside-view-responsive-header v1.7.9

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

clientside-view-responsive-header

This module utilizes the clientside-require and clientside-view-loader modules (found on NPM) to make it easy to create a stylish and responsive header.

The header expects a structured JSON object to be passed to it, from which it will build the header. The dom that the module produces automatically listens for the window to resize and updates how many elements can be displayed or must be put in the "menu" dropdown based on the window size.

visual demo

clientside-view-responsive-header_demo

short example

the following JSON:

{
    "left" : [
        {
            "description" : "go to home page",
            "html" : "<img height='40px' src = '/path/to/logo.png'>",
            "src" : "/path/to/home.html"
        }
    ],
    "right" : [
        {
            "title" : "Blog",
            "src" : "/path/to/blog.html"
        },
        {
            "html" : "<b>Login</b>",
            "src" : "/path/to/loginpage.html"
        }
    ]
}

creates this result: screenshot_2018-05-16_13-38-24

more examples

please see the demo directory for more examples and usage documentation

Additional Functionality

Each element is provided with a hide() and remove() method. By retreiving the DOM node of a .header_element, you can hide the element from the header dynamically with the hide() method. The hide() method will ensure that the dropdowns reflect whether they have children left or not and that the responsive wrapping functionality is not broken.

For example:

    document.querySelector(".header_element#identifier_for_target_element").hide();

or

    document.getElementById("identifier_for_target_element").hide()
1.7.9

6 years ago

1.7.8

6 years ago

1.7.7

6 years ago

1.7.6

6 years ago

1.7.5

6 years ago

1.7.4

6 years ago

1.7.3

6 years ago

1.7.2

6 years ago

1.7.1

6 years ago

1.7.0

6 years ago

1.6.2

6 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago